VSCodeVim / VSCodeVim/Vim

Attempting a replace in selected lines for a pattern that is not found causes VSCodeVim to stop working

Open
#7,499 5 comments 0 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 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:

  1. Visually select at least one line in a file. Example line:
some text
  1. Try to search for a regex that does not match anything in the line, like:
:'<,'>s/^\d//g
  1. 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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.