VSCodeVim / VSCodeVim/Vim

Cursor position doesn't respect non-VIM cursor movements such as Cmd-Right

Open
#6,345 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status/already-resolved
Dominant language
TypeScript
Stars
15.2k
Forks
1.5k
Avg merge
3d 18h
Merged PRs (30d)
6

Description

Firstly, thanks for the great plugin and I love using it, it makes using VS Code so much nicer ❤️

Describe the bug
Cursor is moved incorrectly after using non-Vim cursor movements

To Reproduce
Steps to reproduce the behavior:

  1. Have some text such as "Hello world"
  2. Enter insert mode
  3. Put the cursor in the middle of the line, e.g. "Hel|lo world"
  4. Use some OS cursor movement command, such as Cmd-Right to go to the end of the line, or Opt-Right to go to the end of the word
  5. Use the cursor keys to move left or right
  6. The cursor movement in step 5 is applied from the position of the cursor before step 4, and doesn't respect the new position.

The problem does not happen in Normal mode.

Expected behavior
The cursor movement in step 5 moves from the new position of the cursos

Screenshots
Kapture 2021-03-25 at 10 12 42

Environment (please complete the following information):

  • Extension Name: vim
  • Extension Version: 1.19.1 and 1.20.0
  • OS Version: Darwin x64 19.6.0
  • VSCode version: 1.54.3
{
	"messages": [],
	"activationTimes": {
		"codeLoadingTime": 30,
		"activateCallTime": 1,
		"activateResolvedTime": 125,
		"activationReason": {
			"startup": true,
			"extensionId": {
				"value": "vscodevim.vim",
				"_lower": "vscodevim.vim"
			},
			"activationEvent": "*"
		}
	},
	"runtimeErrors": []
}

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

Start by reproducing the issue in insert mode with Cmd-Right or Opt-Right, then inspect how VS Code cursor movements are synchronized with the Vim cursor state. Done means subsequent left and right cursor-key movements use the new position after an OS movement, while normal-mode behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
developer-experience
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.