'reconnect': 'window.reconnect'
}
PREFIX_B64 = 'b64:'
+OSC_52_PREFIX = ']52;c;'
IRCSPEC_LINE_SEPARATOR = b'\r\n'
IRCSPEC_TAG_ESCAPES = ((r'\:', ';'),
n_gotchs_unprocessed -= 1
n_gotchs_unprocessed -= n_chs_blessed_key
if unhandleds:
- if unhandleds[:6] == [93, 53, 50, 59, 99, 59]:
- if len(unhandleds) > 6:
- encoded = ''.join([chr(c) for c in unhandleds[:6]])
- else:
- encoded = ''
+ fused = ''.join([chr(n) for n in unhandleds])
+ if fused.startswith(OSC_52_PREFIX):
+ encoded = fused[len(OSC_52_PREFIX):]
+ if not encoded:
while True:
gotch = self._blessed.getch()
if ord(gotch) == 7:
def cmd__paste(self) -> None:
'Write OSC 52 ? sequence to get encoded clipboard paste into stdin.'
- self._term.write_yx(YX(self._y_status, 0), '\033]52;c;?\007')
+ self._term.write_yx(YX(self._y_status, 0), f'\033{OSC_52_PREFIX}?\007')
self.draw()