VSCodeVim / VSCodeVim/Vim

In a line with indentation, jumping to mark does not work after inserting a new line above

Open
#4,955 3 comments 1 reaction 0 assignees View on GitHub

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
In a line with indentation, jumping to mark (with backtick `) does not work after inserting a new line above

To Reproduce
Steps to reproduce the behavior:

  1. In a line with 4-space indentation, mo somewhere in the middle of this line to set a mark at o
  2. O to create a new line above and enter insert mode
  3. Esc to go back to normal mode
  4. `o to go back to mark o. It will not go back to mark o, instead it will go to a position 4-space to the right of mark o in the same line.

Expected behavior
It should go back to the position of mark o

Environment (please complete the following information):

  • Extension (VsCodeVim) version: v1.14.5
  • VSCode version: 1.46.0
  • OS: Windows 10 Pro

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 mark-jump behavior in VSCodeVim using the listed indentation, O, and `o steps. Trace the mark-jumping and line-insertion handling, then verify that jumping to mark o returns to its original position after the new line is inserted.

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
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.