mirror of
https://github.com/godotengine/godot.git
synced 2025-10-26 11:14:17 +00:00
Merge pull request #86978 from kitbdev/multicaret-overhaul
Overhaul multicaret editing and selection in TextEdit
This commit is contained in:
commit
e19b808a7a
19 changed files with 8243 additions and 3197 deletions
|
|
@ -653,10 +653,10 @@ void TextShaderEditor::_menu_option(int p_option) {
|
|||
code_editor->get_text_editor()->select_all();
|
||||
} break;
|
||||
case EDIT_MOVE_LINE_UP: {
|
||||
code_editor->move_lines_up();
|
||||
code_editor->get_text_editor()->move_lines_up();
|
||||
} break;
|
||||
case EDIT_MOVE_LINE_DOWN: {
|
||||
code_editor->move_lines_down();
|
||||
code_editor->get_text_editor()->move_lines_down();
|
||||
} break;
|
||||
case EDIT_INDENT: {
|
||||
if (shader.is_null() && shader_inc.is_null()) {
|
||||
|
|
@ -671,10 +671,10 @@ void TextShaderEditor::_menu_option(int p_option) {
|
|||
code_editor->get_text_editor()->unindent_lines();
|
||||
} break;
|
||||
case EDIT_DELETE_LINE: {
|
||||
code_editor->delete_lines();
|
||||
code_editor->get_text_editor()->delete_lines();
|
||||
} break;
|
||||
case EDIT_DUPLICATE_SELECTION: {
|
||||
code_editor->duplicate_selection();
|
||||
code_editor->get_text_editor()->duplicate_selection();
|
||||
} break;
|
||||
case EDIT_DUPLICATE_LINES: {
|
||||
code_editor->get_text_editor()->duplicate_lines();
|
||||
|
|
@ -1010,7 +1010,7 @@ void TextShaderEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
|
|||
}
|
||||
}
|
||||
if (!tx->has_selection()) {
|
||||
tx->set_caret_line(row, true, false);
|
||||
tx->set_caret_line(row, true, false, -1);
|
||||
tx->set_caret_column(col);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue