Navigating to search result with shortcut and pressing any key returns to previous cursor location
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:
- Open editor and position cursor somewhere
- Run global text search (cmd+shift+f)
- Navigate to a search result (in the same or a different file) via keyboard (cmd+arrows, enter)
- 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
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 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