File tree 3 files changed +8
-6
lines changed
3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -283,7 +283,7 @@ The following table summarizes the available options.
283
283
| ` source ` | list | Vim list as input to fzf |
284
284
| ` sink ` | string | Vim command to handle the selected item (e.g. ` e ` , ` tabe ` ) |
285
285
| ` sink ` | funcref | Reference to function to process each selected item |
286
- | ` sink* ` | funcref | Similar to ` sink ` , but takes the list of output lines at once |
286
+ | ` sinklist ` (or ` sink* ` ) | funcref | Similar to ` sink ` , but takes the list of output lines at once |
287
287
| ` options ` | string/list | Options to fzf |
288
288
| ` dir ` | string | Working directory |
289
289
| ` up ` /` down ` /` left ` /` right ` | number/string | (Layout) Window position and size (e.g. ` 20 ` , ` 50% ` ) |
@@ -387,7 +387,7 @@ command! -bang -complete=dir -nargs=? LS
387
387
388
388
- ` g:fzf_layout `
389
389
- ` g:fzf_action `
390
- - ** Works only when no custom ` sink ` (or ` sink* ` ) is provided**
390
+ - ** Works only when no custom ` sink ` (or ` sinklist ` ) is provided**
391
391
- Having custom sink usually means that each entry is not an ordinary
392
392
file path (e.g. name of color scheme), so we can't blindly apply the
393
393
same strategy (i.e. ` tabedit some-color-scheme ` doesn't make sense)
Original file line number Diff line number Diff line change @@ -300,7 +300,7 @@ The following table summarizes the available options.
300
300
`source ` | list | Vim list as input to fzf
301
301
`sink` | string | Vim command to handle the selected item (e.g. `e ` , `tabe ` )
302
302
`sink` | funcref | Reference to function to process each selected item
303
- `sink * ` | funcref | Similar to `sink` , but takes the list of output lines at once
303
+ `sinklist ` (or `sink * ` ) | funcref | Similar to `sink` , but takes the list of output lines at once
304
304
`options ` | string/list | Options to fzf
305
305
`dir ` | string | Working directory
306
306
`up ` / `down` / `left ` / `right ` | number/string | (Layout) Window position and size (e.g. `20 ` , `50 % ` )
Original file line number Diff line number Diff line change @@ -419,13 +419,13 @@ function! fzf#wrap(...)
419
419
endif
420
420
421
421
" Action: g:fzf_action
422
- if ! s: has_any (opts, [' sink' , ' sink*' ])
422
+ if ! s: has_any (opts, [' sink' , ' sinklist ' , ' sink*' ])
423
423
let opts._action = get (g: , ' fzf_action' , s: default_action )
424
424
let opts.options .= ' --expect=' .join (keys (opts._action), ' ,' )
425
- function ! opts.sink (lines ) abort
425
+ function ! opts.sinklist (lines ) abort
426
426
return s: common_sink (self ._action, a: lines )
427
427
endfunction
428
- let opts[' sink*' ] = remove ( opts, ' sink ' )
428
+ let opts[' sink*' ] = opts.sinklist " For backward compatibility
429
429
endif
430
430
431
431
return opts
@@ -943,6 +943,8 @@ function! s:callback(dict, lines) abort
943
943
endif
944
944
if has_key (a: dict , ' sink*' )
945
945
call a: dict [' sink*' ](a: lines )
946
+ elseif has_key (a: dict , ' sinklist' )
947
+ call a: dict [' sinklist' ](a: lines )
946
948
endif
947
949
catch
948
950
if stridx (v: exception , ' :E325:' ) < 0
You can’t perform that action at this time.
0 commit comments