[vim] Simplify --border injection

Prepend the border options so that the user can override them in
'options' entry of the spec.
This commit is contained in:
Junegunn Choi 2023-01-27 14:00:12 +09:00
parent aef39f1160
commit 0f4af38457
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

@ -512,9 +512,7 @@ try
let optstr .= ' --height='.height
endif
" Respect --border option given in 'options'
if match(optstr, '--border\([^-]\|$\)') < 0 && match(optstr, '--no-border\([^-]\|$\)') < 0
let optstr .= s:border_opt(get(dict, 'window', 0))
endif
let optstr = join([s:border_opt(get(dict, 'window', 0)), optstr])
let prev_default_command = $FZF_DEFAULT_COMMAND
if len(source_command)
let $FZF_DEFAULT_COMMAND = source_command