[cursor movement] press `escape` will jump to previous position
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
Describe the bug
When triggering the code snippet in insert mode, undo this, then esc to exit insert mode, and the cursor will jump back to the previous position.
Afterwards, you enter insert mode again and use meta/alt + arrow keys to move left or right. As long as you exit insert mode, the cursor will return to its position before entering insert mode.
Unless you reload window, otherwise, any cross-region movement done in insert mode (including alt + arrow keys or cursor movement caused by code completion) will not be preserved in normal mode.
To Reproduce
Steps to reproduce the behavior:
https://github.com/VSCodeVim/Vim/assets/41265413/ad6083eb-f39f-4e9a-9f9f-abaa74ea6126
- Enter insert mode, expand a snippets, then press
escto exit insert mode. The cursor will jump back - Enter insert mode again, and alt + left or + right to move the cursor
- Exit insert mode.
- Cursor will Jump back
Expected behavior
The cursor should remain in the position under insert mode.
Screenshots
See the video above.
Environment (please complete the following information):
- Extension (VsCodeVim) version:v1.26.0
- VSCode version: 1.82.2
- OS:macOS
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in VSCodeVim using the listed snippet, Escape, and Meta/Alt+arrow steps, checking whether the cursor returns to its pre-insert position. Trace the insert-mode exit and cursor movement behavior; done means the cursor remains at its final insert-mode position without requiring a window reload.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- devtools, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100