From aef39f1160e25484ff8a6ec7ce1f942d8da3fe03 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Fri, 27 Jan 2023 11:00:59 +0900 Subject: [PATCH] [vim] Fix missing --border when --border-label is present --- plugin/fzf.vim | 4 ++-- 1 file 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