From be404e0d4f91548af6ed600b2fd2027ad8a041c7 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 31 Jul 2026 01:47:40 -0300 Subject: focus history is a stack of locations, and the Jumplist is that same stack MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit One container, not two: focus_hist (a stack of pane ids rebuilt every sync) is now jumps[] + a current pointer, and the +Jumps buffer is a RENDERING of that array — nothing copies it, nothing shadows it. prevFocus, Toggleterm, Look's directory order, Back/Forward, Last and Jumplist all walk the one list. A pane id is reused, so a location that only remembered an id would retarget after a respawn: panes now carry a monotonic serial and an entry whose slot holds a different serial is dead. trackJump compacts those out and fixes the pointer in the same pass. The push rule lives in ONE place and says: a location is worth remembering when you cannot see it any more — a different pane, or more than a bodyful of rows away in the same one. So hjkl never grows the list and 100G, a search hit and a goto-definition do. Ctrl-o/Ctrl-i walk it, SPC j j toggles the last two, SPC j l lists them. Ctrl-i IS Tab on a legacy host, where the binding simply never fires and Tab-executes is untouched; kitty reports them apart. SPC j o/i work anywhere. Two goldens moved, both the SPC ? Help listing gaining four rows. --- test/snapshots/ttyhelp.golden | 60 +++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'test/snapshots/ttyhelp.golden') diff --git a/test/snapshots/ttyhelp.golden b/test/snapshots/ttyhelp.golden index 6cb6d930..ec3a4fd6 100644 --- a/test/snapshots/ttyhelp.golden +++ b/test/snapshots/ttyhelp.golden @@ -45,21 +45,21 @@ | 9 SPC f g Grep | 10 SPC f s Save | 11 SPC h t Tutor -| 12 SPC k Kill -| 13 SPC l D WsDiagnostics -| 14 SPC l S WsSymbols -| 15 SPC l a CodeAction -| 16 SPC l d Diagnostics -| 17 SPC l h SelectRefs -| 18 SPC l i Lspinfo -| 19 SPC l k Hover -| 20 SPC l r Rename -| 21 SPC l s Symbols -| 22 SPC l w Lspwhy -| 23 SPC s d Dump -| 24 SPC s r Restore -| 25 SPC t a Ascii -| 26 SPC t c Colors +| 12 SPC j i Forward +| 13 SPC j j Last +| 14 SPC j l Jumplist +| 15 SPC j o Back +| 16 SPC k Kill +| 17 SPC l D WsDiagnostics +| 18 SPC l S WsSymbols +| 19 SPC l a CodeAction +| 20 SPC l d Diagnostics +| 21 SPC l h SelectRefs +| 22 SPC l i Lspinfo +| 23 SPC l k Hover +| 24 SPC l r Rename +| 25 SPC l s Symbols +| 26 SPC l w Lspwhy == snap leaderworks grid=100x30 cursor=7,4 |Kill Newcol Tutor Debug NextColor Dump Find Grep Help | TTY /tmp/pardes-snap/ttyhelp/cwd Del @@ -76,18 +76,18 @@ | 9 SPC f g Grep | 10 SPC f s Save | 11 SPC h t Tutor -| 12 SPC k Kill -| 13 SPC l D WsDiagnostics -| 14 SPC l S WsSymbols -| 15 SPC l a CodeAction -| 16 SPC l d Diagnostics -| 17 SPC l h SelectRefs -| 18 SPC l i Lspinfo -| 19 SPC l k Hover -| 20 SPC l r Rename -| 21 SPC l s Symbols -| 22 SPC l w Lspwhy -| 23 SPC s d Dump -| 24 SPC s r Restore -| 25 SPC t a Ascii -| 26 SPC t c Colors +| 12 SPC j i Forward +| 13 SPC j j Last +| 14 SPC j l Jumplist +| 15 SPC j o Back +| 16 SPC k Kill +| 17 SPC l D WsDiagnostics +| 18 SPC l S WsSymbols +| 19 SPC l a CodeAction +| 20 SPC l d Diagnostics +| 21 SPC l h SelectRefs +| 22 SPC l i Lspinfo +| 23 SPC l k Hover +| 24 SPC l r Rename +| 25 SPC l s Symbols +| 26 SPC l w Lspwhy -- cgit v1.3