F1-F5 leave full-screen views; dialogs still block them

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-20 19:57:05 +02:00
co-authored by Claude Sonnet 5.5
parent 2dfd018284
commit 6668f91e7a
5 changed files with 46 additions and 13 deletions
+15
View File
@@ -24,3 +24,18 @@ func TestToastProgress(t *testing.T) {
t.Error("progress detection wrong")
}
}
func TestOnlyFullOverlays(t *testing.T) {
a := &App{}
if !a.onlyFullOverlays() {
t.Error("no overlays: view shortcuts must work")
}
a.overlays = []overlay{{full: true}, {full: true}}
if !a.onlyFullOverlays() {
t.Error("full-screen views must not block view shortcuts")
}
a.overlays = append(a.overlays, overlay{})
if a.onlyFullOverlays() {
t.Error("a dialog must block view shortcuts")
}
}