From 3a67a1e8c0b31d31033e216f66f13ba32bc1d447 Mon Sep 17 00:00:00 2001 From: Rigidity Date: Mon, 13 Apr 2026 18:34:08 -0400 Subject: [PATCH] Fix word deletion behavior with multiple spaces --- parley/src/editing/editor.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parley/src/editing/editor.rs b/parley/src/editing/editor.rs index 31a260fce..829c4246e 100644 --- a/parley/src/editing/editor.rs +++ b/parley/src/editing/editor.rs @@ -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); @@ -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);