1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 17:55:08 +00:00

GTextEditor: Allow moving the selected line(s) up/down in bulk

You can now press Ctrl+Shift+Up/Down in a GTextEditor and the currently
selected line(s) will all move together one step up/down.

If there is no selection, we move the line with the cursor on it. :^)
This commit is contained in:
Andreas Kling 2019-11-08 20:14:42 +01:00
parent c16b1a515e
commit fa77a57257
2 changed files with 69 additions and 0 deletions

View file

@ -161,6 +161,9 @@ private:
void recompute_all_visual_lines();
void ensure_cursor_is_valid();
void flush_pending_change_notification_if_needed();
void get_selection_line_boundaries(int& first_line, int& last_line);
void move_selected_lines_up();
void move_selected_lines_down();
class UndoCommand {