From 1c68f81c37f62db849ba8a37a0de68e2e3397938 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Fri, 30 Oct 2020 21:55:30 +0900 Subject: [PATCH] [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 --- plugin/fzf.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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