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, including --expect keys; keys bound
  to abort/cancel cancel the wait and discard pending actions instead
- Actions deferred by the wait survive across nested lists (trigger
  chords) and cancel/re-arm chains
- Debounced feedback after 200ms: dimmed prompt, hidden cursor, and
  (..) on the info line
This commit is contained in:
Junegunn Choi
2026-07-05 11:22:02 +09:00
parent 9e2856559d
commit 8ec443ba40
6 changed files with 303 additions and 19 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":