mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-24 01:08:10 +02:00
clipboard kitten: Add a --wait-for-completion option to have the kitten wait till copying to clipboard is complete
Fixes #1693
This commit is contained in:
@@ -214,9 +214,20 @@ class Loop:
|
||||
self.handler.on_text(chunk, self.in_bracketed_paste)
|
||||
|
||||
def _on_dcs(self, dcs):
|
||||
debug(dcs)
|
||||
if dcs.startswith('@kitty-cmd'):
|
||||
import json
|
||||
self.handler.on_kitty_cmd_response(json.loads(dcs[len('@kitty-cmd'):]))
|
||||
elif dcs.startswith('1+r'):
|
||||
from binascii import unhexlify
|
||||
vals = dcs[3:].split(';')
|
||||
for q in vals:
|
||||
parts = q.split('=', 1)
|
||||
try:
|
||||
name, val = parts[0], unhexlify(parts[1]).decode('utf-8', 'replace')
|
||||
except Exception:
|
||||
continue
|
||||
self.handler.on_capability_response(name, val)
|
||||
|
||||
def _on_csi(self, csi):
|
||||
q = csi[-1]
|
||||
|
||||
Reference in New Issue
Block a user