From 4b53a39743dc5962e985fcf059a1222538d57b3f Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 27 Jul 2026 12:34:24 -0300 Subject: k off the topmost tagline focuses the TOPBAR: row 0 is a tagline too --- test/snapshots/tagnav.golden | 219 ++++++++++++++++++++++++++++++++++++++++++- test/snapshots/tagnav.snap | 52 +++++++++- 2 files changed, 268 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/snapshots/tagnav.golden b/test/snapshots/tagnav.golden index 2b00eba5..77d5a846 100644 --- a/test/snapshots/tagnav.golden +++ b/test/snapshots/tagnav.golden @@ -184,7 +184,100 @@ | | | -== snap up-edge grid=100x30 cursor=39,1 +== snap up-edge grid=100x30 cursor=0,0 +|Kill Newcol Tutor Debug NextColor Dump +| NOR /tmp/pardes-snap/tagnav/cwd/w.txt Save Del NOR /tmp/pardes-snap/tagnav/cwd Del +| 1 alpha +| 2 beta w.txt +| 3 gamma +| +| +| +| +| +| +| +| +| +| +| +| NOR /tmp/pardes-snap/tagnav/cwd Del +| +| w.txt +| +| +| +| +| +| +| +| +| +| +| +== snap topbar-word grid=100x30 cursor=4,0 +|Kill Newcol Tutor Debug NextColor Dump +| NOR /tmp/pardes-snap/tagnav/cwd/w.txt Save Del NOR /tmp/pardes-snap/tagnav/cwd Del +| 1 alpha +| 2 beta w.txt +| 3 gamma +| +| +| +| +| +| +| +| +| +| +| +| NOR /tmp/pardes-snap/tagnav/cwd Del +| +| w.txt +| +| +| +| +| +| +| +| +| +| +| +== snap topbar-graphemes grid=100x30 cursor=6,0 +|Kill Newcol Tutor Debug NextColor Dump +| NOR /tmp/pardes-snap/tagnav/cwd/w.txt Save Del NOR /tmp/pardes-snap/tagnav/cwd Del +| 1 alpha +| 2 beta w.txt +| 3 gamma +| +| +| +| +| +| +| +| +| +| +| +| NOR /tmp/pardes-snap/tagnav/cwd Del +| +| w.txt +| +| +| +| +| +| +| +| +| +| +| +== snap back-down grid=100x30 cursor=39,1 |Kill Newcol Tutor Debug NextColor Dump | NOR /tmp/pardes-snap/tagnav/cwd/w.txt Save Del NOR /tmp/pardes-snap/tagnav/cwd Del | 1 alpha @@ -370,3 +463,127 @@ | | | +== snap topbar-dollar grid=100x30 cursor=37,0 +|Kill Newcol Tutor Debug NextColor Dump +| NOR /tmp/pardes-snap/tagnav/cwd/w.txt Save Del TTY /tmp/pardes-snap/tagnav/cwd Del +| 1 alpha $ ls +| 2 beta w.txt +| 3 gamma $ +| +| +| +| +| +| +| +| +| +| +| +| NOR /tmp/pardes-snap/tagnav/cwd Del +| +| w.txt +| +| +| +| +| +| +| +| +| +| +| +== snap topbar-exec grid=100x30 cursor=7,2 +|Kill Newcol Tutor Debug NextColor Dump Restore /tmp/pardes-dump.zon +| NOR /tmp/pardes-snap/tagnav/cwd/w.txt Save Del TTY /tmp/pardes-snap/tagnav/cwd Del +| 1 alpha $ ls +| 2 beta w.txt +| 3 gamma $ +| +| +| +| +| +| +| +| +| +| +| +| NOR /tmp/pardes-snap/tagnav/cwd Del +| +| w.txt +| +| +| +| +| +| +| +| +| +| +| +== snap topbar-restore-word grid=100x30 cursor=39,0 +|Kill Newcol Tutor Debug NextColor Dump Restore /tmp/pardes-dump.zon +| NOR /tmp/pardes-snap/tagnav/cwd/w.txt Save Del TTY /tmp/pardes-snap/tagnav/cwd Del +| 1 alpha $ ls +| 2 beta w.txt +| 3 gamma $ +| +| +| +| +| +| +| +| +| +| +| +| NOR /tmp/pardes-snap/tagnav/cwd Del +| +| w.txt +| +| +| +| +| +| +| +| +| +| +| +== snap topbar-restored grid=100x30 cursor=7,2 +|Kill Newcol Tutor Debug NextColor Dump +| NOR /tmp/pardes-snap/tagnav/cwd/w.txt Save Del TTY /tmp/pardes-snap/tagnav/cwd Del +| 1 alpha $ ls +| 2 beta w.txt +| 3 gamma $ +| +| +| +| +| +| +| +| +| +| +| +| NOR /tmp/pardes-snap/tagnav/cwd Del +| +| w.txt +| +| +| +| +| +| +| +| +| +| +| diff --git a/test/snapshots/tagnav.snap b/test/snapshots/tagnav.snap index 6ba86c08..fbb9c917 100644 --- a/test/snapshots/tagnav.snap +++ b/test/snapshots/tagnav.snap @@ -42,11 +42,28 @@ snap down-tag key k stable 400 5000 snap up-tag -# k again: nothing above the file. focusDir leaves `active` alone, so the move -# is a plain no-op and the tag KEEPS focus — you stay exactly where you were. +# k again: nothing above the file — but "nothing" is not nowhere. Above the +# topmost tagline is the TOPBAR, row 0, the global one. It is not a pane, so +# focusDir can never find it; this fallback is the one place k walks off the +# layout entirely. Evidence is the cursor=0,0 header: the bar has the keyboard +# and parks on `Kill`. key k stable 400 5000 snap up-edge +# the bar speaks the tag's own one-line vocabulary: w to the next word start +key w +stable 400 5000 +snap topbar-word +# h/l are plain graphemes up here — row 0 has no window to its left or right to +# walk to — and the arrows still mean what they always did +key l right +stable 400 5000 +snap topbar-graphemes +# j is the mirror of the k that got you here: back DOWN onto the topmost pane's +# tagline, still in normal mode, so the hop is a round trip +key j +stable 400 5000 +snap back-down # the arrows are still in-tag motion: two rights walk two columns of the tail key right right stable 400 5000 @@ -73,3 +90,34 @@ key esc settle 700 stable 400 5000 snap tty-restored +# Enter/Tab on the BAR runs the word under the cursor through the very dispatch +# a middle click on it uses, and leaves the bar FIRST — `Kill` lives up here, so +# a builtin that frees the session must never return into a focused topbar (the +# same hazard the pane-tag chord has with `Del`). `Dump` is the visible one: the +# bar GROWS a `Restore ` word, which is also the case where the line gets +# longer than the column you were parked on. +key c-w h +stable 400 5000 +key : +key k +stable 400 5000 +key $ +stable 400 5000 +snap topbar-dollar +key enter +stable 700 15000 +snap topbar-exec +# THE DELETION HAZARD, from the bar itself: `Restore` frees every pane and +# swaps the core out from under the caller. Walk back onto the word the Dump +# just grew — B twice off the tail, because the LONG word motions are the ones +# that step over a path in one go — and run it. The bar drops focus BEFORE the +# builtin, so nothing reaches for state the swap already freed. +key : +key k +stable 400 5000 +key $ B B +stable 400 5000 +snap topbar-restore-word +key enter +stable 900 15000 +snap topbar-restored -- cgit v1.3