Fix usage of chunk_num

This commit is contained in:
Kovid Goyal 2022-04-13 20:16:51 +05:30
parent a1bfcd9fc5
commit 4b7c50518e
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 2 additions and 2 deletions

View File

@ -1022,7 +1022,7 @@ class Window:
num, rest = msg.split(':', 1)
if num == '0' or len(self.current_clone_data) > 1024 * 1024:
self.current_clone_data = ''
self.current_clone_data += msg
self.current_clone_data += rest
def handle_remote_askpass(self, msg: str) -> None:
from .shm import SharedMemory

View File

@ -370,7 +370,7 @@ clone-in-kitty() {
while [ $pos -lt ${#data} ]; do
builtin local chunk="${data:$pos:2048}"
pos=$(($pos+2048))
builtin print -nu "$_ksi_fd" '\eP@kitty-clone|'"${chunk}:"'\e\\'
builtin print -nu "$_ksi_fd" -f '\eP@kitty-clone|%s:%s\e\\' "${chunk_num}" "${chunk}"
chunk_num=$(($chunk_num+1))
done
builtin print -nu "$_ksi_fd" '\eP@kitty-clone|\e\\'