summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2023-01-27 11:00:59 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2023-01-27 11:00:59 +0900
commitaef39f1160e25484ff8a6ec7ce1f942d8da3fe03 (patch)
tree4ec65d235a710dc7ef8eb39d7aa541bd7378ddc3
parent2023012408ff892d43441fce0385943bafdbb52b (diff)
[vim] Fix missing --border when --border-label is present
-rw-r--r--plugin/fzf.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugin/fzf.vim b/plugin/fzf.vim
index b569da43..e0eb8718 100644
--- a/plugin/fzf.vim
+++ b/plugin/fzf.vim
@@ -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