VSCodeVim / VSCodeVim/Vim

Incorrect cursor position when type hints are present

Open
#7,344 1 comment 4 reactions 0 assignees View on GitHub

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 on the first character of a function argument for which the language extension provides a type hint, the cursor positions itself on the type hint rather than the actual first character. See screen capture below with a Javascript example.

To Reproduce

  1. click on the second character of an argument name
  2. Hit 'h' to move the cursor by one character left
  3. Voilà...

Expected behavior
The cursor should position itself on the first character of the argument name, not on the type hint (herebelow on the "m" of "msg", not on the "e" of the "error:" type hint)

Screenshots
image

Environment (please complete the following information):

  • Extension (VsCodeVim) version: v1.21.10
  • VSCode version: 1.63.2
  • OS: Windows 10

Additional context
ESLint extension from Microsoft v2.2.2, which provides the type hints.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in VSCode 1.63.2 with VSCodeVim v1.21.10 and the ESLint extension v2.2.2, following the three steps in the report. Trace the cursor movement behavior when type hints are visible; done means moving left from the second argument character places the cursor on the argument's first character rather than the hint.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.