Fix deleting word from end of buffer (#4328)
This commit is contained in:
parent
0c14d9f869
commit
1a772d1b67
1 changed files with 1 additions and 1 deletions
|
@ -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()),
|
||||
|
|
Loading…
Add table
Reference in a new issue