From 44bf7c68ff86bfc930ff0d68cd04bb902257ff28 Mon Sep 17 00:00:00 2001 From: Krzosa Karol Date: Fri, 26 Dec 2025 15:41:29 +0100 Subject: [PATCH] Misc --- src/text_editor/text_editor.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) 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); - } - } }