diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2020-10-30 21:55:30 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2020-10-30 21:57:09 +0900 |
commit | 1c68f81c37f62db849ba8a37a0de68e2e3397938 (patch) | |
tree | 8dcad8b06f0e661a22e266dc199e6052f2aa07e4 /plugin | |
parent | d4c9db0a273ccd17e7f43026c1297b434df6cbd7 (diff) |
[vim] See the last line of "fzf --version" output
The output may contain some unexpected warning messages from the shell
if it's not properly configured. While such extra messages should be
properly addressed by the user, we can ignore them by checking the
last line of the output instead of the first line.
Related: https://github.com/junegunn/fzf.vim/commit/bd3a021ec11617c56e6aa95578fee619445b029d
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/fzf.vim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugin/fzf.vim b/plugin/fzf.vim index b5030942..57fb009f 100644 --- a/plugin/fzf.vim +++ b/plugin/fzf.vim @@ -189,7 +189,7 @@ function! fzf#exec(...) if v:shell_error || empty(output) throw printf('Failed to run "%s": %s', command, output) endif - let fzf_version = matchstr(output[0], '[0-9.]\+') + let fzf_version = matchstr(output[-1], '[0-9.]\+') if s:version_requirement(fzf_version, a:1) let s:checked[a:1] = 1 return s:exec |