Skip to content

Commit 1a772d1

Browse files
authored
Fix deleting word from end of buffer (#4328)
1 parent 0c14d9f commit 1a772d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

helix-term/src/commands.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2885,7 +2885,7 @@ pub mod insert {
28852885

28862886
/// Exclude the cursor in range.
28872887
fn exclude_cursor(text: RopeSlice, range: Range, cursor: Range) -> Range {
2888-
if range.to() == cursor.to() {
2888+
if range.to() == cursor.to() && text.len_chars() != cursor.to() {
28892889
Range::new(
28902890
range.from(),
28912891
graphemes::prev_grapheme_boundary(text, cursor.to()),

0 commit comments

Comments
 (0)