mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-17 14:04:52 +02:00
Fix some responses from terminal sometimes leaking into shell on after kitten exit
Always do a roundtrip at kitten exit, except for special purpose kittens. This slows down exit by one round trip time (capped at 2 seconds), however it ensures that we never get terminal response leak. Fixes #9839
This commit is contained in:
@@ -32,13 +32,14 @@ func do_chunked_io(io_data *rc_io_data) (serialized_response []byte, err error)
|
||||
// arrives, leading to the notification being sent to whatever is executed
|
||||
// after us. Similarly no focus tracking.
|
||||
lp, err := loop.New(loop.NoAlternateScreen, loop.NoRestoreColors, loop.NoInBandResizeNotifications, loop.NoFocusTracking)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
if io_data.on_key_event != nil {
|
||||
lp.FullKeyboardProtocol()
|
||||
} else {
|
||||
lp.NoKeyboardStateChange()
|
||||
}
|
||||
if err != nil {
|
||||
return
|
||||
lp.NoRoundtripToTerminalOnExit = true
|
||||
}
|
||||
|
||||
const (
|
||||
|
||||
Reference in New Issue
Block a user