Add 'wait' action to block until search completion (#4825)

Blocks execution of subsequent actions until the current search
completes, so motion actions operate on the complete result set.

  # Move to the best match only after the search is done
  fzf --bind 'start:change-query(foo)+wait+best'

- Blocks when a search is in progress, will be triggered by preceding
  actions, or the query was edited in the same binding; no-op otherwise
- Initial input load counts as a search in progress, so 'start:wait'
  blocks until the input is fully loaded and searched
- User input ignored while blocked; keys bound to abort/cancel cancel
  the wait and discard pending actions instead
- Debounced feedback after 200ms: dimmed prompt, hidden cursor, and
  (..) on the info line
This commit is contained in:
Junegunn Choi
2026-07-03 08:53:36 +09:00
parent 3c9965a61a
commit afac1644d8
6 changed files with 226 additions and 12 deletions
+2
View File
@@ -1958,6 +1958,8 @@ func parseActionList(masked string, original string, prevActions []*action, putA
} else {
return nil, errors.New("unable to put non-printable character")
}
case "wait":
appendAction(actWait)
case "bell":
appendAction(actBell)
case "exclude":