From a0bfbdd49c8cd2cff948301273815ae728965e2b Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Tue, 26 Mar 2019 16:40:40 +0900 Subject: [PATCH] [vim] Increase window height by 2 when --border is set Close #1535 --- plugin/fzf.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin/fzf.vim b/plugin/fzf.vim index 5eca120..e1047d0 100644 --- a/plugin/fzf.vim +++ b/plugin/fzf.vim @@ -606,8 +606,9 @@ function! s:calc_size(max, val, dict) let srcsz = len(a:dict.source) endif - let opts = s:evaluate_opts(get(a:dict, 'options', '')).$FZF_DEFAULT_OPTS + let opts = $FZF_DEFAULT_OPTS.' '.s:evaluate_opts(get(a:dict, 'options', '')) let margin = stridx(opts, '--inline-info') > stridx(opts, '--no-inline-info') ? 1 : 2 + let margin += stridx(opts, '--border') > stridx(opts, '--no-border') ? 2 : 0 let margin += stridx(opts, '--header') > stridx(opts, '--no-header') return srcsz >= 0 ? min([srcsz + margin, size]) : size endfunction