detached f75a2e7

test(core): cover a screen-sized tile mapping under a bound fullscreen

commit
f75a2e77712f49db576b3cea51262c073916b74e
author
brice · · 2026-10-23 01:12 UTC
parent
2ca07b7
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
checks
1/1
1 file · +28 -0
M internal/core/legacy_fullscreen_internal_test.go +28 -0
@@ -1,6 +1,7 @@
11 package core
22
33 import (
4+ "context"
45 "testing"
56
67 "github.com/bnema/neferwl/internal/ports"
@@ -216,3 +217,30 @@ func TestLegacyFullscreenNeedsFocusAtFirstSize(t *testing.T) {
216217 }
217218 })
218219 }
220+
221+// The adapter's sequence for a screen-sized tile mapping under a cover
222+// (bound fullscreen, animations on): the cover and its focus stay.
223+func TestLegacyFullscreenUnderBoundCover(t *testing.T) {
224+ for _, anim := range []bool{false, true} {
225+ c, _, _ := fadeCore(t)
226+ c.cfg.Animations.On = anim
227+ sc := c.cur()
228+ c.mapWindow(ports.WindowMapped{ID: 1})
229+ c.mapWindow(ports.WindowMapped{ID: 2})
230+ sc.mon.ToggleFullscreen()
231+ w := sc.mon.Current()
232+ if w.fullscreen != 2 {
233+ t.Fatalf("setup: fullscreen = %d", w.fullscreen)
234+ }
235+ c.clientEvent(context.Background(), ports.WindowMapped{ID: 3})
236+ o := sc.rect()
237+ c.clientEvent(context.Background(), ports.WindowResized{ID: 3, Width: o.W, Height: o.H})
238+ _ = c.publish(context.Background())
239+ if w.fullscreen != 2 {
240+ t.Fatalf("anim=%v: fullscreen = %d, want the cover 2", anim, w.fullscreen)
241+ }
242+ if id, _ := w.Focused(); id != 2 {
243+ t.Fatalf("anim=%v: focus moved to %d", anim, id)
244+ }
245+ }
246+}
@@ -1,6 +1,7 @@
1 package core1 package core
2 2
3 import (3 import (
4+ "context"
4 "testing"5 "testing"
5 6
6 "github.com/bnema/neferwl/internal/ports"7 "github.com/bnema/neferwl/internal/ports"
@@ -216,3 +217,30 @@ func TestLegacyFullscreenNeedsFocusAtFirstSize(t *testing.T) {
216 }217 }
217 })218 })
218 }219 }
220+
221+// The adapter's sequence for a screen-sized tile mapping under a cover
222+// (bound fullscreen, animations on): the cover and its focus stay.
223+func TestLegacyFullscreenUnderBoundCover(t *testing.T) {
224+ for _, anim := range []bool{false, true} {
225+ c, _, _ := fadeCore(t)
226+ c.cfg.Animations.On = anim
227+ sc := c.cur()
228+ c.mapWindow(ports.WindowMapped{ID: 1})
229+ c.mapWindow(ports.WindowMapped{ID: 2})
230+ sc.mon.ToggleFullscreen()
231+ w := sc.mon.Current()
232+ if w.fullscreen != 2 {
233+ t.Fatalf("setup: fullscreen = %d", w.fullscreen)
234+ }
235+ c.clientEvent(context.Background(), ports.WindowMapped{ID: 3})
236+ o := sc.rect()
237+ c.clientEvent(context.Background(), ports.WindowResized{ID: 3, Width: o.W, Height: o.H})
238+ _ = c.publish(context.Background())
239+ if w.fullscreen != 2 {
240+ t.Fatalf("anim=%v: fullscreen = %d, want the cover 2", anim, w.fullscreen)
241+ }
242+ if id, _ := w.Focused(); id != 2 {
243+ t.Fatalf("anim=%v: focus moved to %d", anim, id)
244+ }
245+ }
246+}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 23

Tags 10

↑↓ moveenter openesc close