Skip to content

Commit

Permalink
Fix deleting word from end of buffer (helix-editor#4328)
Browse files Browse the repository at this point in the history
  • Loading branch information
xJonathanLEI authored and Shekhinah Memmel committed Dec 11, 2022
1 parent a6b2937 commit 23f1e09
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 @@ -2925,7 +2925,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 23f1e09

Please sign in to comment.