Attempting a replace in selected lines for a pattern that is not found causes VSCodeVim to stop working
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 you select a few lines and then try to replace something in the selected lines that does not match the regex provided, VSCodeVim seemingly stops working.
To Reproduce
Steps to reproduce the behavior:
- Visually select at least one line in a file. Example line:
some text
- Try to search for a regex that does not match anything in the line, like:
:'<,'>s/^\d//g
- VSCodeVim/navigation stops working until you restart VSCode.
Expected behavior
I would imagine that VSCodeVim would just give an error back to the user. This is what vim/neovim does with the same text
Here's a recording of the issue:
https://user-images.githubusercontent.com/8128941/153974395-2cb400cb-26de-4230-b2f5-ffd379adf23f.mp4
Environment (please complete the following information):
- Extension (VsCodeVim) version: 1.22.1
- VSCode version: 1.64.2
- OS: macOS 12.2
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 visual-selection substitution command :'<,'>s/^\d//g in VSCodeVim and trace the handling of a pattern with no matches. Confirm the failure path against Vim/neovim behavior; done means an appropriate error is shown and VSCodeVim navigation continues without restarting VSCode.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100