Skip to content

Commit 98575ed

Browse files
committed
Fix issue when cursor is at end of doc
1 parent 461f512 commit 98575ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

helix-core/src/surround.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ pub fn find_nth_pairs_pos(
173173
if text.len_chars() < 2 {
174174
return Err(Error::PairNotFound);
175175
}
176-
if range.to() >= text.len_chars() {
176+
if range.to() > text.len_chars() {
177177
return Err(Error::RangeExceedsText);
178178
}
179179

0 commit comments

Comments
 (0)