diff --git a/src/text_editor/text_editor.cpp b/src/text_editor/text_editor.cpp index ca3a2d9..e60dffe 100644 --- a/src/text_editor/text_editor.cpp +++ b/src/text_editor/text_editor.cpp @@ -526,6 +526,12 @@ void Update(Event event) { { ProfileScope(WindowEndOfFrameVisibilityAndLastActive); For (Windows) { + if (it->goto_history.len > ConfigJumpHistorySize) { + RemoveByIndex(&it->goto_history, 0); + } + if (it->goto_redo.len > ConfigJumpHistorySize) { + RemoveByIndex(&it->goto_redo, 0); + } if (it->sync_visibility_with_focus) { if (it->id == ActiveWindowID) { it->visible = true; @@ -541,15 +547,6 @@ void Update(Event event) { LastActiveLayoutWindowID = ActiveWindowID; } } - - For (Windows) { - if (it->goto_history.len > ConfigJumpHistorySize) { - RemoveByIndex(&it->goto_history, 0); - } - if (it->goto_redo.len > ConfigJumpHistorySize) { - RemoveByIndex(&it->goto_redo, 0); - } - } }