Fix fzf minimum-version check using lexicographic comparison

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.
This commit is contained in:
Shaked Shlomo 2026-06-02 01:15:22 +03:00
parent 1ac218cb1e
commit 0eb4cb29de

View file

@ -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.",