1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-06 19:41:11 +00:00

Merge pull request #56504 from Chaosus/fix_code_editor_goto_error

This commit is contained in:
Rémi Verschelde
2022-01-06 09:39:10 +01:00
committed by GitHub

View File

@@ -1548,7 +1548,9 @@ void CodeTextEditor::set_error_pos(int p_line, int p_column) {
void CodeTextEditor::goto_error() {
if (!error->get_text().is_empty()) {
text_editor->unfold_line(error_line);
if (text_editor->get_line_count() != error_line) {
text_editor->unfold_line(error_line);
}
text_editor->set_caret_line(error_line);
text_editor->set_caret_column(error_column);
text_editor->center_viewport_to_caret();