Repository: vscode
Issue: Snippet Choice Traps Focus
Labels: bug,snippets

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: **Yes**

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: 1.96.0
- OS Version: Windows 11, and Mac OS 

```
Version: 1.96.0 (user setup)
Commit: 138f619c86f1199955d53b4166bef66ef252935c
Date: 2024-12-11T02:29:09.626Z
Electron: 32.2.6
ElectronBuildId: 10629634
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.22631
```

My extension's Language Server provides snippets to complete function documentation as part of its `textDocument/completion` handler. Here is an example snippet it provides:

```
;---------
; SCOPE:        ${1|PRIVATE,INTERNAL,PUBLIC|}
; DESCRIPTION:  ${2}
; PARAMETERS:
;   subject (${3|I,O,IO|},${4|REQ,OPT|}${5}) - ${6}
;   body (${7|I,O,IO|},${8|REQ,OPT|}${9}) - ${10}
;   inst (${11|I,O,IO|},${12|REQ,OPT|}${13}) - ${14}
;   interval (${15|I,O,IO|},${16|REQ,OPT|}${17}) - ${18}
;${0}
;---------
```

When the user offers the snippet, the content is inserted correctly. However, when they tab to one of the lines below `PARAMETERS:` and stop on any of the `${X|I,O,IO|}` and `${X|REQ,OPT|}` tab choices, they can no longer Shift+Tab to a tab stop before the choice. Interestingly, if the user has reached the `${2}` tab stop, they can tab back to the `$1` choice.  

In order to verify this was not an issue with the extension itself, I copied this snippet to be a user-configured global snippet per [these instructions](https://code.visualstudio.com/docs/editor/userdefinedsnippets#_create-your-own-snippets).

```json
{
	"Function Header": {
		"scope": "",
		"prefix": ";",
		"body": [
			";---------",
			"; SCOPE:        ${1|PRIVATE,INTERNAL,PUBLIC|}",
			"; DESCRIPTION:  ${2}",
			"; PARAMETERS:",
			";   subject (${3|I,O,IO|},${4|REQ,OPT|}${5}) - ${6}",
			";   body (${7|I,O,IO|},${8|REQ,OPT|}${9}) - ${10}",
			";   inst (${11|I,O,IO|},${12|REQ,OPT|}${13}) - ${14}",
			";   interval (${15|I,O,IO|},${16|REQ,OPT|}${17}) - ${18}",
			";${0}",
			";---------"
		]
	}
}
```

Steps to Reproduce:

1. Create this snippet in your global snippet configuration
2. In a new document, accept the snippet
3. Tab to the `I/O/IO` tab choice on the line `subject` parameter.
4. You can no longer shift tab back to `${2}`