mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 14:18:26 +02:00
Dont send invalid kitty-cmd escape code over tty
This commit is contained in:
@@ -85,10 +85,11 @@ func do_chunked_io(io_data *rc_io_data) (serialized_response []byte, err error)
|
|||||||
}
|
}
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
queue_escape_code(chunk)
|
|
||||||
if len(chunk) == 0 {
|
if len(chunk) == 0 {
|
||||||
state = WAITING_FOR_RESPONSE
|
state = WAITING_FOR_RESPONSE
|
||||||
transition_to_read()
|
transition_to_read()
|
||||||
|
} else {
|
||||||
|
queue_escape_code(chunk)
|
||||||
}
|
}
|
||||||
return "", nil
|
return "", nil
|
||||||
}
|
}
|
||||||
@@ -104,10 +105,11 @@ func do_chunked_io(io_data *rc_io_data) (serialized_response []byte, err error)
|
|||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
queue_escape_code(chunk)
|
|
||||||
if len(chunk) == 0 {
|
if len(chunk) == 0 {
|
||||||
state = WAITING_FOR_RESPONSE
|
state = WAITING_FOR_RESPONSE
|
||||||
transition_to_read()
|
transition_to_read()
|
||||||
|
} else {
|
||||||
|
queue_escape_code(chunk)
|
||||||
}
|
}
|
||||||
if state == BEFORE_FIRST_ESCAPE_CODE_SENT {
|
if state == BEFORE_FIRST_ESCAPE_CODE_SENT {
|
||||||
if wants_streaming {
|
if wants_streaming {
|
||||||
|
|||||||
Reference in New Issue
Block a user