mirror of
https://github.com/denisidoro/navi.git
synced 2026-07-18 17:14:03 +00:00
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:
parent
1ac218cb1e
commit
0eb4cb29de
1 changed files with 2 additions and 3 deletions
|
|
@ -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.",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue