summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorllschuster <perez99leo@outlook.es>2021-05-12 12:45:30 +0200
committerllschuster <perez99leo@outlook.es>2021-05-13 17:07:39 +0200
commit6b55ec2ca9a805bc2ae72038d2eaa24242cb4fea (patch)
tree31df51ffa2ddf299132fb1e8ea27a516665368da
parentde3747fc378383e9df1dc98849e3235f280338b7 (diff)
text-editor: fix Clicking warning doesn't center around line
-rw-r--r--editor/plugins/script_text_editor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index c982207224..edf540bf48 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -292,7 +292,7 @@ void ScriptTextEditor::_show_warnings_panel(bool p_show) {
void ScriptTextEditor::_warning_clicked(Variant p_line) {
if (p_line.get_type() == Variant::INT) {
- code_editor->get_text_editor()->cursor_set_line(p_line.operator int64_t());
+ 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);