From 0eb4cb29debefdb1fed7b2b558fbd275801bee98 Mon Sep 17 00:00:00 2001 From: Shaked Shlomo Date: Tue, 2 Jun 2026 01:15:22 +0300 Subject: [PATCH] Fix fzf minimum-version check using lexicographic comparison MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The minimum supported fzf version is 0.23.1, but the guard required major == 0 && minor < 23 && patch < 1 (all with &&). Because patch < 1 is only true for patch == 0, versions such as 0.22.5 and 0.23.0 — both older than 0.23.1 — were not detected as too old, while only x.y.0 versions were. Compare the (major, minor, patch) tuples directly so any version below the minimum is correctly flagged. --- src/finder/mod.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/finder/mod.rs b/src/finder/mod.rs index a1edee6..b952455 100644 --- a/src/finder/mod.rs +++ b/src/finder/mod.rs @@ -76,9 +76,8 @@ impl FinderChoice { if let Self::Fzf = self { if let Some((major, minor, patch)) = Self::check_fzf_version() { - if major == MIN_FZF_VERSION_MAJOR - && minor < MIN_FZF_VERSION_MINOR - && patch < MIN_FZF_VERSION_PATCH + if (major, minor, patch) + < (MIN_FZF_VERSION_MAJOR, MIN_FZF_VERSION_MINOR, MIN_FZF_VERSION_PATCH) { eprintln!( "Warning: Fzf version {major}.{minor} does not support the preview window layout used by navi.",