[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.
This commit is contained in:
Junegunn Choi
2017-09-07 11:01:40 +09:00
parent 288976310b
commit 5edc3f755c
+1
View File
@@ -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))