This commit is contained in:
Kovid Goyal
2026-04-10 15:32:27 +05:30
parent 5e158f90a7
commit 3fe884a29a
8 changed files with 23 additions and 18 deletions

View File

@@ -27,19 +27,15 @@ func is_stream_response(serialized_response []byte) bool {
func do_chunked_io(io_data *rc_io_data) (serialized_response []byte, err error) {
serialized_response = make([]byte, 0)
// we cant do inbandresize notification as in the --no-response case the
// command can cause a resize and the loop can quit before the notification
// 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)
lp, err := loop.NewForSimpleInteraction()
if err != nil {
return
}
if io_data.on_key_event != nil {
lp.FullKeyboardProtocol()
lp.NoRoundtripToTerminalOnExit = false
} else {
lp.NoKeyboardStateChange()
lp.NoRoundtripToTerminalOnExit = true
}
const (