bugaevc / wl-clipboard

Command-line copy/paste utilities for Wayland
GNU General Public License v3.0
1.62k stars 59 forks source link

neovim yanking appends to last yanked #199

Closed alextrastero closed 10 months ago

alextrastero commented 1 year ago

I have a strange issue happening in neovim. When I yank some lines and paste them in a browser for example, the content is appended to what ever I previously yanked.

this is what happens: yank line 2 paste line 2 in browser yank lines 5 to 6 paste line 2 and then lines 5 to 6 in the next line

i'm using kitty/tmux/neovim and wayland

thanks in advanced to anyone who can help me 🙏🏼

webframp commented 1 year ago

Seeing something weirdly similar wsing WSL2 on Windows 11, see it both in doom emacs and neovim so it doesn't seem related to specific application config.

Behavior I'm seeing:

Before:

  gtk = {enable = true;};

Press yy, followed by p to paste

Actual Result:

  gtk = {enable = true;};  gtk = {enable = true;};^M

Expected Result:

  gtk = {enable = true;};  
  gtk = {enable = true;};

Appreciate any guidance.

webframp commented 1 year ago

fixed in my case on the doom emacs config side by forcing it to use OSC-52 escape codes but this obviously just bypassed wl-copy/wl-paste

bugaevc commented 10 months ago

Hi; could you explain why is it that you think this is an issue with wl-clipboard, rather than with how neovim is using it?

alextrastero commented 10 months ago

True, I have two machines, one using popos and one using ubuntu, popos + this clipboard manager was giving me problems so I thought maybe the issue lies here. I will continue debugging