From 8cb53cb5a62025d78b18d30f08e3362406f98390 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 14 May 2024 13:13:17 +0530 Subject: [PATCH] Fix handling of streaming remote command via tty_io that doesnt actually stream anything --- tools/cmd/at/tty_io.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/cmd/at/tty_io.go b/tools/cmd/at/tty_io.go index 2f91283d9..989fa676e 100644 --- a/tools/cmd/at/tty_io.go +++ b/tools/cmd/at/tty_io.go @@ -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)