1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Merge pull request #52662 from Chaosus/fix_bookmarks

Fix editor crash on pressing `Go to Previous Bookmark` menu button
This commit is contained in:
Rémi Verschelde
2021-09-14 14:13:00 +02:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -1755,7 +1755,7 @@ void CodeTextEditor::goto_prev_bookmark() {
text_editor->set_caret_line(bmarks[bmarks.size() - 1]);
text_editor->center_viewport_to_caret();
} else {
for (int i = bmarks.size(); i >= 0; i--) {
for (int i = bmarks.size() - 1; i >= 0; i--) {
int bmark_line = bmarks[i];
if (bmark_line < line) {
text_editor->unfold_line(bmark_line);