Cancel key reading when 'execute' triggered via a server request (#4653)
CodeQL / Analyze (go) (push) Has been cancelled
build / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled
Generate Sponsors README / deploy (push) Has been cancelled

Fix #4524
Close #4648
This commit is contained in:
Junegunn Choi
2026-01-09 00:29:40 +09:00
committed by GitHub
parent 3c7cbc9d47
commit 3f94bcb5bf
8 changed files with 175 additions and 42 deletions
+8 -1
View File
@@ -5615,7 +5615,7 @@ func (t *Terminal) Loop() error {
select {
case <-ctx.Done():
return
case t.keyChan <- t.tui.GetChar():
case t.keyChan <- t.tui.GetChar(t.listenAddr != nil):
}
}
}()
@@ -5702,6 +5702,13 @@ func (t *Terminal) Loop() error {
}
}
}
for _, action := range actions {
if action.t == actExecute {
t.tui.CancelGetChar()
break
}
}
case callback := <-t.callbackChan:
event = tui.Invalid.AsEvent()
actions = append(actions, &action{t: actAsync})