summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-05 00:08:16 -0300
committerGabriel Schneider <[email protected]>2026-11-05 00:32:56 -0300
commit2367ed34beccf3f2f1b8bbf6b8a171f50933d7a1 (patch)
tree8dcc7111d1e78806c6ac0e0bd1493c25d86bfc85
parent43a4c24e607a456d7a23eb8a779bce5651f18222 (diff)
downloadpardes-2367ed34beccf3f2f1b8bbf6b8a171f50933d7a1.tar.gz
pardes-2367ed34beccf3f2f1b8bbf6b8a171f50933d7a1.zip
config, exec, look: Placement, BootShell, LookWord, DirLook and DiffLook go, with what each kept of pardes before it took acme's ways (exec's pardesPlace, atFoot, belowParent, pardesDoc and evictLonePristineTty with mouse.zig's call, layout's splitParent and columnFitsHalves that only they called, look's ls in a terminal for a directory, the word and patch looks' other branches, the SPC c p key, their Help and builtins-JSON rows, their lines in docs/typ and a changelog line), and the tests of them: Dir.zig's "DirLook terminal: a look at a directory opens a terminal there, no pane listing it", pardes.zig's "first document fallback splits like Term from the originating pane", "first document keeps its originating shell and only opens a column when it fits", "BootShell keep leaves the untouched boot shell a dragged document joins; replace closes it" and "a Look on a directory does not type ls into an occupied terminal", keys.zig's "keys: SPC j n and SPC j p walk on from the place a Look's +Search listing chose, its keyboard left in the file", look_and_exec.zig's "look-and-exec: a second LookWord list look in a directory refills its +Search rather than stacking another", placement.zig's "placement: Placement pardes puts a new pane right under the asking one, and bare it steps back to acme", output.zig's "LookNext/LookPrev keeps the result output a Look chose through a no-match answer, and a stale serial once it is deleted", and the snapshot scripts that turned them on (cmdword, doccol, look-dir, lookpanes, rsearch, splitparent, ttylook); the Del question's test makes its middle panes the acme way, a New at the column's foot, and the others that turned one on for their layout run without it
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
-rw-r--r--docs/typ/builtins-gui.json5
-rw-r--r--docs/typ/builtins-tui.json5
-rw-r--r--docs/typ/cheatsheet.typ1
-rw-r--r--docs/typ/guide.typ9
-rw-r--r--docs/typ/reference.typ34
-rw-r--r--src/CHANGELOG.md7
-rw-r--r--src/Dir.zig25
-rw-r--r--src/Output.zig8
-rw-r--r--src/config.zig35
-rw-r--r--src/dump.zig2
-rw-r--r--src/exec.zig145
-rw-r--r--src/hunks.zig8
-rw-r--r--src/layout.zig21
-rw-r--r--src/look.zig28
-rw-r--r--src/mouse.zig6
-rw-r--r--src/ninep/cols.zig31
-rw-r--r--src/ninep/ctl.zig16
-rw-r--r--src/ninep/tree.zig1
-rw-r--r--src/pardes.zig164
-rw-r--r--test/behaviour/keys.zig24
-rw-r--r--test/behaviour/look_and_exec.zig27
-rw-r--r--test/behaviour/modes.zig4
-rw-r--r--test/behaviour/panes.zig1
-rw-r--r--test/behaviour/placement.zig18
-rw-r--r--test/behaviour/root_ctl.zig1
-rw-r--r--test/monkey9p.zig28
-rw-r--r--test/output.zig55
-rw-r--r--test/process/terminals.zig7
-rw-r--r--test/process/tree.zig2
-rw-r--r--test/snapshots/builtins.golden5
-rw-r--r--test/snapshots/cmdword.golden28
-rw-r--r--test/snapshots/cmdword.snap93
-rw-r--r--test/snapshots/doccol.golden25
-rw-r--r--test/snapshots/doccol.snap61
-rw-r--r--test/snapshots/jumps.snap3
-rw-r--r--test/snapshots/leader.golden3
-rw-r--r--test/snapshots/look-dir.golden22
-rw-r--r--test/snapshots/look-dir.snap23
-rw-r--r--test/snapshots/lookpanes.golden80
-rw-r--r--test/snapshots/lookpanes.snap95
-rw-r--r--test/snapshots/rsearch.golden43
-rw-r--r--test/snapshots/rsearch.snap99
-rw-r--r--test/snapshots/shellset.snap6
-rw-r--r--test/snapshots/splitparent.golden35
-rw-r--r--test/snapshots/splitparent.snap34
-rw-r--r--test/snapshots/ttylook.golden71
-rw-r--r--test/snapshots/ttylook.snap65
-rw-r--r--test/snapshots/ttytaken.snap2
48 files changed, 118 insertions, 1393 deletions
diff --git a/docs/typ/builtins-gui.json b/docs/typ/builtins-gui.json
index a78c2af0..8150509c 100644
--- a/docs/typ/builtins-gui.json
+++ b/docs/typ/builtins-gui.json
@@ -3,7 +3,6 @@
{"name": "Ascii", "leader": "SPC t a", "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "add the printable ASCII bitmaps to the matcher's glyph set"},
{"name": "Back", "leader": "SPC j o", "also": ["C-o"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Ctrl-o: one step back into the history."},
{"name": "Bloom", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off, 0-3", "doc": "The brightest ink glows a little: a level, 0 (off) through 3."},
- {"name": "BootShell", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "keep, replace", "doc": "A document dropped where a lone untouched shell stands: keep the shell, or replace it."},
{"name": "Callees", "leader": "SPC l C", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "List the functions the function under the cursor calls."},
{"name": "Callers", "leader": "SPC l c", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "List the callers of the function under the cursor."},
{"name": "Callstack", "leader": "SPC l b", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Show outermost callers first, with signatures and call sites (gc)."},
@@ -32,8 +31,6 @@
{"name": "Detach", "leader": "SPC s D", "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Detach this pardes from its terminal or window, leaving the session running: `pardes --attach` (or `pardes-gui --attach`) takes it back."},
{"name": "Diagnostics", "leader": "SPC l d", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "List the file's diagnostics from the language server."},
{"name": "Diff", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Stack a diff's hunks as a diff viewer shows them, each under its place and the declarations around it, in a +Diff; on a +Diff, show the diff itself as text."},
- {"name": "DiffLook", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "hunks, text", "doc": "A .diff or .patch looked at: hunks, a +Diff stacking its hunks, or text, the file itself; Diff goes from one to the other."},
- {"name": "DirLook", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "pane, terminal", "doc": "A directory looked at: pane, a pane listing it as acme's directory window, or terminal, ls in a terminal there."},
{"name": "Down", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Move the keyboard to the pane below, off a tag onto the pane under it."},
{"name": "Dump", "leader": "SPC s d", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Write the session's panes and layout to a dump file, for Restore."},
{"name": "DumpConfig", "leader": null, "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Open the settings in effect, each a word to click, and the startup file's path."},
@@ -71,7 +68,6 @@
{"name": "Look", "leader": null, "also": ["enter", "right-click"], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Look at its argument: open the file or address it names, else find the word, as a right click does."},
{"name": "LookNext", "leader": "SPC j n", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Select the next Look location across panes; Enter opens it."},
{"name": "LookPrev", "leader": "SPC j p", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Select the previous Look location across panes; Enter opens it."},
- {"name": "LookWord", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "search, list", "doc": "A plain word looked at: search selects its next place in the pane, list lists every place in a +Search."},
{"name": "Lspinfo", "leader": "SPC l i", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Show which language servers serve this file and their state."},
{"name": "Lspwhy", "leader": "SPC l w", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Explain how the last language server request was answered, step by step."},
{"name": "MessageAnimation", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "A message falls into its row and dissolves out of it, on or off."},
@@ -110,7 +106,6 @@
{"name": "PdfTint", "leader": "SPC t i", "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Tint the PDF page to the theme, or show it as printed, stepping through them (or to the one named, `disabled|filtered|full`)."},
{"name": "Pet", "leader": null, "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "An optional SDL workspace-tag companion; never consumes input or text cells."},
{"name": "Petscii", "leader": "SPC t p", "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "glyph art over the host's pixels: an image pane's picture, or the kitty graphics a terminal's program placed (yazi's previews)"},
- {"name": "Placement", "leader": "SPC c p", "also": [], "arg": true, "scope": "root", "setting": true, "choices": "acme, pardes", "doc": "Where a new pane goes: acme, as makenewwindow does, or pardes, the older rules."},
{"name": "ProgramEsc", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "In a raw terminal, Esc goes to the program and Shift-Esc backs out, on; off (the default) swaps them."},
{"name": "Putall", "leader": null, "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "acme's Putall: every pane holding unsaved edits to a file is saved, each as its own Save; one that is refused (changed on disk since, a write that fails) says so and the rest are saved all the same."},
{"name": "Recent", "leader": "SPC f r", "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "List the files opened lately, closed ones too, each a place to open again."},
diff --git a/docs/typ/builtins-tui.json b/docs/typ/builtins-tui.json
index 7592a745..5ce8aa64 100644
--- a/docs/typ/builtins-tui.json
+++ b/docs/typ/builtins-tui.json
@@ -2,7 +2,6 @@
{"name": "Adopt", "leader": null, "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Take in the shells of a session that died holding them, each as a terminal pane here: the pardes daemon kept their terminals open."},
{"name": "Ascii", "leader": "SPC t a", "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "add the printable ASCII bitmaps to the matcher's glyph set"},
{"name": "Back", "leader": "SPC j o", "also": ["C-o"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Ctrl-o: one step back into the history."},
- {"name": "BootShell", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "keep, replace", "doc": "A document dropped where a lone untouched shell stands: keep the shell, or replace it."},
{"name": "Callees", "leader": "SPC l C", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "List the functions the function under the cursor calls."},
{"name": "Callers", "leader": "SPC l c", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "List the callers of the function under the cursor."},
{"name": "Callstack", "leader": "SPC l b", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Show outermost callers first, with signatures and call sites (gc)."},
@@ -29,8 +28,6 @@
{"name": "Detach", "leader": "SPC s D", "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Detach this pardes from its terminal or window, leaving the session running: `pardes --attach` (or `pardes-gui --attach`) takes it back."},
{"name": "Diagnostics", "leader": "SPC l d", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "List the file's diagnostics from the language server."},
{"name": "Diff", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Stack a diff's hunks as a diff viewer shows them, each under its place and the declarations around it, in a +Diff; on a +Diff, show the diff itself as text."},
- {"name": "DiffLook", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "hunks, text", "doc": "A .diff or .patch looked at: hunks, a +Diff stacking its hunks, or text, the file itself; Diff goes from one to the other."},
- {"name": "DirLook", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "pane, terminal", "doc": "A directory looked at: pane, a pane listing it as acme's directory window, or terminal, ls in a terminal there."},
{"name": "Down", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Move the keyboard to the pane below, off a tag onto the pane under it."},
{"name": "Dump", "leader": "SPC s d", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Write the session's panes and layout to a dump file, for Restore."},
{"name": "DumpConfig", "leader": null, "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Open the settings in effect, each a word to click, and the startup file's path."},
@@ -61,7 +58,6 @@
{"name": "Look", "leader": null, "also": ["enter", "right-click"], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Look at its argument: open the file or address it names, else find the word, as a right click does."},
{"name": "LookNext", "leader": "SPC j n", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Select the next Look location across panes; Enter opens it."},
{"name": "LookPrev", "leader": "SPC j p", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Select the previous Look location across panes; Enter opens it."},
- {"name": "LookWord", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "search, list", "doc": "A plain word looked at: search selects its next place in the pane, list lists every place in a +Search."},
{"name": "Lspinfo", "leader": "SPC l i", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Show which language servers serve this file and their state."},
{"name": "Lspwhy", "leader": "SPC l w", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Explain how the last language server request was answered, step by step."},
{"name": "MessageAnimation", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "A message falls into its row and dissolves out of it, on or off."},
@@ -97,7 +93,6 @@
{"name": "PdfSections", "leader": "SPC t s", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "List the PDF's sections in a pane, each a place to go."},
{"name": "PdfTint", "leader": "SPC t i", "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Tint the PDF page to the theme, or show it as printed, stepping through them (or to the one named, `disabled|filtered|full`)."},
{"name": "Petscii", "leader": "SPC t p", "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "glyph art over the host's pixels: an image pane's picture, or the kitty graphics a terminal's program placed (yazi's previews)"},
- {"name": "Placement", "leader": "SPC c p", "also": [], "arg": true, "scope": "root", "setting": true, "choices": "acme, pardes", "doc": "Where a new pane goes: acme, as makenewwindow does, or pardes, the older rules."},
{"name": "ProgramEsc", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "In a raw terminal, Esc goes to the program and Shift-Esc backs out, on; off (the default) swaps them."},
{"name": "Putall", "leader": null, "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "acme's Putall: every pane holding unsaved edits to a file is saved, each as its own Save; one that is refused (changed on disk since, a write that fails) says so and the rest are saved all the same."},
{"name": "Recent", "leader": "SPC f r", "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "List the files opened lately, closed ones too, each a place to open again."},
diff --git a/docs/typ/cheatsheet.typ b/docs/typ/cheatsheet.typ
index 0e984efe..60bea770 100644
--- a/docs/typ/cheatsheet.typ
+++ b/docs/typ/cheatsheet.typ
@@ -101,7 +101,6 @@ Helix-style: motions *select*, then an edit acts on the selection. Mode box: bla
key("SPC t n"), word("NextColor"),
key("SPC t w"), word("Wrap"),
key("SPC c n"), word("Newcol"),
- key("SPC c p"), word("Placement"),
key("SPC s d"), word("Dump"),
key("SPC s r"), word("Restore"),
key("SPC s D"), word("Detach"),
diff --git a/docs/typ/guide.typ b/docs/typ/guide.typ
index d45f5cc5..df8c79ce 100644
--- a/docs/typ/guide.typ
+++ b/docs/typ/guide.typ
@@ -140,8 +140,7 @@ or left-clicked, or where the last new pane went. The new pane takes the
keyboard. A listing is the exception: it opens below the pane that asked,
which keeps the keyboard, so #keys("n", "N") walk the listing. #btn("B3")
on a file open in another column jumps there, but the next new pane still
-lands in the old column. #word("Placement") `pardes` picks other rules
-(#doc("reference", section: "placement")).
+lands in the old column (#doc("reference", section: "placement")).
To open beside: #word("Newcol"), then #word("Look") a file name typed in
its tag opens it there; #key("Alt-c") moves a pane into a new column.
@@ -157,7 +156,7 @@ pardes.
addr("notes.txt"), [opens it, or goes to the pane already showing it],
addr("notes.txt:12"), [line 12],
addr("notes.txt:/TODO/"), [the next match of `TODO`],
- addr("src/"), [a pane listing it, as acme's directory window: a #word("Look") at an entry opens it, `..` goes up, `Get` reads it again (#word("DirLook") `terminal`: `ls` in a terminal there)],
+ addr("src/"), [a pane listing it, as acme's directory window: a #word("Look") at an entry opens it, `..` goes up, `Get` reads it again],
addr("https://ziglang.org"), [the browser, through `xdg-open` (`open` on macOS); there is no plumber],
)
@@ -265,8 +264,7 @@ tinted and a line added or removed whole faintly. A mailed patch keeps its
message and diffstat above. The files are found from the diff's directory
or one above it. #word("Diff") on a `+Diff` shows the diff itself as
text (a paged one's `+Pager` is closed once stacked), and on the text stacks
-it again; #word("DiffLook") `text` in the startup file opens the text
-first.
+it again.
= Call hierarchy <callstack>
@@ -375,7 +373,6 @@ hands it back to the one that ran it.
```
Theme atelier
Shell zsh
-# Placement acme is the default; Placement pardes picks the other rules
```
#word("DumpConfig") opens every live setting as the line that sets it.
diff --git a/docs/typ/reference.typ b/docs/typ/reference.typ
index 5e277f20..663bc0af 100644
--- a/docs/typ/reference.typ
+++ b/docs/typ/reference.typ
@@ -229,10 +229,10 @@ files.
second number is a section,
`file.pdf:PAGE:SECTION`, and only such rows are checked against the
outline: a section not there, or not on that page, is a miss.
-- A plain word selects its next place after dot, wrapping. #word("LookWord") `list`
- on the root ctl lists a row per line holding it in a `+Search` pane
- instead; the next word given to #word("Look") in that directory refills it. In a
- terminal a word is always listed, rows spelled `@p3:12:5-9`.
+- A plain word selects its next place after dot, wrapping. In a terminal a
+ word is listed instead, a row per line holding it in a `+Search` pane,
+ rows spelled `@p3:12:5-9`; the next word given to #word("Look") in that
+ directory refills it.
A miss logs `err <serial> look: ...` (`no match for "zzq:#3"` quoting what
was written when nothing by that name exists; `<path>:99 has no line 99`
@@ -357,15 +357,15 @@ task while the editor waits in its syscall. Through QUIC that still hangs.
= The root ctl <root-ctl>
Reading #file("/ctl") gives every setting, one a line, in the words a write
-takes (#word("Theme") `orchard`, #word("Verbose") `on`, #word("Placement") `acme`, #word("DumpDir") `<dir>`,
+takes (#word("Theme") `orchard`, #word("Verbose") `on`, #word("DumpDir") `<dir>`,
#word("Shell") `/bin/bash`, ...), as #word("DumpConfig") does, and one the
frontend lacks as a comment (`# Lift unsupported`), so writing back what it
reads changes nothing.
Writes take settings and session builtins (`scope = .session` in
`src/builtins.zig`), acting at the pane with the keyboard:
-- A setting written bare steps to its next value (a switch flips; so do
- #word("Placement"), #word("BootShell"), #word("Crt")). A value it does not
+- A setting written bare steps to its next value (a switch flips; so does
+ #word("Crt")). A value it does not
take is `bad value in control message; ...` naming what it takes;
#file("/commands") lists them. A setting the frontend cannot show is
refused (`Lift is GUI-only, invalid here`).
@@ -411,8 +411,7 @@ runs fails with the editor's words (`Mount: already mounted`, `Save /root/x: acc
== Settings <settings>
-A setting that chooses among words (`on`/`off` switches,
-#word("Placement"), #word("BootShell"), #word("Crt"), #word("Bloom"),
+A setting that chooses among words (`on`/`off` switches, #word("Crt"), #word("Bloom"),
#word("Vignette"), #word("Grain"), #word("Lift"), #word("Motion"),
#word("ShaderAnimation")) steps to its next value when given bare, as its
word clicked in a tag does. The same lines go in the startup file
@@ -429,10 +428,6 @@ word clicked in a tag does. The same lines go in the startup file
[#word("PagerColor")], [on: the next paged text keeps its colours],
[#word("ProgramEsc")], [off: in a raw terminal #key("Esc") goes back a pane and #key("Shift-Esc") is the program's Esc; on swaps them, and #key("Esc") goes back only at an empty shell prompt],
[#word("Pager") `pardes|off`], [`pardes`: what a terminal's commands page through, `pardes -`; `off` leaves `PAGER`, `GIT_PAGER` and `SYSTEMD_PAGER` as the environment has them (#doc("fs", section: "pardes-stdin")). It applies to terminals started after it],
- [#word("Placement") `acme|pardes`], [`acme`: where new panes go (#doc("fs", section: "placement"))],
- [#word("BootShell") `keep|replace`], [`keep`; `replace` closes the untouched lone shell a dragged document lands beside],
- [#word("LookWord") `search|list`], [`search`: a word given to #word("Look") selects its next place, or lists all in `+Search`],
- [#word("DirLook") `pane|terminal`], [`pane`: #word("Look") on a directory opens a pane listing it, as acme's directory window (#doc("reference", section: "from-acme")); `terminal` types `ls` into a terminal idle there, else opens one],
[#word("JumpScope") `file|all`], [`file`: #word("Back") and #word("Forward") keep to the focused pane's file, that pane's places first, then the file's in another pane, and go to another file only when the file has no place left that way; from a terminal or a pane with no file they step through every place; `all`: every place, in the order it was jumped to],
[#word("TermImages") `real|petscii`], [`real`: a new terminal draws its program's kitty graphics (yazi's previews) as pixels where the shell can; #word("Petscii") flips one terminal; a tui under a terminal without kitty graphics draws them as glyph art either way],
[#word("Shell") `<name or path>`], [`$SHELL` when it is executable, else `/bin/sh`: the shell the next terminal and command pane run; a bare name is searched for in the usual bin directories, not `$PATH`; bare #word("Shell"): `$SHELL` if it is executable, else `/bin/sh`],
@@ -986,8 +981,7 @@ starts a separate session whose shells do not forward to it.
= Placement <placement>
-#word("Placement") `acme` (the default) puts a new pane in the column whose tag
-asked, else the active column (last typed or left-clicked in,
+A new pane goes in the column whose tag asked, else the active column (last typed or left-clicked in,
dropped into, its tag given the keyboard, or given the last new pane),
never a new column. An empty column it takes whole; #word("New") and
#file("pane/new") take the bottom half of the column's last pane; a pane
@@ -995,12 +989,8 @@ opened from a pane's text (#word("Look"), #word("Term"), #key("Alt-n")) goes und
the pane with the most blank rows, or halves the biggest. #word("New") in a
pane's tag names its `+New` in that pane's directory and column; from a
column tag, in that column and the session's directory. A command pane
-goes to the last column, or the column whose tag ran it, under either
-placement. #word("Placement") `pardes` fills an empty column whose tag asked or has
-the keyboard, puts a scratch or a shell under the pane that asked, and a
-document beside the last one read (or in a column of its own on a wide
-screen). No pane is made shorter than its tag and two rows; with no room
-the pane is refused.
+goes to the last column, or the column whose tag ran it. No pane is made
+shorter than its tag and two rows; with no room the pane is refused.
A command pane runs in the directory it started in, whatever its command
does with `cd`, and a relative #word("Look") in it resolves there. The next command
@@ -1166,7 +1156,7 @@ with Client(sys.argv[1]) as c: # a socket path, or (ip, port)
[acme's other builtins], [refused: `Sort`, `Local`, `Abort` (plan9port's debugging word)],
[Edit], [every acme command but `B <cmd`, `D <cmd` and the `'` address; no `\1`-`\9`, and an alternation takes the first branch that matches, not the longest; a failing `< | >` command changes nothing, where acme puts in what it wrote (#doc("fs", section: "edit"))],
[`win`], [#word("Term") is a VT terminal pane; #file("pty/run") runs a line at its prompt and answers `exit N` and the output; with #word("Repl") bound, #word("Exec") on a source pane types the text into it],
- [a directory window], [as acme's: a text pane named `dir/` (#file("index") kind `text`, #file("ctl") isdir 1), its entries in columns sorted bytewise, dotfiles shown, a directory's marked `/`; blanks pad the columns where acme's tabs do; a #word("Look") at an entry is from that directory, `Get` or a look at it again reads it again, and an edit is kept until then rather than lost to a resize; never dirty, #word("Save") refuses it; #word("DirLook") `terminal` types `ls` into a terminal there instead],
+ [a directory window], [as acme's: a text pane named `dir/` (#file("index") kind `text`, #file("ctl") isdir 1), its entries in columns sorted bytewise, dotfiles shown, a directory's marked `/`; blanks pad the columns where acme's tabs do; a #word("Look") at an entry is from that directory, `Get` or a look at it again reads it again, and an edit is kept until then rather than lost to a resize; never dirty, #word("Save") refuses it],
[the plumber], [none: #word("Look") on an `http://` or `https://` URL runs `xdg-open` (`open` on macOS); files, addresses and directories follow built-in rules],
[#key("Esc") selects what was typed], [#key("Esc") leaves insert mode, or goes back a pane (#doc("tags", section: "modes"))],
)
diff --git a/src/CHANGELOG.md b/src/CHANGELOG.md
index 0b10238f..25d167f4 100644
--- a/src/CHANGELOG.md
+++ b/src/CHANGELOG.md
@@ -2,6 +2,13 @@
## Unreleased
+- `Placement`, `BootShell`, `LookWord`, `DirLook` and `DiffLook` are gone,
+ with what each kept of pardes before it took acme's ways: its own
+ placement (`Placement pardes`, `SPC c p`), a dragged document closing
+ the boot shell, a word looked at listing every place in a `+Search` (a
+ terminal's word still does), a directory looked at typing `ls` into a
+ terminal, and a patch looked at opening as text (`Diff` on its `+Diff`
+ still shows it).
- The root ctl reads the settings in DumpConfig's words: one this
frontend lacks is a `# Word unsupported` comment, which a write of it
back skips, `Font` is the path or name asked for, `Shader off` says the
diff --git a/src/Dir.zig b/src/Dir.zig
index ebe6b69c..f43c6e02 100644
--- a/src/Dir.zig
+++ b/src/Dir.zig
@@ -179,8 +179,8 @@ pub fn refresh(p: *Pardes, id: usize) !void {
panes.Output.resetBody(p, now);
}
-/// A look at directory `dir` (look.zig's `.dir`, with `DirLook pane`): its
-/// pane, read again, or a new one, placed as a document is.
+/// A look at directory `dir` (look.zig's `.dir`): its pane, read again, or
+/// a new one, placed as a document is.
pub fn look(p: *Pardes, from: usize, dir: []const u8) void {
const name = (if (std.mem.endsWith(u8, dir, "/"))
p.gpa.dupe(u8, dir)
@@ -433,27 +433,6 @@ test "an exec in a directory pane runs in its directory, and its +Errors goes th
try testing.expect(named(p, try std.fmt.bufPrint(&errors_buf, "{s}{s}", .{ sub_name, config.errors_buffer })).id != null);
}
-test "DirLook terminal: a look at a directory opens a terminal there, no pane listing it" {
- if (comptime !pardes.hosted) return;
- var tmp = testing.tmpDir(.{});
- defer tmp.cleanup();
- var buf: [4096]u8 = undefined;
- const s = try session(&tmp, &buf);
- defer s.p.deinit();
- const p = s.p;
- try testing.expect(p.executeBuiltinLine(0, "DirLook terminal"));
- try testing.expectEqual(config.Runtime.DirLook.terminal, p.settings.dir_look);
- pardes.look.lookAt(p, 0, s.dir);
- p.sync();
- var name_buf: [4200]u8 = undefined;
- try testing.expectEqual(@as(usize, 0), named(p, try std.fmt.bufPrint(&name_buf, "{s}/", .{s.dir})).count);
- try testing.expect(p.panes[p.active].?.isTerminal());
- try testing.expectEqualStrings(s.dir, p.panes[p.active].?.cwdSlice());
- // Bare, it steps back to pane, the default.
- try testing.expect(p.executeBuiltinLine(0, "DirLook"));
- try testing.expectEqual(config.Runtime.DirLook.pane, p.settings.dir_look);
-}
-
test "over 9P a directory pane is a text pane whose name ends in /, its body the listing, ctl's isdir 1, and get reads it again" {
if (comptime !pardes.hosted) return;
const th = @import("ninep/testing.zig");
diff --git a/src/Output.zig b/src/Output.zig
index cee15dcd..e6a468ee 100644
--- a/src/Output.zig
+++ b/src/Output.zig
@@ -464,7 +464,7 @@ pub fn open(p: *Pardes, id: usize, dir: []const u8, from: Origin, arg: []const u
/// Find and Grep share one +Search a directory, each run replacing what
/// the last showed, as acme reuses a directory's +Errors; a pane's own
-/// search (LookWord list) keeps a pane a pattern.
+/// search keeps a pane a pattern.
/// Whether `dir` has its Find/Grep +Search open.
pub fn hasFileSearch(p: *Pardes, dir: []const u8) bool {
for (p.panes) |slot| {
@@ -548,8 +548,8 @@ pub fn fillRows(p: *Pardes, id: usize, dir: []const u8, from: Origin, arg: []con
const rf = if (rp.file) |*f| f else continue;
const o = if (rf.output) |*x| x else continue;
// A file search's rows share the directory's one +Search, and so do
- // word looks (`LookWord list`, a terminal's word: a look of a word
- // no file names, clicked or written): the next word refills it
+ // a terminal's word looks (a look of a word no file names, clicked
+ // or written): the next word refills it
// rather than stacking another. A `/` search keeps a +Search each,
// which n and N walk.
const terminal_word = p.word_look and from == .search and o.from == .search;
@@ -621,7 +621,7 @@ pub fn openDiff(p: *Pardes, id: usize, path: []const u8, content: []const u8) !u
/// Diff on a +Diff: the diff it stacks, as text. A pane holding it
/// already (the newest: a +Pager folded under its +Diff unfolds) is
-/// shown; else the file is opened as text, whatever DiffLook says.
+/// shown; else the file is opened as text.
pub fn showDiffText(p: *Pardes, id: usize, source: []const u8) void {
var newest: ?usize = null;
for (p.panes, 0..) |slot, i| {
diff --git a/src/config.zig b/src/config.zig
index 0e469c28..49dd4f78 100644
--- a/src/config.zig
+++ b/src/config.zig
@@ -113,17 +113,12 @@ pub const leader_path = paths: {
.Newcol = "cn",
.Delcol = "cd",
.Joincol = "cj",
- .Placement = "cp",
.SearchPlace = null,
.SearchPane = null,
.SearchRows = null,
.Search = null,
.Panes = null,
.More = null,
- .BootShell = null,
- .LookWord = null,
- .DirLook = null,
- .DiffLook = null,
.Pager = null,
.PagerColor = null,
.TermImages = null,
@@ -851,24 +846,6 @@ pub const Runtime = struct {
/// never, while the window has the focus, or always (ghostty's
/// custom-shader-animation).
shader_animation: ShaderAnimation = .on,
- /// Where a new pane goes (exec.placeNew): `acme`, acme's makenewwindow,
- /// or `pardes`, the rules pardes had before it.
- placement: Placement = .acme,
- /// A document dragged into the left column where a lone shell nobody
- /// has typed into stands: `keep` leaves the shell, `replace` closes it
- /// (exec.evictLonePristineTty).
- boot_shell: BootShell = .keep,
- /// A plain word looked at in a pane: `search`, acme's look3, selects its
- /// next place in that pane, wrapping; `list`, what pardes did before,
- /// lists every place in a +Search pane (look.zig, lookWord).
- look_word: LookWord = .search,
- /// A directory looked at: `pane`, acme's, a pane listing it (Dir.zig);
- /// `terminal`, what pardes did before, `ls` in a terminal there.
- dir_look: DirLook = .pane,
- /// A .diff or .patch looked at (a look, `pardes FILE`, `--wait`):
- /// `hunks`, a +Diff stacking its hunks (hunks.zig); `text`, the file
- /// itself, as pardes showed it before. Diff goes from one to the other.
- diff_look: DiffLook = .hunks,
/// What a terminal's shell pages through (host_io.ChildEnv): `pardes`,
/// PAGER and GIT_PAGER set to `pardes -`, a +Pager pane, where the
/// user's environment set neither; `off`, the environment as it is.
@@ -901,11 +878,6 @@ pub const Runtime = struct {
search_rows: u16 = 8,
pub const ShaderAnimation = enum { off, on, always };
- pub const Placement = enum { acme, pardes };
- pub const BootShell = enum { keep, replace };
- pub const LookWord = enum { search, list };
- pub const DirLook = enum { pane, terminal };
- pub const DiffLook = enum { hunks, text };
pub const Pager = enum { pardes, off };
pub const TermImages = enum { real, petscii };
pub const JumpScope = enum { file, all };
@@ -914,7 +886,7 @@ pub const Runtime = struct {
pub const SearchPlace = enum { attached, column };
pub const SearchPane = enum { reuse, new };
/// A setting that is one of a few words, each an enum field of Runtime.
- pub const Choice = enum { placement, boot_shell, look_word, dir_look, diff_look, pager, term_images, jump_scope, callstack_layout, callstack_corners, search_place, search_pane };
+ pub const Choice = enum { pager, term_images, jump_scope, callstack_layout, callstack_corners, search_place, search_pane };
/// shadow: a soft drop shadow. rim: a light hairline along the top of
/// the focused pane's tag rows. auto: a shadow on a light page; on a
@@ -1194,11 +1166,6 @@ pub const Runtime = struct {
.{ .word = "Grain", .action = .{ .scene = .grain }, .doc = "The page takes a fine, still grain, like paper: a level, 0 (off) through 3." },
.{ .word = "Shader", .action = .shader, .doc = "A Shadertoy file into the post chain, or out of it, compiled again when saved; off empties the chain." },
.{ .word = "ShaderAnimation", .action = .shader_animation, .doc = "When the post chain animates on its own: off, on (while focused) or always." },
- .{ .word = "Placement", .action = .{ .choice = .placement }, .doc = "Where a new pane goes: acme, as makenewwindow does, or pardes, the older rules." },
- .{ .word = "BootShell", .action = .{ .choice = .boot_shell }, .doc = "A document dropped where a lone untouched shell stands: keep the shell, or replace it." },
- .{ .word = "LookWord", .action = .{ .choice = .look_word }, .doc = "A plain word looked at: search selects its next place in the pane, list lists every place in a +Search." },
- .{ .word = "DiffLook", .action = .{ .choice = .diff_look }, .doc = "A .diff or .patch looked at: hunks, a +Diff stacking its hunks, or text, the file itself; Diff goes from one to the other." },
- .{ .word = "DirLook", .action = .{ .choice = .dir_look }, .doc = "A directory looked at: pane, a pane listing it as acme's directory window, or terminal, ls in a terminal there." },
.{ .word = "Pager", .action = .{ .choice = .pager }, .doc = "What a terminal's commands page through: pardes, a +Pager pane (pardes -), or off, the environment's own; for terminals started after it." },
.{ .word = "PagerColor", .action = .{ .toggle = .pager_color }, .doc = "A +Pager keeps its program's colours, on or off; for the next text paged." },
.{ .word = "TermImages", .action = .{ .choice = .term_images }, .doc = "How a new terminal draws its program's kitty graphics: real, as pixels where it can, or petscii, as glyph art." },
diff --git a/src/dump.zig b/src/dump.zig
index 9ceaa600..2cff503a 100644
--- a/src/dump.zig
+++ b/src/dump.zig
@@ -569,13 +569,11 @@ test "a dump keeps the session's settings, and a restore applies them" {
const gpa = std.testing.allocator;
const p = try Pardes.init(gpa, .{ .tty_only = true });
defer p.deinit();
- try std.testing.expect(p.executeBuiltinLine(p.active, "Placement pardes"));
try std.testing.expect(p.executeBuiltinLine(p.active, "Verbose off"));
try std.testing.expect(p.executeBuiltinLine(p.active, "JumpScope all"));
try dumpState(p);
const restored = try initFromDump(gpa, .{ .tty_only = true }, p.dump_out.?);
defer restored.deinit();
- try std.testing.expectEqual(config.Runtime.Placement.pardes, restored.settings.placement);
try std.testing.expect(!restored.settings.verbose);
try std.testing.expectEqual(config.Runtime.JumpScope.all, restored.settings.jump_scope);
}
diff --git a/src/exec.zig b/src/exec.zig
index de31624a..4706d11a 100644
--- a/src/exec.zig
+++ b/src/exec.zig
@@ -467,34 +467,6 @@ fn kindHost(z: [:0]const u8) ?std.Io.File.Kind {
return stat.kind;
}
-/// With `BootShell replace`, a doc landing in `col` closes a lone pristine
-/// shell there, the boot's placeholder, and absorbVWeight hands its space to
-/// the doc. With `keep`, the default, the shell stays like any other pane.
-pub fn evictLonePristineTty(p: *Pardes, col: usize, keep_id: usize) void {
- if (p.settings.boot_shell == .keep) return;
- var n_tty: usize = 0;
- var tty_id: usize = 0;
- for (0..p.col_n[col]) |k| {
- const cid = p.col_panes[col][k];
- if (p.panes[cid]) |ct| if (ct.isTerminal()) {
- n_tty += 1;
- tty_id = cid;
- };
- }
- if (n_tty != 1) return;
- const tt = p.panes[tty_id] orelse return;
- // No typing, cursor on the first prompt line, no scrollback: this is
- // the throwaway boot placeholder a document may replace.
- if (tt.ovl != null or panes.terminal.gridCursor(tt).y != 0 or
- panes.terminal.scrollbar(tt).total > tt.rows) return;
- p.deinitPane(tt) catch |err| return p.reportError(tty_id, "close", err);
- layout.compute(p); // a just-stacked doc has no rect yet; absorb snaps to rows
- _ = layout.absorbVWeight(p, tty_id, null);
- layout.removePane(p, tty_id);
- p.panes[tty_id] = null;
- if (p.active == tty_id) p.active = keep_id;
-}
-
// ---- REPLs ----
//
// A terminal is bound as a language's REPL by `Repl python` (builtins.zig).
@@ -1151,9 +1123,9 @@ pub fn applySettingBuiltin(p: *Pardes, setting: config.Runtime.Setting, arg: ?[]
/// `scratch` is New's, `fs` 9P's pane/new, `errors` a +Errors pane.
pub const NewPane = enum { scratch, fs, shell, doc, command, errors };
-/// Put new pane `id` in the layout: every new pane comes through here, by
-/// the `Placement` setting, and every one but a command pane takes the
-/// keyboard. `from` is the pane that asked, `origin` the text it asked
+/// Put new pane `id` in the layout: every new pane comes through here, as
+/// acme's makenewwindow places it, and every one but a command pane takes
+/// the keyboard. `from` is the pane that asked, `origin` the text it asked
/// from: null when a column tag, the workspace tag or 9P asked (acme's
/// t->w == nil).
pub fn placeNew(p: *Pardes, from: usize, origin: ?usize, id: usize, kind: NewPane) void {
@@ -1172,21 +1144,18 @@ pub fn placeNew(p: *Pardes, from: usize, origin: ?usize, id: usize, kind: NewPan
layout.compute(p);
const before = p.rects;
const before_min = layout.minima(p);
- switch (p.settings.placement) {
- .acme => switch (kind) {
- // New: the bottom half of the last pane in its own column
- // (look.c:921-923, et->col).
- .scratch => layout.acmePlace(p, p.exec_column orelse columnOf(p, from), null, id),
- // +Errors, a command's output: the last column (util.c:94-98);
- // a command run from a column's tag, that column. The finder's
- // is never the last column for them.
- .command => layout.acmePlace(p, p.exec_column orelse p.ncol - 1, null, id),
- .errors => layout.acmePlace(p, away orelse p.ncol - 1, null, id),
- // makenewwindow(nil) for 9P's new (acme.c:877), else (t).
- .fs => layout.acmePlace(p, acmeColumn(p, from), null, id),
- .shell, .doc => layout.acmePlace(p, acmeColumn(p, from), asked, id),
- },
- .pardes => pardesPlace(p, from, id, kind),
+ switch (kind) {
+ // New: the bottom half of the last pane in its own column
+ // (look.c:921-923, et->col).
+ .scratch => layout.acmePlace(p, p.exec_column orelse columnOf(p, from), null, id),
+ // +Errors, a command's output: the last column (util.c:94-98); a
+ // command run from a column's tag, that column. The finder's is
+ // never the last column for them.
+ .command => layout.acmePlace(p, p.exec_column orelse p.ncol - 1, null, id),
+ .errors => layout.acmePlace(p, away orelse p.ncol - 1, null, id),
+ // makenewwindow(nil) for 9P's new (acme.c:877), else (t).
+ .fs => layout.acmePlace(p, acmeColumn(p, from), null, id),
+ .shell, .doc => layout.acmePlace(p, acmeColumn(p, from), asked, id),
}
// No pane is made shorter than its tag and two rows: where the place
// chosen has not the room, the column's tallest pane gives it, and
@@ -1274,90 +1243,6 @@ fn columnOf(p: *Pardes, id: usize) usize {
return if (layout.findPane(p, id)) |f| f.col else p.ncol - 1;
}
-/// The placements pardes had before it took acme's: an empty column whose
-/// tag asked, or has the keyboard, is filled; a scratch goes under the
-/// asking pane, a shell under it or the nearest pane with room, a document
-/// beside the last one read or in a column of its own, and a command pane
-/// at the foot of the last column.
-fn pardesPlace(p: *Pardes, from: usize, id: usize, kind: NewPane) void {
- const empty = if (p.exec_column orelse if (p.header_focus) p.header_column else null) |c|
- (if (c < p.ncol and p.col_n[c] == 0) c else null)
- else
- null;
- if (empty) |c| {
- layout.insert(p, c, 0, id);
- p.panes[id].?.vweight = 1;
- return;
- }
- const nt = p.panes[id].?;
- switch (kind) {
- .scratch, .fs => if (layout.findPane(p, from)) |sf| {
- layout.insert(p, sf.col, layout.groupEnd(p, sf.col, sf.idx), id);
- layout.splitBelow(p, from, nt);
- } else atFoot(p, id),
- .shell => belowParent(p, from, id),
- .doc, .errors => pardesDoc(p, from, id),
- .command => {
- const rc = p.exec_column orelse p.ncol - 1;
- if (p.col_n[rc] > 0) belowParent(p, p.col_panes[rc][p.col_n[rc] - 1], id) else layout.insert(p, rc, 0, id);
- },
- }
-}
-
-/// Where a pane goes when the one it would go under is in no column (Delcol
-/// took them all, or it was never placed): the foot of the active column,
-/// else of the last.
-fn atFoot(p: *Pardes, id: usize) void {
- const c = p.activeColumn() orelse p.ncol - 1;
- layout.insert(p, c, p.col_n[c], id);
- if (p.col_n[c] == 1) p.panes[id].?.vweight = 1;
-}
-
-fn belowParent(p: *Pardes, from: usize, id: usize) void {
- const parent = layout.splitParent(p, from);
- const f = layout.findPane(p, parent) orelse return atFoot(p, id);
- layout.insert(p, f.col, layout.groupEnd(p, f.col, f.idx), id);
- layout.splitBelow(p, parent, p.panes[id].?);
-}
-
-fn pardesDoc(p: *Pardes, from_id: usize, free: usize) void {
- const nt = p.panes[free].?;
- const doc = if (nt.file) |f| panes.Output.fileTraits(f.output).doc else true; // an image is a doc
- var src_id: ?usize = null;
- if (p.panes[from_id]) |src| if (if (src.file) |f| panes.Output.fileTraits(f.output).doc else src.image != null or src.hasPdf()) {
- src_id = from_id;
- };
- if (doc and src_id == null) {
- var n = p.njumps;
- while (n > 0) : (n -= 1) {
- const j = p.jumps[n - 1];
- const pp = p.panes[j.pane] orelse continue;
- if (pp.serial != j.serial) continue;
- if (if (pp.file) |f| panes.Output.fileTraits(f.output).doc else pp.image != null or pp.hasPdf()) {
- src_id = j.pane;
- break;
- }
- }
- }
- if (doc and src_id == null) for (p.panes, 0..) |sl, i| {
- if (sl) |pp| if (i != free and (if (pp.file) |f| panes.Output.fileTraits(f.output).doc else pp.image != null or pp.hasPdf())) {
- src_id = i;
- break;
- };
- };
- if (!doc) if (layout.findPane(p, from_id)) |sf| {
- layout.insert(p, sf.col, layout.groupEnd(p, sf.col, sf.idx), free);
- layout.splitBelow(p, from_id, nt); // NOT splitParent: no bystander pays
- return;
- };
- if (src_id == null and doc and p.ncol < MAX_COLS and
- layout.columnFitsHalves(p, from_id, 100) and layout.splitColumn(p, from_id, free, true))
- return;
- // Without room for a first-document column, split the Look origin
- // just like Term. Never displace (or evict) a top-left bystander.
- belowParent(p, src_id orelse from_id, free);
-}
-
test "the acme chords act once per selection, not once on the primary" {
const gpa = std.testing.allocator;
const p = try Pardes.init(gpa, .{ .tty_only = true, .cols = 100, .rows = 30 });
diff --git a/src/hunks.zig b/src/hunks.zig
index ae7b5966..b30f09a6 100644
--- a/src/hunks.zig
+++ b/src/hunks.zig
@@ -715,7 +715,7 @@ test "a mailed patch keeps its headers, message and diffstat above its hunks" {
try testing.expectEqualStrings("From 0123 Mon Sep 17 00:00:00 2001\nSubject: [PATCH] change x\n\nWhy it changed.\n---\n x.txt | 2 +-\n\nx.txt:1\n-a\n+b\n", result.content);
}
-test "DiffLook hunks: a .patch looked at opens its +Diff; Diff goes to the text and back; DiffLook text opens the text" {
+test "a .patch looked at opens its +Diff, and Diff goes to the text and back" {
const p = try Pardes.init(testing.allocator, .{ .tty_only = true });
defer p.deinit();
var tmp = testing.tmpDir(.{});
@@ -737,7 +737,6 @@ test "DiffLook hunks: a .patch looked at opens its +Diff; Diff goes to the text
return n;
}
};
- try testing.expectEqual(pardes.config.Runtime.DiffLook.hunks, p.settings.diff_look);
pardes.look.lookAt(p, 0, patch);
try testing.expectEqual(@as(usize, 1), Count.of(p, hunks_path));
try testing.expectEqual(@as(usize, 0), Count.of(p, patch));
@@ -752,11 +751,6 @@ test "DiffLook hunks: a .patch looked at opens its +Diff; Diff goes to the text
// Diff on the text: the +Diff again, refilled, not another.
try testing.expect(p.executeBuiltinLine(raw, "Diff"));
try testing.expectEqual(@as(usize, 1), Count.of(p, hunks_path));
- // DiffLook text: a look opens the text (here the pane already open).
- try testing.expect(p.executeBuiltinLine(0, "DiffLook text"));
- try p.removePane(raw, null);
- pardes.look.lookAt(p, 0, patch);
- try testing.expectEqual(@as(usize, 1), Count.of(p, patch));
}
test "a hunk edited since, beside siblings with its signature's tail, is found in its own function" {
diff --git a/src/layout.zig b/src/layout.zig
index f545f60d..c7d7a189 100644
--- a/src/layout.zig
+++ b/src/layout.zig
@@ -989,21 +989,6 @@ pub fn absorbVWeight(p: *Pardes, id: usize, to: ?usize) ?usize {
return sib;
}
-pub fn splitParent(p: *Pardes, want: usize) usize {
- const need = 2 * (BOX_H + min_body_rows);
- if (p.rects[want].h >= need) return want;
- if (findPane(p, want)) |f| for (0..p.col_n[f.col]) |k| {
- if (p.rects[p.col_panes[f.col][k]].h >= need) return p.col_panes[f.col][k];
- };
- var tallest = want;
- for (0..p.ncol) |c| for (0..p.col_n[c]) |k| {
- const pid = p.col_panes[c][k];
- if (p.rects[pid].h >= need) return pid;
- if (p.rects[pid].h > p.rects[tallest].h) tallest = pid;
- };
- return tallest;
-}
-
pub fn splitBelow(p: *Pardes, src_id: usize, nw: *Pane) void {
const src = p.panes[src_id] orelse return;
const src_h = p.rects[src_id].h;
@@ -1196,12 +1181,6 @@ fn collapseGroup(p: *Pardes, c: usize, start: usize, end: usize) void {
compute(p);
}
-pub fn columnFitsHalves(p: *Pardes, source_id: usize, min_cells: u16) bool {
- const f = findPane(p, source_id) orelse return false;
- compute(p);
- return p.col_w[f.col] >= min_cells * 2;
-}
-
pub fn panelBox(rect: Rect) Box {
return .{
.x = @floatFromInt(rect.x),
diff --git a/src/look.zig b/src/look.zig
index 05cdd581..1f81d6ec 100644
--- a/src/look.zig
+++ b/src/look.zig
@@ -1330,8 +1330,7 @@ fn settleLine(p: *Pardes, id: usize, path: []const u8, at: Spot, before: usize,
/// A plain word looked at in a pane, as acme's look3 does with one that
/// names no file (look.c:210, search): its next place in that pane after
-/// the dot, wrapping to the top, is selected there. No +Search pane
-/// (`LookWord list` lists every place in one instead).
+/// the dot, wrapping to the top, is selected there. No +Search pane.
fn lookWord(p: *Pardes, id: usize, pane: *Pane, word: []const u8) void {
const ninep_pane = @import("ninep/pane.zig");
const f = pane.file orelse return;
@@ -1390,7 +1389,7 @@ fn lookUnresolved(p: *Pardes, id: usize, pane: *Pane, trimmed: []const u8, text:
if (pane.image != null or (pane.body.mode == .tty and !p.fs.serving)) return;
if (text.len == 0) return;
if (lookCommit(p, id, pane, trimmed)) return;
- if (p.settings.look_word == .search and pane.file != null) return lookWord(p, id, pane, text);
+ if (pane.file != null) return lookWord(p, id, pane, text);
p.word_look = true;
defer p.word_look = false;
const rows = runSearch(p, id, text, .cursor, false) catch |err| {
@@ -1826,21 +1825,8 @@ pub fn lookAt(p: *Pardes, id: usize, operand_raw: []const u8) void {
var said: [4200]u8 = undefined;
return p.reportFailure(id, std.fmt.bufPrint(&said, "look: {s}: no such directory", .{dir[0..@min(dir.len, 4096)]}) catch "look: no such directory");
};
- // acme's: a pane listing it (Dir.zig). `DirLook terminal`, what
- // pardes did before: `ls` in a terminal there.
- if (p.settings.dir_look == .pane) return panes.Dir.look(p, id, dir);
- for (p.panes, 0..) |slot, i| {
- if (slot) |tt| if (std.mem.eql(u8, tt.cwdSlice(), dir) and exec.takesCommandLine(p, i)) {
- clearNavigationSelection(p, tt);
- p.active = i;
- p.emitWrite(i, "ls\r");
- return;
- };
- }
- const free = p.freeSlot() orelse return p.reportError(id, "look", error.NoPaneSlots);
- const nt = p.newShell(free, dir) catch |err| return p.reportError(id, "look", err);
- nt.greet = true;
- exec.placeNew(p, id, id, free, .shell);
+ // acme's: a pane listing it (Dir.zig).
+ panes.Dir.look(p, id, dir);
},
.file => |target| {
if (comptime pdf_enabled) if (target.kind == .pdf) {
@@ -1872,9 +1858,9 @@ pub fn lookAt(p: *Pardes, id: usize, operand_raw: []const u8) void {
var opened: ?usize = null;
if (!focusPaneByPath(p, target.path, target.at)) {
// A .diff or .patch looked at bare: its hunks stacked in a
- // +Diff (DiffLook hunks), which takes the keyboard as the
- // file would; one with none in it opens as text.
- if (p.settings.diff_look == .hunks and !p.look_text and target.at.line == 0 and
+ // +Diff, which takes the keyboard as the file would; one
+ // with none in it opens as text.
+ if (!p.look_text and target.at.line == 0 and
(std.mem.endsWith(u8, target.path, ".diff") or std.mem.endsWith(u8, target.path, ".patch")))
if (filesystem.read(p, target.path)) |bytes| {
defer p.gpa.free(bytes);
diff --git a/src/mouse.zig b/src/mouse.zig
index 4e0439fa..cb218a36 100644
--- a/src/mouse.zig
+++ b/src/mouse.zig
@@ -1250,12 +1250,6 @@ fn dragRelease(p: *Pardes, button: Mouse.Button) void {
.move => |d| {
layout.movePane(p, d.id, d.cur_x, d.cur_y);
if (layout.findPane(p, d.id)) |f| p.setActiveColumn(f.col);
- // BootShell replace: a file moved into the left column closes a
- // lone unused shell there
- if (p.panes[d.id]) |mt| if (mt.file != null) {
- if (layout.findPane(p, d.id)) |f| if (f.col == 0)
- exec.evictLonePristineTty(p, 0, d.id);
- };
},
.select => |s| {
const pane = p.panes[s.id] orelse return;
diff --git a/src/ninep/cols.zig b/src/ninep/cols.zig
index 0ee25345..833b25c5 100644
--- a/src/ninep/cols.zig
+++ b/src/ninep/cols.zig
@@ -564,23 +564,20 @@ test "a column's tag and the workspace's read, replace and append as a pane tag
}
test "a focus write makes its pane's column the active one: layout says so and pane/new goes there" {
- for ([_][]const u8{ "Placement acme", "Placement pardes" }) |placement| {
- const p = try th.withFile(testing.allocator, "x\n");
- defer p.deinit();
- try testing.expect(p.executeBuiltinLine(p.active, placement));
- const left = p.panes[0].?.serial;
- p.newColumn(p.active);
- p.newScratchFor(p.active, .fs); // fills the new, right column
- p.sync();
- try testing.expectEqual(@as(usize, 1), layout.findPane(p, p.active).?.col);
- var digits: [16]u8 = undefined;
- _ = th.wr(p, @backingInt(tree.TopFile.focus), try std.fmt.bufPrint(&digits, "{d}\n", .{left}));
- var want: [32]u8 = undefined;
- const text = th.rd(p, @backingInt(tree.TopFile.layout), 0, 4096).bytes;
- try testing.expect(std.mem.endsWith(u8, text, try std.fmt.bufPrint(&want, "active {d}\n", .{layout.columnSerial(p, 0)})));
- const made = th.call(p, .{ .tag = 1, .op = .open, .node = @backingInt(tree.TopFile.new) }).reply.handle;
- try testing.expectEqual(@as(usize, 0), layout.findPane(p, p.paneBySerial(made).?).?.col);
- }
+ const p = try th.withFile(testing.allocator, "x\n");
+ defer p.deinit();
+ const left = p.panes[0].?.serial;
+ p.newColumn(p.active);
+ p.newScratchFor(p.active, .fs); // fills the new, right column
+ p.sync();
+ try testing.expectEqual(@as(usize, 1), layout.findPane(p, p.active).?.col);
+ var digits: [16]u8 = undefined;
+ _ = th.wr(p, @backingInt(tree.TopFile.focus), try std.fmt.bufPrint(&digits, "{d}\n", .{left}));
+ var want: [32]u8 = undefined;
+ const text = th.rd(p, @backingInt(tree.TopFile.layout), 0, 4096).bytes;
+ try testing.expect(std.mem.endsWith(u8, text, try std.fmt.bufPrint(&want, "active {d}\n", .{layout.columnSerial(p, 0)})));
+ const made = th.call(p, .{ .tag = 1, .op = .open, .node = @backingInt(tree.TopFile.new) }).reply.handle;
+ try testing.expectEqual(@as(usize, 0), layout.findPane(p, p.paneBySerial(made).?).?.col);
}
test "a refused write after a truncation leaves every kind of tag as it was, and Dump still works" {
diff --git a/src/ninep/ctl.zig b/src/ninep/ctl.zig
index cb4cfa97..2a2131e3 100644
--- a/src/ninep/ctl.zig
+++ b/src/ninep/ctl.zig
@@ -91,7 +91,7 @@ pub fn run(p: *Pardes, id: usize, exec: bool, text: []const u8, in_tag: bool) vo
for (after.list[0..after.len]) |serial| if (std.mem.indexOfScalar(u32, before.list[0..before.len], serial) == null) {
// A query pane's +Preview is its query pane's: that answers.
if (p.paneBySerial(serial)) |made| if (p.panes[made].?.file) |f| if (f.output) |o| if (o.from == .preview) continue;
- // A look that made a +Search pane (LookWord list, a terminal)
+ // A look that made a +Search pane (a terminal's word)
// answers it: that is where the places it found are.
noteResult(p, serial);
created = true;
@@ -732,9 +732,9 @@ pub fn fillPager(p: *Pardes, serial: u32, held: *std.ArrayList(u8)) error{OutOfM
f.pager_spans = page.spans;
f.saved_revision = f.revision;
// A diff paged (`git show`, difftui's patches): its hunks stacked in a
- // +Diff (DiffLook hunks) in the +Pager's place, the +Pager closed. The
- // keyboard stays where it was, as a page's.
- if (f.pager_diff and p.settings.diff_look == .hunks) {
+ // +Diff in the +Pager's place, the +Pager closed. The keyboard stays
+ // where it was, as a page's.
+ if (f.pager_diff) {
const keyboard = p.active;
if (panes.Output.openDiff(p, id, f.path, f.content)) |hid| {
// ponytail: the text is gone with it; Diff on the +Diff says no such file.
@@ -954,7 +954,7 @@ pub fn writeFocus(p: *Pardes, req: Req) Reply {
const id = p.paneBySerial(serial) orelse return tree.failText(req.tag, E.NOENT, e_no_pane);
// The keyboard goes to the pane itself, off any header that had it, and
// its column becomes the active one, as the user's click there would
- // make it: pane/new and a look place there next, whatever Placement.
+ // make it: pane/new and a look place there next.
tagline.exitHeader(p);
p.active = id;
if (pardes.layout.findPane(p, id)) |at| p.setActiveColumn(at.col);
@@ -1429,7 +1429,7 @@ test "commands lists every builtin with its argument and the ctl that takes it"
var here: usize = 0;
for (std.enums.values(Builtin)) |b| here += @intFromBool(builtins.registry.here(p, b));
try testing.expectEqual(here, lines);
- for ([_][]const u8{ "\nDel arg pane -- ", "\nNewcol root -- ", "\nSave arg pane", "\nVerbose arg root on,off", "\nPlacement arg root acme,pardes", "\nUndo pane -- ", "\nEdit arg both -- acme's Edit" }) |row|
+ for ([_][]const u8{ "\nDel arg pane -- ", "\nNewcol root -- ", "\nSave arg pane", "\nVerbose arg root on,off", "\nUndo pane -- ", "\nEdit arg both -- acme's Edit" }) |row|
try testing.expect(std.mem.indexOf(u8, listed.bytes, row) != null);
}
@@ -2052,10 +2052,9 @@ test "a terminal told the directory it already goes by logs no rename" {
try testing.expect(th.logHas(p, try std.fmt.bufPrint(&rec, "rename {d} /usr", .{p.panes[term].?.serial})));
}
-test "a terminal with text typed at its prompt is never typed into: a look at its directory opens another" {
+test "a terminal with text typed at its prompt is never typed into: a look at its directory or an exec at it opens a pane of its own" {
const p = try th.withTerm(testing.allocator);
defer p.deinit();
- p.settings.dir_look = .terminal; // `ls` in a terminal, not a directory pane
const term = p.paneBySerial(serialOf(p)).?;
p.setCwd(term, "/tmp");
p.update(.{ .output = .{ .pane = @intCast(term), .bytes = "\x1b]133;A;aid=pardes\x07$ \x1b]133;B;aid=pardes\x07TYPED" } });
@@ -2598,7 +2597,6 @@ test "every word's /commands description is its own doc comment's first sentence
"\nNewcol root -- An empty column right of the keyboard's, its tag taking the keyboard.\n",
"\nSave arg pane -- Write the pane's text to its file, or to the file its argument names.\n",
"\nVerbose arg root on,off -- A builtin says its own name on the message row as it runs, on or off.\n",
- "\nPlacement arg root acme,pardes -- Where a new pane goes: acme, as makenewwindow does, or pardes, the older rules.\n",
"\nKill arg root -- acme's Kill: stop the commands pardes started",
}) |row| try testing.expect(std.mem.indexOf(u8, listed, row) != null);
try testing.expect(std.mem.indexOf(u8, listed, ".c:") == null);
diff --git a/src/ninep/tree.zig b/src/ninep/tree.zig
index 6bd4e007..24de3e76 100644
--- a/src/ninep/tree.zig
+++ b/src/ninep/tree.zig
@@ -1827,7 +1827,6 @@ test "random placements, refused or not, leave no pane under its tag and two row
_ = try p.setTestFile("x\n");
while (p.nextEffect()) |_| {}
for (0..r.uintLessThan(usize, 3)) |_| _ = th.wr(p, Node.of(serialOf(p), .exec), "Newcol\n");
- if (r.boolean()) p.settings.placement = .pardes;
for (0..40) |step| {
var serials: [pardes.MAX_PANES]u32 = undefined;
var n: usize = 0;
diff --git a/src/pardes.zig b/src/pardes.zig
index aa458198..0dc0dc5f 100644
--- a/src/pardes.zig
+++ b/src/pardes.zig
@@ -965,47 +965,6 @@ test "a terminal respawned into a closed pane's slot hangs the old shell up firs
try std.testing.expect(closed and spawned);
}
-test "first document fallback splits like Term from the originating pane" {
- for ([_]u16{ 100, 198 }) |width| for (0..3) |from| {
- for ([_]bool{ false, true }) |collapsed| {
- const p = try Pardes.init(std.testing.allocator, .{ .cols = width, .rows = 62, .shells = 3 });
- defer p.deinit();
- const tty = try Pardes.init(std.testing.allocator, .{ .cols = width, .rows = 62, .shells = 3 });
- defer tty.deinit();
- p.settings.placement = .pardes;
- tty.settings.placement = .pardes;
- if (collapsed) {
- layout.toggleCollapse(p, from);
- layout.toggleCollapse(tty, from);
- }
- p.sync();
- tty.sync();
- const before = p.rects;
- const parent = layout.splitParent(p, from);
- const at = layout.findPane(p, parent).?;
- // The Look origin need not be the currently active pane.
- p.active = (from + 1) % 3;
- const free = p.freeSlot().?;
- _ = try p.openTutorView(free);
- exec.placeNew(p, from, from, free, .doc);
- _ = exec.spawnTty(tty, from);
- p.sync();
- tty.sync();
- try std.testing.expectEqual(@as(usize, 2), p.ncol);
- try std.testing.expectEqual(free, p.active);
- try std.testing.expectEqual(free, p.col_panes[at.col][at.idx + 1]);
- for (0..3) |id| {
- try std.testing.expect(p.panes[id] != null);
- if (id != parent) try std.testing.expectEqualDeep(before[id], p.rects[id]);
- }
- for (0..4) |id| try std.testing.expectEqualDeep(tty.rects[id], p.rects[id]);
- for (0..p.ncol) |col| {
- try std.testing.expectEqualSlices(usize, tty.col_panes[col][0..tty.col_n[col]], p.col_panes[col][0..p.col_n[col]]);
- }
- }
- };
-}
-
test "a frame no one watches is not drawn, and is drawn once someone does" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true });
defer p.deinit();
@@ -1153,29 +1112,6 @@ test "the Tutor pane is named +Tutor in the session's directory, never a bare pa
while (p.nextEffect()) |e| try std.testing.expect(e != .save_file);
}
-test "first document keeps its originating shell and only opens a column when it fits" {
- for ([_]u16{ 199, 200 }) |width| {
- const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = width, .rows = 32 });
- defer p.deinit();
- p.settings.placement = .pardes;
- const shell = p.panes[0].?;
- _ = try p.openTutorView(1);
- exec.placeNew(p, 0, 0, 1, .doc);
- p.sync();
- try std.testing.expectEqual(shell, p.panes[0].?);
- try std.testing.expectEqual(@as(usize, 1), p.active);
- if (width < 200) {
- try std.testing.expectEqual(@as(usize, 1), p.ncol);
- try std.testing.expectEqualSlices(usize, &.{ 0, 1 }, p.col_panes[0][0..p.col_n[0]]);
- try std.testing.expectEqual(p.rects[0].y + p.rects[0].h, p.rects[1].y);
- } else {
- try std.testing.expectEqual(@as(usize, 2), p.ncol);
- try std.testing.expectEqual(@as(usize, 1), p.col_panes[0][0]);
- try std.testing.expectEqual(@as(usize, 0), p.col_panes[1][0]);
- }
- }
-}
-
test "an empty column shows its theme's empty_col under its tag: acme's white, else the border" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 120, .rows = 20 });
defer p.deinit();
@@ -1195,24 +1131,6 @@ test "an empty column shows its theme's empty_col under its tag: acme's white, e
}
}
-test "BootShell keep leaves the untouched boot shell a dragged document joins; replace closes it" {
- inline for (.{ "keep", "replace" }) |word| {
- const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 100, .rows = 30 });
- defer p.deinit();
- const shell = p.active;
- try std.testing.expect(p.panes[shell].?.isTerminal());
- try std.testing.expect(p.executeBuiltinLine(shell, "BootShell " ++ word));
- _ = try p.openTutorView(1);
- layout.insert(p, 0, 1, 1);
- p.sync();
- exec.evictLonePristineTty(p, 0, 1);
- p.sync();
- const kept = std.mem.eql(u8, word, "keep");
- try std.testing.expectEqual(kept, p.panes[shell] != null);
- try std.testing.expectEqual(@as(usize, if (kept) 2 else 1), p.col_n[0]);
- }
-}
-
test "dragging a column's only pane to another leaves that column in place, empty" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 160, .rows = 32 });
defer p.deinit();
@@ -1798,49 +1716,6 @@ test "image dump restores source bytes renderer choices and exact custom tail" {
try std.testing.expectEqualSlices(u8, source, again.panes[0].?.image.?.raw);
}
-test "a Look on a directory does not type ls into an occupied terminal" {
- const gpa = std.testing.allocator;
- const p = try Pardes.init(gpa, .{ .cols = 100, .rows = 30 });
- defer p.deinit();
- p.settings.dir_look = .terminal; // `ls` in a terminal, not a directory pane
- while (p.nextEffect()) |_| {}
-
- var realbuf: [4096]u8 = undefined;
- const tmp = look.resolve(null, "/tmp", "/", &realbuf).dir;
- p.setCwd(0, tmp);
- var host: FakeTtyQuery = .{};
- host.install(p);
- host.taken[0] = true;
- look.lookAt(p, 0, tmp);
-
- var spawned = false;
- while (p.nextEffect()) |effect| switch (effect) {
- .write => |w| if (w.pane == 0) return error.TypedLsIntoTheProgramOnTheTty,
- .spawn => spawned = true,
- else => {},
- };
- try std.testing.expect(spawned);
-
- // ...and the same look reuses that very pane once its program is gone: the
- // core keeps no state of its own about it, so recovery needs nothing reset
- host.taken[0] = false;
- look.lookAt(p, 0, tmp);
- var sent: [64]u8 = undefined;
- var sent_len: usize = 0;
- while (p.nextEffect()) |effect| switch (effect) {
- .write => |w| {
- try std.testing.expectEqual(@as(u8, 0), w.pane);
- try std.testing.expect(w.bytes.slice().len <= sent.len - sent_len);
- @memcpy(sent[sent_len..][0..w.bytes.slice().len], w.bytes.slice());
- sent_len += w.bytes.slice().len;
- },
- .spawn => return error.SpawnedDespiteAFreeTerminalOnTheDirectory,
- else => {},
- };
- try std.testing.expectEqualStrings("ls\r", sent[0..sent_len]);
- try std.testing.expectEqual(@as(usize, 0), p.active);
-}
-
test "a terminal its program gave back takes command lines again" {
const gpa = std.testing.allocator;
const p = try Pardes.init(gpa, .{});
@@ -4054,8 +3929,8 @@ pub const Pardes = struct {
chord_hold: bool = false,
/// The look just run found nothing (look.zig missed).
look_missed: bool = false,
- /// The look being run opens a .diff or .patch as text whatever DiffLook
- /// says: Diff going back from a +Diff, Edit's B (it edits the file).
+ /// The look being run opens a .diff or .patch as text, not its +Diff:
+ /// Diff going back from a +Diff, Edit's B (it edits the file).
look_text: bool = false,
look_hover_wait: ?look.LookHoverWait = null,
/// The place a look-hover last found nothing to open: the pointer
@@ -8057,7 +7932,6 @@ test "Del from a key asks which neighbour takes the rows; nothing else asks" {
if (platform == .web) return;
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 80, .rows = 40 });
defer p.deinit();
- p.settings.placement = .pardes; // the neighbours below are what is under test
var frame = std.heap.ArenaAllocator.init(std.testing.allocator);
defer frame.deinit();
const top = p.active;
@@ -8086,14 +7960,14 @@ test "Del from a key asks which neighbour takes the rows; nothing else asks" {
try std.testing.expectEqual(low, p.active); // focus follows the rows
// Esc takes the question back and the pane stays; so does any other key,
- // and so does a click. (Top gets rows back first: split at its cursor,
- // it kept its tag and two, too few to give a pane below its own.)
- p.panes[top].?.vweight = p.panes[low].?.vweight;
+ // and so does a click. A New goes to the column's foot, under low, which
+ // is between two again.
+ p.newScratchBelow(low);
+ const foot = p.active;
+ const again = low;
+ p.active = again;
p.sync();
- p.newScratchBelow(top);
- const again = p.active;
- p.sync();
- h = .{ p.rects[top].h, p.rects[again].h, p.rects[low].h };
+ h = .{ p.rects[top].h, p.rects[again].h, p.rects[foot].h };
try std.testing.expect(p.executeBuiltinLine(again, "Msg keep"));
for ([_]Key{ .{ .cp = Key.escape }, .{ .cp = 'x' } }) |answer| {
p.update(.{ .key = .{ .cp = ' ' } });
@@ -8122,14 +7996,16 @@ test "Del from a key asks which neighbour takes the rows; nothing else asks" {
try std.testing.expect(p.panes[again] == null);
try std.testing.expectEqual(h[0] + h[1], p.rects[top].h);
try std.testing.expectEqual(top, p.active);
- try std.testing.expectEqual(h[2], p.rects[low].h);
+ try std.testing.expectEqual(h[2], p.rects[foot].h);
// A script answers the question on the pane's ctl, as the log's `ask`
// names it: `answer -` takes it back, a side closes the pane toward it.
+ p.newScratchBelow(foot);
+ const tail = p.active;
{
const th = @import("ninep/testing.zig");
- p.newScratchBelow(top);
- const asked = p.active;
+ const asked = foot;
+ p.active = asked;
p.sync();
const serial = p.panes[asked].?.serial;
const ctl = ctlfs.Node.of(serial, .ctl);
@@ -8152,20 +8028,21 @@ test "Del from a key asks which neighbour takes the rows; nothing else asks" {
// Bare Del from anything but a key closes at once and gives the rows up,
// as it always has.
- p.newScratchBelow(top);
- const third = p.active;
+ p.newScratchBelow(tail);
+ const last = p.active;
+ const third = tail;
p.sync();
- h = .{ p.rects[top].h, p.rects[third].h, p.rects[low].h };
+ h = .{ p.rects[top].h, p.rects[third].h, p.rects[last].h };
try std.testing.expect(p.executeBuiltinLine(third, "Del"));
p.sync();
try std.testing.expect(p.panes[third] == null);
try std.testing.expectEqual(h[0] + h[1], p.rects[top].h);
// With nothing open below, there is nothing to ask: SPC d closes at once.
- p.active = low;
+ p.active = last;
p.update(.{ .key = .{ .cp = ' ' } });
p.update(.{ .key = .{ .cp = 'd' } });
- try std.testing.expect(p.panes[low] == null);
+ try std.testing.expect(p.panes[last] == null);
}
test "the bare tty startup opens a text pane under the shell, unfocused" {
@@ -8298,7 +8175,6 @@ test "the Del question shows only once its delay is up: a quick SPC d j never se
if (platform == .web) return;
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 80, .rows = 40 });
defer p.deinit();
- p.settings.placement = .pardes;
var frame = std.heap.ArenaAllocator.init(std.testing.allocator);
defer frame.deinit();
const top = p.active;
diff --git a/test/behaviour/keys.zig b/test/behaviour/keys.zig
index 476504ce..eeaacf7d 100644
--- a/test/behaviour/keys.zig
+++ b/test/behaviour/keys.zig
@@ -323,30 +323,6 @@ test "keys: SPC j n from the pane a Look gave the keyboard walks back into the c
try std.testing.expect(std.mem.startsWith(u8, try s.read(sel), "Theme "));
}
-test "keys: SPC j n and SPC j p walk on from the place a Look's +Search listing chose, its keyboard left in the file" {
- var tmp = std.testing.tmpDir(.{});
- defer tmp.cleanup();
- try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "look-owner.txt", .data = "alpha target\nbeta target\ngamma target\n" });
- var dir: [4096]u8 = undefined;
- const at = dir[0..try tmp.dir.realPath(std.testing.io, &dir)];
- var s = try Session.initFile(std.testing.allocator, "x\n");
- defer s.deinit();
- try s.write("/ctl", "LookWord list\n"); // the +Search listing is what is walked
- try s.write("/look", s.at("{s}/look-owner.txt\n", .{at}));
- const file = try s.focused();
- try s.write(s.at("/pane/{d}/exec", .{file}), "Look target\n");
- try std.testing.expectEqual(file, try s.focused());
- // The Look took the first; the walk goes on from it, and back.
- try s.keys(" jn");
- const results = try s.focused();
- try std.testing.expect(results != file);
- const sel = s.at("/pane/{d}/sel", .{results});
- try s.expect(sel, "look-owner.txt:2:6-11");
- try s.keys(" jp");
- try std.testing.expectEqual(results, try s.focused());
- try s.expect(sel, "look-owner.txt:1:7-12");
-}
-
/// Screen row `row` as drawn.
fn screenRow(s: *Session, row: usize) ![]const u8 {
var rows = std.mem.splitScalar(u8, try s.screen(), '\n');
diff --git a/test/behaviour/look_and_exec.zig b/test/behaviour/look_and_exec.zig
index ee9554cc..e88a0053 100644
--- a/test/behaviour/look_and_exec.zig
+++ b/test/behaviour/look_and_exec.zig
@@ -593,7 +593,7 @@ test "look-and-exec: a look that goes to another pane leaves the looking pane's
}
}
-test "look-and-exec: a looked word is found in its own pane, next place after the dot, wrapping, and opens no pane; LookWord list lists it in +Search" {
+test "look-and-exec: a looked word is found in its own pane, next place after the dot, wrapping, and opens no pane" {
var s = try Session.initFile(std.testing.allocator, "foo x foo y\n");
defer s.deinit();
const n = try s.focused();
@@ -604,31 +604,6 @@ test "look-and-exec: a looked word is found in its own pane, next place after th
try expectEqual(.{ at, at + 3 }, try s.range(s.at("/pane/{d}/dot", .{n})));
}
try s.expect("/index", index);
- try s.write("/ctl", "LookWord list\n");
- try s.write(look, "foo\n");
- try std.testing.expect(lines(try s.read("/index")) > lines(index));
- // ...and look reads back that +Search pane, where the places are.
- const search = try paneNamed(&s, "/+Search");
- try std.testing.expect(has(try s.read(look), s.at("{d}\n", .{search})));
-}
-
-test "look-and-exec: a second LookWord list look in a directory refills its +Search rather than stacking another" {
- var tmp = std.testing.tmpDir(.{});
- defer tmp.cleanup();
- try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "words.txt", .data = "alpha beta\nalpha beta\n" });
- var s = try Session.initFile(std.testing.allocator, "x\n");
- defer s.deinit();
- const n = try s.focused();
- try s.write(s.at("/pane/{d}/name", .{n}), s.at("{s}/words.txt\n", .{try tmpPath(&s, &tmp)}));
- try s.write(s.at("/pane/{d}/exec", .{n}), "Get\n");
- try s.write("/ctl", "LookWord list\n");
- try s.write(s.at("/pane/{d}/look", .{n}), "alpha\n");
- const first = try paneNamed(&s, "/+Search");
- try s.write(s.at("/pane/{d}/look", .{n}), "beta\n");
- try expectEqual(@as(usize, 1), std.mem.count(u8, try s.read("/index"), "/+Search "));
- try expectEqual(first, try paneNamed(&s, "/+Search"));
- // Refilled with beta's places (columns 7-10), not alpha's.
- try std.testing.expect(has(try s.read(s.at("/pane/{d}/body", .{first})), "words.txt:1:7-10\n"));
}
test "look-and-exec: `@pN:` looks at pane N as `a.txt:` looks at a.txt, and a line past the end is said one way, `:N` or `file:N`" {
diff --git a/test/behaviour/modes.zig b/test/behaviour/modes.zig
index 961ca788..ef39d912 100644
--- a/test/behaviour/modes.zig
+++ b/test/behaviour/modes.zig
@@ -174,8 +174,6 @@ fn listed(s: *Session, n: u32) !bool {
test "modes: in window mode d deletes the outlined pane, asking k or j between two, c collapses it, and the mode stays on" {
var s = try Session.initFile(std.testing.allocator, "top\n");
defer s.deinit();
- // The neighbours below are what is under test: each New right under its asker.
- try s.write("/ctl", "Placement pardes\n");
const top = try s.focused();
try s.write(s.at("/pane/{d}/exec", .{top}), "New\n");
const mid = try s.focused();
@@ -451,8 +449,6 @@ test "modes: Ctrl-o and Ctrl-i drop the selections, select mode and the extra cu
test "modes: hopping between two panes by Esc, window mode or a click makes no places, so one Ctrl-o goes back across and the next has nowhere to go" {
var s = try Session.initFile(std.testing.allocator, std.mem.asBytes(&@as([100][4]u8, @splat("row\n".*))));
defer s.deinit();
- // Two panes of room, not acme's fit to the doc.
- try s.write("/ctl", "Placement pardes\n");
const doc = try s.focused();
try s.keys("\u{F015}n"); // a shell under the doc
const shell = try s.focused();
diff --git a/test/behaviour/panes.zig b/test/behaviour/panes.zig
index 0c0edbf9..12be354a 100644
--- a/test/behaviour/panes.zig
+++ b/test/behaviour/panes.zig
@@ -182,7 +182,6 @@ test "panes: an unsaved file's tag is its name alone, its dirty file says it is
test "panes: a pane closed while its question stands ends the question in the log" {
var s = try Session.initFile(std.testing.allocator, "x\n");
defer s.deinit();
- try s.write("/ctl", "Placement pardes\n");
const top = try s.focused();
try s.write(s.at("/pane/{d}/exec", .{top}), "New\n");
const closing = try s.focused();
diff --git a/test/behaviour/placement.zig b/test/behaviour/placement.zig
index 3d261808..73d69883 100644
--- a/test/behaviour/placement.zig
+++ b/test/behaviour/placement.zig
@@ -45,22 +45,7 @@ test "placement: New and 9P's new take the bottom half of the column's last pane
try std.testing.expect(try tagRow(&s, "/made") >= was + (rows - was) / 2);
}
-test "placement: Placement pardes puts a new pane right under the asking one, and bare it steps back to acme" {
- var s = try Session.initFile(std.testing.allocator, "x\n");
- defer s.deinit();
- try s.write("/ctl", "Placement pardes\n");
- try std.testing.expect(std.mem.indexOf(u8, try s.read("/ctl"), "\nPlacement pardes\n") != null);
- const top = try s.focused();
- try s.write(s.at("/pane/{d}/exec", .{top}), "New\n");
- const below = try s.focused();
- // Directly under the asking pane, as New always put it.
- try s.write(s.at("/pane/{d}/exec", .{top}), "New\n");
- try std.testing.expectEqualStrings(s.at("{d}:{d},{d},{d}", .{ try s.column(0), top, try s.focused(), below }), try s.columns());
- try s.write("/ctl", "Placement\n");
- try std.testing.expect(std.mem.indexOf(u8, try s.read("/ctl"), "\nPlacement acme\n") != null);
-}
-
-test "placement: a look under pardes's placement, from a pane pane/new made after Delcol, opens its file in a column" {
+test "placement: a look from a pane pane/new made after Delcol opens its file in a column" {
var tmp = std.testing.tmpDir(.{});
defer tmp.cleanup();
try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "f.txt", .data = "file\n" });
@@ -69,7 +54,6 @@ test "placement: a look under pardes's placement, from a pane pane/new made afte
var s = try Session.initFile(std.testing.allocator, "x\n");
defer s.deinit();
const first = try s.focused();
- try s.write(s.at("/pane/{d}/exec", .{first}), "Placement\n");
try s.write(s.at("/pane/{d}/exec", .{first}), "Delcol\n");
const made = try s.newPane();
try s.write(s.at("/pane/{d}/look", .{made}), s.at("{s}/f.txt:#4\n", .{dir}));
diff --git a/test/behaviour/root_ctl.zig b/test/behaviour/root_ctl.zig
index 12f2b56a..7bf15ee2 100644
--- a/test/behaviour/root_ctl.zig
+++ b/test/behaviour/root_ctl.zig
@@ -62,7 +62,6 @@ test "root-ctl: the root ctl reads the settings as a write takes them, and takes
.{ "Del", "not a session control message \"Del\": write it to pane/<n>/ctl" },
.{ "Nonsense 1", "unknown control message \"Nonsense\"" },
.{ "Verbose maybe", "bad value in control message; takes on, off \"maybe\"" },
- .{ "Placement east", "bad value in control message; takes acme, pardes \"east\"" },
// A number's refusal names its range.
.{ "InactiveDim 200", "bad value in control message; takes 0-100 (a percentage) \"200\"" },
.{ "MessageLinger x", "bad value in control message; takes 0-60000 (milliseconds) \"x\"" },
diff --git a/test/monkey9p.zig b/test/monkey9p.zig
index 8870e389..d87fed07 100644
--- a/test/monkey9p.zig
+++ b/test/monkey9p.zig
@@ -62,20 +62,20 @@ const unsafe = "/~$`;|&<>.\\*?![]{}'\"";
const runes = [_][]const u8{ "\xc3\xa9", "e\xcc\x81", "\xe6\x97\xa5\xe6\x9c\xac", "\xf0\x9f\x98\x80", "\xce\x94", "\xc2\xa0", "\xe2\x80\x8b", "\xc2\x80", "\xc2\x9f" };
const odd = [_][]const u8{ "", "\n", "\r\n", "\x00", "\xff", "\xfe\xff", "\xe6\x97", "\xc0\x80", "\x1b[2J", "\x7f", "\t", "\n\n\n", " ", " \n" };
const words = [_][]const u8{
- "alpha", "beta", "foo", "bar", "x", "hello", "zz", "0", "1", "-1", "99999999999",
- "on", "off", "follow", "follow new", "lock", "unlock", "clean", "dirty", "show", "dot=addr", "addr=dot",
- "limit=addr", "nomark", "mark", "get", "put", "del", "delete", "name", "cleartag", "answer", "answer -",
- "size 80 24", "size 20 6", "size 5000 5000", "winsize 80 24", "winsize 0 0", "sig INT", "sig TERM", "sig HUP", "sig KILL", "sig BOGUS", "exec",
- "Placement acme", "Placement pardes", "Wrap on", "Wrap off",
+ "alpha", "beta", "foo", "bar", "x", "hello", "zz", "0", "1", "-1", "99999999999",
+ "on", "off", "follow", "follow new", "lock", "unlock", "clean", "dirty", "show", "dot=addr", "addr=dot",
+ "limit=addr", "nomark", "mark", "get", "put", "del", "delete", "name", "cleartag", "answer", "answer -",
+ "size 80 24", "size 20 6", "size 5000 5000", "winsize 80 24", "winsize 0 0", "sig INT", "sig TERM", "sig HUP", "sig KILL", "sig BOGUS", "exec",
+ "Wrap on", "Wrap off",
};
const shell_lines = [_][]const u8{ "true", "false", "echo hi", "echo m9p", "sleep 1", "ls", "cat nonexist", "printf abc", "exit 3", "seq 1 2000", "yes | head -n 3000", "date", "pwd", "env | wc" };
const builtins = [_][]const u8{
- "Look", "Exec", "Kill", "Dump", "Msg", "NextColor", "Themes", "DumpThemes", "TreeContext", "PdfFit", "PdfTint", "PdfSections", "Petscii",
- "Palette", "Ascii", "Save", "New", "Newcol", "Del", "Filter", "Mode", "Togglettymode", "Edit", "Undo", "Redo", "Collapse",
- "Delcol", "DelAbove", "DelBelow", "Term", "Repl", "Joincol", "Config", "LocationsConfig", "Messages", "Mini", "Find", "Grep", "Left",
- "Down", "Up", "Right", "Back", "Forward", "Last", "Recent", "Jumplist", "Colors", "Wrap", "Tagbottom", "Debug", "FocusTint",
- "Verbose", "Motion", "InactiveDim", "DumpDir", "Theme", "Placement", "BootShell", "LookWord", "Get", "Put", "Undo", "Redo", "Zerox",
- "Snarf", "Paste", "Cut", "Sort", "Font", "Local",
+ "Look", "Exec", "Kill", "Dump", "Msg", "NextColor", "Themes", "DumpThemes", "TreeContext", "PdfFit", "PdfTint", "PdfSections", "Petscii",
+ "Palette", "Ascii", "Save", "New", "Newcol", "Del", "Filter", "Mode", "Togglettymode", "Edit", "Undo", "Redo", "Collapse",
+ "Delcol", "DelAbove", "DelBelow", "Term", "Repl", "Joincol", "Config", "LocationsConfig", "Messages", "Mini", "Find", "Grep", "Left",
+ "Down", "Up", "Right", "Back", "Forward", "Last", "Recent", "Jumplist", "Colors", "Wrap", "Tagbottom", "Debug", "FocusTint",
+ "Verbose", "Motion", "InactiveDim", "DumpDir", "Theme", "Get", "Put", "Undo", "Redo", "Zerox", "Snarf", "Paste", "Cut",
+ "Sort", "Font", "Local",
};
const pane_files = [_][]const u8{ "name", "body", "tag", "ctl", "addr", "dot", "limit", "data", "xdata", "sel", "dirty", "mark", "scroll", "errors", "event", "look", "exec", "tagexec", "pty", "pty/run", "pty/data", "pty/ctl", "pty/status" };
const root_files = [_][]const u8{ "README", "index", "status", "focus", "ctl", "commands", "recent", "look", "exec", "log", "screen", "listeners", "layout", "tag", "tagexec", "pane", "pane/new", "col", "" };
@@ -326,9 +326,9 @@ fn editCommand(r: Random, a: Allocator) []const u8 {
fn eventRecord(r: Random, a: Allocator) []const u8 {
const text = shellSafe(a, editText(r, a));
var rec: []const u8 = print(a, "{c}{c}{d} {d} {d} {d} {s}\n", .{
- pick(r, "EFKMZ"), pick(r, "xXlLiIdDZ"),
- pick(r, &[_]i64{ 0, 1, 5, 10 }), pick(r, &[_]i64{ 0, 2, 7, 1 << 40, -1 }),
- pick(r, &[_]u8{ 0, 1, 2, 8 }), text.len,
+ pick(r, "EFKMZ"), pick(r, "xXlLiIdDZ"),
+ pick(r, &[_]i64{ 0, 1, 5, 10 }), pick(r, &[_]i64{ 0, 2, 7, 1 << 40, -1 }),
+ pick(r, &[_]u8{ 0, 1, 2, 8 }), text.len,
text,
});
if (chance(r) < 0.3) rec = mutate(r, a, rec);
diff --git a/test/output.zig b/test/output.zig
index c476af28..9fba1a77 100644
--- a/test/output.zig
+++ b/test/output.zig
@@ -793,61 +793,6 @@ test "LookNext/LookPrev selects one output location per row and opens nothing" {
try std.testing.expectEqual(panes.Output.Grain.word, panes.Output.grain(p.panes[p.active].?.file.?.output));
}
-test "LookNext/LookPrev keeps the result output a Look chose through a no-match answer, and a stale serial once it is deleted" {
- if (platform == .web) return;
- var tmp = std.testing.tmpDir(.{});
- defer tmp.cleanup();
- try tmp.dir.writeFile(std.testing.io, .{
- .sub_path = "look-owner.txt",
- .data = "alpha target\nbeta target\ngamma target\n",
- });
- var path_buf: [256]u8 = undefined;
- const path = try std.fmt.bufPrint(&path_buf, ".zig-cache/tmp/{s}/look-owner.txt", .{tmp.sub_path});
- const p = try Pardes.init(std.testing.allocator, .{ .file = path, .cols = 80, .rows = 24 });
- defer p.deinit();
- p.locations_config.layout = .@"inline";
- p.settings.look_word = .list; // the +Search listing is what is walked
-
- try std.testing.expect(p.executeBuiltinLine(0, "Look target"));
- const rid = p.panes[0].?.search_pane orelse return error.MissingResults;
- const results = p.panes[rid].?;
- const first = results.body.cur_row;
- try std.testing.expectEqual(@as(usize, 0), p.active);
- try std.testing.expect(results.look_at != null);
- try std.testing.expectEqual(results.serial, p.look_walk_owner orelse return error.MissingLookOwner);
-
- // The walk on and back from it is test/behaviour/keys.zig's; what is
- // left needs answers put in by fillResults.
- // A later no-match answer has no position to resume and therefore cannot
- // steal the provenance established by the Look above.
- const owner = results.serial;
- const dir = std.fs.path.dirname(path) orelse ".";
- try panes.Output.fillResults(
- p,
- 0,
- dir,
- .search,
- "no-such-result",
- try p.gpa.dupe(u8, ""),
- null,
- );
- try std.testing.expectEqual(owner, p.look_walk_owner.?);
- lookKey(p, 'n');
- try std.testing.expectEqual(rid, p.active);
- try std.testing.expectEqual(first + 1, results.body.cur_row);
-
- // Emptying the owner itself keeps its identity as the ring's starting
- // point. Deleting it then leaves a stale serial, never an id that can bind
- // to the unrelated pane subsequently allocated in the same slot.
- try panes.Output.fillResults(p, 0, dir, .search, "target", try p.gpa.dupe(u8, ""), null);
- try std.testing.expectEqual(owner, p.look_walk_owner.?);
- try std.testing.expect(p.executeBuiltinLine(rid, "Del"));
- try std.testing.expect(p.paneBySerial(owner) == null);
- const replacement = try p.newShell(rid, "");
- try std.testing.expect(replacement.serial != owner);
- try std.testing.expect(p.paneBySerial(owner) == null);
-}
-
test "LookPrev exactly reverses LookNext across output panes and the ring seam" {
if (platform == .web) return;
var cwd_buf: [4096]u8 = undefined;
diff --git a/test/process/terminals.zig b/test/process/terminals.zig
index 250c4fb0..24772ced 100644
--- a/test/process/terminals.zig
+++ b/test/process/terminals.zig
@@ -212,17 +212,12 @@ fn namedOnce(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
const c = try process.Conn.dial(gpa, d.socket());
defer c.deinit(gpa);
const root = d.root();
- try expectEqual(@as(c_int, 0), libc.mkdir(try std.fmt.allocPrintSentinel(a, "{s}/sub", .{root}, 0), 0o755));
- // A look at a directory starts a terminal there (DirLook terminal);
- // DirLook pane, the default, lists it in a pane.
- try c.write("/ctl", "DirLook terminal\n");
var made: std.ArrayList(u32) = .empty;
- try made.append(a, try c.look(a, f.at("{s}/sub", .{root}), null));
const before = try serials(a, c);
try c.write("/pane/1/ctl", "Term\n");
if (shell(a, "command -v fish >/dev/null", .{}) == 0) try c.write("/pane/1/ctl", "Term fish\n");
for (try serials(a, c)) |s| if (std.mem.indexOfScalar(u32, before, s) == null) try made.append(a, s);
- try expect(made.items.len >= 2);
+ try expect(made.items.len >= 1);
process.sleep(1500); // their shells start and say where they are
// A shell started again by pty/ctl exec: named as it was.
try c.write(f.at("/pane/{d}/pty/ctl", .{made.items[0]}), "exec\n");
diff --git a/test/process/tree.zig b/test/process/tree.zig
index 27b51bf1..70b2a89c 100644
--- a/test/process/tree.zig
+++ b/test/process/tree.zig
@@ -258,7 +258,7 @@ fn discovery(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
if (std.mem.eql(u8, which, "arg")) which = w.next().?;
try expect(contains(&.{ "root", "pane", "both" }, which));
}
- try expect(row(commands, "Placement arg root acme,pardes"));
+ try expect(row(commands, "Pager arg root pardes,off"));
try expect(std.mem.endsWith(u8, commands, "\n"));
try expectEqual(commands.len, (try c.stat("/commands")).length);
try c.write(f.at("/pane/{d}/ctl", .{first}), "Msg said through ctl\n");
diff --git a/test/snapshots/builtins.golden b/test/snapshots/builtins.golden
index a4733cdc..93a6ab2b 100644
--- a/test/snapshots/builtins.golden
+++ b/test/snapshots/builtins.golden
@@ -16,15 +16,12 @@
|12: 3 SPC c d Delcol
|13: 4 SPC c j Joincol topbar
|14: 5 SPC c n Newcol topbar
-|15: 6 SPC c p Placement
-|16: 7
+|15: 6
== snap docs-group grid=120x67 cursor=7,10
|10: 1 pardes builtins under SPC h
|12: 3 SPC h c Changelog topbar
|13: 4 SPC h m Messages
|14: 5 SPC h t Tutor topbar
-|15: 6
-|16:
== snap tutor-from-index grid=120x67 cursor=7,16
|10: 1 pardes builtins under SPC h Tutor
|15: /tmp/pardes-snap/builtins/cwd/+Tutor Save Term Collapse Del
diff --git a/test/snapshots/cmdword.golden b/test/snapshots/cmdword.golden
deleted file mode 100644
index 2b99a8a1..00000000
--- a/test/snapshots/cmdword.golden
+++ /dev/null
@@ -1,28 +0,0 @@
-== snap opened grid=120x31 cursor=7,3
-| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
-| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/cmdword/cwd/cmds.txt Save Term Collapse Del
-| 1 @`echo ZZ''E` @`echo ZZ''L` Look p.txt @`Look .`
-== snap atexec grid=120x31 cursor=7,3
-|17: /tmp/pardes-snap/cmdword/cwd (echo ZZ''E) exit 0 Kill Save Collapse Del
-|18: % echo ZZ''E
-|19: ZZE
-|20: exit 0
-== snap atlook grid=120x31 cursor=2,24
-|17: /tmp/pardes-snap/cmdword/cwd (echo ZZ''L) exit 0 Kill Save Collapse Del
-|21: % echo ZZ''L
-|22: ZZL
-|23: exit 0
-== snap lookword grid=120x31 cursor=7,6
-|5: /tmp/pardes-snap/cmdword/cwd/p.txt Save Term Collapse Del
-|6: 1 just text
-== snap nested grid=120x31 cursor=4,11
-|8: /tmp/pardes-snap/cmdword/cwd Term+bash Save Mode Filter Collapse Del
-|9: ls
-|10: cmds.txt p.txt zzmark.txt
-== snap execword grid=120x31 cursor=4,11
-|8: /tmp/pardes-snap/cmdword/cwd Term+bash Save Mode Filter Collapse Del Exec
-== snap tagcmd grid=120x31 cursor=4,11
-|8: /tmp/pardes-snap/cmdword/cwd Term+bash Save Mode Filter Collapse Del Exec @`echo ZZ''T`
-|11: echo ZZ''T
-|12: ZZT
diff --git a/test/snapshots/cmdword.snap b/test/snapshots/cmdword.snap
deleted file mode 100644
index 42a91e18..00000000
--- a/test/snapshots/cmdword.snap
+++ /dev/null
@@ -1,93 +0,0 @@
-# `@`...`` — a word that names a COMMAND instead of a file to open. The
-# delimiters are config.cmd_open/cmd_close and nothing else in the editor knows
-# how one is spelled.
-#
-# A backtick is not a file char, so the ordinary word expansion would stop dead
-# inside one and hand a look the fragment `echo`. config.wordBounds takes the
-# whole run instead, which is what makes a single CLICK the way you invoke one
-# (acme does the same for its own `<`/`|`/`>` command words).
-#
-# EXECUTE runs it, as a command pane, and leaves you where you were; LOOK runs
-# it and lands you in the pane that answered — looking at a thing means being
-# shown it, and a directory's look has always been exactly that (a shell
-# there, ls'd).
-#
-# And Look and Exec are ORDINARY BUILTINS now, so their names are executable
-# words like Save or Grep: `Look p.txt` run off the page is the same look a
-# right click on `p.txt` is. Which is also what makes `@`Look .`` nest — Exec
-# unwraps it and the contents go straight back through the one dispatcher.
-file cmds.txt @`echo ZZ''E` @`echo ZZ''L` Look p.txt @`Look .`
-file p.txt just text
-file zzmark.txt x
-# Builtins announce themselves by default, and an announcement is a band at
-# the top of the body -- which would move every row this script clicks. The
-# verbs are what is under test here, not the announcement.
-config Verbose off
-# a directory looked at opens a terminal there (DirLook terminal), as this
-# script was written for; DirLook pane, the default, is dirpane.snap's
-config DirLook terminal
-start 31 120 cmds.txt
-wait 8000 Newcol Joincol
-wait 8000 cmds.txt
-stable 700 20000
-snap opened
-# a single middle CLICK inside the run (col 11 is inside `echo`) expands to the
-# whole `@`echo ZZ''E`` and runs it as a command pane; focus stays on the file
-press middle 11 4
-release middle 11 4
-wait 10000 ZZE
-stable 700 15000
-snap atexec
-# LOOK on the second one (col 24, inside its `echo`) runs it too, in the same
-# command pane now its first is done, below it, AND focuses it — that is the
-# whole difference between the two verbs
-press right 24 4
-release right 24 4
-wait 10000 ZZL
-stable 700 15000
-snap atlook
-# `Look p.txt` middle-dragged: the builtin by NAME, with an argument
-press middle 36 4
-drag middle 45 4
-release middle 45 4
-wait 10000 just text
-stable 700 15000
-snap lookword
-# nesting: `@`Look .`` — Exec unwraps it, `Look .` is parsed as the ordinary
-# Look builtin with an argument, and Look opens the directory (a shell there,
-# ls'd — zzmark.txt is only ever in that listing; a command pane is no shell)
-press middle 49 4
-release middle 49 4
-wait 10000 zzmark.txt
-stable 700 15000
-snap nested
-# the same syntax typed into a TAG — the other place the expansion has to know
-# about backticks. The look above left that shell focused, so `:` opens ITS
-# tag, and the word run from a shell's own tag is typed into it; `A` appends at the end of it, Esc and `h` put the normal-mode cursor on
-# the last character typed, and the execute key runs the word under it
-# exactly as the body's does.
-key :
-key A
-key space
-text Exec
-key esc
-settle 100
-key h
-key tab
-stable 700 8000
-# ...except that word is `Exec` ITSELF, with nothing to execute. This is the
-# case that must not hang a re-entrant dispatcher: it runs out of argument
-# immediately and does nothing at all. Executing gave the keyboard back to the
-# body, and `:` finds the tag's cursor where it was left.
-snap execword
-key :
-key A
-key space
-text @`echo ZZ''T`
-key esc
-settle 100
-key h
-key tab
-wait 10000 ZZT
-stable 700 15000
-snap tagcmd
diff --git a/test/snapshots/doccol.golden b/test/snapshots/doccol.golden
deleted file mode 100644
index 426dc948..00000000
--- a/test/snapshots/doccol.golden
+++ /dev/null
@@ -1,25 +0,0 @@
-== snap boot grid=100x31 cursor=7,4
-| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
-| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/doccol/cwd/a.txt Save Term Coll /tmp/pardes-snap/doccol/cwd Term+bash Save Mode
-| apse Del Filter Collapse Del
-| 1 AAA ls
-| a.txt b.txt c.txt
-== snap two-docs grid=100x31 cursor=7,19
-|17: /tmp/pardes-snap/doccol/cwd/b.txt Save Term Coll
-|18: apse Del
-|19: 1 BBB
-|20: 2 B-TWO
-== snap moved grid=100x31 cursor=57,22
-|17:
-|18:
-|19:
-|20: /tmp/pardes-snap/doccol/cwd/b.txt Save Term Coll
-|21: apse Del
-|22: 1 BBB
-|23: 2 B-TWO
-== snap worked grid=100x31 cursor=59,23
-== snap third grid=100x31 cursor=57,28
-|26: /tmp/pardes-snap/doccol/cwd/c.txt Save Term Coll
-|27: apse Del
-|28: 1 CCC
diff --git a/test/snapshots/doccol.snap b/test/snapshots/doccol.snap
deleted file mode 100644
index bdc5db67..00000000
--- a/test/snapshots/doccol.snap
+++ /dev/null
@@ -1,61 +0,0 @@
-# A file opened from a terminal joins the column a FILE PANE was last used in.
-# a.txt boots on the left and b.txt joins it there; b.txt is then dragged into
-# the RIGHT column and worked in, so that column is the newest one a doc was
-# read in while a.txt keeps the lowest pane id. The c.txt look then comes from
-# the right shell and must land under b.txt. Slot order — the rule this
-# replaces — would have answered a.txt (pane 0) and put c.txt back on the left.
-file a.txt AAA
-file b.txt BBB\nB-TWO
-file c.txt CCC
-# a FILE boots alone (and always outranked -n), so the shell whose ls output
-# the looks below are clicked in is opened here: Alt-n stacks it below a.txt
-# and Alt-c moves it into a column of its own on the right — the layout the
-# boot used to hand over — and SPC w h Enter comes back to a.txt, which is where the
-# boot left focus. (`New`/`Newcol` open an empty +New scratch now, not a
-# shell, so the shell has to be asked for by name.)
-# Builtins announce themselves by default, and an announcement is a band at
-# the top of the body -- which moves every row this script clicks. What the
-# verbs do is what is under test, not the announcement.
-config Verbose off
-# pins the pardes placement rule (Placement pardes), which it covers
-config Placement pardes
-start 31 100 a.txt
-wait 8000 AAA
-stable 700 20000
-key a-n
-key a-c
-wait 8000 c.txt
-stable 700 20000
-key space w h enter
-stable 400 5000
-snap boot
-# look b.txt in the shell's ls output: the second doc splits the first, so
-# both docs are in the left column and a.txt is the lower-numbered pane
-press right 60 6
-release right 60 6
-wait 10000 BBB
-stable 700 20000
-snap two-docs
-# drag b.txt's layout box (the gutter cells of its tag row) into the right
-# column, below the shell
-press left 1 18
-drag left 75 21
-release left 75 21
-stable 700 15000
-snap moved
-# use a.txt, then b.txt: what counts is the doc last USED, so a.txt being the
-# most recent for a moment must not survive the click into b.txt
-press left 5 5
-release left 5 5
-stable 400 5000
-press left 60 23
-release left 60 23
-key j
-stable 400 5000
-snap worked
-# look c.txt from the shell: below b.txt, in the right column
-press right 67 6
-release right 67 6
-wait 10000 CCC
-stable 700 20000
-snap third
diff --git a/test/snapshots/jumps.snap b/test/snapshots/jumps.snap
index 7e66aa91..0c8919e6 100644
--- a/test/snapshots/jumps.snap
+++ b/test/snapshots/jumps.snap
@@ -79,8 +79,7 @@ snap jumplist
# took two steps. A results buffer is a LIST — its rows are locations, and the
# text after one says what is THERE rather than naming another place to go — so
# the walk takes the location at the head of a row and moves on to the next row
-# (output_pane.Grain.line). Free text still steps every word: that is the
-# terminal walk in ttylook, and it is why the two goldens differ.
+# (output_pane.Grain.line). Free text still steps every word.
#
# An `@pN` row moves focus like any other, which it did not use to: the STEP
# only selects now, and the look Enter runs goes to the pane by the same route
diff --git a/test/snapshots/leader.golden b/test/snapshots/leader.golden
index 66739ef8..e047786c 100644
--- a/test/snapshots/leader.golden
+++ b/test/snapshots/leader.golden
@@ -92,8 +92,7 @@
|8: 3 SPC c d Delcol
|9: 4 SPC c j Joincol topbar
|10: 5 SPC c n Newcol topbar
-|11: 6 SPC c p Placement
-|12: 7
+|11: 6
|35:
|36:
|37:
diff --git a/test/snapshots/look-dir.golden b/test/snapshots/look-dir.golden
deleted file mode 100644
index 5cb0694d..00000000
--- a/test/snapshots/look-dir.golden
+++ /dev/null
@@ -1,22 +0,0 @@
-== snap dir-open grid=100x31 cursor=4,11
-| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
-| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/look-dir/cwd Term+bash Save Mod /tmp/pardes-snap/look-dir/cwd Term+bash Save Mod
-| e Filter Collapse Del e Filter Collapse Del
-| ls ls
-| sub top.txt sub top.txt
-|
-| /tmp/pardes-snap/look-dir/cwd/sub Term+bash Save
-| Mode Filter Collapse Del
-| ls
-| inner.txt
-|
-|
-|
-|
-|
-|
-| /tmp/pardes-snap/look-dir/cwd Term+bash Save Mod
-| e Filter Collapse Del
-| ls
-| sub top.txt
diff --git a/test/snapshots/look-dir.snap b/test/snapshots/look-dir.snap
deleted file mode 100644
index 2032d0c0..00000000
--- a/test/snapshots/look-dir.snap
+++ /dev/null
@@ -1,23 +0,0 @@
-# right-click look on a typed dir name opens a shell there (split below) + ls
-dirmk sub
-file sub/inner.txt inner-marker
-file top.txt x
-# a directory looked at opens a terminal there (DirLook terminal), as this
-# script was written for; DirLook pane, the default, is dirpane.snap's
-config DirLook terminal
-start 31 100 -n 3
-wait 8000 top.txt
-stable 700 20000
-press left 5 9
-release left 5 9
-stable 400 5000
-key i
-text sub
-key esc
-settle 100
-stable 400 5000
-press right 6 9
-release right 6 9
-wait 10000 inner.txt
-stable 700 20000
-snap dir-open
diff --git a/test/snapshots/lookpanes.golden b/test/snapshots/lookpanes.golden
deleted file mode 100644
index b0a3110f..00000000
--- a/test/snapshots/lookpanes.golden
+++ /dev/null
@@ -1,80 +0,0 @@
-== snap shells grid=130x51 cursor=122,4
-| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
-| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/lookpanes/cwd/beta/bmark.txt Save Term Collaps /tmp/pardes-snap/lookpanes/cwd Term+bash Save Mode Filter Colla
-| e Del pse Del
-| 1 both.txt ls zqonly.txt pick.txt twin.txt
-| 2 b-marker alpha beta zzboot.txt
-|
-| /tmp/pardes-snap/lookpanes/cwd/alpha Term+bash Save Mode Filter
-| Collapse Del
-| ls
-| amark.txt both.txt pick.txt twin.txt zqonly.txt
-== snap other-dir grid=130x51 cursor=7,8
-|6: /tmp/pardes-snap/lookpanes/cwd/alpha/zqonly.txt Save Term Colla
-|7: pse Del /tmp/pardes-snap/lookpanes/cwd/alpha Term+bash Save Mode Filter
-|8: 1 ONLY-IN-ALPHA Collapse Del
-== snap clicked-wins grid=130x51 cursor=7,12
-|10: /tmp/pardes-snap/lookpanes/cwd/beta/both.txt Save Term Collapse amark.txt both.txt pick.txt twin.txt zqonly.txt
-|11: Del
-|12: 1 BOTH-FROM-BETA
-== snap mru-alpha grid=130x51 cursor=72,14
-|12: 1 BOTH-FROM-BETA /tmp/pardes-snap/lookpanes/cwd/alpha/pick.txt Save Term Collaps
-|13: e Del
-|14: 1 PICK-FROM-ALPHA
-== snap mru-beta grid=130x51 cursor=7,16
-|14: /tmp/pardes-snap/lookpanes/cwd/beta/twin.txt Save Term Collapse 1 PICK-FROM-ALPHA
-|15: Del
-|16: 1 TWIN-FROM-BETA
-== style mru-beta grid=130x51
-|0: 0-1 d,#1d2824, 2-129 #b2c3b8,#1d2824,
-|1: 0-1 d,#887455, 2-64 #becfc4,#314738, 65-66 #becfc4,#887455, 67-129 #b2c3b8,#1d2824,
-|2: 0-1 d,#496656, 2-37 #b2c3b8,#1d2824, 38-47 #d3b0d9,#1d2824, 48-64 #b2c3b8,#1d2824, 65-66 #b2c3b8,#496656, 67-97 #b2c3b8,#1d2824, 98-107 #d3b0d9,#1d2824, 108-129 #b2c3b8,#1d2824,
-|3: 0-1 d,#1d2824, 2-129 #b2c3b8,#1d2824,
-|4: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-64 #e5eee5,#0d1410, 65-65 #e5eee5,#608269, 66-129 #e5eee5,#0d1410,
-|5: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-64 #e5eee5,#0d1410, 65-65 #e5eee5,#608269, 66-129 #e5eee5,#0d1410,
-|6: 0-1 d,#496656, 2-38 #b2c3b8,#1d2824, 39-49 #d3b0d9,#1d2824, 50-64 #b2c3b8,#1d2824, 65-65 #b2c3b8,#608269, 66-129 #b2c3b8,#0d1410,
-|7: 0-1 d,#1d2824, 2-64 #b2c3b8,#1d2824, 65-66 #b2c3b8,#496656, 67-103 #b2c3b8,#1d2824, 104-113 #d3b0d9,#1d2824, 114-129 #b2c3b8,#1d2824,
-|8: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-64 #e5eee5,#0d1410, 65-67 #e5eee5,#1d2824, 68-129 #b2c3b8,#1d2824,
-|9: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|10: 0-1 d,#496656, 2-37 #b2c3b8,#1d2824, 38-46 #d3b0d9,#1d2824, 47-64 #b2c3b8,#1d2824, 65-65 #b2c3b8,#608269, 66-66 #b2c3b8,#0d1410, 67-129 #e5eee5,#0d1410,
-|11: 0-2 d,#1d2824, 3-64 #b2c3b8,#1d2824, 65-65 #b2c3b8,#608269, 66-129 #b2c3b8,#0d1410,
-|12: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-64 #e5eee5,#0d1410, 65-66 #e5eee5,#496656, 67-103 #b2c3b8,#1d2824, 104-112 #d3b0d9,#1d2824, 113-129 #b2c3b8,#1d2824,
-|13: 0-0 d,#608269, 1-64 d,#0d1410, 65-66 d,#1d2824, 67-129 #b2c3b8,#1d2824,
-|14: 0-1 d,#add38a, 2-37 #becfc4,#314738, 38-46 #dfbce5,#314738, 47-64 #becfc4,#314738, 65-65 #becfc4,#608269, 66-69 #becfc4,#0d1410, 70-71 #59675c,#0d1410, 72-129 #e5eee5,#0d1410,
-|15: 0-2 d,#314738, 3-64 #becfc4,#314738, 65-65 #becfc4,#608269, 66-129 #becfc4,#0d1410,
-|16: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-64 #e5eee5,#0d1410, 65-65 #e5eee5,#608269, 66-129 #e5eee5,#0d1410,
-|17: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
-|18: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
-|19: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
-|20: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
-|21: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
-|22: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
-|23: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
-|24: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
-|25: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
-|26: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
-|27: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
-|28: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
-|29: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
-|30: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
-|31: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
-|32: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
-|33: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
-|34: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
-|35: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
-|36: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
-|37: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
-|38: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
-|39: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
-|40: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
-|41: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
-|42: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
-|43: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
-|44: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
-|45: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
-|46: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
-|47: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
-|48: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
-|49: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
-|50: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
diff --git a/test/snapshots/lookpanes.snap b/test/snapshots/lookpanes.snap
deleted file mode 100644
index 2834a4a9..00000000
--- a/test/snapshots/lookpanes.snap
+++ /dev/null
@@ -1,95 +0,0 @@
-# a look resolves against EVERY open pane's directory, in access order: the
-# pane the click came from first, then the rest most-recently-focused first,
-# and only a word NO directory holds falls through to a search. Two dirs
-# (alpha, beta) hold same-named files and the shell's own cwd holds none of
-# them, so every look below would have been a search before.
-dirmk alpha
-dirmk beta
-file zzboot.txt x
-file alpha/amark.txt a
-file alpha/zqonly.txt ONLY-IN-ALPHA
-file alpha/pick.txt PICK-FROM-ALPHA
-file alpha/twin.txt TWIN-FROM-ALPHA
-file alpha/both.txt BOTH-FROM-ALPHA
-file beta/pick.txt PICK-FROM-BETA
-file beta/twin.txt TWIN-FROM-BETA
-file beta/both.txt BOTH-FROM-BETA
-# the file argument opens a pane whose directory is beta's, and nothing else —
-# so the workdir shell every look below falls through is opened with Alt-n
-# (`New`/`Newcol` open an empty +New scratch now, and one inheriting beta's
-# directory at that) and Alt-c puts it in a column of its own on the right;
-# its first line is a word to look FROM that pane
-file beta/bmark.txt both.txt\nb-marker
-# Builtins announce themselves by default, and an announcement is a band at
-# the top of the body -- which moves every row this script clicks. What the
-# verbs do is what is under test, not the announcement.
-config Verbose off
-# a directory looked at opens a terminal there (DirLook terminal), as this
-# script was written for; DirLook pane, the default, is dirpane.snap's
-config DirLook terminal
-start 51 130 beta/bmark.txt
-wait 8000 b-marker
-stable 700 20000
-key a-n
-key a-c
-wait 8000 zzboot.txt
-stable 700 20000
-key space w h
-stable 400 5000
-# an ordinary dir look on the shell's own ls output: a shell in ./alpha,
-# split below it
-press right 70 6
-release right 70 6
-wait 10000 amark.txt
-stable 700 20000
-# type the words to look into what is left of the workdir shell (past its own
-# ls output, on the same row: its last row is the resize handle)
-press left 95 5
-release left 95 5
-stable 400 5000
-key i
-text zqonly.txt pick.txt twin.txt
-key esc
-settle 100
-stable 400 5000
-snap shells
-# make the beta pane the most recently focused, so the walk has to pass it
-press left 10 5
-release left 10 5
-stable 700 10000
-# zqonly.txt is only under alpha: the clicked shell's cwd fails, beta fails,
-# the alpha shell answers. Before, this word became a search.
-press right 99 5
-release right 99 5
-wait 10000 ONLY-IN-ALPHA
-stable 700 20000
-snap other-dir
-# both.txt is in BOTH dirs and alpha is now the most recent (its file pane
-# just opened), but the CLICK still wins: looked inside the beta pane it
-# opens beta's copy
-press right 10 5
-release right 10 5
-wait 10000 BOTH-FROM-BETA
-stable 700 20000
-snap clicked-wins
-# from a pane whose own dir holds neither copy the access order decides:
-# focus the alpha shell, look pick.txt (in both dirs) -> alpha's
-press left 70 14
-release left 70 14
-stable 700 10000
-press right 109 5
-release right 109 5
-wait 10000 PICK-FROM-ALPHA
-stable 700 20000
-snap mru-alpha
-# focus the beta pane instead and the same look flips: twin.txt is in both
-# dirs, beta is most recent, beta's copy opens
-press left 10 5
-release left 10 5
-stable 700 10000
-press right 118 5
-release right 118 5
-wait 10000 TWIN-FROM-BETA
-stable 700 20000
-snap mru-beta
-snapstyle mru-beta
diff --git a/test/snapshots/rsearch.golden b/test/snapshots/rsearch.golden
deleted file mode 100644
index 59082a6c..00000000
--- a/test/snapshots/rsearch.golden
+++ /dev/null
@@ -1,43 +0,0 @@
-== snap opened grid=210x31 cursor=7,7
-| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
-| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/rsearch/cwd Term+bash Save Mode Filter Collapse Del
-| ls
-| code.txt sub
-|
-| /tmp/pardes-snap/rsearch/cwd/code.txt Save Term Collapse Del
-| 1 run count_x now
-| 2 open sub/dep.txt:3 here
-| 3 count_x again
-| 4 pick two words
-== snap search grid=210x31 cursor=13,9
-|11: /tmp/pardes-snap/rsearch/cwd/+Search Save Term Collapse LocationsConfig Del
-|12: 1 code.txt:1:5-11
-|13: 2 run count_x now
-|14: 3 code.txt:3:1-7
-|15: 4 count_x again
-|16: 5
-== snap select grid=210x31 cursor=14,10
-|12: 1 code.txt:4:1-8
-|13: 2 pick two words
-|14: 3
-|15:
-|16:
-== snap path-open grid=210x31 cursor=16,17
-|14: /tmp/pardes-snap/rsearch/cwd/sub/dep.txt Save Term Collapse Del
-|15: 1 d1
-|16: 2 d2
-|17: 3 DEPTARGET
-|18: 4 d4
-|19: 5 d5
-|20: 6 d6
-== snap step1 grid=210x31 cursor=13,9
-|12: 2 run count_x now
-|13: 3 code.txt:3:1-7
-== snap step2 grid=210x31 cursor=13,9
-== snap step3 grid=210x31 cursor=13,9
-== snap selclick grid=210x31 cursor=14,10
-|12: 1 code.txt:4:1-8
-|13: 2 pick two words
-== snap outside grid=210x31 cursor=20,10
-|12: 1 code.txt:4:10-14
diff --git a/test/snapshots/rsearch.snap b/test/snapshots/rsearch.snap
deleted file mode 100644
index 75d0212c..00000000
--- a/test/snapshots/rsearch.snap
+++ /dev/null
@@ -1,99 +0,0 @@
-# acme button-3 in a text file = search: right-click / right-select reuse the
-# `/` machinery. A click expands the file-ish word (config.isFileChar) and, when
-# it names no file, searches the buffer for it — hits into the +Search output
-# buffer, n/N walk them like `/`. A right-select searches the span verbatim.
-# A real path (sub/dep.txt:3) still resolves and OPENS — expansion keeps / . :
-# so paths are not broken; only the non-file case falls through to search.
-dirmk sub
-file sub/dep.txt d1\nd2\nDEPTARGET\nd4\nd5\nd6
-file code.txt run count_x now\nopen sub/dep.txt:3 here\ncount_x again\npick two words
-# Builtins announce themselves by default, and an announcement is a band at
-# the top of the body -- which moves every row this script clicks. What the
-# verbs do is what is under test, not the announcement.
-config Verbose off
-# the +Search listing is what this walks: LookWord list (search, acme's look3,
-# is the default; ctl.zig tests it)
-config LookWord list
-start 31 210 -n 1
-wait 8000 code.txt
-stable 700 20000
-# open code.txt: type the name in a shell, right-click it (ordinary look)
-press left 5 9
-release left 5 9
-stable 400 5000
-key i
-text code.txt
-key esc
-settle 100
-stable 400 5000
-press right 6 9
-release right 6 9
-wait 10000 count_x
-stable 700 15000
-snap opened
-# code.txt opens under the shell's text, its line 1 on screen row 8.
-# right-CLICK the identifier `count_x` (line 1, the 'n' at col 15). It names no
-# file, so the click searches for it: the results list both lines containing it.
-press right 15 8
-release right 15 8
-# Locations stack the target under its line now: two rows, two waits.
-wait 10000 code.txt:1:5-11
-wait 10000 run count_x now
-stable 700 15000
-snap search
-# right-SELECT `pick two` (line 4, sweep cols 8..15): a multi-word span passes
-# through verbatim (the space is kept), unlike a click's single-word expansion.
-press right 8 11
-drag right 15 11
-release right 15 11
-wait 10000 code.txt:4:1-8
-wait 10000 pick two words
-stable 700 15000
-snap select
-# right-CLICK the path `sub/dep.txt:3` (line 2, col 18): isFileChar keeps / . :
-# so the click expands the whole token and it RESOLVES — a look, not a search —
-# opening dep.txt scrolled to line 3 (DEPTARGET). The "don't break paths" case.
-press right 18 9
-release right 18 9
-wait 10000 DEPTARGET
-stable 700 15000
-snap path-open
-# A click does not merely LIST the hits, it goes to one: this re-search of
-# `count_x` (line 1, col 15) also STEPS onto hit 1, so the cursor lands in the
-# match, not where the click was.
-press right 15 8
-release right 15 8
-stable 700 15000
-snap step1
-# ...and the same word clicked in its OTHER place (line 3, col 10) opens NO
-# second +Search: the list is already armed on this pattern, so the click is
-# `n`. Cursor moves to hit 2, line 3.
-press right 10 10
-release right 10 10
-stable 700 15000
-snap step2
-# past the last hit the ring wraps: back to hit 1, line 1.
-press right 10 10
-release right 10 10
-stable 700 15000
-snap step3
-# acme sized code.txt to its four lines, so line 4 is on its last row: a
-# pane's last row is text like any other, never a resize handle.
-# A LEFT sweep over `pick two` (line 4, cols 8..15) and then a right CLICK
-# INSIDE it: the click takes the whole selection — the search is for the
-# two-word span (`4:1-8`), which the file-ish word expansion could never
-# produce from the single word under the click.
-press left 8 11
-drag left 15 11
-release left 15 11
-stable 400 5000
-press right 11 11
-release right 11 11
-stable 700 15000
-snap selclick
-# ...and a right click OUTSIDE the selection is the ordinary word click again:
-# `words` (line 4, col 19), not the span left lying in the pane.
-press right 19 11
-release right 19 11
-stable 700 15000
-snap outside
diff --git a/test/snapshots/shellset.snap b/test/snapshots/shellset.snap
index 7d213a84..63fe03f1 100644
--- a/test/snapshots/shellset.snap
+++ b/test/snapshots/shellset.snap
@@ -31,9 +31,9 @@ key tab
stable 700 15000
# NOTHING happened on screen, and that is the assertion: a name the builtin
# parser does not know is a command line, so it would have forked a terminal
-# for this directory and printed `Shell: command not found` into it (that is
-# cmdword.snap's contract). One pane, no error — `Shell` was consumed as a
-# builtin and its argument went with it.
+# for this directory and printed `Shell: command not found` into it. One
+# pane, no error — `Shell` was consumed as a builtin and its argument went
+# with it.
snap builtin-ran
# a new terminal, which asks for a shell that is not there. It gets the
# fallback: the pane greets, `ls` runs, and its output is on screen. Alt-n and
diff --git a/test/snapshots/splitparent.golden b/test/snapshots/splitparent.golden
deleted file mode 100644
index 3073d4d3..00000000
--- a/test/snapshots/splitparent.golden
+++ /dev/null
@@ -1,35 +0,0 @@
-== snap shrunk grid=100x31 cursor=4,5
-| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
-| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/splitparent/cwd Term+bash Save /tmp/pardes-snap/splitparent/cwd Term+bash Save
-| Mode Filter Collapse Del Mode Filter Collapse Del
-| ls ls
-|
-| /tmp/pardes-snap/splitparent/cwd Term+bash Save
-| Mode Filter Collapse Del
-| ls
-== snap swap-parent grid=100x31 cursor=4,13
-|10: /tmp/pardes-snap/splitparent/cwd Term+bash Save
-|11: Mode Filter Collapse Del
-|12: ls
-== snap tallest grid=100x6 cursor=4,5
-| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
-| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/splitparent/cwd Term+bash Save /tmp/pardes-snap/splitparent/cwd Term+bash Save
-| /tmp/pardes-snap/splitparent/cwd Term+bash Save Mode Filter Collapse Del
-| /tmp/pardes-snap/splitparent/cwd Term+bash Save ls
-| e in that column: each keeps its tag and 2 rows
-== snap regrown grid=100x31 cursor=4,13
-| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
-| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/splitparent/cwd Term+bash Save /tmp/pardes-snap/splitparent/cwd Term+bash Save
-| Mode Filter Collapse Del Mode Filter Collapse Del
-| ls ls
-|
-| /tmp/pardes-snap/splitparent/cwd Term+bash Save
-| Mode Filter Collapse Del
-| ls
-|
-| /tmp/pardes-snap/splitparent/cwd Term+bash Save
-| Mode Filter Collapse Del
-| e in that column: each keeps its tag and 2 rows
diff --git a/test/snapshots/splitparent.snap b/test/snapshots/splitparent.snap
deleted file mode 100644
index 93ed9e21..00000000
--- a/test/snapshots/splitparent.snap
+++ /dev/null
@@ -1,34 +0,0 @@
-# a new pane never opens under a too-short parent: Alt-n from a pane too short to halve
-# splits the tall sibling in its column instead; when NO pane could leave the
-# newcomer 2 body rows, the tallest one anywhere is split, and when that one
-# cannot keep its own tag and 2 rows either, the pane is refused
-# pins the pardes placement rule (Placement pardes), which it covers
-config Placement pardes
-start 31 100 -n 3
-stable 700 20000
-# shrink pane 0 (top-left), a terminal, as far as it goes, its tag and 2 body
-# rows: the pane below's grip dragged up under its tag (a terminal has no
-# rule between panes; the grip is the handle)
-press left 1 18
-drag left 1 3
-release left 1 3
-motion 40 25
-stable 500 8000
-snap shrunk
-# Alt-n from the short pane: the new shell opens below the tall sibling
-# underneath it, not as another 1-row sliver
-key a-n
-stable 700 15000
-snap swap-parent
-# squeeze the grid until no pane can give a new one its tag and 2 rows, then
-# Alt-n again: the new shell is refused, and the message row says why (before
-# every pane had to keep only a tag and one row, the tallest pane anywhere was
-# split here)
-resize 6 100
-stable 700 15000
-key a-n
-stable 700 15000
-snap tallest
-resize 31 100
-stable 700 15000
-snap regrown
diff --git a/test/snapshots/ttylook.golden b/test/snapshots/ttylook.golden
deleted file mode 100644
index 30a5b564..00000000
--- a/test/snapshots/ttylook.golden
+++ /dev/null
@@ -1,71 +0,0 @@
-== snap tok1 grid=120x31 cursor=2,5
-| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
-| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/ttylook/cwd Term+bash Save Mode Filter Co /tmp/pardes-snap/ttylook/cwd Term+bash Save Mode Filter Co
-| llapse Del llapse Del
-| ls ls
-| big.txt plain.txt sub big.txt plain.txt sub
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-| /tmp/pardes-snap/ttylook/cwd Term+bash Save Mode Filter Co
-| llapse Del
-| ls
-| big.txt plain.txt sub
-== style tok1 grid=120x31
-|0: 0-1 d,#1d2824, 2-119 #b2c3b8,#1d2824,
-|1: 0-1 d,#887455, 2-59 #becfc4,#314738, 60-61 #becfc4,#887455, 62-119 #b2c3b8,#1d2824,
-|2: 0-1 d,#add38a, 2-30 #becfc4,#314738, 31-40 #dfbce5,#314738, 41-59 #becfc4,#314738, 60-61 #becfc4,#496656, 62-90 #b2c3b8,#1d2824, 91-100 #d3b0d9,#1d2824, 101-119 #b2c3b8,#1d2824,
-|3: 0-1 d,#314738, 2-59 #becfc4,#314738, 60-61 #becfc4,#1d2824, 62-119 #b2c3b8,#1d2824,
-|4: 0-0 d,#608269, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410,
-|5: 0-0 d,#608269, 1-1 d,#0d1410, 2-8 #f5f7ee,#3c614a, 9-10 #f5f7ee,#0d1410, 11-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410,
-|6: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
-|7: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
-|8: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
-|9: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
-|10: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
-|11: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
-|12: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
-|13: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
-|14: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
-|15: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
-|16: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
-|17: 0-1 d,#496656, 2-30 #b2c3b8,#1d2824, 31-40 #d3b0d9,#1d2824, 41-59 #b2c3b8,#1d2824, 60-60 #b2c3b8,#608269, 61-119 #b2c3b8,#0d1410,
-|18: 0-1 d,#1d2824, 2-59 #b2c3b8,#1d2824, 60-60 #b2c3b8,#608269, 61-119 #b2c3b8,#0d1410,
-|19: 0-0 d,#608269, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410,
-|20: 0-0 d,#608269, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410,
-|21: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
-|22: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
-|23: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
-|24: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
-|25: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
-|26: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
-|27: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
-|28: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
-|29: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
-|30: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
-== snap tok2 grid=120x31 cursor=11,5
-== snap tokback grid=120x31 cursor=2,5
-== snap insert grid=120x31 cursor=4,5
-|5: nnbig.txt plain.txt sub big.txt plain.txt sub
-== snap tok3 grid=120x31 cursor=22,5
-|5: big.txt plain.txt sub big.txt plain.txt sub
-== snap diropen grid=120x31 cursor=4,10
-|7: /tmp/pardes-snap/ttylook/cwd/sub Term+bash Save Mode Filte
-|8: r Collapse Del
-|9: ls
-== snap noop grid=120x31 cursor=2,5
-== snap fileopen grid=120x31 cursor=3,4
-|22: /tmp/pardes-snap/ttylook/cwd/+Search Save Term Collapse Lo
-|23: cationsConfig Del
-|24: 1 @p1:1:1-2
-|25: 2 ls
-|26: 3
diff --git a/test/snapshots/ttylook.snap b/test/snapshots/ttylook.snap
deleted file mode 100644
index 62760ae6..00000000
--- a/test/snapshots/ttylook.snap
+++ /dev/null
@@ -1,65 +0,0 @@
-# tty n/N token motion (normal mode only): n/N SELECT the next/prev
-# whitespace-separated token that look resolves — several per line, so the
-# greet ls row hops big.txt -> plain.txt -> sub — moving the cursor to the
-# token start and opening NOTHING. Return looks the selection (dir -> shell
-# +ls there, file -> pane) and focus follows what opened. The first n wraps
-# from the prompt row to the first token; insert-mode n still types; and a
-# pane with nothing look-able in it never traps the walk, because the walk is
-# a RING ACROSS PANES rather than a scan of the one you are in.
-lines big.txt 40
-file plain.txt just text
-dirmk sub
-# a directory looked at opens a terminal there (DirLook terminal), as this
-# script was written for; DirLook pane, the default, is dirpane.snap's
-config DirLook terminal
-start 31 120 -n 3
-wait 8000 big.txt
-stable 700 20000
-# first n: cursor sits at the shell prompt below the output — wrap lands on
-# the ls row's first token, big.txt; nothing opens
-key space j n
-stable 400 5000
-snap tok1
-snapstyle tok1
-# same row, next token: plain.txt
-key space j n
-stable 400 5000
-snap tok2
-# N steps back to big.txt
-key space j p
-stable 400 5000
-snap tokback
-# insert-mode n still types (a run splice), no stepping; undo it
-key i
-text nn
-key esc
-settle 100
-stable 400 5000
-snap insert
-key u
-stable 400 5000
-# resume the walk from big.txt's start: plain.txt, then sub
-key space j n
-stable 400 5000
-key space j n
-stable 400 5000
-snap tok3
-# Return looks the selected dir: a shell opens below in sub and ls's it
-key enter
-stable 700 15000
-snap diropen
-# the fresh pane's dir is empty, and that is not where n stops: the ring is
-# spined on the panes that have LOOKED, so the step leaves this shell for the
-# one it was looked out of. That pane's cursor is on its last token (`sub`),
-# so the walk runs off the end and comes round to its first — big.txt.
-key space j n
-stable 400 5000
-snap noop
-# back in the first pane, Enter with the cursor ON a token looks it (no
-# selection: the cursor word expands) — big.txt opens as a file pane
-press left 4 5
-release left 4 5
-stable 400 5000
-key enter
-stable 700 15000
-snap fileopen
diff --git a/test/snapshots/ttytaken.snap b/test/snapshots/ttytaken.snap
index a6ccb632..928993a6 100644
--- a/test/snapshots/ttytaken.snap
+++ b/test/snapshots/ttytaken.snap
@@ -4,7 +4,7 @@
# and into a command pane of its own once `less` owns the terminal -- where
# it runs, instead of becoming keystrokes the pager would eat. Nothing about
# the pager's screen changes. (From any pane but a terminal, an Exec always
-# runs as a command pane: exec.snap and cmdword.snap.)
+# runs as a command pane: exec.snap.)
lines big.txt 40
start 31 210 -n 1
wait 8000 big.txt