From 5edc3f755ca5f1e5512679cc8e7f995de7e12c3b Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Thu, 7 Sep 2017 11:01:40 +0900 Subject: [vim] Update FZF command not set up lengthy prompt on narrow screen Port of https://github.com/junegunn/fzf.vim/commit/e7928d154aad71e530daf5c17733275da5732680 Since :FZF does not enable preview window, we determine based on full &columns instead of &columns / 2. --- plugin/fzf.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/plugin/fzf.vim b/plugin/fzf.vim index d90694af..2f449091 100644 --- a/plugin/fzf.vim +++ b/plugin/fzf.vim @@ -789,6 +789,7 @@ function! s:cmd(bang, ...) abort else let prompt = s:shortpath() endif + let prompt = strwidth(prompt) < &columns - 20 ? prompt : '> ' call extend(opts.options, ['--prompt', prompt]) call extend(opts.options, args) call fzf#run(fzf#wrap('FZF', opts, a:bang)) -- cgit v1.2.3