diff options
Diffstat (limited to 'editor/code_editor.cpp')
-rw-r--r-- | editor/code_editor.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index 44cd15ab90..c51c01dbeb 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -1573,6 +1573,7 @@ void CodeTextEditor::goto_next_bookmark() { if (line >= bmarks[bmarks.size() - 1]) { text_editor->unfold_line(bmarks[0]); text_editor->cursor_set_line(bmarks[0]); + text_editor->center_viewport_to_cursor(); } else { for (List<int>::Element *E = bmarks.front(); E; E = E->next()) { int bline = E->get(); @@ -1598,6 +1599,7 @@ void CodeTextEditor::goto_prev_bookmark() { if (line <= bmarks[0]) { text_editor->unfold_line(bmarks[bmarks.size() - 1]); text_editor->cursor_set_line(bmarks[bmarks.size() - 1]); + text_editor->center_viewport_to_cursor(); } else { for (List<int>::Element *E = bmarks.back(); E; E = E->prev()) { int bline = E->get(); |