Cursor position error when it is next to the inlay hint
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 the cursor is next to the inlay hint, there is a 1 character error in the position:

In the image above, the cursor incorrectly treats the colon in the inlay hint as a character and skips the space after the inlay hint.
In addition, this is the behaviour of the vim plugin when it is disabled.

To Reproduce
- Install
rust-analyzerextension - Input code:
struct StructWithLongName {};
fn main() {
let object = StructWithLongName {};
}
Expected behavior
A clear and concise description of what you expected to happen.
Environment (please complete the following information):
- Extension (VsCodeVim) version: 1.24.3
- VSCode version: 1.72.2
- OS: 5.10.154-1-MANJARO
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 cursor-position issue with the rust-analyzer example and compare behavior with the VSCodeVim plugin disabled. Trace the extension's cursor handling around inlay hints; done means the inlay hint's colon is not counted as a document character and the cursor no longer skips the following space.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100