mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-12-23 03:19:01 +00:00
[vim] Remove unnecessary pushd/popd in :FZF
It is already handled by its caller.
This commit is contained in:
parent
a7cb1a78df
commit
51a19a2804
@ -320,14 +320,9 @@ function! s:cmd_callback(lines) abort
|
|||||||
elseif key == 'ctrl-v' | let cmd = 'vsplit'
|
elseif key == 'ctrl-v' | let cmd = 'vsplit'
|
||||||
else | let cmd = 'e'
|
else | let cmd = 'e'
|
||||||
endif
|
endif
|
||||||
call s:pushd(s:opts)
|
for item in a:lines
|
||||||
try
|
execute cmd s:escape(item)
|
||||||
for item in a:lines
|
endfor
|
||||||
execute cmd s:escape(item)
|
|
||||||
endfor
|
|
||||||
finally
|
|
||||||
call s:popd(s:opts)
|
|
||||||
endtry
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:cmd(bang, ...) abort
|
function! s:cmd(bang, ...) abort
|
||||||
@ -346,7 +341,6 @@ function! s:cmd(bang, ...) abort
|
|||||||
if s:legacy
|
if s:legacy
|
||||||
call fzf#run(extend({ 'options': join(args), 'sink': 'e' }, opts))
|
call fzf#run(extend({ 'options': join(args), 'sink': 'e' }, opts))
|
||||||
else
|
else
|
||||||
let s:opts = opts
|
|
||||||
call fzf#run(extend({ 'options': join(args), 'sink*': function('<sid>cmd_callback') }, opts))
|
call fzf#run(extend({ 'options': join(args), 'sink*': function('<sid>cmd_callback') }, opts))
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
Loading…
Reference in New Issue
Block a user