Browse Source

text-editor: fix Clicking warning doesn't center around line

(cherry picked from commit 6b55ec2ca9a805bc2ae72038d2eaa24242cb4fea)
llschuster 4 years ago
parent
commit
2a18909210
1 changed files with 1 additions and 1 deletions
  1. 1 1
      editor/plugins/script_text_editor.cpp

+ 1 - 1
editor/plugins/script_text_editor.cpp

@@ -388,7 +388,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_edit()->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_edit()->insert_at("# warning-ignore:" + meta["code"].operator String(), meta["line"].operator int64_t() - 1);