summaryrefslogtreecommitdiff
path: root/editor/plugins/text_editor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins/text_editor.cpp')
-rw-r--r--editor/plugins/text_editor.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/editor/plugins/text_editor.cpp b/editor/plugins/text_editor.cpp
index dc7f85a790..d62be993af 100644
--- a/editor/plugins/text_editor.cpp
+++ b/editor/plugins/text_editor.cpp
@@ -320,10 +320,10 @@ void TextEditor::_edit_option(int p_op) {
code_editor->move_lines_down();
} break;
case EDIT_INDENT_LEFT: {
- tx->indent_selected_lines_left();
+ tx->unindent_lines();
} break;
case EDIT_INDENT_RIGHT: {
- tx->indent_selected_lines_right();
+ tx->indent_lines();
} break;
case EDIT_DELETE_LINE: {
code_editor->delete_lines();
@@ -332,7 +332,7 @@ void TextEditor::_edit_option(int p_op) {
code_editor->clone_lines_down();
} break;
case EDIT_TOGGLE_FOLD_LINE: {
- tx->toggle_fold_line(tx->cursor_get_line());
+ tx->toggle_foldable_line(tx->cursor_get_line());
tx->update();
} break;
case EDIT_FOLD_ALL_LINES: {
@@ -432,8 +432,8 @@ void TextEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
tx->_get_mouse_pos(mb->get_global_position() - tx->get_global_position(), row, col);
tx->set_right_click_moves_caret(EditorSettings::get_singleton()->get("text_editor/cursor/right_click_moves_caret"));
- bool can_fold = tx->can_fold(row);
- bool is_folded = tx->is_folded(row);
+ bool can_fold = tx->can_fold_line(row);
+ bool is_folded = tx->is_line_folded(row);
if (tx->is_right_click_moving_caret()) {
if (tx->is_selection_active()) {
@@ -463,7 +463,7 @@ void TextEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
if (k.is_valid() && k->is_pressed() && k->get_keycode() == KEY_MENU) {
CodeEdit *tx = code_editor->get_text_editor();
int line = tx->cursor_get_line();
- _make_context_menu(tx->is_selection_active(), tx->can_fold(line), tx->is_folded(line), (get_global_transform().inverse() * tx->get_global_transform()).xform(tx->_get_cursor_pixel_pos()));
+ _make_context_menu(tx->is_selection_active(), tx->can_fold_line(line), tx->is_line_folded(line), (get_global_transform().inverse() * tx->get_global_transform()).xform(tx->_get_cursor_pixel_pos()));
context_menu->grab_focus();
}
}
@@ -581,11 +581,11 @@ TextEditor::TextEditor() {
highlighter_menu->connect("id_pressed", callable_mp(this, &TextEditor::_change_syntax_highlighter));
Ref<EditorPlainTextSyntaxHighlighter> plain_highlighter;
- plain_highlighter.instance();
+ plain_highlighter.instantiate();
add_syntax_highlighter(plain_highlighter);
Ref<EditorStandardSyntaxHighlighter> highlighter;
- highlighter.instance();
+ highlighter.instantiate();
add_syntax_highlighter(highlighter);
set_syntax_highlighter(plain_highlighter);