[vim] Fix missing --border when --border-label is present

pull/3160/head
Junegunn Choi 1 year ago
parent 2023012408
commit aef39f1160
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

@ -512,7 +512,7 @@ try
let optstr .= ' --height='.height
endif
" Respect --border option given in 'options'
if stridx(optstr, '--border') < 0 && stridx(optstr, '--no-border') < 0
if match(optstr, '--border\([^-]\|$\)') < 0 && match(optstr, '--no-border\([^-]\|$\)') < 0
let optstr .= s:border_opt(get(dict, 'window', 0))
endif
let prev_default_command = $FZF_DEFAULT_COMMAND
@ -741,7 +741,7 @@ function! s:calc_size(max, val, dict)
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
let margin += match(opts, '--border\([^-]\|$\)') > match(opts, '--no-border\([^-]\|$\)') ? 2 : 0
if stridx(opts, '--header') > stridx(opts, '--no-header')
let margin += len(split(opts, "\n"))
endif

Loading…
Cancel
Save