Skip to content

Commit

Permalink
Fix deleting word from end of buffer (#4328)
Browse files Browse the repository at this point in the history
  • Loading branch information
xJonathanLEI authored Oct 19, 2022
1 parent 0c14d9f commit 1a772d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion helix-term/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2885,7 +2885,7 @@ pub mod insert {

/// Exclude the cursor in range.
fn exclude_cursor(text: RopeSlice, range: Range, cursor: Range) -> Range {
if range.to() == cursor.to() {
if range.to() == cursor.to() && text.len_chars() != cursor.to() {
Range::new(
range.from(),
graphemes::prev_grapheme_boundary(text, cursor.to()),
Expand Down

0 comments on commit 1a772d1

Please sign in to comment.