Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong selection after undoing TextEditor.insertSnippet #170041

Closed
Gregoor opened this issue Dec 26, 2022 · 0 comments
Closed

Wrong selection after undoing TextEditor.insertSnippet #170041

Gregoor opened this issue Dec 26, 2022 · 0 comments
Assignees
Labels
api bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders snippets verified Verification succeeded

Comments

@Gregoor
Copy link

Gregoor commented Dec 26, 2022

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.74.2
  • OS Version: MacOS Ventura 13.0

Steps to Reproduce:

  1. Build an extension that adds a command, calling TextEditor.insertSnippet. The call should provide a range to be replaced. e.g. insertSnippet("${0:hi}", new vscode.Selection(new vscode.Position(0, 1), new vscode.Position(0, 4)))
  2. Make a range selection and then call the snippet-inserting command
  3. Undo that change
  4. The selection is now with the parts that have previously been replaced, instead of the selection pre-insertSnippet
@jrieken jrieken added the bug Issue identified by VS Code Team member as probable bug label Dec 4, 2023
@jrieken jrieken added this to the December 2023 milestone Dec 4, 2023
jrieken added a commit that referenced this issue Dec 4, 2023
@jrieken jrieken closed this as completed in dc732fc Dec 4, 2023
@vscodenpa vscodenpa added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Dec 4, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jan 19, 2024
@amunger amunger added the verified Verification succeeded label Jan 25, 2024
@aiday-mar aiday-mar added this to the December / January 2024 milestone Feb 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders snippets verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants