Get rid of kitty's special OSC 52 protocol

A better solution from an ecosystem perspective is to just work with the
original protocol. I have modified kitty's escape parser to special case
OSC 52 handling without changing its max escape code size.

Basically, it works by splitting up OSC 52 escape codes longer than the
max size into a series of partial OSC 52 escape codes. These get
dispatched to the UI layer where it accumulates them upto the 8MB limit
and then sends to clipboard when the partial sequence ends.

See https://github.com/ranger/ranger/issues/1861
This commit is contained in:
Kovid Goyal
2021-07-23 22:12:04 +05:30
parent 096c4c78c7
commit 8f214c51c0
12 changed files with 147 additions and 71 deletions

View File

@@ -16,6 +16,12 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
- When opening hyperlinks, allow defining open actions for directories
(:pull:`3836`)
- When using the OSC 52 escape code to copy to clipboard allow large
copies (up to 8MB) without needing a kitty specific chunking protocol.
Note that if you used the chunking protocol in the past, it will no longer
work and you should switch to using the unmodified protocol which has the
advantage of working with all terminal emulators.
- Fix a bug in the implementation of the synchronized updates escape code that
could cause incorrect parsing if either the pending buffer capacity or the
pending timeout were exceeded (:iss:`3779`)