Ignoring slipped selection after scrolling down extremely fast
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 scrolling down a file extremely fast the extension will go into a state where searching will give a ignoring slipped selection warning, and the cursor will jump back to its original position after pressing escape twice.
To Reproduce
- Add a mapping to move down fast. For example:
nnoremap J 10j
Though I managed to trigger this with 1j as well. Simply using j on the other hand does not trigger it.
2. Go to a file that does not fit on a single page. Two screens long should be enough to trigger the bug.
3. Scroll down by holding down the mapped key. Note that I have my Windows modified for rapid repeated keys. I'm not sure if that is necessary to trigger this, or if the normal repeated key interval will suffice.
4. Press Ctrl + F for search.
5. Search anything away from where your cursor is currently at.
6. Press escape twice.
7. The cursor jumps back to its old position.
When you search a warning triggers: Ignoring slipped selection: [49, 51; 49, 52] appear.
Expected behavior
When pressing escape twice I expect my cursor to stay in the position where it was placed as a result of searching.
Screenshots
Searching for b and then pressing escape twice.
Environment (please complete the following information):
- Extension (VsCodeVim) version: V1.27.3
- VSCode version: 1.91.1
- OS: Windows 10
Additional context
This is a terrible type of bug, because it makes me distrust my editor. Every time I press escape after a search I need to hope that it will not jump back. If anyone has a quick fix for me, that would also be great.
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 VS Code using the documented J or 1j mapping, rapid scrolling, search, and two Escape presses; begin by tracing the search and Escape handling associated with the “Ignoring slipped selection” warning. Done means the cursor remains at the search result instead of returning to its prior position.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100