mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2025-02-06 22:18:42 +00:00
[vim] Fix missing --border when --border-label is present
This commit is contained in:
parent
2023012408
commit
aef39f1160
@ -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…
x
Reference in New Issue
Block a user