Text is inserted to the right of the cursor and cursor does not move with the text in Insert mode
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
I am not sure if I have stumbled upon some hidden Vim shortcut (is maybe similar to Replace functionality) but when entering Insert mode randomly it happens that the cursor becomes stuck in place, and all text is inserted to the right of the cursor, but the cursor position is not update.
Ultimately this means that all text that I insert is then written backwards which is extremely annoying (as one can imagine)
Please someone tell me I am being an idiot and accidentally triggering some command :D
I have not found a way to reverse this behavior other than restarting my machine.
To Reproduce
Steps to reproduce the behavior:
Unfortunately no known repro steps - will keep log level on Debug for longer and when it happens again can add them here.
Expected behavior
While in insert mode, the cursor select handler should move to the right of the inserted text.
Environment (please complete the following information):
- Extension (VsCodeVim) version: 1.27.3
- VSCode version: 1.90.2
- OS: Windows 11 10.0.22631 Build 22631
Additional context
2024-07-01 13:20:47.032 [debug] Handling key: A
2024-07-01 13:20:47.034 [debug] Status bar: -- INSERT --
2024-07-01 13:20:48.597 [debug] Handling key: j
2024-07-01 13:20:48.598 [debug] Adding Transformation {"type":"insertTextVSCode","text":"j","isMultiCursor":false}
2024-07-01 13:20:48.605 [debug] 1 change(s) to c:<file-path> because undefined
2024-07-01 13:20:48.606 [debug] Selection change: [206, 17], [206, 17], SelectionsLength: 1
2024-07-01 13:20:48.608 [debug] Selection change: [206, 16], [206, 16], SelectionsLength: 1
2024-07-01 13:20:48.608 [debug] Selections: Changing Cursors from selection handler... [206, 16], [206, 16]
2024-07-01 13:21:10.823 [debug] Handling key: f
2024-07-01 13:21:10.824 [debug] Set nextStepStartPosition to [206, 16]
2024-07-01 13:21:10.824 [debug] Adding Transformation {"type":"insertTextVSCode","text":"f","isMultiCursor":false}
2024-07-01 13:21:10.847 [debug] 1 change(s) to c:<file-path>
2024-07-01 13:21:10.849 [debug] Selection change: [206, 17], [206, 17], SelectionsLength: 1
2024-07-01 13:21:10.849 [debug] Selections: Changing Cursors from selection handler... [206, 17], [206, 17]
2024-07-01 13:21:10.849 [debug] Selection change: [206, 16], [206, 16], SelectionsLength: 1
2024-07-01 13:21:10.849 [debug] Selections: Changing Cursors from selection handler... [206, 16], [206, 16]
2024-07-01 13:21:16.488 [debug] Handling key: d
2024-07-01 13:21:16.489 [debug] Adding Transformation {"type":"insertTextVSCode","text":"d","isMultiCursor":false}
2024-07-01 13:21:16.492 [debug] 1 change(s) to c:<file-path>
2024-07-01 13:21:16.493 [debug] Selection change: [206, 17], [206, 17], SelectionsLength: 1
2024-07-01 13:21:16.493 [debug] Selections: Changing Cursors from selection handler... [206, 17], [206, 17]
2024-07-01 13:21:16.493 [debug] Selection change: [206, 16], [206, 16], SelectionsLength: 1
2024-07-01 13:21:16.494 [debug] Selections: Changing Cursors from selection handler... [206, 16], [206, 16]
2024-07-01 13:21:18.345 [debug] Handling key: s
2024-07-01 13:21:18.345 [debug] Adding Transformation {"type":"insertTextVSCode","text":"s","isMultiCursor":false}
2024-07-01 13:21:18.349 [debug] 1 change(s) to c:<file-path>
2024-07-01 13:21:18.350 [debug] Selection change: [206, 17], [206, 17], SelectionsLength: 1
2024-07-01 13:21:18.351 [debug] Selections: Changing Cursors from selection handler... [206, 17], [206, 17]
2024-07-01 13:21:18.351 [debug] Selection change: [206, 16], [206, 16], SelectionsLength: 1
2024-07-01 13:21:18.351 [debug] Selections: Changing Cursors from selection handler... [206, 16], [206, 16]
2024-07-01 13:21:19.590 [debug] Handling key: d
2024-07-01 13:21:19.591 [debug] Adding Transformation {"type":"insertTextVSCode","text":"d","isMultiCursor":false}
2024-07-01 13:21:19.594 [debug] 1 change(s) to c:<file-path>
2024-07-01 13:21:19.595 [debug] Selection change: [206, 17], [206, 17], SelectionsLength: 1
2024-07-01 13:21:19.595 [debug] Selections: Changing Cursors from selection handler... [206, 17], [206, 17]
2024-07-01 13:21:19.596 [debug] Selection change: [206, 16], [206, 16], SelectionsLength: 1
2024-07-01 13:21:19.596 [debug] Selections: Changing Cursors from selection handler... [206, 16], [206, 16]
2024-07-01 13:21:19.977 [debug] Handling key: f
2024-07-01 13:21:19.978 [debug] Adding Transformation {"type":"insertTextVSCode","text":"f","isMultiCursor":false}
2024-07-01 13:21:19.982 [debug] 1 change(s) to c:<file-path>
2024-07-01 13:21:19.984 [debug] Selection change: [206, 17], [206, 17], SelectionsLength: 1
2024-07-01 13:21:19.984 [debug] Selections: Changing Cursors from selection handler... [206, 17], [206, 17]
2024-07-01 13:21:19.985 [debug] Selection change: [206, 16], [206, 16], SelectionsLength: 1
2024-07-01 13:21:19.985 [debug] Selections: Changing Cursors from selection handler... [206, 16], [206, 16]
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
No source file or test is named. Start by reproducing the behavior in Insert mode on the listed VSCodeVim and VSCode versions, then trace the selection-handler events corresponding to the provided debug log. Done means inserted text advances the cursor normally and a regression test covers the behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100