1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Rework code editor multiline operations

Fix bugs if 2 selections were on same line.
Fix bugs when selection ended at new line.
Make carets stay in place after operation and on undo.

Affects: delete lines, move lines, toggle comments, bookmarks and breakpoints.
This commit is contained in:
aXu-AP
2023-02-01 15:35:35 +02:00
parent 27fb53024b
commit bdfb10fb98
3 changed files with 169 additions and 161 deletions

View File

@@ -198,9 +198,11 @@ class CodeTextEditor : public VBoxContainer {
void _update_status_bar_theme();
void _delete_line(int p_line, int p_caret);
void _toggle_scripts_pressed();
int _get_affected_lines_from(int p_caret);
int _get_affected_lines_to(int p_caret);
protected:
virtual void _load_theme_settings() {}
virtual void _validate_script() {}