mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-17 05:54:59 +02:00
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:
@@ -239,6 +239,11 @@ class TestParser(BaseTest):
|
||||
pb('\033]8;moo\x07', ('Ignoring malformed OSC 8 code',))
|
||||
pb('\033]8;id=xyz;\x07', ('set_active_hyperlink', 'xyz', None))
|
||||
pb('\033]8;moo:x=z:id=xyz:id=abc;http://yay;.com\x07', ('set_active_hyperlink', 'xyz', 'http://yay;.com'))
|
||||
c.clear()
|
||||
payload = '1' * 1024
|
||||
pb(f'\033]52;p;{payload}\x07', ('clipboard_control', 52, f'p;{payload}'))
|
||||
c.clear()
|
||||
pb('\033]52;p;xyz\x07', ('clipboard_control', 52, 'p;xyz'))
|
||||
|
||||
def test_desktop_notify(self):
|
||||
reset_registry()
|
||||
|
||||
Reference in New Issue
Block a user