Remove jump history, Make sure these windows are visible one at a time

This commit is contained in:
Krzosa Karol
2025-12-30 12:42:05 +01:00
parent ca464c314b
commit ebf0f5de27
6 changed files with 23 additions and 28 deletions

View File

@@ -592,14 +592,6 @@ void Update(Event event) {
}
}
it->skip_checkpoint = false;
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) {
@@ -618,6 +610,20 @@ void Update(Event event) {
window = GetWindow(ActiveWindowID);
}
// Behavior where these windows cannot be visible at the same time
{
WindowID id[] = {BuildWindowID, CommandWindowID, SearchWindowID};
for (int i = 0; i < Lengthof(id); i += 1) {
if (ActiveWindowID == id[i]) {
for (int j = 0; j < Lengthof(id); j += 1) {
if (i == j) continue;
Window *window = GetWindow(id[j]);
window->visible = false;
}
}
}
}
if (ActiveWindowID != LastActiveLayoutWindowID) {
if (window->layout) {
LastActiveLayoutWindowID = ActiveWindowID;