summaryrefslogtreecommitdiffstats
path: root/plugin
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2020-06-29 22:26:13 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2020-06-29 22:27:36 +0900
commitbdde69d011436abdf9e90dff584981e83775d834 (patch)
tree9f8891a45838cb6b73a0e5e9166ad5a7fc4d40c3 /plugin
parent6dec42a33ac8262977623102fc0d700e8825d78a (diff)
[vim] Disable height calculation when 'preview' is found in the option string
Fix #2093 And we'll phase out height specification with `~` prefix.
Diffstat (limited to 'plugin')
-rw-r--r--plugin/fzf.vim3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugin/fzf.vim b/plugin/fzf.vim
index fc45c797..e1a5d3da 100644
--- a/plugin/fzf.vim
+++ b/plugin/fzf.vim
@@ -629,6 +629,9 @@ function! s:calc_size(max, val, dict)
endif
let opts = $FZF_DEFAULT_OPTS.' '.s:evaluate_opts(get(a:dict, 'options', ''))
+ if opts =~ 'preview'
+ return size
+ endif
let margin = match(opts, '--inline-info\|--info[^-]\{-}inline') > match(opts, '--no-inline-info\|--info[^-]\{-}\(default\|hidden\)') ? 1 : 2
let margin += stridx(opts, '--border') > stridx(opts, '--no-border') ? 2 : 0
if stridx(opts, '--header') > stridx(opts, '--no-header')