1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 12:47:45 +00:00

LibGUI: Fix weird behavior when using Ctrl+Shift+[Up,Down] in TextEditor

Those inconveniences come from cursor and selection not being saved
during the switch.
This commit is contained in:
Lucas CHOLLET 2022-05-17 20:43:22 +02:00 committed by Andreas Kling
parent 4d93fb4789
commit fcb1d2cfb7
2 changed files with 37 additions and 32 deletions

View file

@ -50,10 +50,16 @@ protected:
WeakPtr<TextEditor> m_editor;
enum class DidMoveALine {
No,
Yes,
};
void move_one_left();
void move_one_right();
void move_one_up(KeyEvent const& event);
void move_one_down(KeyEvent const& event);
void move_one_helper(KeyEvent const& event, VerticalDirection direction);
DidMoveALine move_one_up(KeyEvent const& event);
DidMoveALine move_one_down(KeyEvent const& event);
void move_to_previous_span();
void move_to_next_span();
void move_to_logical_line_beginning();