Fix handling of streaming remote command via tty_io that doesnt actually stream anything

This commit is contained in:
Kovid Goyal 2024-05-14 13:13:17 +05:30
parent 8eb3267fb8
commit 8cb53cb5a6
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -8,6 +8,7 @@ import (
"time"
"kitty/tools/tui/loop"
"kitty/tools/utils"
)
type stream_response struct {
@ -111,7 +112,7 @@ func do_chunked_io(io_data *rc_io_data) (serialized_response []byte, err error)
return err
}
if len(chunk) == 0 {
state = WAITING_FOR_RESPONSE
state = utils.IfElse(state == BEFORE_FIRST_ESCAPE_CODE_SENT && wants_streaming, WAITING_FOR_STREAMING_RESPONSE, WAITING_FOR_STREAMING_RESPONSE)
transition_to_read()
} else {
queue_escape_code(chunk)