mirror of
https://github.com/junegunn/fzf.git
synced 2025-07-31 12:12:02 -07:00
[vim] Update FZF command not set up lengthy prompt on narrow screen
Port of e7928d154a
Since :FZF does not enable preview window, we determine based on full
&columns instead of &columns / 2.
This commit is contained in:
@@ -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))
|
||||
|
Reference in New Issue
Block a user