You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Regression: Can't switch between windows of same app after some time #16
Eventually Alt-Tilde/Backquote seems to stop working. "Eventually" as in after cmdtab has run for some time. Probably something goes wrong after cmdtab has observed more than 128 window changes, which is max history entries. The code that handles the overflow is here. Admittedly I wrote this while rather exhausted, so I won't be surprised if it's wonky.
changed the title [-]Can't switch between windows of same app after some time[/-][+]Regression: Can't switch between windows of same app after some time[/+]on Apr 22, 2025
I can't repro. However, you generate an off-by-one in the linked code.
In the if branch, postfix incrementation should be used sizeof History[0] * HistoryCount++
and in the else branch take either sizeof History[0] * (HistoryCount - 1)
or, preferably something like sizeof History[0] * (countof(History) - 1) or sizeof History - sizeof History[0]
to tell the compiler it's a constant expression which doesn't need to be calculated at runtime.
I'll refrain from further PRs for now as it doesn't seem you have time to review them at the moment.
This issue might have been fixed by #33/#36. I haven't kept track, so it might have disappeared (or not!) from other changes. I'll close if I eventually feel confident that I'm not having this issue anymore.
Activity
[-]Can't switch between windows of same app after some time[/-][+]Regression: Can't switch between windows of same app after some time[/+]german-one commentedon May 7, 2025
I can't repro. However, you generate an off-by-one in the linked code.
In the
ifbranch, postfix incrementation should be usedsizeof History[0] * HistoryCount++and in the
elsebranch take eithersizeof History[0] * (HistoryCount - 1)or, preferably something like
sizeof History[0] * (countof(History) - 1)orsizeof History - sizeof History[0]to tell the compiler it's a constant expression which doesn't need to be calculated at runtime.
I'll refrain from further PRs for now as it doesn't seem you have time to review them at the moment.
stianhoiland commentedon Aug 19, 2026
This issue might have been fixed by #33/#36. I haven't kept track, so it might have disappeared (or not!) from other changes. I'll close if I eventually feel confident that I'm not having this issue anymore.