[Files] Do not set up lengthy prompt on narrow screen

This commit is contained in:
Junegunn Choi 2017-09-05 18:48:45 +09:00
parent df79877245
commit e7928d154a
No known key found for this signature in database
GPG key ID: 254BC280FEF9C627

View file

@ -281,7 +281,7 @@ function! fzf#vim#files(dir, ...)
let dir = s:shortpath()
endif
let args.options = ['-m', '--prompt', dir]
let args.options = ['-m', '--prompt', strwidth(dir) < &columns / 2 - 20 ? dir : '> ']
call s:merge_opts(args, get(g:, 'fzf_files_options', []))
return s:fzf('files', args, a:000)
endfunction