diff --git a/crates/find/src/find.rs b/crates/find/src/find.rs index 4096abe03c..f1725d4b96 100644 --- a/crates/find/src/find.rs +++ b/crates/find/src/find.rs @@ -432,7 +432,7 @@ impl FindBar { Ordering::Equal } }) { - Ok(i) | Err(i) => Some(cmp::min(i, ranges.len() - 1)), + Ok(i) | Err(i) => Some(cmp::min(i, ranges.len().saturating_sub(1))), } } }