vimperator-labs icon indicating copy to clipboard operation
vimperator-labs copied to clipboard

Yank to both PRIMARY and CLIPBOARD in visual mode (X11)

Open dkasak opened this issue 10 years ago • 5 comments

If I enter caret mode ('c') and then visual mode ('v') on a page, select some text and then press 'y', the result only gets yanked to the PRIMARY register on X11. This is unlike y, Y, ;y and ;Y which yank to both PRIMARY and CLIPBOARD. The desired behaviour would be to consistent and yank to both.

I suppose it would also be nice if X11 users could specify the register(s) to which the commands should yank through an option, but it's not essential.

dkasak avatar Feb 20 '15 11:02 dkasak

I'm not sure why, but it seems to use both primary and clipboard in my setup (KDE). Might be something that Klipper or any other clipboard relation thing in KDE does, but I don't have it set to synchronize "contents of the clipboard and the selection".

Another thing I noticed is that when just selecting text in caret mode it tends to fill up the clipboard:

klipper

This might not be very helpful, but thought I'd mention it in case anyone else wanted to try.

timss avatar Feb 20 '15 13:02 timss

For what it's worth, I'm using a bare xmonad with no desktop environment.

dkasak avatar Feb 20 '15 13:02 dkasak

caret to visual yanks to both primary and clipboard for me as well. using i3wm with no desktop environment.

mrjovanovic avatar Oct 27 '15 05:10 mrjovanovic

May or may not be related to #633. They seem too similar to discount the possibility without SME knowledge of the underpinnings. BTW, I've seen the issue in #633 for quite a while (many months, conceivably even to the vintage of this ticket,) but I never investigated, always attributing it to me needing to read the documentation better.

nschley avatar Oct 25 '16 14:10 nschley

@timss @mrjovanovic That might be related to your clipboard managers.

PRIMARY selection: Is updated every time a selection changes (e.g. in visual mode after every movement). It just stores a reference to the selection and during paste the content is requested from the application that hast the selection.

CLIPBOARD: The content is sent to the X server on copy/cut. The source application isn't involved in further access to the clipboard.

Some clipboard managers merge primary selection and clipboard. So if you select a text character by character it will "fill" the history of the combined clipboard.

I tried to select text in visual mode. The secondary selection is updated on every movement as expected. The clipboard is updated once I've pressed y. So it seems like everything is ok.

SammysHP avatar Nov 09 '16 13:11 SammysHP