mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 22:28:24 +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:
@@ -26,10 +26,11 @@ func main(cmd *cli.Command, opts *Options, args []string) (rc int, err error) {
|
||||
queries[i] = x
|
||||
}
|
||||
}
|
||||
lp, err := loop.New(loop.NoAlternateScreen, loop.NoKeyboardStateChange, loop.NoMouseTracking, loop.NoRestoreColors, loop.NoInBandResizeNotifications)
|
||||
lp, err := loop.New(loop.NoAlternateScreen, loop.NoKeyboardStateChange, loop.NoMouseTracking, loop.NoRestoreColors, loop.NoInBandResizeNotifications, loop.NoFocusTracking)
|
||||
if err != nil {
|
||||
return 1, err
|
||||
}
|
||||
lp.NoRoundtripToTerminalOnExit = true
|
||||
timed_out := false
|
||||
lp.OnInitialize = func() (string, error) {
|
||||
lp.QueryTerminal(queries...)
|
||||
|
||||
Reference in New Issue
Block a user