From bd3a021ec11617c56e6aa95578fee619445b029d Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Fri, 30 Oct 2020 19:34:04 +0900 Subject: [PATCH] See the last line of "fzf --version" output The output may contain some warning messages from the shell. While such extra messages should be properly fixed by the user, we can ignore them by checking the last line of the output. Related: https://github.com/junegunn/fzf.vim/issues/1145#issuecomment-719465248 --- autoload/fzf/vim.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/fzf/vim.vim b/autoload/fzf/vim.vim index 5a551eb..44246f7 100644 --- a/autoload/fzf/vim.vim +++ b/autoload/fzf/vim.vim @@ -76,7 +76,7 @@ function! s:check_requirements() if v:shell_error || empty(output) throw 'Failed to run "fzf --version": ' . string(output) endif - let fzf_version = matchstr(output[0], '[0-9.]\+') + let fzf_version = matchstr(output[-1], '[0-9.]\+') if s:version_requirement(fzf_version, s:min_version) let s:checked = 1