mirror of https://github.com/helix-editor/helix
Fix issue when cursor is at end of doc
parent
461f512d82
commit
98575ed36f
|
@ -173,7 +173,7 @@ pub fn find_nth_pairs_pos(
|
||||||
if text.len_chars() < 2 {
|
if text.len_chars() < 2 {
|
||||||
return Err(Error::PairNotFound);
|
return Err(Error::PairNotFound);
|
||||||
}
|
}
|
||||||
if range.to() >= text.len_chars() {
|
if range.to() > text.len_chars() {
|
||||||
return Err(Error::RangeExceedsText);
|
return Err(Error::RangeExceedsText);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue