You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With a small scrollback it works great, but with a big scrollback it consistently fails to copy the whole scrollback, instead truncating the end of the scrollback at non-deterministic positions 😕.
For example, after ls -la /usr/bin (2800 lines), when pressing kitty_mod+a,
First press yields 2122 lines
Second press yields 317 lines
Third press yields 2635 lines
I'm using kitty master @ 4faf71b under Ubuntu 19.04, my shell is fish 3.0.2 .
Note: this is a followup of [Help] Map key to copying whole scrollback to clipboard, where I asked for advice to achieve the same result, using xclip/xsel. It worked, until it didn't, for reasons I didn't investigate, so I moved to kitten clipboard and was happy, then I noticed this problem.
The text was updated successfully, but these errors were encountered:
Does using the clipboard kitten directly with a large text file work?
kitty +kitten clipboard < some text file
@kovidgoyal yes this works consistently (same test case, with a ls.txt containing the same 2800 lines of ls -la /usr/bin/). Problem happens only when invoking the kitten from a binding, which opens a transient tab which gets closed after a few milliseconds. Maybe the transient tab is closed too soon / fails to wait for the kitten to finish?
And with that additional information, maybe my initial xsel-based solution actually suffers from the same problem?
@kovidgoyal I compiled 84fcabe and updated my config to map kitty_mod+a pipe @text tab kitty +kitten clipboard --wait-for-completion. Although it visibly waits, it now fails differently, truncating the beginning of a big scrollback and only keeping the end. In a terminal with a big scrollback of several ls -la /usr/bin, I get three only-slightly different outputs in my clipboard:
First run: 11871 lines, 744.285 bytes.
Second run: 11878 lines, 744.758 bytes.
Third run: 11876 lines, 744.638 bytes.
My scrollback_lines is currently set to 100000, so it shouldn't be the problem.
@kovidgoyal yes! That works muuuuuch better, it's reliable, flicker-less, and fast. Sorry, had focused on the first commit with --wait-for-completion but didn't see the contents of the second, adding the pipe command to send to clipboard.
Thanks for the fix and for the continued work on kitty 🙏 ! Good day/night.