mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-12 05:15:00 +00:00
Fix panic when no matches were found
This commit is contained in:
parent
969d81b632
commit
c16bd98f56
1 changed files with 1 additions and 1 deletions
|
@ -432,7 +432,7 @@ impl FindBar {
|
||||||
Ordering::Equal
|
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 a new issue