Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions parley/src/editing/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ where
if self.editor.selection.is_collapsed() {
let focus = self.editor.selection.focus();
let start = focus.index();
let end = focus.next_logical_word(&self.editor.layout).index();
let end = focus.next_visual_word(&self.editor.layout).index();
if self.editor.buffer.get(start..end).is_some() {
self.editor.buffer.replace_range(start..end, "");
self.editor.update_compose_for_replaced_range(start..end, 0);
Expand Down Expand Up @@ -328,7 +328,7 @@ where
if self.editor.selection.is_collapsed() {
let focus = self.editor.selection.focus();
let end = focus.index();
let start = focus.previous_logical_word(&self.editor.layout).index();
let start = focus.previous_visual_word(&self.editor.layout).index();
if self.editor.buffer.get(start..end).is_some() {
self.editor.buffer.replace_range(start..end, "");
self.editor.update_compose_for_replaced_range(start..end, 0);
Expand Down
Loading