fix off by one error for completion-replace option (#10279)

This commit is contained in:
Pascal Kuthe 2024-04-08 05:31:23 +02:00 committed by GitHub
parent 0da809c981
commit 6f5ea6be58
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -284,7 +284,8 @@ fn find_completion_range(text: RopeSlice, replace_mode: bool, cursor: usize) ->
.chars_at(cursor)
.skip(1)
.take_while(|ch| chars::char_is_word(*ch))
.count();
.count()
+ 1;
}
(start, end)
}