mirror of
https://github.com/junegunn/fzf.git
synced 2026-07-10 02:29:14 +08:00
Ignore wait action while already wait-blocked
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user