mirror of
https://github.com/junegunn/fzf.git
synced 2026-07-22 16:10:36 +08:00
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:
@@ -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":
|
||||
|
||||
Reference in New Issue
Block a user