VSCodeVim / VSCodeVim/Vim

Pasting over a selection doesn't work while useSystemClipboard is true.

Open
#3,831 0 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 useSystemClipboard is set true, pasting over a selection will yank the selection, but not replace it.

To Reproduce
Steps to reproduce the behavior:

  1. Visually select lines in a buffer using shift-V (and optionally movement keys)
  2. Copy the selection with y
  3. Visually select the block you want to replace using shift-V
  4. Paste over the selection with p
  5. Nothing Appears to happen
  6. Move your curser to a new line
  7. Paste in normal mode with p
  8. You'll see the previous attempt to paste successfully yanked

Expected behavior
Step 5 should have pasted the first selected text block. Step 8 works as expected.

Screenshots
Current Behavior (vim.useSystemClipboard: true)
useSystemClipboard-true

Expected Behavior (vim.useSystemClipboard: false)
useSystemClipboard-false

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 1.8.1
  • VSCode version: 1.35.0
  • OS: macOS Mojave 10.14.5

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

No file or test is named. Reproduce the issue in VSCodeVim with useSystemClipboard enabled, then trace visual-mode p handling and the clipboard/yank path. Done means pasting over a visual selection replaces that selection and a later normal-mode paste still uses the expected text.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.