From a09c6e991aa494bed852f8a8c40bfd94ce43aac2 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Wed, 28 Aug 2024 13:49:41 +0900 Subject: [PATCH] [vim] Ignore argument to fzf#exec if it's lower than minimum requirement --- plugin/fzf.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugin/fzf.vim b/plugin/fzf.vim index 598b2084..7f721998 100644 --- a/plugin/fzf.vim +++ b/plugin/fzf.vim @@ -226,7 +226,10 @@ function! fzf#exec(...) let s:exec = binaries[-1] endif - let min_version = a:0 ? a:1 : s:min_version + let min_version = s:min_version + if a:0 && s:compare_versions(a:1, min_version) > 0 + let min_version = a:1 + endif if !has_key(s:checked, min_version) let fzf_version = s:get_version(s:exec) if empty(fzf_version)