[vim] Make list options compatible with layout options

Fix #1205
pull/1208/merge
Junegunn Choi 6 years ago
parent 7f0caf0683
commit eb3afc03b5
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

@ -586,7 +586,7 @@ function! s:calc_size(max, val, dict)
let srcsz = len(a:dict.source)
endif
let opts = get(a:dict, 'options', '').$FZF_DEFAULT_OPTS
let opts = s:evaluate_opts(get(a:dict, 'options', '')).$FZF_DEFAULT_OPTS
let margin = stridx(opts, '--inline-info') > stridx(opts, '--no-inline-info') ? 1 : 2
let margin += stridx(opts, '--header') > stridx(opts, '--no-header')
return srcsz >= 0 ? min([srcsz + margin, size]) : size

Loading…
Cancel
Save