VSCodeVim / VSCodeVim/Vim

Search and replace finds pattern but doesn't replace it giving an error

Open
#9,241 0 comments 1 reaction 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
When I type :%s/self.seek_to\(offset\)/self.file.seek(SeekFrom::Start(offset))/g with neovim enabled it seems to very quickly flash the error "Pattern not found" while quickly doing the find and replace then because of the error i assume is reverting back the change so it never actually happens. When i turn neovim off and do the same input it works fine.

For anyone wanting to reproduce the bug im replacing self.seek_to(offset) with self.file.seek(SeekFrom::Start(offset)).

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 1.28.0
  • VSCode version: 1.92.2
  • OS: Windows 11

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 command :%s/self.seek_to\(offset\)/self.file.seek(SeekFrom::Start(offset))/g with Neovim enabled, then compare it with Neovim disabled in VSCodeVim 1.28.0. Investigate the search-and-replace path responsible for the transient “Pattern not found” error; done means the replacement is applied without reverting or showing a false error.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.