Ignore wait action while already wait-blocked
CodeQL / Analyze (go) (push) Has been cancelled
build / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled

actWait is handled in doActions before the waitBlocked guard in
doAction, so a binding containing wait could reset waitBlockedAt,
overwrite pendingActions, and spawn extra debounce goroutines while
blocked. Ignore it, consistent with how other input is dropped while
waiting.
This commit is contained in:
Junegunn Choi
2026-06-29 09:22:50 +09:00
parent 5b4afa0447
commit 206f5877c0
+4
View File
@@ -6661,6 +6661,10 @@ func (t *Terminal) Loop() error {
currentIndex := t.currentIndex()
for i, action := range actions {
if action.t == actWait {
// Already waiting; ignore so input can't reset the blocked state
if t.waitBlocked {
return true
}
// Block if search is in progress or will be triggered
if changed || newCommand != nil || t.searchInProgress {
t.waitBlocked = true