VSCodeVim / VSCodeVim/Vim

Yanking with `:g[lobal]` command misbehave (neovim integration)

Open
#4,708 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/commandline area/neovim kind/bug
Dominant language
TypeScript
Stars
15.2k
Forks
1.5k
Avg merge
3d 18h
Merged PRs (30d)
6

Description

Describe the bug
Yanking with the global command always put everything into the default register, and the 'append to register' command always add a copy of the last item to the beginning of the register.

To Reproduce
Content in a buffer:

pattern 1
pattern 2
pattern 3
pattern 4
another text 1
another text 

Commands:

  1. :g/pattern/y a
  2. :g/pattern/y A

Expected behavior

  1. a register content: pattern 4
  2. a register content:
pattern 1
pattern 2
pattern 3
pattern 4

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 1.13.1
  • VSCode version: 1.43.2
  • OS: Win10 x64
  • NVIM: 0.4.3

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

Start by tracing how the :g command handles y with lowercase and uppercase register names in the Neovim integration. Reproduce the two commands from the issue and verify that register a first contains the final matching line, then contains all four matching lines in order without an extra copy.

Written by the indexing model from the issue text.

Assessment

Tech stack
neovim, typescript
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.