summaryrefslogtreecommitdiffstats
path: root/plugin
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2017-09-07 11:01:40 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2017-09-07 11:01:40 +0900
commit5edc3f755ca5f1e5512679cc8e7f995de7e12c3b (patch)
treef832cda2b99ea0a7b9b0fa7778066af8df0b3db2 /plugin
parent288976310b44b9176a2d5fb2d2da8c5a8b51423d (diff)
[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.
Diffstat (limited to 'plugin')
-rw-r--r--plugin/fzf.vim1
1 files changed, 1 insertions, 0 deletions
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))