Skip to content

Commit 0c22861

Browse files
xJonathanLEIpathwave
authored andcommitted
Fix deleting word from end of buffer (helix-editor#4328)
1 parent bab557f commit 0c22861

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
@@ -2892,7 +2892,7 @@ pub mod insert {
28922892

28932893
/// Exclude the cursor in range.
28942894
fn exclude_cursor(text: RopeSlice, range: Range, cursor: Range) -> Range {
2895-
if range.to() == cursor.to() {
2895+
if range.to() == cursor.to() && text.len_chars() != cursor.to() {
28962896
Range::new(
28972897
range.from(),
28982898
graphemes::prev_grapheme_boundary(text, cursor.to()),

0 commit comments

Comments
 (0)