mirror of
https://github.com/junegunn/fzf.git
synced 2025-08-01 04:32:05 -07:00
[vim] Disable height calculation when 'preview' is found in the option string
Fix #2093 And we'll phase out height specification with `~` prefix.
This commit is contained in:
@@ -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')
|
||||
|
Reference in New Issue
Block a user