summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/behaviour/addons.zig2
-rw-r--r--test/behaviour/builtins.zig44
-rw-r--r--test/daemon.py29
-rw-r--r--test/panes.zig6
-rw-r--r--test/process/cli.zig8
-rw-r--r--test/process/tty_boot.zig78
-rw-r--r--test/process/tty_terminals.zig2
-rw-r--r--test/snapshots/builtins.golden133
-rw-r--r--test/snapshots/leader.golden194
-rw-r--r--test/snapshots/ttyhelp.golden30
10 files changed, 309 insertions, 217 deletions
diff --git a/test/behaviour/addons.zig b/test/behaviour/addons.zig
index e36b088c..abadd781 100644
--- a/test/behaviour/addons.zig
+++ b/test/behaviour/addons.zig
@@ -334,7 +334,7 @@ test "addons: a Look at a file whose extension an addon claims opens a pane of i
try s.write(s.at("/pane/{d}/ctl", .{pane}), "Del\n");
try s.write("/ctl", "Help\n");
const help = try s.read(s.at("/pane/{d}/body", .{try s.focused()}));
- try std.testing.expect(has(help, "SPC z f Fake a fake pane, counting (addon fake)\n"));
+ try std.testing.expect(has(help, "SPC z f Fake (addon fake)\na fake pane, counting\n\n"));
}
test "addons: an image pane whose file changes on disk shows the new picture, under a new key: a window keeps a texture by its key" {
diff --git a/test/behaviour/builtins.zig b/test/behaviour/builtins.zig
index 86ee6ca9..50e6e688 100644
--- a/test/behaviour/builtins.zig
+++ b/test/behaviour/builtins.zig
@@ -35,6 +35,50 @@ test "builtins: Mini maps a file of the pane's directory over pardes's own sourc
try std.testing.expectEqual(@as(usize, 0), s.saved);
}
+test "builtins: Help holds every builtin with its whole documentation, `Help <name>` that one's alone, and B2 on a builtin's name in it runs it" {
+ var s = try Session.initFile(std.testing.allocator, "x\n");
+ defer s.deinit();
+ try s.write(s.at("/pane/{d}/exec", .{try s.focused()}), "Help\n");
+ const help = try s.focused();
+ const body = s.at("/pane/{d}/body", .{help});
+ const all = try s.read(body);
+ const commands = try s.read("/commands");
+ var words = std.mem.tokenizeScalar(u8, commands, '\n');
+ while (words.next()) |line| {
+ const name = line[0..std.mem.indexOfScalar(u8, line, ' ').?];
+ // One alone: its row, a blank, its documentation, a blank, then what
+ // the list does not say; the one +Help, filled again.
+ try s.write(s.at("/pane/{d}/exec", .{help}), s.at("Help {s}\n", .{name}));
+ try std.testing.expectEqual(help, try s.focused());
+ const one = try s.read(body);
+ const doc_end = std.mem.indexOf(u8, one, "\n\nkeys: ").?;
+ const row = one[0..std.mem.indexOfScalar(u8, one, '\n').?];
+ const documented = one[0..doc_end];
+ // The list holds it whole: its row, its documentation under it.
+ try std.testing.expect(std.mem.indexOf(u8, all, s.at("{s}\n{s}\n\n", .{ row, documented[row.len + 2 ..] })) != null);
+ // Its documentation begins with its summary, /commands' line.
+ try std.testing.expect(std.mem.startsWith(u8, documented[row.len + 2 ..], line[std.mem.indexOf(u8, line, " -- ").? + 4 ..]));
+ // And holds no other word's.
+ var others = std.mem.tokenizeScalar(u8, commands, '\n');
+ while (others.next()) |other| if (!std.mem.eql(u8, other, line))
+ try std.testing.expect(std.mem.indexOf(u8, one, other[std.mem.indexOf(u8, other, " -- ").? + 4 ..]) == null);
+ }
+ // A word that is neither a builtin, as the registry spells it, nor SPC
+ // keys is said, the +Help left as it was.
+ const kept = try s.read(body);
+ try std.testing.expect(try s.refused("/ctl", "Help diff\n") != 0);
+ try s.expect(body, kept);
+ // SPC keys: the builtins under them.
+ try s.write("/ctl", "Help c\n");
+ try std.testing.expect(std.mem.startsWith(u8, try s.read(body), "pardes builtins under SPC c\n"));
+ // All text is text: B2 on a builtin's name in the +Help runs it.
+ try s.write("/ctl", "Help Newcol\n");
+ const before = std.mem.count(u8, try s.columns(), ":");
+ // (its row, `SPC c n Newcol`: the topbar's Newcol is drawn first)
+ try s.click("c n Newcol", "c n N".len, 2);
+ try std.testing.expectEqual(before + 1, std.mem.count(u8, try s.columns(), ":"));
+}
+
test "builtins: Build prints this build into a +Build pane" {
var s = try Session.initFile(std.testing.allocator, "x\n");
defer s.deinit();
diff --git a/test/daemon.py b/test/daemon.py
index 22a8c3b7..90977ef4 100644
--- a/test/daemon.py
+++ b/test/daemon.py
@@ -4019,10 +4019,17 @@ def upgrade_clients(old, new):
shutil.rmtree(root, ignore_errors=True)
+def frame_size(ppm):
+ """A window's capture's width and height in pixels (its P6 header)."""
+ return tuple(int(n) for n in ppm.read_bytes()[:32].split()[1:3])
+
+
def gui_upgrades(old, new):
"""Upgrade in a window session (test mode: hidden windows, captured):
- its window, a client window, an unsaved edit and a shell's job, onto
- another build."""
+ its window, resized since its start, a client window, an unsaved edit
+ and a shell's job, onto another build; its new window the size the old
+ one had when its record names it (upgrade.zig `Record.size`), the
+ default when an older build's names none."""
scratch = Path(__file__).resolve().parent.parent.parent / '.scratch' / 'daemon' / 'dmn'
root = Path(tempfile.mkdtemp(prefix='rtgu-', dir=scratch))
env = base_env()
@@ -4066,12 +4073,19 @@ def gui_upgrades(old, new):
started.append(second.pid)
frames = [caps / 'latest.ppm', root / 'second' / 'latest.ppm']
wait_for('both windows drawn', lambda: all(f.exists() for f in frames), timeout=20)
+ # The window resized by hand since its start (the test feed's
+ # in-band resize, CSI 48;rows;cols t, as a user's drag).
+ start = frame_size(frames[0])
+ os.write(feed_w, b'\x1b[48;30;100t')
+ wait_for('the window resized', lambda: frame_size(frames[0]) != start)
+ sized = frame_size(frames[0])
install(new, binary)
time.sleep(.05)
mark = time.time()
client.write(f'/pane/{shell}/exec', b'Upgrade\n')
client.socket.close()
wait_for('the session on the new build', lambda: exe_of(proc.pid) == (str(binary), True), timeout=30)
+ exec_at = time.time()
client = reconnect(sock)
assert proc.poll() is None
wait_for('the daemon on the new build', lambda: exe_of(daemon) == (str(binary), True))
@@ -4094,6 +4108,17 @@ def gui_upgrades(old, new):
second.p.wait(timeout=30)
said = second.err.read_bytes()
assert b'upgrade this client too' in said or b'run the same pardes at both ends' in said, said[-400:]
+ # The new build's window (a frame captured since the exec) the size
+ # the old one had at the Upgrade, not the one it started at, when
+ # the old build's record (the new process's command line) names it;
+ # an older build's names none: the default.
+ wait_for('a frame of the new build\'s window', lambda: frames[0].stat().st_mtime > exec_at)
+ record = next((a for a in cmdline(proc.pid) if a.startswith(b'--upgraded=')), b'')
+ size = re.search(rb'\nsize (\S+)\n', record)
+ back = frame_size(frames[0])
+ assert back == (sized if size else start), ('the window back the size it had' if size else 'the default', back, sized, start, record)
+ print(f'upgrade: the window resized from {start[0]}x{start[1]} to {sized[0]}x{sized[1]} pixels came back '
+ + (f'that size (its record: size {size[1].decode()})' if size else 'at the default (the old build\'s record names no size)'))
said = Replica(root / 'pardes-replica.sock').hello('win', semantics(new))
assert said == ('welcome', proc.pid, 'win'), said
os.kill(sleeper, signal.SIGTERM)
diff --git a/test/panes.zig b/test/panes.zig
index 88209693..bd39beba 100644
--- a/test/panes.zig
+++ b/test/panes.zig
@@ -2083,7 +2083,11 @@ const OutputTests = struct {
_ = try p.render(frame.allocator());
const rect = p.view().rects[id];
const x = rect.x + config.GUTTER + panes.File.gutterWidth(help) + @as(u16, @intCast(at - line_start + 2));
- const y = (bodyY(p, rect)) + @as(u16, @intCast(row));
+ // Its documentation above it wraps: the row the line starts on.
+ const shown = for (help.wrap_line[0..help.wrap_n], 0..) |line, i| {
+ if (line == @as(i32, @intCast(row))) break i;
+ } else return error.MissingTutorRow;
+ const y = (bodyY(p, rect)) + @as(u16, @intCast(shown));
p.update(.{ .mouse = .{ .button = config.exec_button, .kind = .press, .col = x, .row = y } });
p.update(.{ .mouse = .{ .button = config.exec_button, .kind = .release, .col = x, .row = y } });
try std.testing.expect(p.view().active != id);
diff --git a/test/process/cli.zig b/test/process/cli.zig
index 083ba368..bf3716a8 100644
--- a/test/process/cli.zig
+++ b/test/process/cli.zig
@@ -52,8 +52,12 @@ fn helpOffline(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try expectRan(try pardes(a, exe, root, &.{ "help", "attach" }), 0, "\n pardes attach box:notes ", "help attach");
try expectRan(try pardes(a, exe, root, &.{ "help", "new" }), 0, " --detach[=NAME]", "help new");
try expectRan(try pardes(a, exe, root, &.{ "help", "fs" }), 0, "usage: fs ls [PATH]", "help fs");
- try expectRan(try pardes(a, exe, root, &.{ "help", "Newcol" }), 0, "Newcol (the root ctl; SPC c n; column)", "help Newcol");
- try expectRan(try pardes(a, exe, root, &.{ "help", "Save" }), 0, "pardes do Save", "help Save");
+ // A builtin: what `Help <Word>` shows, its whole documentation.
+ const newcol = try pardes(a, exe, root, &.{ "help", "Newcol" });
+ try expectRan(newcol, 0, "SPC c n Newcol", "help Newcol");
+ try expectRan(newcol, 0, "\nacts on: the session (over 9P, the root ctl)\n", "help Newcol");
+ try expectRan(try pardes(a, exe, root, &.{ "help", "Save" }), 0, "\nfrom a shell: pardes do Save [ARG]\n", "help Save");
+ try expectRan(try pardes(a, exe, root, &.{ "help", "Diff" }), 0, "`Diff <hash>`", "help Diff");
try expectRan(try pardes(a, exe, root, &.{ "help", "pane/3/addr" }), 0, "pane/<n>/ name body tag", "help pane/3/addr");
try expectRan(try pardes(a, exe, root, &.{ "help", "nowhere" }), 1, "is not a command, a builtin", "help nowhere");
const all = try pardes(a, exe, root, &.{ "help", "--all" });
diff --git a/test/process/tty_boot.zig b/test/process/tty_boot.zig
index 51aea53b..6373de84 100644
--- a/test/process/tty_boot.zig
+++ b/test/process/tty_boot.zig
@@ -122,64 +122,16 @@ fn builtins(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
// The full index includes commands without leader paths.
try t.key("space ?");
- try t.wait(10000, "pardes builtins, and how to run each:");
+ try t.wait(10000, "pardes builtins: each one's keys and its name");
try t.wait(10000, "ClipPasteBefore");
- try t.key("g e");
- // Every builtin added since adds an index line, and one wheel tick is one row
- // (config.wheel_rows): scroll far enough to expose Look and Exec above the
- // bottom viewport while keeping the same pane geometry for the later clicks.
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
+ // The words with no SPC path come last, each under its documentation:
+ // a search for Look's row, the one line that starts with blanks and
+ // `Look ` (its documentation's lines start with a letter).
+ try t.key("/");
+ try t.send("^ +Look ");
+ try t.key("enter");
try t.wait(10000, "Look enter, right-click");
try t.wait(10000, "Exec tab, middle-click");
- try t.wait(10000, "Filter");
- try t.wait(10000, "Theme");
try t.stable(700, 15000);
// n moves through look-able text; it must not execute command names.
@@ -196,8 +148,9 @@ fn builtins(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.wait(10000, "Tutor");
try t.stable(700, 15000);
try t.snap("docs-group");
- try t.press("middle", "@Tutor", 16);
- try t.release("middle", "@Tutor", 16);
+ // Tutor's row, under the documentation of the three before it
+ try t.press("middle", "@Tutor", 24);
+ try t.release("middle", "@Tutor", 24);
try t.wait(10000, "PARDES TUTOR");
try t.stable(700, 15000);
try t.snap("tutor-from-index");
@@ -539,7 +492,7 @@ fn leader(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
// Executing Help as text opens the full index, not a filtered group.
try t.press("middle", "@Help", 4);
try t.release("middle", "@Help", 4);
- try t.wait(10000, "pardes builtins, and how to run each:");
+ try t.wait(10000, "pardes builtins: each one's keys and its name");
try t.wait(10000, "ClipPasteBefore");
try t.key("space h ?");
try t.wait(10000, "under SPC h");
@@ -562,16 +515,15 @@ fn leader(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.stable(700, 15000);
try t.key("space ?");
- try t.wait(10000, "pardes builtins, and how to run each:");
+ try t.wait(10000, "pardes builtins: each one's keys and its name");
try t.wait(10000, "ClipPasteBefore");
// PDF commands depend on the build; these toggles do not.
try t.key("space t ?");
try t.wait(10000, "under SPC t");
- try t.wait(10000, "Ascii");
- try t.wait(10000, "Palette");
- try t.wait(10000, "Petscii");
- try t.wait(10000, "Wrap");
+ // its first rows: each word's documentation under it, the rest below
+ try t.wait(10000, "SPC t a Ascii");
+ try t.wait(10000, "SPC t c Changes");
// SPC w is Window itself now, not a group; the column group stands in
try t.key("space c ?");
try t.wait(10000, "under SPC c");
diff --git a/test/process/tty_terminals.zig b/test/process/tty_terminals.zig
index dfb027e2..9f7c9308 100644
--- a/test/process/tty_terminals.zig
+++ b/test/process/tty_terminals.zig
@@ -231,7 +231,7 @@ fn ttyhelp(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
// The bare-tty boot now opens an empty pane under the shell, so the index is
// half as tall: wait on a row that is on screen. What the leader route
// produced is the snapshot below, not this.
- try t.wait(10000, "SPC Y ClipYankMain");
+ try t.wait(10000, "SPC ? Help");
try t.stable(700, 15000);
try t.snap("leaderworks");
try t.done();
diff --git a/test/snapshots/builtins.golden b/test/snapshots/builtins.golden
index 65fb024c..6d5739ef 100644
--- a/test/snapshots/builtins.golden
+++ b/test/snapshots/builtins.golden
@@ -14,66 +14,81 @@
|10: 1 pardes builtins under SPC c
|11: 2
|12: 3 SPC c d Delcol
-|13: 4 SPC c f Follow
-|14: 5 SPC c j Joincol topbar
-|15: 6 SPC c n Newcol topbar
-|16: ~
+|13: 4 Close this column and its panes.
+|14: 5 The column is the one whose tag it ran from, else the pane's. Refused once while a pane in it holds unsaved text↩
+|15: , the notice saying how many; Delcol again, nothing edited since, closes them.
+|16: 6
+|17: 7 SPC c f Follow
+|18: 8 Show one text across a chain of panes as consecutive pages, scrolled as one.
+|19: 9 As Emacs's follow-mode: each page goes on where the one before ends. Each Follow adds a page, a Zerox of the tex↩
+|20: t, at the end of the column right of the chain's last, or in a new column there; its tag has Unfollow.
+|21: 10
+|22: 11 SPC c j Joincol topbar
+|23: 12 Fold the keyboard's column into the one on its right, keeping its panes.
+|24: 13 Refused for the last column, and where the joined column could not give each pane its tag and 2 rows.
+|25: 14
+|26: 15 SPC c n Newcol topbar
+|27: 16 Make an empty column right of the keyboard's, its tag taking the keyboard.
+|28: 17 The next pane made from there goes in it. Refused, saying why, when no column fits.
+|29: 18
+|30: ~
+|57: +Search 1/1 Save Undock Del
+|58: /^ +Look
+|59: @p2:220:1 Look enter, right-click
== snap docs-group grid=120x67 cursor=7,10
|10: 1 pardes builtins under SPC h
|12: 3 SPC h b Build
-|13: 4 SPC h c Changelog topbar
-|14: 5 SPC h m Messages
-|15: 6 SPC h t Tutor topbar
-== snap tutor-from-index grid=120x67 cursor=7,17
+|13: 4 Show this build in a +Build: its version, compiler, optimize mode, target and dependencies.
+|14: 5 A stamped build's (a release, or the ~/.local install) commit, jj change and build time too, its platform, its g↩
+|15: rammars, and whether the addons are compiled in.
+|17: 7 SPC h c Changelog topbar
+|18: 8 Show this build's version and what changed to reach it, in a +Changelog.
+|19: 9
+|20: 10 SPC h m Messages
+|21: 11 Show the messages said so far in a +Messages.
+|22: 12
+|23: 13 SPC h t Tutor topbar
+|24: 14 Open the tutor, a document to work through.
+|25: 15
+|26: ~
+|27:
+|28:
+|29:
+|30:
+== snap tutor-from-index grid=120x67 cursor=7,36
|10: 1 pardes builtins under SPC h Tutor
-|16: /tmp/pardes-snap/builtins/cwd/+Tutor Save Term Collapse Follow Del
-|17: 1
-|18: 2 PARDES TUTOR
-|19: 3
-|20: 4 This pane is +Tutor, a copy: edit it freely; there is no need to
-|21: 5 Save it (a bare Save asks for a path to write a copy to).
-|22: 6 `Del` in its tag closes it; once you have edited it, `Del` refuses
-|23: 7 once and the second `Del` discards. `Tutor` or SPC h t opens a
-|24: 8 fresh copy.
-|25: 9
-|26: 10 The guide (docs/typ/guide.typ) explains; this is the hands-on part.
-|27: 11 Each lesson is a few things to do, then names its guide section.
-|28: 12 Words in backticks, like `Save`, are builtins.
-|29: 13 `Exec` (B2) runs the builtin a word names, or else runs it as a
-|30: 14 shell line; `Look` (B3) opens what the text names, or else finds
-|31: 15 it. Type a builtin in any tag and `Exec` it. Lines starting with
-|32: 16 "| " are tags.
-|33: 17
-|34: 18 Press j until you reach part 1.
-|35: 19
-|36: 20
-|37: 21 =================================================================
-|38: 22 = PART 1 — MODES =
-|39: 23 =================================================================
-|40: 24
-|41: 25 1. The box left of this pane's tag is blank, so you are in
-|42: 26 NORMAL mode. Press i: it shows ^ (INSERT). Type a word, then
-|43: 27 Esc: blank again.
-|44: 28 2. Press Esc once more, in NORMAL: the keyboard goes back to the
-|45: 29 pane you were in before (not what helix does). Come back with
-|46: 30 Esc again.
-|47: 31 3. Press Alt-n: a terminal opens, in NORMAL mode, and pardes types
-|48: 32 ls at its first prompt. Press Ctrl-b: its box shows $ (RAW), and
-|49: 33 keys go to the shell. Esc brings you back here; the terminal stays
-|50: 34 $. Shift-Esc sends the shell an Esc.
-|51: 35
-|52: 36 -> Guide: Modes
-|53: 37
-|54: 38
-|55: 39 =================================================================
-|56: 40 = PART 2 — THE MOUSE =
-|57: 41 =================================================================
-|58: 42
-|59: 43 1. `Look` (B3) the word mouse in this sentence: the next mouse is
-|60: 44 selected.
-|61: 45 2. `Exec` (B2) the word `Help` here: the list of keys opens.
-|62: 46 Close it with `Del` in its tag.
-|63: 47 3. Select a word with B1, keep B1 down, click B2: it is cut. Still
-|64: 48 holding B1, click B3: it comes back. That pair is a copy.
-|65: 49 4. Put the cursor on `Help` and press Tab: `Exec`, as B2. Enter
-|66: 50 is `Look`, as B3.
+|25: +Search 1/1 Save Undock Del
+|26: /^ +Look
+|27: @p2:220:1 Look enter, right-click
+|35: /tmp/pardes-snap/builtins/cwd/+Tutor Save Term Collapse Follow Del
+|36: 1
+|37: 2 PARDES TUTOR
+|38: 3
+|39: 4 This pane is +Tutor, a copy: edit it freely; there is no need to
+|40: 5 Save it (a bare Save asks for a path to write a copy to).
+|41: 6 `Del` in its tag closes it; once you have edited it, `Del` refuses
+|42: 7 once and the second `Del` discards. `Tutor` or SPC h t opens a
+|43: 8 fresh copy.
+|44: 9
+|45: 10 The guide (docs/typ/guide.typ) explains; this is the hands-on part.
+|46: 11 Each lesson is a few things to do, then names its guide section.
+|47: 12 Words in backticks, like `Save`, are builtins.
+|48: 13 `Exec` (B2) runs the builtin a word names, or else runs it as a
+|49: 14 shell line; `Look` (B3) opens what the text names, or else finds
+|50: 15 it. Type a builtin in any tag and `Exec` it. Lines starting with
+|51: 16 "| " are tags.
+|52: 17
+|53: 18 Press j until you reach part 1.
+|54: 19
+|55: 20
+|56: 21 =================================================================
+|57: 22 = PART 1 — MODES =
+|58: 23 =================================================================
+|59: 24
+|60: 25 1. The box left of this pane's tag is blank, so you are in
+|61: 26 NORMAL mode. Press i: it shows ^ (INSERT). Type a word, then
+|62: 27 Esc: blank again.
+|63: 28 2. Press Esc once more, in NORMAL: the keyboard goes back to the
+|64: 29 pane you were in before (not what helix does). Come back with
+|65: 30 Esc again.
+|66: 31 3. Press Alt-n: a terminal opens, in NORMAL mode, and pardes types
diff --git a/test/snapshots/leader.golden b/test/snapshots/leader.golden
index d8e57385..1bd0bb41 100644
--- a/test/snapshots/leader.golden
+++ b/test/snapshots/leader.golden
@@ -13,41 +13,42 @@
|6: 1 pardes builtins under SPC h
|7: 2
|8: 3 SPC h b Build
-|9: 4 SPC h c Changelog topbar
-|10: 5 SPC h m Messages
-|11: 6 SPC h t Tutor topbar
-|12: ~
-== snap tutor grid=100x41 cursor=7,13
+|9: 4 Show this build in a +Build: its version, compiler, optimize mode, target and dependencies.
+|10: 5 A stamped build's (a release, or the ~/.local install) commit, jj change and build time too,↩
+|11: its platform, its grammars, and whether the addons are compiled in.
+|12: 6
+|13: 7 SPC h c Changelog topbar
+|14: 8 Show this build's version and what changed to reach it, in a +Changelog.
+|15: 9
+|16: 10 SPC h m Messages
+|17: 11 Show the messages said so far in a +Messages.
+|18: 12
+|19: 13 SPC h t Tutor topbar
+|20: 14 Open the tutor, a document to work through.
+|21: 15
+|22: ~
+== snap tutor grid=100x41 cursor=7,22
|6: 1 pardes builtins under SPC h Tutor
-|12: /tmp/pardes-snap/leader/cwd/+Tutor Save Term Collapse Follow Del
-|13: 1
-|14: 2 PARDES TUTOR
-|15: 3
-|16: 4 This pane is +Tutor, a copy: edit it freely; there is no need to
-|17: 5 Save it (a bare Save asks for a path to write a copy to).
-|18: 6 `Del` in its tag closes it; once you have edited it, `Del` refuses
-|19: 7 once and the second `Del` discards. `Tutor` or SPC h t opens a
-|20: 8 fresh copy.
-|21: 9
-|22: 10 The guide (docs/typ/guide.typ) explains; this is the hands-on part.
-|23: 11 Each lesson is a few things to do, then names its guide section.
-|24: 12 Words in backticks, like `Save`, are builtins.
-|25: 13 `Exec` (B2) runs the builtin a word names, or else runs it as a
-|26: 14 shell line; `Look` (B3) opens what the text names, or else finds
-|27: 15 it. Type a builtin in any tag and `Exec` it. Lines starting with
-|28: 16 "| " are tags.
-|29: 17
-|30: 18 Press j until you reach part 1.
-|31: 19
-|32: 20
-|33: 21 =================================================================
-|34: 22 = PART 1 — MODES =
-|35: 23 =================================================================
-|36: 24
-|37: 25 1. The box left of this pane's tag is blank, so you are in
-|38: 26 NORMAL mode. Press i: it shows ^ (INSERT). Type a word, then
-|39: 27 Esc: blank again.
-|40: 28 2. Press Esc once more, in NORMAL: the keyboard goes back to the
+|21: /tmp/pardes-snap/leader/cwd/+Tutor Save Term Collapse Follow Del
+|22: 1
+|23: 2 PARDES TUTOR
+|24: 3
+|25: 4 This pane is +Tutor, a copy: edit it freely; there is no need to
+|26: 5 Save it (a bare Save asks for a path to write a copy to).
+|27: 6 `Del` in its tag closes it; once you have edited it, `Del` refuses
+|28: 7 once and the second `Del` discards. `Tutor` or SPC h t opens a
+|29: 8 fresh copy.
+|30: 9
+|31: 10 The guide (docs/typ/guide.typ) explains; this is the hands-on part.
+|32: 11 Each lesson is a few things to do, then names its guide section.
+|33: 12 Words in backticks, like `Save`, are builtins.
+|34: 13 `Exec` (B2) runs the builtin a word names, or else runs it as a
+|35: 14 shell line; `Look` (B3) opens what the text names, or else finds
+|36: 15 it. Type a builtin in any tag and `Exec` it. Lines starting with
+|37: 16 "| " are tags.
+|38: 17
+|39: 18 Press j until you reach part 1.
+|40: 19
== snap deleted grid=100x41 cursor=7,3
|5:
|6:
@@ -69,31 +70,52 @@
|22:
|23:
|24:
-|25:
-|26:
-|27:
-|28:
-|29:
-|30:
-|31:
-|32:
-|33:
-|34: /tmp/pardes-snap/leader/cwd/+Help Save Term Collapse Follow Del
-|35: 1 pardes builtins under SPC h
-|36: 2
-|37: 3 SPC h b Build
-|38: 4 SPC h c Changelog topbar
-|39: 5 SPC h m Messages
-|40: 6 SPC h t Tutor topbar
+|25: /tmp/pardes-snap/leader/cwd/+Help Save Term Collapse Follow Del
+|26: 1 pardes builtins under SPC h
+|27: 2
+|28: 3 SPC h b Build
+|29: 4 Show this build in a +Build: its version, compiler, optimize mode, target and dependencies.
+|30: 5 A stamped build's (a release, or the ~/.local install) commit, jj change and build time too,↩
+|31: its platform, its grammars, and whether the addons are compiled in.
+|32: 6
+|33: 7 SPC h c Changelog topbar
+|34: 8 Show this build's version and what changed to reach it, in a +Changelog.
+|35: 9
+|36: 10 SPC h m Messages
+|37: 11 Show the messages said so far in a +Messages.
+|38: 12
+|39: 13 SPC h t Tutor topbar
+|40: 14 Open the tutor, a document to work through.
== snap help-column grid=100x41 cursor=7,6
|5: /tmp/pardes-snap/leader/cwd/+Help Save Term Collapse Follow Del
|6: 1 pardes builtins under SPC c
|7: 2
|8: 3 SPC c d Delcol
-|9: 4 SPC c f Follow
-|10: 5 SPC c j Joincol topbar
-|11: 6 SPC c n Newcol topbar
-|12: ~
+|9: 4 Close this column and its panes.
+|10: 5 The column is the one whose tag it ran from, else the pane's. Refused once while a pane in i↩
+|11: t holds unsaved text, the notice saying how many; Delcol again, nothing edited since, closes↩
+|12: them.
+|13: 6
+|14: 7 SPC c f Follow
+|15: 8 Show one text across a chain of panes as consecutive pages, scrolled as one.
+|16: 9 As Emacs's follow-mode: each page goes on where the one before ends. Each Follow adds a page↩
+|17: , a Zerox of the text, at the end of the column right of the chain's last, or in a new colum↩
+|18: n there; its tag has Unfollow.
+|19: 10
+|20: 11 SPC c j Joincol topbar
+|21: 12 Fold the keyboard's column into the one on its right, keeping its panes.
+|22: 13 Refused for the last column, and where the joined column could not give each pane its tag an↩
+|23: d 2 rows.
+|24: 14
+|25: 15 SPC c n Newcol topbar
+|26: 16 Make an empty column right of the keyboard's, its tag taking the keyboard.
+|27: 17 The next pane made from there goes in it. Refused, saying why, when no column fits.
+|28: 18
+|29: ~
+|30:
+|31:
+|32:
+|33:
|34:
|35:
|36:
@@ -104,25 +126,38 @@
== snap help-language grid=100x41 cursor=7,6
|6: 1 pardes builtins under SPC l
|8: 3 SPC l C Callees
-|9: 4 SPC l D WsDiagnostics
-|10: 5 SPC l S WsSymbols
-|11: 6 SPC l T Subtypes
-|12: 7 SPC l a CodeAction
-|13: 8 SPC l b Callstack
-|14: 9 SPC l c Callers
-|15: 10 SPC l d Diagnostics
-|16: 11 SPC l h SelectRefs
-|17: 12 SPC l i Lspinfo
-|18: 13 SPC l k Hover
-|19: 14 SPC l r Rename
-|20: 15 SPC l s Symbols
-|21: 16 SPC l t Supertypes
-|22: 17 SPC l w Lspwhy
-|23: 18
-|24: 19 Callstack: static caller chains,
-|25: 20 with signatures and clickable call sites.
-|26: 21 Callers / Callees: one direction at a time.
-|27: ~
+|9: 4 List the functions the one under the cursor calls, one level down; a single one is a jump.
+|10: 5
+|11: 6 SPC l D WsDiagnostics
+|12: 7 List the diagnostics of the whole workspace in a +Search.
+|13: 8
+|14: 9 SPC l S WsSymbols
+|15: 10 Search the workspace's symbols for its argument, in a +Search; bare, it asks for the name.
+|16: 11
+|17: 12 SPC l T Subtypes
+|18: 13 List the subtypes of the type under the cursor in a +Search; a single one is a jump.
+|19: 14
+|20: 15 SPC l a CodeAction
+|21: 16 List the language server's code actions for the cursor, in a +Lsp.
+|22: 17
+|23: 18 SPC l b Callstack
+|24: 19 Show the callers of the function under the cursor as a tree, outermost first, in a +Callstac↩
+|25: k.
+|26: 20 Each caller with its place to open and its signature, the line of each call under it; caller↩
+|27: s named for tests after the rest, a recursion marked `↻`. CallstackDepth sets how many level↩
+|28: s (8 by default); a deeper tree says where to go on from. `g c` does the same.
+|29: 21
+|30: 22 SPC l c Callers
+|31: 23 List the functions that call the one under the cursor, one level up; a single one is a jump.
+|32: 24
+|33: 25 SPC l d Diagnostics
+|34: 26 List this file's diagnostics in a +Search.
+|35: 27 `] d` and `[ d` step through them in the text, `] D` and `[ D` to the last and the first.
+|36: 28
+|37: 29 SPC l h SelectRefs
+|38: 30 Select every reference to the symbol under the cursor.
+|39: 31
+|40: 32 SPC l i Lspinfo
== snap del-output grid=100x41 cursor=7,3
|5:
|6:
@@ -147,3 +182,16 @@
|25:
|26:
|27:
+|28:
+|29:
+|30:
+|31:
+|32:
+|33:
+|34:
+|35:
+|36:
+|37:
+|38:
+|39:
+|40:
diff --git a/test/snapshots/ttyhelp.golden b/test/snapshots/ttyhelp.golden
index 561f34ab..de9471a9 100644
--- a/test/snapshots/ttyhelp.golden
+++ b/test/snapshots/ttyhelp.golden
@@ -25,20 +25,20 @@
== snap helped grid=100x31 cursor=7,6
|3: $ Help
|5: /tmp/pardes-snap/ttyhelp/cwd/+Help Save Term Collapse Follow Del
-|6: 1 pardes builtins, and how to run each:
-|7: 2 SPC and its keys, a chord, a button, the
-|8: 3 topbar - or the name, executed anywhere.
-|9: 4
-|10: 5 SPC ? Help topbar
-|11: 6 SPC P ClipPasteBefore
-|12: 7 SPC R ClipReplace
-|13: 8 SPC Y ClipYankMain
-|14: 9 SPC c d Delcol
-|15: 10 SPC c f Follow
-|16: 11 SPC c j Joincol topbar
-|17: 12 SPC c n Newcol topbar
-|18: 13 SPC d Del
-|19: 14 SPC f c Config topbar
-|20: 15 SPC f f Find topbar
+|6: 1 pardes builtins: each one's keys and its name, then what it does. Run one by its keys, or by↩
+|7: its name anywhere: B2 on the word, Exec <name>, a line of a ctl file, or `pardes do <name>`↩
+|8: from a shell. `Help <name>` shows one builtin alone; `Help <keys>` (or SPC, those keys, the↩
+|9: n ?) the builtins under SPC and those keys.
+|10: 2
+|11: 3 SPC ? Help topbar
+|12: 4 Show every builtin with its keys and documentation, or one builtin's alone.
+|13: 5 `Help <name>`: that builtin alone, its keys spelled out, what it acts on and its line for a ↩
+|14: shell (`Help Diff`); a setting or an addon's word the same. `Help <keys>`: the builtins unde↩
+|15: r SPC and those keys (`Help l`, as `SPC l ?` shows them). Each fills the one +Help: a second↩
+|16: Help replaces its text.
+|17: 6
+|18: 7 SPC P ClipPasteBefore
+|19: 8 Paste the system clipboard before the selection.
+|20: 9
== snap leaderworks grid=100x31 cursor=7,6
|3: $