`gi` goes to incorrect position after brace completion
Open
Nobody has claimed this yet.
kind/bug
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
Describe the bug
The position where gi goes to insert is slightly off, if the last insert had brace completion: it is after the brace, also if exit insert mode is done within the brace.
To Reproduce
Steps to reproduce the behavior:
- Goto insert mode
- type: foo('bar') and exit insert mode after "r" from bar. Cursor should be on r.
- you need brace completion, so that ') is inserted by vscode
- use "gi": it will start the insert after ")"
Expected behavior
Insert should start after "r"
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 sequence in VS Code with brace completion enabled: insert foo('bar'), exit after the r, then invoke gi. Trace the gi handling and cursor position used after insert mode exits; done means gi begins insertion after the r rather than after the automatically inserted closing brace.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100