mirror of
https://github.com/penpot/penpot.git
synced 2026-10-29 14:00:37 +00:00
🐛 Fix Ctrl+Home/End moving only to the paragraph edge (#12225)
This commit is contained in:
parent
78d26243c7
commit
91b30d387f
@ -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),
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user