Use a record separator to delimit the start of data

Needed because the user could press keys and send data to the tty
before kitty can send the ssh data
This commit is contained in:
Kovid Goyal
2022-02-24 19:41:21 +05:30
parent 4054163447
commit fda9415873
2 changed files with 13 additions and 5 deletions

View File

@@ -58,7 +58,7 @@ def get_ssh_data(msg: str, shell_integration_dest: str = DEFAULT_SHELL_INTEGRATI
else:
from base64 import standard_b64encode
encoded_data = standard_b64encode(data)
yield f"{len(encoded_data)}:".encode('ascii')
yield f"\036{len(encoded_data)}:".encode('ascii')
yield encoded_data