VSCodeVim / VSCodeVim/Vim

Navigating to search result with shortcut and pressing any key returns to previous cursor location

Open
#7,617 1 comment 8 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
If I run a global text search (cmd+shift+f) and navigate to a result via the keyboard (cmd+arrows, enter) the cursor is visibly positioned in the editor corresponding to the search result. But pressing anything (cursor movement, insert) returns it to the previous position.

To Reproduce
Steps to reproduce the behavior:

  1. Open editor and position cursor somewhere
  2. Run global text search (cmd+shift+f)
  3. Navigate to a search result (in the same or a different file) via keyboard (cmd+arrows, enter)
  4. Try to move the cursor or insert a character

Expected behavior
The cursor stays in the new location / doesn't jump back to the location where it was before running the search.

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 1.22.2
  • VSCode version: 1.66.0
  • OS: MacOS 12.1

Additional context
I just noticed that restarting VSCode fixes it. Or at least did this one time. I remember having had this issue several times, between restarts.

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 this in VSCodeVim using global text search (cmd+shift+f), keyboard navigation (cmd+arrows, enter), and then cursor movement or insertion. Compare the cursor location before and after the search result is selected, including navigation within the same and a different file. Done means editing stays at the selected search result instead of returning to the pre-search location.

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
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.