From 0b4cfd4b416d03ef64ccd908dfee810c6a498569 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 9 Nov 2026 23:15:39 -0300 Subject: a session's end leaves a slim dump and History lists them, the tags gain Follow, History and the window's Fonts: every way out (Exit, the last pane's Del, the host's quit) runs Pardes.endSession, which puts a dump of the session in the state file under the usual label before quitting, slim by the dump's own means (dumpJoin's slim_terminals, and Store's slim-file swap now a Slim struct: no undo, a clean file's text read from its file again by revivePane, a terminal a size for a new shell), none for a session of shells alone; the dump's image carries the panes' names, which /dumps rows end with; the History builtin (SPC f h) lists the state file's dumps in a +History pane and a look at a row is a Restore of its label; the default tags: Follow after Collapse on text panes, History before Debug on the workspace row, Fonts after Themes in a window's view alone (tagline.topbarDefault picks the row per view; both rows are known defaults to the docs and tutor tests); the tty goldens re-recorded (the new words; a narrow pane's tag wraps to a second row, so its body rows shift), builtins JSON regenerated Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- docs/typ/builtins-gui.json | 3 +- docs/typ/builtins-tui.json | 1 + docs/typ/cheatsheet.typ | 5 +- docs/typ/guide.typ | 4 +- docs/typ/reference.typ | 10 ++- src/CHANGELOG.md | 10 +++ src/Core.zig | 25 ++++-- src/Db.zig | 44 +++++++---- src/Effect.zig | 4 +- src/Handover.zig | 2 +- src/Output.zig | 17 +++++ src/builtins.zig | 18 ++++- src/config.zig | 17 +++-- src/dump.zig | 85 ++++++++++++++++----- src/look.zig | 15 ++++ src/mouse.zig | 3 +- src/panes.zig | 2 +- src/tagline.zig | 13 +++- src/tutor.txt | 6 +- test/behaviour/mouse.zig | 6 +- test/behaviour/panes.zig | 4 +- test/behaviour/root_ctl.zig | 38 ++++++++++ test/behaviour/tags.zig | 20 +++-- test/snapshots/argv.golden | 14 ++-- test/snapshots/badutf.golden | 6 +- test/snapshots/boot.golden | 2 +- test/snapshots/builtins.golden | 8 +- test/snapshots/callstack.golden | 6 +- test/snapshots/chordcut.golden | 68 ++++++++--------- test/snapshots/cmdexit.golden | 4 +- test/snapshots/cmdword.golden | 6 +- test/snapshots/colgrip.golden | 8 +- test/snapshots/collapse.golden | 12 +-- test/snapshots/cornerdrag-left.golden | 2 +- test/snapshots/cornerdrag.golden | 2 +- test/snapshots/cursorline.golden | 4 +- test/snapshots/delask.golden | 12 +-- test/snapshots/diffview.golden | 12 +-- test/snapshots/dirpane.golden | 6 +- test/snapshots/dump.golden | 2 +- test/snapshots/edit.golden | 2 +- test/snapshots/emptycol.golden | 8 +- test/snapshots/exec-bigdrag.golden | 2 +- test/snapshots/exec.golden | 2 +- test/snapshots/fileedit.golden | 4 +- test/snapshots/filewatch.golden | 6 +- test/snapshots/find.golden | 6 +- test/snapshots/follow.golden | 118 ++++++++++++++--------------- test/snapshots/fsearch.golden | 4 +- test/snapshots/ghostty-mid.golden | 2 +- test/snapshots/grep.golden | 8 +- test/snapshots/headersweep-restored.golden | 4 +- test/snapshots/headersweep.golden | 8 +- test/snapshots/hscroll.golden | 4 +- test/snapshots/images.golden | 4 +- test/snapshots/jumps.golden | 37 ++++----- test/snapshots/layout-close.golden | 2 +- test/snapshots/layout-open.golden | 6 +- test/snapshots/leader.golden | 12 +-- test/snapshots/load.golden | 2 +- test/snapshots/logquiet.golden | 2 +- test/snapshots/look-center.golden | 4 +- test/snapshots/look-fd-deep.golden | 8 +- test/snapshots/look-file-1col.golden | 4 +- test/snapshots/look-file.golden | 4 +- test/snapshots/lookloaded.golden | 6 +- test/snapshots/lookpanes.golden | 12 +-- test/snapshots/lookrange.golden | 6 +- test/snapshots/lsp-client-edit.golden | 10 +-- test/snapshots/lsp-client.golden | 6 +- test/snapshots/lsp-rename-files.golden | 8 +- test/snapshots/lsp-rename.golden | 8 +- test/snapshots/lsp.golden | 8 +- test/snapshots/lspcomplete.golden | 26 +++---- test/snapshots/lspcompletemoved.golden | 4 +- test/snapshots/lspdebug.golden | 4 +- test/snapshots/lsprelpath.golden | 35 ++++----- test/snapshots/markup.golden | 8 +- test/snapshots/mini.golden | 36 ++++----- test/snapshots/modal.golden | 2 +- test/snapshots/msg.golden | 10 +-- test/snapshots/multicursor.golden | 6 +- test/snapshots/nested-optout.golden | 20 ++--- test/snapshots/nested.golden | 14 ++-- test/snapshots/ninep.golden | 30 ++++---- test/snapshots/pagercolor.golden | 6 +- test/snapshots/pipe.golden | 8 +- test/snapshots/psearch.golden | 8 +- test/snapshots/reflow.golden | 4 +- test/snapshots/respawn.golden | 2 +- test/snapshots/restore.golden | 2 +- test/snapshots/savepane.golden | 6 +- test/snapshots/scroll.golden | 2 +- test/snapshots/scrolloff.golden | 4 +- test/snapshots/selarg.golden | 2 +- test/snapshots/selregex.golden | 8 +- test/snapshots/shellset.golden | 6 +- test/snapshots/shrinktag.golden | 2 +- test/snapshots/stepgrain.golden | 6 +- test/snapshots/syntax.golden | 6 +- test/snapshots/tag.golden | 4 +- test/snapshots/tagalign.golden | 34 +++++---- test/snapshots/tagalign2col.golden | 8 +- test/snapshots/tagcmd.golden | 6 +- test/snapshots/tagnav.golden | 50 +++++++++--- test/snapshots/tagpath.golden | 12 +-- test/snapshots/theme.golden | 40 +++++----- test/snapshots/themesel.golden | 6 +- test/snapshots/topbarexec.golden | 2 +- test/snapshots/tty.golden | 2 +- test/snapshots/ttyclick.golden | 2 +- test/snapshots/ttyedit.golden | 2 +- test/snapshots/ttyfollow.golden | 2 +- test/snapshots/ttyhelp.golden | 6 +- test/snapshots/ttylook.golden | 6 +- test/snapshots/ttyonly.golden | 4 +- test/snapshots/ttypaste.golden | 2 +- test/snapshots/ttyprompt.golden | 2 +- test/snapshots/ttytaken.golden | 2 +- test/snapshots/tutor.golden | 4 +- test/snapshots/wheeldrift.golden | 71 +++++++++-------- test/snapshots/winch.golden | 4 +- test/snapshots/windownav.golden | 4 +- test/snapshots/windowops.golden | 4 +- test/snapshots/wrap.golden | 6 +- test/snapshots/yankpaste.golden | 4 +- 126 files changed, 818 insertions(+), 591 deletions(-) diff --git a/docs/typ/builtins-gui.json b/docs/typ/builtins-gui.json index 09517de3..a8f682a6 100644 --- a/docs/typ/builtins-gui.json +++ b/docs/typ/builtins-gui.json @@ -39,12 +39,13 @@ {"name": "Find", "leader": "SPC f f", "also": ["topbar"], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "List the files below this pane's directory whose names hold its argument, in a +Search."}, {"name": "Follow", "leader": "SPC c f", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Emacs's follow-mode: one text across a chain of panes as consecutive pages, each going on where the one before ends, scrolled as one."}, {"name": "Font", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "The body font, by name or path, and its size."}, - {"name": "Fonts", "leader": "SPC t f", "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "List the fonts in a pane, each a word to click."}, + {"name": "Fonts", "leader": "SPC t f", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "List the fonts in a pane, each a word to click."}, {"name": "Forward", "leader": "SPC j i", "also": ["C-i"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Ctrl-i: one step forward again, up to wherever Back started."}, {"name": "Get", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "acme's Get: the pane's file read again, its unsaved edits refused once as Del refuses them."}, {"name": "Grep", "leader": "SPC f g", "also": ["topbar"], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Find's sibling: Find matches file NAMES under this pane's directory, Grep matches the LINES of those files, on the disk engine's worker."}, {"name": "GripWidth", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "The grip and scrollbar width, as a percent of the theme's rail."}, {"name": "Help", "leader": "SPC ?", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Open the help: every key and every builtin."}, + {"name": "History", "leader": "SPC f h", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "List the state file's dumps, those Dump made and those every session's end left (dump.dumpExit), the newest first: a row each, its label, date, size, pane count and the panes' names; a look at a row is a Restore of its label."}, {"name": "Hover", "leader": "SPC l k", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Ask the language server about the symbol under the cursor."}, {"name": "InactiveDim", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "Fade the unfocused panes' text by a percentage, 0 through 100, 0 off."}, {"name": "Incl", "leader": null, "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "acme's Incl, for the session: `Incl dir ...` adds directories a look at a name found nowhere else is tried in (`stdio.h`, ``), bare lists them, `Incl -` empties the list."}, diff --git a/docs/typ/builtins-tui.json b/docs/typ/builtins-tui.json index edc401f6..c5533c63 100644 --- a/docs/typ/builtins-tui.json +++ b/docs/typ/builtins-tui.json @@ -41,6 +41,7 @@ {"name": "Get", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "acme's Get: the pane's file read again, its unsaved edits refused once as Del refuses them."}, {"name": "Grep", "leader": "SPC f g", "also": ["topbar"], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Find's sibling: Find matches file NAMES under this pane's directory, Grep matches the LINES of those files, on the disk engine's worker."}, {"name": "Help", "leader": "SPC ?", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Open the help: every key and every builtin."}, + {"name": "History", "leader": "SPC f h", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "List the state file's dumps, those Dump made and those every session's end left (dump.dumpExit), the newest first: a row each, its label, date, size, pane count and the panes' names; a look at a row is a Restore of its label."}, {"name": "Hover", "leader": "SPC l k", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Ask the language server about the symbol under the cursor."}, {"name": "InactiveDim", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "Fade the unfocused panes' text by a percentage, 0 through 100, 0 off."}, {"name": "Incl", "leader": null, "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "acme's Incl, for the session: `Incl dir ...` adds directories a look at a name found nowhere else is tried in (`stdio.h`, ``), bare lists them, `Incl -` empties the list."}, diff --git a/docs/typ/cheatsheet.typ b/docs/typ/cheatsheet.typ index 25a9294f..5e373fac 100644 --- a/docs/typ/cheatsheet.typ +++ b/docs/typ/cheatsheet.typ @@ -24,9 +24,9 @@ Over a program that takes the mouse, Shift swaps: #btn("B1", shift: true) select One button: Alt/Option-click is #btn("B2"), Cmd/Super-click #btn("B3"), sweeps too (a terminal passes only Alt); Ctrl-click is a definition; a program that takes the mouse gets the plain click. == Tags -#tag("Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit") +#tag("Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Fonts Config History Debug Exit") #tag("New Term Find Grep Joincol Delcol") -#tag("Save Term Collapse Del", path: "/home/me/notes.txt") +#tag("Save Term Collapse Follow Del", path: "/home/me/notes.txt") #tag("Term+bash Save Mode Filter Collapse Del", path: "/home/me/src") #tag("Term PdfSections PdfTint PdfFit Collapse Del", path: "[1/12] … manual.pdf") - #word("Del") over unsaved text refuses once; again discards. #word("Del") `j`: rows below. #key("SPC d") between two panes takes #key("k") (rows above) or #key("j") (below), asking only if you pause. @@ -87,6 +87,7 @@ Helix-style: motions *select*, then an edit acts on the selection. Mode box: bla key("SPC f f"), word("Find"), key("SPC f g"), word("Grep"), key("SPC f r"), word("Recent"), + key("SPC f h"), word("History"), key("SPC b b"), word("Panes"), key("SPC s s"), [declarations], key("SPC f c"), word("Config"), diff --git a/docs/typ/guide.typ b/docs/typ/guide.typ index 51f29fb8..41d59e53 100644 --- a/docs/typ/guide.typ +++ b/docs/typ/guide.typ @@ -92,9 +92,9 @@ the registers. #key("SPC y") and #key("SPC p") use the system clipboard. = Tags -#tag("Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit") +#tag("Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Fonts Config History Debug Exit") #tag("New Term Find Grep Joincol Delcol") -#tag("Save Term Collapse Del", path: "/home/me/notes.txt") +#tag("Save Term Collapse Follow Del", path: "/home/me/notes.txt") A tag is text with undo. Type `make` into one and #word("Exec") it, or delete the words you never use. Any word runs from any tag: #word("Exit") diff --git a/docs/typ/reference.typ b/docs/typ/reference.typ index 48bdfdbe..e1c9e263 100644 --- a/docs/typ/reference.typ +++ b/docs/typ/reference.typ @@ -396,7 +396,15 @@ Writes take settings and session builtins (`scope = .session` in #word("Restore") `