mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2025-04-05 00:41:49 +00:00
[vim] Don't set wfw, wfh, bh options when opening popup (#2042)
* No need to restore &wfw and &wfh when using popup window Co-authored-by: lacygoill <lacygoill@lacygoill.me> Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
This commit is contained in:
parent
d631c76e8d
commit
ace92ba281
@ -678,9 +678,11 @@ function! s:split(dict)
|
|||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
endif
|
endif
|
||||||
return [ppos, { '&l:wfw': &l:wfw, '&l:wfh': &l:wfh }, is_popup]
|
return [ppos, is_popup ? {} : { '&l:wfw': &l:wfw, '&l:wfh': &l:wfh }, is_popup]
|
||||||
finally
|
finally
|
||||||
setlocal winfixwidth winfixheight
|
if !is_popup
|
||||||
|
setlocal winfixwidth winfixheight
|
||||||
|
endif
|
||||||
endtry
|
endtry
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
@ -751,9 +753,6 @@ function! s:execute_term(dict, command, temps) abort
|
|||||||
if has('nvim')
|
if has('nvim')
|
||||||
call termopen(command, fzf)
|
call termopen(command, fzf)
|
||||||
else
|
else
|
||||||
if !len(&bufhidden)
|
|
||||||
setlocal bufhidden=hide
|
|
||||||
endif
|
|
||||||
let term_opts = {'exit_cb': function(fzf.on_exit)}
|
let term_opts = {'exit_cb': function(fzf.on_exit)}
|
||||||
if is_popup
|
if is_popup
|
||||||
let term_opts.hidden = 1
|
let term_opts.hidden = 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user