mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-27 18:51:41 +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:
@@ -21,11 +21,12 @@ func DetectSupport(timeout time.Duration) (memory, files, direct bool, err error
|
||||
temp_files_to_delete := make([]string, 0, 8)
|
||||
shm_files_to_delete := make([]shm.MMap, 0, 8)
|
||||
var direct_query_id, file_query_id, memory_query_id uint32
|
||||
lp, e := loop.New(loop.NoAlternateScreen, loop.NoRestoreColors, loop.NoMouseTracking, loop.NoInBandResizeNotifications)
|
||||
lp, e := loop.New(loop.NoAlternateScreen, loop.NoRestoreColors, loop.NoMouseTracking, loop.NoInBandResizeNotifications, loop.NoFocusTracking)
|
||||
if e != nil {
|
||||
err = e
|
||||
return
|
||||
}
|
||||
lp.NoRoundtripToTerminalOnExit = true
|
||||
print_error := func(format string, args ...any) {
|
||||
lp.Println(fmt.Sprintf(format, args...))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user