Fix issue when cursor is at end of doc

pull/11695/head
Thomas Schafer 2025-04-29 09:57:56 +01:00
parent 461f512d82
commit 98575ed36f
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -173,7 +173,7 @@ pub fn find_nth_pairs_pos(
if text.len_chars() < 2 {
return Err(Error::PairNotFound);
}
if range.to() >= text.len_chars() {
if range.to() > text.len_chars() {
return Err(Error::RangeExceedsText);
}