Skip to content

Visual commenting messes up unnamed register #69

@kristijanhusak

Description

@kristijanhusak

Hi,

Today I noticed that something strange was happening with my clipboard. I was commenting a lot of lines in and out to test something, and my unnamed clipboard constantly changed. Then I figured out that kommentary is somehow overriding my unnamed registry.

Steps to reproduce:

  • Open some file, select anything, yank it into unnamed register with "+y
  • Select some other lines, do gc to comment them out
  • Try pasting unnamed register with "+p, see the result

Expected: See the thing I initially put into the register
Actual: I get the lines that I commented out.

Here's the gif reproducing the issue (you can see what I'm typing in bottom right corner):
kommentary-issue

I wasn't able to find anywhere in the code where anything is done with the unnamed register, but I didn't look into too much details.

Here's some more information:

  • OS: Linux
  • Neovim version: 0.6.0-dev (Latest master)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions