From 91b30d387f3f780e41b6471c9e597e6675f3b2a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elena=20Torr=C3=B3?= Date: Thu, 8 Oct 2026 16:37:05 +0200 Subject: [PATCH] :bug: Fix Ctrl+Home/End moving only to the paragraph edge (#12225) --- render-wasm/src/state/text_editor.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/render-wasm/src/state/text_editor.rs b/render-wasm/src/state/text_editor.rs index c052884f10..8d4ff4fca6 100644 --- a/render-wasm/src/state/text_editor.rs +++ b/render-wasm/src/state/text_editor.rs @@ -923,6 +923,11 @@ impl TextEditorState { CursorDirection::LineAfter => { text_helpers::move_cursor_down(&focus, paragraphs, text_content) } + CursorDirection::LineStart if word_boundary => TextPositionWithAffinity::empty(), + CursorDirection::LineEnd if word_boundary => text_helpers::move_cursor_line_end( + &TextPositionWithAffinity::new_downstream_affinity(paragraphs.len() - 1, 0), + paragraphs, + ), CursorDirection::LineStart => text_helpers::move_cursor_line_start(&focus, paragraphs), CursorDirection::LineEnd => text_helpers::move_cursor_line_end(&focus, paragraphs), };