m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-16 23:33:39 -05:00

[vim] Add 'exit' callback

A spec can have `exit` callback that is called with the exit status of fzf.
This can be used to clean up temporary resources or restore the original
state when fzf is closed without a selection.
This commit is contained in:
Junegunn Choi
2024-08-19 20:51:08 +09:00
parent 5cce17e80a
commit 8cb59e6fca
4 changed files with 15 additions and 15 deletions

View File

@@ -306,8 +306,9 @@ The following table summarizes the available options.
`source` | string | External command to generate input to fzf (e.g. `find .` )
`source` | list | Vim list as input to fzf
`sink` | string | Vim command to handle the selected item (e.g. `e` , `tabe` )
`sink` | funcref | Reference to function to process each selected item
`sink` | funcref | Function to be called with each selected item
`sinklist` (or `sink*` ) | funcref | Similar to `sink` , but takes the list of output lines at once
`exit` | funcref | Function to be called with the exit status of fzf (e.g. 0, 1, 2, 130)
`options` | string/list | Options to fzf
`dir` | string | Working directory
`up` / `down` / `left` / `right` | number/string | (Layout) Window position and size (e.g. `20` , `50%` )