Skip to content

Fix cursor jump after exiting snippet mode#10034

Open
14-himanshu wants to merge 1 commit into
VSCodeVim:masterfrom
14-himanshu:fix-emmet-cursor-jump
Open

Fix cursor jump after exiting snippet mode#10034
14-himanshu wants to merge 1 commit into
VSCodeVim:masterfrom
14-himanshu:fix-emmet-cursor-jump

Conversation

@14-himanshu

Copy link
Copy Markdown

What this PR does / why we need it:
When an Emmet snippet is expanded, VS Code enters Snippet Mode. Exiting insert mode via the extension previously failed to cancel this Snippet Mode, causing conflicts with the snippet controller that snapped the cursor to the end of the line.

Adding an explicit leaveSnippet command perfectly aligns the extension's behavior with native VS Code, ensuring the cursor stays exactly where it should.

Which issue(s) this PR fixes:
Fixes #1270

Special notes for your reviewer:
N/A

  • Commit messages has a short & issue references when necessary
  • Each commit does a logical chunk of work.
  • It builds and tests pass

When an Emmet snippet is expanded, VS Code enters Snippet Mode. Exiting insert mode via the extension previously failed to cancel this Snippet Mode, causing conflicts with the snippet controller that snapped the cursor to the end of the line.

Adding an explicit `leaveSnippet` command perfectly aligns the extension's behavior with native VS Code, ensuring the cursor stays exactly where it should.

Fixes VSCodeVim#1270
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cursor jumps to end of line after expanding emmet in insert mode and changing to normal mode.

1 participant