From ace92ba281669df7f1d5c434789c454e98dde45b Mon Sep 17 00:00:00 2001 From: lacygoill Date: Sun, 17 May 2020 16:28:23 +0200 Subject: [PATCH] [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 Co-authored-by: Junegunn Choi --- plugin/fzf.vim | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/plugin/fzf.vim b/plugin/fzf.vim index c288948..06ef99a 100644 --- a/plugin/fzf.vim +++ b/plugin/fzf.vim @@ -678,9 +678,11 @@ function! s:split(dict) endif endfor 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 - setlocal winfixwidth winfixheight + if !is_popup + setlocal winfixwidth winfixheight + endif endtry endfunction @@ -751,9 +753,6 @@ function! s:execute_term(dict, command, temps) abort if has('nvim') call termopen(command, fzf) else - if !len(&bufhidden) - setlocal bufhidden=hide - endif let term_opts = {'exit_cb': function(fzf.on_exit)} if is_popup let term_opts.hidden = 1