diff options
author | Jonathan LEI | 2022-10-19 00:53:58 +0000 |
---|---|---|
committer | GitHub | 2022-10-19 00:53:58 +0000 |
commit | 1a772d1b67d4895d79273b027b1b1f86bd1616fe (patch) | |
tree | e8e6229f1b7ecf37a4b1cc73d260d707bdf52c69 /helix-term/src | |
parent | 0c14d9f869c503a873a420c4acab17bd922d1d3b (diff) |
Fix deleting word from end of buffer (#4328)
Diffstat (limited to 'helix-term/src')
-rw-r--r-- | helix-term/src/commands.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 318dd035..5073651b 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -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()), |