summaryrefslogtreecommitdiffstats
path: root/editor/code_editor.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-12-01 22:20:31 +0100
committerGitHub <noreply@github.com>2019-12-01 22:20:31 +0100
commitd2858e23713314f286875c45b6bd176daf860171 (patch)
tree18d72e610e1cec9603f9dc4462d2232af32f6f5b /editor/code_editor.cpp
parente9b709a5dbbe46d73b121f595cceb08ca31fcc36 (diff)
parentf4d0e598a7500c667028c408c51cdbfb8acaa212 (diff)
downloadredot-engine-d2858e23713314f286875c45b6bd176daf860171.tar.gz
Merge pull request #34048 from KoBeWi/center_of_the_bookmark
Center Script Editor when jumping to bookmarks/breakpoints
Diffstat (limited to 'editor/code_editor.cpp')
-rw-r--r--editor/code_editor.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index 16780a795f..e3138dc1e5 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -1565,6 +1565,7 @@ void CodeTextEditor::goto_next_bookmark() {
if (bline > line) {
text_editor->unfold_line(bline);
text_editor->cursor_set_line(bline);
+ text_editor->center_viewport_to_cursor();
return;
}
}
@@ -1589,6 +1590,7 @@ void CodeTextEditor::goto_prev_bookmark() {
if (bline < line) {
text_editor->unfold_line(bline);
text_editor->cursor_set_line(bline);
+ text_editor->center_viewport_to_cursor();
return;
}
}