kovidgoyal / kitty

Cross-platform, fast, feature-rich, GPU based terminal
https://sw.kovidgoyal.net/kitty/
GNU General Public License v3.0
24.33k stars 977 forks source link

Copy selection to clipboard appends, does not replace #1951

Closed eprislac closed 5 years ago

eprislac commented 5 years ago

Selecting text to copy to clipboard appends text to whatever's currently in the clipboard, rather than replacing it.

On: MacOS 10.14.6

eprislac commented 5 years ago

Closed, read through the config instructions and found a solution

blueyed commented 4 years ago

@eprislac you could have left a reference to what you've found.. ;)

Came here, since within tmux yanking appended to my system clipboard, which can be changed in kitty: https://sw.kovidgoyal.net/kitty/conf.html?highlight=clipboard#opt-kitty.clipboard_control (or use set -g set-clipboard off to disable it in tmux)

alecandido commented 2 years ago

In particular, on kitty 0.21.2 (current version for Ubuntu package), I found the solution in the comment in the default config file (rather than in the online pages):

#: Allow programs running in kitty to read and write from the
#: clipboard. You can control exactly which actions are allowed. The
#: set of possible actions is: write-clipboard read-clipboard write-
#: primary read-primary. You can additionally specify no-append to
#: disable kitty's protocol extension for clipboard concatenation. The
#: default is to allow writing to the clipboard and primary selection
#: with concatenation enabled. Note that enabling the read
#: functionality is a security risk as it means that any program, even
#: one running on a remote server via SSH can read your clipboard.

So, adding no-append to the list:

clipboard_control write-clipboard write-primary no-append

definitely solved my problem.

I thought it was an issue with tmux for a long time, this issue has been helpful.