Merge pull request #51755 from jmb462/fix-carret-not-following-debugger

Fix caret not following while debugging (Fix #51754)
This commit is contained in:
Rémi Verschelde 2021-08-17 14:02:47 +02:00 committed by GitHub
commit 3621ec9b57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -1429,13 +1429,13 @@ void CodeTextEditor::toggle_inline_comment(const String &delimiter) {
void CodeTextEditor::goto_line(int p_line) {
text_editor->deselect();
text_editor->unfold_line(p_line);
text_editor->call_deferred(SNAME("cursor_set_line"), p_line);
text_editor->call_deferred(SNAME("set_caret_line"), p_line);
}
void CodeTextEditor::goto_line_selection(int p_line, int p_begin, int p_end) {
text_editor->unfold_line(p_line);
text_editor->call_deferred(SNAME("cursor_set_line"), p_line);
text_editor->call_deferred(SNAME("cursor_set_column"), p_begin);
text_editor->call_deferred(SNAME("set_caret_line"), p_line);
text_editor->call_deferred(SNAME("set_caret_column"), p_begin);
text_editor->select(p_line, p_begin, p_line, p_end);
}