Selecting text in visual mode always highlights one additional character
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 I select some text in visual mode, e.g. with viw (not with mouse), it always highlights one extra character/column to the right.
To Reproduce
- In normal mode, go to the first character of a word
- Enter visual mode by pressing
v - Press
e
(The word is selected correctly, but the space after the word is also highlighted.)
Expected behavior
When selecting a word, I would expect something like the following:
But instead it highlights like this:
- Extension (VsCodeVim) version: 1.27.2
- VSCode version: 1.85.1
- OS: Linux Mint 21.2 x86_64 (DE: Cinnamon)
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 with the reported sequence: move to a word, press v, then e, and compare the selection with the expected behavior. Trace the visual-mode selection handling and any related tests; done means selecting the word no longer highlights the following space or column.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100