From 198889ab8f78b12c9881a20309a792e419ba1386 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Sat, 8 Aug 2026 10:44:56 -0300 Subject: Esc alternates between the last two panes; Toggleterm is gone MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Esc ran Toggleterm, which hopped between the newest DOC and the newest TERMINAL. That distinction never earned its keep. It made Esc unpredictable — which of three panes you landed on depended on their kinds, not on where you had been — and it could not alternate between two files at all, which is the case you hit most. Editing two files, Esc did nothing. The replacement already existed. Last (SPC j j) is "the pane you were in before this one, whichever it was": it walks the jump stack for the newest entry naming a different pane and restores its line and column. So Esc, and Shift-Esc in tty, now run Last, and Toggleterm is deleted rather than renamed — a third implementation of "go to the other pane" was the thing to avoid. SPC w t goes with it; the w group is the four directional moves, and the jump group already had SPC j j. Held down, Esc alternates. Two files, a file and its shell, a file and a +Search — all the same, because Last has no notion of kind to get wrong. This depends on the swap in the same series: Last reads the stack backwards, and until hopping stopped appending, the pane you came from could fall off it. windownav.snap needed only its keys and prose changed — its golden did not move at all, which is the useful evidence here: for the one scenario the old builtin handled well, Last produces an identical focus sequence. Coverage for what it did not handle is new: a unit test opens a second FILE by looking its name and asserts Esc alternates between two panes of the SAME kind, which is the case that used to be a no-op. Docs follow: tutor.txt, docs/helix-keys.md, docs/design.typ, and the builtin index goldens, which are now one row shorter. 75/75 snapshots, both unit suites, and the macOS ABI build all pass. --- test/snapshots/tagnav.golden | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'test/snapshots/tagnav.golden') diff --git a/test/snapshots/tagnav.golden b/test/snapshots/tagnav.golden index 72cfd175..e3e5e8d2 100644 --- a/test/snapshots/tagnav.golden +++ b/test/snapshots/tagnav.golden @@ -29,7 +29,7 @@ | | | -== snap colon grid=100x30 cursor=35,1 +== snap colon grid=100x30 cursor=36,1 |New Newcol Find Grep Help Tutor Dump NextColor Debug Kill | /tmp/pardes-snap/tagnav/cwd/w.txt Save New Del /tmp/pardes-snap/tagnav/cwd New Del | 1 alpha @@ -60,7 +60,7 @@ | | | -== snap right-tag grid=100x30 cursor=79,1 +== snap right-tag grid=100x30 cursor=80,1 |New Newcol Find Grep Help Tutor Dump NextColor Debug Kill | /tmp/pardes-snap/tagnav/cwd/w.txt Save New Del /tmp/pardes-snap/tagnav/cwd New Del | 1 alpha @@ -91,7 +91,7 @@ | | | -== snap left-tag grid=100x30 cursor=35,1 +== snap left-tag grid=100x30 cursor=36,1 |New Newcol Find Grep Help Tutor Dump NextColor Debug Kill | /tmp/pardes-snap/tagnav/cwd/w.txt Save New Del /tmp/pardes-snap/tagnav/cwd New Del | 1 alpha @@ -122,7 +122,7 @@ | | | -== snap down-tag grid=100x30 cursor=29,16 +== snap down-tag grid=100x30 cursor=30,16 |New Newcol Find Grep Help Tutor Dump NextColor Debug Kill | /tmp/pardes-snap/tagnav/cwd/w.txt Save New Del /tmp/pardes-snap/tagnav/cwd New Del | 1 alpha @@ -153,7 +153,7 @@ | | | -== snap up-tag grid=100x30 cursor=35,1 +== snap up-tag grid=100x30 cursor=36,1 |New Newcol Find Grep Help Tutor Dump NextColor Debug Kill | /tmp/pardes-snap/tagnav/cwd/w.txt Save New Del /tmp/pardes-snap/tagnav/cwd New Del | 1 alpha @@ -277,7 +277,7 @@ | | | -== snap back-down grid=100x30 cursor=35,1 +== snap back-down grid=100x30 cursor=36,1 |New Newcol Find Grep Help Tutor Dump NextColor Debug Kill | /tmp/pardes-snap/tagnav/cwd/w.txt Save New Del /tmp/pardes-snap/tagnav/cwd New Del | 1 alpha @@ -308,7 +308,7 @@ | | | -== snap arrows-still-motion grid=100x30 cursor=37,1 +== snap arrows-still-motion grid=100x30 cursor=38,1 |New Newcol Find Grep Help Tutor Dump NextColor Debug Kill | /tmp/pardes-snap/tagnav/cwd/w.txt Save New Del /tmp/pardes-snap/tagnav/cwd New Del | 1 alpha @@ -401,7 +401,7 @@ | | | -== snap tty-tag grid=100x30 cursor=79,1 +== snap tty-tag grid=100x30 cursor=80,1 |New Newcol Find Grep Help Tutor Dump NextColor Debug Kill | /tmp/pardes-snap/tagnav/cwd/w.txt Save New Del $ /tmp/pardes-snap/tagnav/cwd New Del | 1 alpha -- cgit v1.3