From dec32938b83f2ad0712ba1fa9ae2a0f76d4042dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Yngve=20Lerv=C3=A5g?= Date: Tue, 10 May 2022 22:15:36 +0200 Subject: [PATCH] Use fzf#wrap to respect user option `fzf.vim` provides both `fzf#run` and `fzf#wrap`. The latter function is used to force `fzf#run` to respect user options defined in e.g. `g:fzf_layout`. I believe it is better to use this so that dressings fzf behaviour respects user options. See `:help fzf#wrap` for more details. --- autoload/dressing.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/dressing.vim b/autoload/dressing.vim index 4275527..2d549bf 100644 --- a/autoload/dressing.vim +++ b/autoload/dressing.vim @@ -1,10 +1,10 @@ function! dressing#fzf_run(labels, options, window) abort - call fzf#run({ + call fzf#run(fzf#wrap({ \ 'source': a:labels, \ 'sink': funcref('dressing#fzf_choice'), \ 'options': a:options, \ 'window': a:window, - \ }) + \})) endfunction function! dressing#fzf_choice(label) abort