summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/script_text_editor.cpp126
-rw-r--r--editor/plugins/shader_editor_plugin.cpp35
-rw-r--r--editor/plugins/text_editor.cpp43
-rw-r--r--editor/plugins/version_control_editor_plugin.cpp2
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp2
5 files changed, 109 insertions, 99 deletions
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 64381c0d9e..8cd746304c 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -241,14 +241,14 @@ void ScriptTextEditor::_warning_clicked(Variant p_line) {
goto_line_centered(p_line.operator int64_t());
} else if (p_line.get_type() == Variant::DICTIONARY) {
Dictionary meta = p_line.operator Dictionary();
- code_editor->get_text_editor()->insert_at("# warning-ignore:" + meta["code"].operator String(), meta["line"].operator int64_t() - 1);
+ code_editor->get_text_editor()->insert_line_at(meta["line"].operator int64_t() - 1, "# warning-ignore:" + meta["code"].operator String());
_validate_script();
}
}
void ScriptTextEditor::_error_clicked(Variant p_line) {
if (p_line.get_type() == Variant::INT) {
- code_editor->get_text_editor()->cursor_set_line(p_line.operator int64_t());
+ code_editor->get_text_editor()->set_caret_line(p_line.operator int64_t());
}
}
@@ -256,14 +256,14 @@ void ScriptTextEditor::reload_text() {
ERR_FAIL_COND(script.is_null());
CodeEdit *te = code_editor->get_text_editor();
- int column = te->cursor_get_column();
- int row = te->cursor_get_line();
+ int column = te->get_caret_column();
+ int row = te->get_caret_line();
int h = te->get_h_scroll();
int v = te->get_v_scroll();
te->set_text(script->get_source_code());
- te->cursor_set_line(row);
- te->cursor_set_column(column);
+ te->set_caret_line(row);
+ te->set_caret_column(column);
te->set_h_scroll(h);
te->set_v_scroll(v);
@@ -281,12 +281,12 @@ void ScriptTextEditor::add_callback(const String &p_function, PackedStringArray
pos = code_editor->get_text_editor()->get_line_count() + 2;
String func = script->get_language()->make_function("", p_function, p_args);
//code=code+func;
- code_editor->get_text_editor()->cursor_set_line(pos + 1);
- code_editor->get_text_editor()->cursor_set_column(1000000); //none shall be that big
- code_editor->get_text_editor()->insert_text_at_cursor("\n\n" + func);
+ code_editor->get_text_editor()->set_caret_line(pos + 1);
+ code_editor->get_text_editor()->set_caret_column(1000000); //none shall be that big
+ code_editor->get_text_editor()->insert_text_at_caret("\n\n" + func);
}
- code_editor->get_text_editor()->cursor_set_line(pos);
- code_editor->get_text_editor()->cursor_set_column(1);
+ code_editor->get_text_editor()->set_caret_line(pos);
+ code_editor->get_text_editor()->set_caret_column(1);
}
bool ScriptTextEditor::show_members_overview() {
@@ -726,7 +726,7 @@ void ScriptTextEditor::_breakpoint_item_pressed(int p_idx) {
_edit_option(breakpoints_menu->get_item_id(p_idx));
} else {
code_editor->goto_line(breakpoints_menu->get_item_metadata(p_idx));
- code_editor->get_text_editor()->call_deferred(SNAME("center_viewport_to_cursor")); //Need to be deferred, because goto uses call_deferred().
+ code_editor->get_text_editor()->call_deferred(SNAME("center_viewport_to_caret")); //Need to be deferred, because goto uses call_deferred().
}
}
@@ -884,7 +884,7 @@ void ScriptTextEditor::update_toggle_scripts_button() {
void ScriptTextEditor::_update_connected_methods() {
CodeEdit *text_edit = code_editor->get_text_editor();
- text_edit->set_gutter_width(connection_gutter, text_edit->get_row_height());
+ text_edit->set_gutter_width(connection_gutter, text_edit->get_line_height());
for (int i = 0; i < text_edit->get_line_count(); i++) {
if (text_edit->get_line_gutter_metadata(i, connection_gutter) == "") {
continue;
@@ -1054,7 +1054,7 @@ void ScriptTextEditor::_edit_option(int p_op) {
code_editor->duplicate_selection();
} break;
case EDIT_TOGGLE_FOLD_LINE: {
- tx->toggle_foldable_line(tx->cursor_get_line());
+ tx->toggle_foldable_line(tx->get_caret_line());
tx->update();
} break;
case EDIT_FOLD_ALL_LINES: {
@@ -1062,7 +1062,7 @@ void ScriptTextEditor::_edit_option(int p_op) {
tx->update();
} break;
case EDIT_UNFOLD_ALL_LINES: {
- tx->unhide_all_lines();
+ tx->unfold_all_lines();
tx->update();
} break;
case EDIT_TOGGLE_COMMENT: {
@@ -1080,7 +1080,7 @@ void ScriptTextEditor::_edit_option(int p_op) {
tx->begin_complex_operation();
int begin, end;
- if (tx->is_selection_active()) {
+ if (tx->has_selection()) {
begin = tx->get_selection_from_line();
end = tx->get_selection_to_line();
// ignore if the cursor is not past the first column
@@ -1122,7 +1122,7 @@ void ScriptTextEditor::_edit_option(int p_op) {
} break;
case EDIT_EVALUATE: {
Expression expression;
- Vector<String> lines = code_editor->get_text_editor()->get_selection_text().split("\n");
+ Vector<String> lines = code_editor->get_text_editor()->get_selected_text().split("\n");
PackedStringArray results;
for (int i = 0; i < lines.size(); i++) {
@@ -1142,7 +1142,7 @@ void ScriptTextEditor::_edit_option(int p_op) {
}
code_editor->get_text_editor()->begin_complex_operation(); //prevents creating a two-step undo
- code_editor->get_text_editor()->insert_text_at_cursor(String("\n").join(results));
+ code_editor->get_text_editor()->insert_text_at_caret(String("\n").join(results));
code_editor->get_text_editor()->end_complex_operation();
} break;
case SEARCH_FIND: {
@@ -1158,14 +1158,14 @@ void ScriptTextEditor::_edit_option(int p_op) {
code_editor->get_find_replace_bar()->popup_replace();
} break;
case SEARCH_IN_FILES: {
- String selected_text = code_editor->get_text_editor()->get_selection_text();
+ String selected_text = code_editor->get_text_editor()->get_selected_text();
// Yep, because it doesn't make sense to instance this dialog for every single script open...
// So this will be delegated to the ScriptEditor.
emit_signal(SNAME("search_in_files_requested"), selected_text);
} break;
case REPLACE_IN_FILES: {
- String selected_text = code_editor->get_text_editor()->get_selection_text();
+ String selected_text = code_editor->get_text_editor()->get_selected_text();
emit_signal(SNAME("replace_in_files_requested"), selected_text);
} break;
@@ -1189,7 +1189,7 @@ void ScriptTextEditor::_edit_option(int p_op) {
code_editor->remove_all_bookmarks();
} break;
case DEBUG_TOGGLE_BREAKPOINT: {
- int line = tx->cursor_get_line();
+ int line = tx->get_caret_line();
bool dobreak = !tx->is_line_breakpointed(line);
tx->set_line_as_breakpoint(line, dobreak);
EditorDebuggerNode::get_singleton()->set_breakpoint(script->get_path(), line + 1, dobreak);
@@ -1210,20 +1210,20 @@ void ScriptTextEditor::_edit_option(int p_op) {
return;
}
- int line = tx->cursor_get_line();
+ int line = tx->get_caret_line();
// wrap around
if (line >= (int)bpoints[bpoints.size() - 1]) {
tx->unfold_line(bpoints[0]);
- tx->cursor_set_line(bpoints[0]);
- tx->center_viewport_to_cursor();
+ tx->set_caret_line(bpoints[0]);
+ tx->center_viewport_to_caret();
} else {
for (int i = 0; i < bpoints.size(); i++) {
int bline = bpoints[i];
if (bline > line) {
tx->unfold_line(bline);
- tx->cursor_set_line(bline);
- tx->center_viewport_to_cursor();
+ tx->set_caret_line(bline);
+ tx->center_viewport_to_caret();
return;
}
}
@@ -1236,19 +1236,19 @@ void ScriptTextEditor::_edit_option(int p_op) {
return;
}
- int line = tx->cursor_get_line();
+ int line = tx->get_caret_line();
// wrap around
if (line <= (int)bpoints[0]) {
tx->unfold_line(bpoints[bpoints.size() - 1]);
- tx->cursor_set_line(bpoints[bpoints.size() - 1]);
- tx->center_viewport_to_cursor();
+ tx->set_caret_line(bpoints[bpoints.size() - 1]);
+ tx->center_viewport_to_caret();
} else {
for (int i = bpoints.size(); i >= 0; i--) {
int bline = bpoints[i];
if (bline < line) {
tx->unfold_line(bline);
- tx->cursor_set_line(bline);
- tx->center_viewport_to_cursor();
+ tx->set_caret_line(bline);
+ tx->center_viewport_to_caret();
return;
}
}
@@ -1256,21 +1256,21 @@ void ScriptTextEditor::_edit_option(int p_op) {
} break;
case HELP_CONTEXTUAL: {
- String text = tx->get_selection_text();
+ String text = tx->get_selected_text();
if (text == "") {
- text = tx->get_word_under_cursor();
+ text = tx->get_word_under_caret();
}
if (text != "") {
emit_signal(SNAME("request_help"), text);
}
} break;
case LOOKUP_SYMBOL: {
- String text = tx->get_word_under_cursor();
+ String text = tx->get_word_under_caret();
if (text == "") {
- text = tx->get_selection_text();
+ text = tx->get_selected_text();
}
if (text != "") {
- _lookup_symbol(text, tx->cursor_get_line(), tx->cursor_get_column());
+ _lookup_symbol(text, tx->get_caret_line(), tx->get_caret_column());
}
} break;
}
@@ -1325,7 +1325,7 @@ void ScriptTextEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_THEME_CHANGED:
case NOTIFICATION_ENTER_TREE: {
- code_editor->get_text_editor()->set_gutter_width(connection_gutter, code_editor->get_text_editor()->get_row_height());
+ code_editor->get_text_editor()->set_gutter_width(connection_gutter, code_editor->get_text_editor()->get_line_height());
} break;
default:
break;
@@ -1422,8 +1422,10 @@ void ScriptTextEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data
Dictionary d = p_data;
CodeEdit *te = code_editor->get_text_editor();
- int row, col;
- te->_get_mouse_pos(p_point, row, col);
+
+ Point2i pos = te->get_line_column_at_pos(p_point);
+ int row = pos.y;
+ int col = pos.x;
if (d.has("type") && String(d["type"]) == "resource") {
Ref<Resource> res = d["resource"];
@@ -1436,9 +1438,9 @@ void ScriptTextEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data
return;
}
- te->cursor_set_line(row);
- te->cursor_set_column(col);
- te->insert_text_at_cursor(res->get_path());
+ te->set_caret_line(row);
+ te->set_caret_column(col);
+ te->insert_text_at_caret(res->get_path());
}
if (d.has("type") && (String(d["type"]) == "files" || String(d["type"]) == "files_and_dirs")) {
@@ -1459,9 +1461,9 @@ void ScriptTextEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data
}
}
- te->cursor_set_line(row);
- te->cursor_set_column(col);
- te->insert_text_at_cursor(text_to_drop);
+ te->set_caret_line(row);
+ te->set_caret_column(col);
+ te->insert_text_at_caret(text_to_drop);
}
if (d.has("type") && String(d["type"]) == "nodes") {
@@ -1489,9 +1491,9 @@ void ScriptTextEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data
text_to_drop += "\"" + path.c_escape() + "\"";
}
- te->cursor_set_line(row);
- te->cursor_set_column(col);
- te->insert_text_at_cursor(text_to_drop);
+ te->set_caret_line(row);
+ te->set_caret_column(col);
+ te->insert_text_at_caret(text_to_drop);
}
}
@@ -1505,18 +1507,20 @@ void ScriptTextEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
if (mb.is_valid() && mb->get_button_index() == MOUSE_BUTTON_RIGHT && mb->is_pressed()) {
local_pos = mb->get_global_position() - tx->get_global_position();
create_menu = true;
- } else if (k.is_valid() && k->get_keycode() == KEY_MENU) {
- local_pos = tx->_get_cursor_pixel_pos();
+ } else if (k.is_valid() && k->is_action("ui_menu", true)) {
+ tx->adjust_viewport_to_caret();
+ local_pos = tx->get_caret_draw_pos();
create_menu = true;
}
if (create_menu) {
- int col, row;
- tx->_get_mouse_pos(local_pos, row, col);
+ Point2i pos = tx->get_line_column_at_pos(local_pos);
+ int row = pos.y;
+ int col = pos.x;
- tx->set_right_click_moves_caret(EditorSettings::get_singleton()->get("text_editor/cursor/right_click_moves_caret"));
- if (tx->is_right_click_moving_caret()) {
- if (tx->is_selection_active()) {
+ tx->set_move_caret_on_right_click_enabled(EditorSettings::get_singleton()->get("text_editor/cursor/right_click_moves_caret"));
+ if (tx->is_move_caret_on_right_click_enabled()) {
+ if (tx->has_selection()) {
int from_line = tx->get_selection_from_line();
int to_line = tx->get_selection_to_line();
int from_column = tx->get_selection_from_column();
@@ -1527,18 +1531,18 @@ void ScriptTextEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
tx->deselect();
}
}
- if (!tx->is_selection_active()) {
- tx->cursor_set_line(row, true, false);
- tx->cursor_set_column(col);
+ if (!tx->has_selection()) {
+ tx->set_caret_line(row, false, false);
+ tx->set_caret_column(col);
}
}
String word_at_pos = tx->get_word_at_pos(local_pos);
if (word_at_pos == "") {
- word_at_pos = tx->get_word_under_cursor();
+ word_at_pos = tx->get_word_under_caret();
}
if (word_at_pos == "") {
- word_at_pos = tx->get_selection_text();
+ word_at_pos = tx->get_selected_text();
}
bool has_color = (word_at_pos == "Color");
@@ -1590,7 +1594,7 @@ void ScriptTextEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
has_color = false;
}
}
- _make_context_menu(tx->is_selection_active(), has_color, foldable, open_docs, goto_definition, local_pos);
+ _make_context_menu(tx->has_selection(), has_color, foldable, open_docs, goto_definition, local_pos);
}
}
diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp
index 95973f9dfd..29436e32b2 100644
--- a/editor/plugins/shader_editor_plugin.cpp
+++ b/editor/plugins/shader_editor_plugin.cpp
@@ -74,14 +74,14 @@ void ShaderTextEditor::reload_text() {
ERR_FAIL_COND(shader.is_null());
CodeEdit *te = get_text_editor();
- int column = te->cursor_get_column();
- int row = te->cursor_get_line();
+ int column = te->get_caret_column();
+ int row = te->get_caret_line();
int h = te->get_h_scroll();
int v = te->get_v_scroll();
te->set_text(shader->get_code());
- te->cursor_set_line(row);
- te->cursor_set_column(column);
+ te->set_caret_line(row);
+ te->set_caret_column(column);
te->set_h_scroll(h);
te->set_v_scroll(v);
@@ -408,7 +408,7 @@ void ShaderEditor::_show_warnings_panel(bool p_show) {
void ShaderEditor::_warning_clicked(Variant p_line) {
if (p_line.get_type() == Variant::INT) {
- shader_editor->get_text_editor()->cursor_set_line(p_line.operator int64_t());
+ shader_editor->get_text_editor()->set_caret_line(p_line.operator int64_t());
}
}
@@ -550,13 +550,15 @@ void ShaderEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
if (mb.is_valid()) {
if (mb->get_button_index() == MOUSE_BUTTON_RIGHT && mb->is_pressed()) {
- int col, row;
CodeEdit *tx = shader_editor->get_text_editor();
- 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"));
- if (tx->is_right_click_moving_caret()) {
- if (tx->is_selection_active()) {
+ Point2i pos = tx->get_line_column_at_pos(mb->get_global_position() - tx->get_global_position());
+ int row = pos.y;
+ int col = pos.x;
+ tx->set_move_caret_on_right_click_enabled(EditorSettings::get_singleton()->get("text_editor/cursor/right_click_moves_caret"));
+
+ if (tx->is_move_caret_on_right_click_enabled()) {
+ if (tx->has_selection()) {
int from_line = tx->get_selection_from_line();
int to_line = tx->get_selection_to_line();
int from_column = tx->get_selection_from_column();
@@ -567,19 +569,20 @@ void ShaderEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
tx->deselect();
}
}
- if (!tx->is_selection_active()) {
- tx->cursor_set_line(row, true, false);
- tx->cursor_set_column(col);
+ if (!tx->has_selection()) {
+ tx->set_caret_line(row, true, false);
+ tx->set_caret_column(col);
}
}
- _make_context_menu(tx->is_selection_active(), get_local_mouse_position());
+ _make_context_menu(tx->has_selection(), get_local_mouse_position());
}
}
Ref<InputEventKey> k = ev;
- if (k.is_valid() && k->is_pressed() && k->get_keycode() == KEY_MENU) {
+ if (k.is_valid() && k->is_pressed() && k->is_action("ui_menu", true)) {
CodeEdit *tx = shader_editor->get_text_editor();
- _make_context_menu(tx->is_selection_active(), (get_global_transform().inverse() * tx->get_global_transform()).xform(tx->_get_cursor_pixel_pos()));
+ tx->adjust_viewport_to_caret();
+ _make_context_menu(tx->has_selection(), (get_global_transform().inverse() * tx->get_global_transform()).xform(tx->get_caret_draw_pos()));
context_menu->grab_focus();
}
}
diff --git a/editor/plugins/text_editor.cpp b/editor/plugins/text_editor.cpp
index faf287b9bd..cfccf90499 100644
--- a/editor/plugins/text_editor.cpp
+++ b/editor/plugins/text_editor.cpp
@@ -132,14 +132,14 @@ void TextEditor::reload_text() {
ERR_FAIL_COND(text_file.is_null());
CodeEdit *te = code_editor->get_text_editor();
- int column = te->cursor_get_column();
- int row = te->cursor_get_line();
+ int column = te->get_caret_column();
+ int row = te->get_caret_line();
int h = te->get_h_scroll();
int v = te->get_v_scroll();
te->set_text(text_file->get_text());
- te->cursor_set_line(row);
- te->cursor_set_column(column);
+ te->set_caret_line(row);
+ te->set_caret_column(column);
te->set_h_scroll(h);
te->set_v_scroll(v);
@@ -332,7 +332,7 @@ void TextEditor::_edit_option(int p_op) {
code_editor->duplicate_selection();
} break;
case EDIT_TOGGLE_FOLD_LINE: {
- tx->toggle_foldable_line(tx->cursor_get_line());
+ tx->toggle_foldable_line(tx->get_caret_line());
tx->update();
} break;
case EDIT_FOLD_ALL_LINES: {
@@ -340,7 +340,7 @@ void TextEditor::_edit_option(int p_op) {
tx->update();
} break;
case EDIT_UNFOLD_ALL_LINES: {
- tx->unhide_all_lines();
+ tx->unfold_all_lines();
tx->update();
} break;
case EDIT_TRIM_TRAILING_WHITESAPCE: {
@@ -374,14 +374,14 @@ void TextEditor::_edit_option(int p_op) {
code_editor->get_find_replace_bar()->popup_replace();
} break;
case SEARCH_IN_FILES: {
- String selected_text = code_editor->get_text_editor()->get_selection_text();
+ String selected_text = code_editor->get_text_editor()->get_selected_text();
// Yep, because it doesn't make sense to instance this dialog for every single script open...
// So this will be delegated to the ScriptEditor.
emit_signal(SNAME("search_in_files_requested"), selected_text);
} break;
case REPLACE_IN_FILES: {
- String selected_text = code_editor->get_text_editor()->get_selection_text();
+ String selected_text = code_editor->get_text_editor()->get_selected_text();
emit_signal(SNAME("replace_in_files_requested"), selected_text);
} break;
@@ -427,16 +427,18 @@ void TextEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
if (mb.is_valid()) {
if (mb->get_button_index() == MOUSE_BUTTON_RIGHT) {
- int col, row;
CodeEdit *tx = code_editor->get_text_editor();
- 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"));
+ Point2i pos = tx->get_line_column_at_pos(mb->get_global_position() - tx->get_global_position());
+ int row = pos.y;
+ int col = pos.x;
+
+ tx->set_move_caret_on_right_click_enabled(EditorSettings::get_singleton()->get("text_editor/cursor/right_click_moves_caret"));
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()) {
+ if (tx->is_move_caret_on_right_click_enabled()) {
+ if (tx->has_selection()) {
int from_line = tx->get_selection_from_line();
int to_line = tx->get_selection_to_line();
int from_column = tx->get_selection_from_column();
@@ -447,23 +449,24 @@ void TextEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
tx->deselect();
}
}
- if (!tx->is_selection_active()) {
- tx->cursor_set_line(row, true, false);
- tx->cursor_set_column(col);
+ if (!tx->has_selection()) {
+ tx->set_caret_line(row, true, false);
+ tx->set_caret_column(col);
}
}
if (!mb->is_pressed()) {
- _make_context_menu(tx->is_selection_active(), can_fold, is_folded, get_local_mouse_position());
+ _make_context_menu(tx->has_selection(), can_fold, is_folded, get_local_mouse_position());
}
}
}
Ref<InputEventKey> k = ev;
- if (k.is_valid() && k->is_pressed() && k->get_keycode() == KEY_MENU) {
+ if (k.is_valid() && k->is_pressed() && k->is_action("ui_menu", true)) {
CodeEdit *tx = code_editor->get_text_editor();
- int line = tx->cursor_get_line();
- _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()));
+ int line = tx->get_caret_line();
+ tx->adjust_viewport_to_caret();
+ _make_context_menu(tx->has_selection(), tx->can_fold_line(line), tx->is_line_folded(line), (get_global_transform().inverse() * tx->get_global_transform()).xform(tx->get_caret_draw_pos()));
context_menu->grab_focus();
}
}
diff --git a/editor/plugins/version_control_editor_plugin.cpp b/editor/plugins/version_control_editor_plugin.cpp
index a9a36427db..aaa29bcb7a 100644
--- a/editor/plugins/version_control_editor_plugin.cpp
+++ b/editor/plugins/version_control_editor_plugin.cpp
@@ -484,7 +484,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
commit_message->set_h_grow_direction(Control::GrowDirection::GROW_DIRECTION_BEGIN);
commit_message->set_v_grow_direction(Control::GrowDirection::GROW_DIRECTION_END);
commit_message->set_custom_minimum_size(Size2(200, 100));
- commit_message->set_wrap_enabled(true);
+ commit_message->set_line_wrapping_mode(TextEdit::LineWrappingMode::LINE_WRAPPING_BOUNDARY);
commit_message->connect("text_changed", callable_mp(this, &VersionControlEditorPlugin::_update_commit_button));
commit_message->connect("gui_input", callable_mp(this, &VersionControlEditorPlugin::_commit_message_gui_input));
commit_box_vbc->add_child(commit_message);
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index 038ce1467e..37a04a1844 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -3968,7 +3968,7 @@ VisualShaderEditor::VisualShaderEditor() {
preview_text->set_v_size_flags(Control::SIZE_EXPAND_FILL);
preview_text->set_syntax_highlighter(syntax_highlighter);
preview_text->set_draw_line_numbers(true);
- preview_text->set_readonly(true);
+ preview_text->set_editable(false);
error_panel = memnew(PanelContainer);
preview_vbox->add_child(error_panel);