mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-05 03:22:48 +03:00
Fix panic when no matches were found
This commit is contained in:
parent
969d81b632
commit
c16bd98f56
@ -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))),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user