summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--abi/wire.zig13
-rw-r--r--addons/fake/fake.out37
-rw-r--r--addons/life/life.out19
-rw-r--r--addons/pdf/pdf.out80
-rw-r--r--addons/snake/snake.out27
-rw-r--r--core/Band.zig135
-rw-r--r--core/Core.zig140
-rw-r--r--core/Db.zig2
-rw-r--r--core/Effect.zig2
-rw-r--r--core/Field.zig8
-rw-r--r--core/File.zig7
-rw-r--r--core/Jump.zig2
-rw-r--r--core/Kind.zig5
-rw-r--r--core/Layer.zig7
-rw-r--r--core/Messages.zig1480
-rw-r--r--core/Output.zig33
-rw-r--r--core/Pick.zig123
-rw-r--r--core/Pipe.zig156
-rw-r--r--core/Places.zig18
-rw-r--r--core/Plumb.zig6
-rw-r--r--core/Prompt.zig1514
-rw-r--r--core/Query.zig40
-rw-r--r--core/Store.zig2
-rw-r--r--core/Stream.zig2
-rw-r--r--core/TagState.zig254
-rw-r--r--core/Term.zig8
-rw-r--r--core/Text.zig55
-rw-r--r--core/Trail.zig176
-rw-r--r--core/bindings.zig172
-rw-r--r--core/body_layer.zig559
-rw-r--r--core/builtins.zig36
-rw-r--r--core/colors.zig23
-rw-r--r--core/config.zig17
-rw-r--r--core/draw.zig185
-rw-r--r--core/dump.zig1
-rw-r--r--core/edit.zig27
-rw-r--r--core/edit_cmd.zig8
-rw-r--r--core/exec.zig21
-rw-r--r--core/fuzz.zig4
-rw-r--r--core/jj.zig27
-rw-r--r--core/keys.zig75
-rw-r--r--core/layout.zig32
-rw-r--r--core/lib_editor.zig2
-rw-r--r--core/look.zig35
-rw-r--r--core/lsp/Ask.zig157
-rw-r--r--core/modal.zig2
-rw-r--r--core/mouse.zig51
-rw-r--r--core/ninep/ctl.zig12
-rw-r--r--core/ninep/events.zig14
-rw-r--r--core/ninep/tree.zig5
-rw-r--r--core/normal.zig93
-rw-r--r--core/panes.zig183
-rw-r--r--core/replica.zig7
-rw-r--r--core/rollback.zig2
-rw-r--r--core/root.zig21
-rw-r--r--core/surface.zig3
-rw-r--r--core/syntax.zig5
-rw-r--r--core/tagline.zig46
-rw-r--r--dev/Inbox.zig3
-rw-r--r--dev/file_watch.zig2
-rw-r--r--dev/gui/gui.zig13
-rw-r--r--dev/tui/tui.zig12
-rw-r--r--docs/typ/builtins-gui.json6
-rw-r--r--docs/typ/builtins-tui.json5
-rw-r--r--docs/typ/reference.typ2
-rw-r--r--runtime/9p_io.zig4
-rw-r--r--runtime/macos.zig2
-rw-r--r--runtime/upgrade.zig42
-rw-r--r--test/behaviour/addons.zig2
-rw-r--r--test/behaviour/columns_and_tags.zig4
-rw-r--r--test/behaviour/follow.zig2
-rw-r--r--test/behaviour/keys.zig36
-rw-r--r--test/behaviour/language_servers.zig6
-rw-r--r--test/behaviour/look_and_exec.zig10
-rw-r--r--test/behaviour/modes.zig6
-rw-r--r--test/behaviour/other_files.zig10
-rw-r--r--test/behaviour/panes.zig4
-rw-r--r--test/behaviour/placement.zig15
-rw-r--r--test/behaviour/settings.zig2
-rw-r--r--test/behaviour/tags.zig30
-rw-r--r--test/hxdiff.zig5
-rw-r--r--test/monkey9p.zig2
-rw-r--r--test/panes.zig10
-rw-r--r--test/perf.zig214
-rw-r--r--test/process/edit.zig3
-rw-r--r--test/process/flags.zig6
-rw-r--r--test/process/look_and_exec.zig3
-rw-r--r--test/process/mounts.zig2
-rw-r--r--test/process/other_files.zig6
-rw-r--r--test/process/root_ctl.zig12
-rw-r--r--test/process/tree.zig6
-rw-r--r--test/process/tty_boot.zig55
-rw-r--r--test/process/tty_editing.zig18
-rw-r--r--test/process/tty_images.zig3
-rw-r--r--test/process/tty_layout.zig5
-rw-r--r--test/process/tty_terminals.zig12
-rw-r--r--test/snapshots/argv.golden78
-rw-r--r--test/snapshots/badutf.golden53
-rw-r--r--test/snapshots/boot.golden28
-rw-r--r--test/snapshots/builtins.golden158
-rw-r--r--test/snapshots/callstack.golden38
-rw-r--r--test/snapshots/chordcut.golden42
-rw-r--r--test/snapshots/cmdexit.golden42
-rw-r--r--test/snapshots/cmdword.golden56
-rw-r--r--test/snapshots/colgrip.golden41
-rw-r--r--test/snapshots/collapse.golden41
-rw-r--r--test/snapshots/cursorline.golden99
-rw-r--r--test/snapshots/delask.golden34
-rw-r--r--test/snapshots/diffstack.golden13
-rw-r--r--test/snapshots/diffview.golden119
-rw-r--r--test/snapshots/dirpane.golden25
-rw-r--r--test/snapshots/dump.golden12
-rw-r--r--test/snapshots/edit.golden22
-rw-r--r--test/snapshots/emptycol.golden32
-rw-r--r--test/snapshots/exec-bigdrag.golden29
-rw-r--r--test/snapshots/exec.golden20
-rw-r--r--test/snapshots/fileedit.golden65
-rw-r--r--test/snapshots/filewatch.golden14
-rw-r--r--test/snapshots/find.golden154
-rw-r--r--test/snapshots/follow.golden114
-rw-r--r--test/snapshots/fsearch.golden173
-rw-r--r--test/snapshots/ghostty-mid.golden12
-rw-r--r--test/snapshots/grep.golden70
-rw-r--r--test/snapshots/headersweep-restored.golden31
-rw-r--r--test/snapshots/headersweep.golden41
-rw-r--r--test/snapshots/hscroll.golden38
-rw-r--r--test/snapshots/images.golden69
-rw-r--r--test/snapshots/jumps.golden305
-rw-r--r--test/snapshots/layout-close.golden47
-rw-r--r--test/snapshots/layout-open.golden23
-rw-r--r--test/snapshots/leader.golden134
-rw-r--r--test/snapshots/load.golden36
-rw-r--r--test/snapshots/logquiet.golden25
-rw-r--r--test/snapshots/look-center.golden81
-rw-r--r--test/snapshots/look-fd-deep.golden22
-rw-r--r--test/snapshots/look-file-1col.golden26
-rw-r--r--test/snapshots/look-file.golden93
-rw-r--r--test/snapshots/lookloaded.golden55
-rw-r--r--test/snapshots/lookpanes.golden111
-rw-r--r--test/snapshots/lookrange.golden146
-rw-r--r--test/snapshots/lsp-client-edit.golden60
-rw-r--r--test/snapshots/lsp-client.golden67
-rw-r--r--test/snapshots/lsp-rename-files.golden11
-rw-r--r--test/snapshots/lsp-rename.golden16
-rw-r--r--test/snapshots/lsp.golden69
-rw-r--r--test/snapshots/lspcomplete.golden83
-rw-r--r--test/snapshots/lspcompletemoved.golden7
-rw-r--r--test/snapshots/lspdebug.golden39
-rw-r--r--test/snapshots/lsprelpath.golden119
-rw-r--r--test/snapshots/markup.golden39
-rw-r--r--test/snapshots/mini.golden69
-rw-r--r--test/snapshots/modal.golden37
-rw-r--r--test/snapshots/msg.golden46
-rw-r--r--test/snapshots/multicursor.golden132
-rw-r--r--test/snapshots/nested-optout.golden25
-rw-r--r--test/snapshots/nested.golden32
-rw-r--r--test/snapshots/ninep.golden99
-rw-r--r--test/snapshots/pagercolor.golden46
-rw-r--r--test/snapshots/pipe.golden20
-rw-r--r--test/snapshots/psearch.golden12
-rw-r--r--test/snapshots/reflow.golden6
-rw-r--r--test/snapshots/respawn.golden24
-rw-r--r--test/snapshots/restore.golden26
-rw-r--r--test/snapshots/savepane.golden30
-rw-r--r--test/snapshots/scroll.golden116
-rw-r--r--test/snapshots/scrolloff.golden69
-rw-r--r--test/snapshots/selarg.golden14
-rw-r--r--test/snapshots/selregex.golden71
-rw-r--r--test/snapshots/shellset.golden26
-rw-r--r--test/snapshots/shrinktag.golden20
-rw-r--r--test/snapshots/stepgrain.golden152
-rw-r--r--test/snapshots/syntax.golden65
-rw-r--r--test/snapshots/tag.golden20
-rw-r--r--test/snapshots/tagalign.golden125
-rw-r--r--test/snapshots/tagalign2col.golden30
-rw-r--r--test/snapshots/tagcmd.golden24
-rw-r--r--test/snapshots/tagnav.golden58
-rw-r--r--test/snapshots/tagpath.golden33
-rw-r--r--test/snapshots/theme.golden257
-rw-r--r--test/snapshots/themesel.golden544
-rw-r--r--test/snapshots/topbarexec.golden23
-rw-r--r--test/snapshots/tty.golden33
-rw-r--r--test/snapshots/ttyclick.golden12
-rw-r--r--test/snapshots/ttyedit.golden15
-rw-r--r--test/snapshots/ttyfollow.golden55
-rw-r--r--test/snapshots/ttyhelp.golden49
-rw-r--r--test/snapshots/ttylook.golden39
-rw-r--r--test/snapshots/ttyonly.golden10
-rw-r--r--test/snapshots/ttypaste.golden12
-rw-r--r--test/snapshots/ttyprompt.golden12
-rw-r--r--test/snapshots/ttytaken.golden47
-rw-r--r--test/snapshots/tutor.golden26
-rw-r--r--test/snapshots/wheeldrift.golden11
-rw-r--r--test/snapshots/winch.golden28
-rw-r--r--test/snapshots/windownav.golden46
-rw-r--r--test/snapshots/windowops.golden24
-rw-r--r--test/snapshots/wrap.golden22
-rw-r--r--test/snapshots/yankpaste.golden24
-rw-r--r--test/terminal.zig4
199 files changed, 9542 insertions, 3311 deletions
diff --git a/abi/wire.zig b/abi/wire.zig
index d07e6a57..c58957ff 100644
--- a/abi/wire.zig
+++ b/abi/wire.zig
@@ -10,9 +10,16 @@ const pardes = @import("core");
const config = @import("pardes_options");
const build_info = @import("build_info");
-/// 36: a view's tag out of rest (walk UI: `View.tag_state`, its root's
-/// delay, its level unrolled and that level's cursor, the leaf each group
-/// ran last) in the dump and the digest; a pointer's tag hit may be on a
+/// 36: the walk UI (pick-ui SPEC.md) in the dump and the digest: a view's
+/// tag out of rest (`View.tag_state`: its root's delay, its level unrolled
+/// and that level's cursor, the leaf each group ran last, a picker, a
+/// rename's field, a text prompt with its history's place, what its field
+/// found, a pipe's `forced` and `refused`), the session's pickers
+/// (`Pardes.picks`) and prompt histories (`prompt_history`), a pane's walk
+/// (`Pane.trail`), its recipe's selections (`recipe_sels`, `recipe_pri`)
+/// and the pane a view's next sam prompt extends (`Prompt.chain`), the
+/// session's messages (`Said`) and the question a view answers
+/// (`View.answering`), a hover's answer; a pointer's tag hit may be on a
/// pane's band (TagKind `band`, the rows its tag unrolls into);
/// 35: a view's top is a line and a row of that line's wrapped rows: a
/// file's `scroll_row` (and its share's in each view) in the dump and the
diff --git a/addons/fake/fake.out b/addons/fake/fake.out
index 1699ffa6..4216d91e 100644
--- a/addons/fake/fake.out
+++ b/addons/fake/fake.out
@@ -1,12 +1,11 @@
> seed 7
> size 60 20
-window 58x7
+window 58x6
tag fake petscii:on palette:commodore ascii:on
|count 0
|
|
-|view 1 58x7 glyphs
-|
+|view 1 58x6 glyphs
|
|
placement 2x2 src 0,0 2x2 over 0,2 2x1 key 4b3cd99b86ea3486
@@ -15,8 +14,7 @@ tag fake petscii:on palette:commodore ascii:on
|count 2
|kb
|
-|view 1 58x7 glyphs
-|
+|view 1 58x6 glyphs
|
|
placement 2x2 src 0,0 2x2 over 0,2 2x1 key fdcaab9076ad067e
@@ -25,8 +23,7 @@ tag fake petscii:on palette:commodore ascii:on
|count 3
|m3
|
-|view 1 58x7 glyphs
-|
+|view 1 58x6 glyphs
|
|
placement 2x2 src 0,0 2x2 over 0,2 2x1 key 71e39225f0cec2a5
@@ -35,8 +32,7 @@ tag fake petscii:on palette:commodore ascii:on
|count 13
|m3
|
-|view 1 58x7 glyphs
-|
+|view 1 58x6 glyphs
|
|
placement 2x2 src 0,0 2x2 over 0,2 2x1 key 54740e23065232cf
@@ -45,8 +41,7 @@ tag fake petscii:on palette:commodore ascii:on
|count 19
|m3
|
-|view 1 58x7 glyphs
-|
+|view 1 58x6 glyphs
|
|
placement 2x2 src 0,0 2x2 over 0,2 2x1 key 540d6c1b4eee5716
@@ -55,8 +50,7 @@ tag fake petscii:on palette:commodore ascii:on
|count 19
|m3
|
-|view 1 58x7 glyphs
-|
+|view 1 58x6 glyphs
|
|
placement 2x2 src 0,0 2x2 over 0,2 2x1 key 540d6c1b4eee5716
@@ -65,19 +59,17 @@ tag fake petscii:on palette:commodore ascii:on
|count 19
|m3
|
-|view 2 58x7
-|
+|view 2 58x6
|
|
placement 2x2 src 0,0 2x2 over 0,2 2x1 key 540d6c1b4eee5716
> size 70 30
-window 68x12
+window 68x11
tag fake petscii:on palette:commodore ascii:on
|count 19
|m3
|
-|view 2 68x12
-|
+|view 2 68x11
|
|
|
@@ -91,8 +83,7 @@ tag fake petscii:on palette:commodore ascii:on
|count 19
|m3
|
-|view 1 58x7 glyphs
-|
+|view 1 58x6 glyphs
|
|
placement 2x2 src 0,0 2x2 over 0,2 2x1 key 540d6c1b4eee5716
@@ -101,8 +92,7 @@ tag fake petscii:on palette:commodore ascii:on
|count 19
|m3
|
-|view 1 58x7 glyphs
-|
+|view 1 58x6 glyphs
|
|
placement 2x2 src 0,0 2x2 over 0,2 2x1 key 540d6c1b4eee5716
@@ -111,8 +101,7 @@ tag fake petscii:on palette:commodore ascii:on
|count 19
|m3
|
-|view 1 58x7 glyphs
-|
+|view 1 58x6 glyphs
|
|
placement 2x2 src 0,0 2x2 over 0,2 2x1 key 540d6c1b4eee5716
diff --git a/addons/life/life.out b/addons/life/life.out
index fb5a7b13..e6da2e40 100644
--- a/addons/life/life.out
+++ b/addons/life/life.out
@@ -1,6 +1,6 @@
> seed 7
> size 40 36
-window 38x16
+window 38x15
tag gen 0 alive 130
|.#.#.......##......#...#..#.....
|#.#......#......#......#.#......
@@ -17,7 +17,6 @@ tag gen 0 alive 130
|..#..#...#.##....#.#..........##
|..#...#..###..#...........#..#.#
|....#......##.##..#.#.....#.#.#.
-|..#..##.#.......##.....#...#....
> tick 100
tag gen 0 alive 130
|.#.#.......##......#...#..#.....
@@ -35,7 +34,6 @@ tag gen 0 alive 130
|..#..#...#.##....#.#..........##
|..#...#..###..#...........#..#.#
|....#......##.##..#.#.....#.#.#.
-|..#..##.#.......##.....#...#....
> tick 100
tag gen 1 alive 170
|.#.#............##....##..#.....
@@ -53,7 +51,6 @@ tag gen 1 alive 170
|#######..#.###....#......#....##
|...#.#...#....##..##.......#.#.#
|...#..##.#.#######........#.###.
-|..####.......#.#####......##....
> tick 100
tag gen 2 alive 126
|.#...........###......######....
@@ -71,7 +68,6 @@ tag gen 2 alive 126
|..........######..#.......#..#..
|.#.....#.#........##......##....
|......#.#.#.#.............#..##.
-|.....##......#...........##.##..
> key x x
tag gen 3 alive 131 paused
|.#.........#...#......#.....#...
@@ -88,7 +84,6 @@ tag gen 3 alive 131 paused
|..........#.....##....######..#.
|........#.#...##.###........#...
|.......###....#...##.....######.
-|.....##.##...................##.
> tick 300
tag gen 3 alive 131 paused
|.#.........#...#......#.....#...
@@ -105,7 +100,6 @@ tag gen 3 alive 131 paused
|..........#.....##....######..#.
|........#.#...##.###........#...
|.......###....#...##.....######.
-|.....##.##...................##.
> key lljx
tag gen 3 alive 130 paused
|.#.........#...#......#.....#...
@@ -122,7 +116,6 @@ tag gen 3 alive 130 paused
|..........#.....##....######..#.
|........#.#...##.###........#...
|.......###....#...##.....######.
-|.....##.##...................##.
> key k
tag gen 3 alive 130 paused
|.#.........#...#......#.....#...
@@ -139,7 +132,6 @@ tag gen 3 alive 130 paused
|..........#.....##....######..#.
|........#.#...##.###........#...
|.......###....#...##.....######.
-|.....##.##...................##.
> body
=.#.........#...#......#.....#...
=...........#...................#
@@ -174,7 +166,6 @@ tag gen 3 alive 130 paused
|..........#.....##....######..#.
|........#.#...##.###........#...
|.......###....#...##.....######.
-|.....##.##...................##.
> key r
tag gen 0 alive 130 paused
|.#.#.......##......#...#..#.....
@@ -191,7 +182,6 @@ tag gen 0 alive 130 paused
|.#..##.......#..#..#....#.#.....
|..#..#...#.##....#.#..........##
|..#...#..###..#...........#..#.#
-|....#......##.##..#.#.....#.#.#.
> key h l
tag gen 0 alive 130
|.#.#.......##......#...#..#.....
@@ -209,7 +199,6 @@ tag gen 0 alive 130
|..#..#...#.##....#.#..........##
|..#...#..###..#...........#..#.#
|....#......##.##..#.#.....#.#.#.
-|..#..##.#.......##.....#...#....
> tick 100
tag gen 0 alive 130
|.#.#.......##......#...#..#.....
@@ -227,7 +216,6 @@ tag gen 0 alive 130
|..#..#...#.##....#.#..........##
|..#...#..###..#...........#..#.#
|....#......##.##..#.#.....#.#.#.
-|..#..##.#.......##.....#...#....
> tick 100
tag gen 2 alive 126
|.#...........###......######....
@@ -245,7 +233,6 @@ tag gen 2 alive 126
|..........######..#.......#..#..
|.#.....#.#........##......##....
|......#.#.#.#.............#..##.
-|.....##......#...........##.##..
> blur
tag gen 2 alive 126
|.#...........###......######....
@@ -263,7 +250,6 @@ tag gen 2 alive 126
|..........######..#.......#..#..
|.#.....#.#........##......##....
|......#.#.#.#.............#..##.
-|.....##......#...........##.##..
> tick 300
tag gen 2 alive 126
|.#...........###......######....
@@ -281,7 +267,6 @@ tag gen 2 alive 126
|..........######..#.......#..#..
|.#.....#.#........##......##....
|......#.#.#.#.............#..##.
-|.....##......#...........##.##..
> focus
tag gen 2 alive 126
|.#...........###......######....
@@ -299,7 +284,6 @@ tag gen 2 alive 126
|..........######..#.......#..#..
|.#.....#.#........##......##....
|......#.#.#.#.............#..##.
-|.....##......#...........##.##..
> tick 200
tag gen 3 alive 131
|.#.........#...#......#.....#...
@@ -317,4 +301,3 @@ tag gen 3 alive 131
|........#.#...##.###........#...
|.......###....#...##.....######.
|.....##.##...................##.
-|.....###....##.........#....###.
diff --git a/addons/pdf/pdf.out b/addons/pdf/pdf.out
index 2d4566b1..1c438783 100644
--- a/addons/pdf/pdf.out
+++ b/addons/pdf/pdf.out
@@ -1,5 +1,5 @@
> open docs/design.pdf
-window 78x9
+window 78x8
tag [1/16] petscii:on palette:commodore ascii:on docs/design.pdf
|Pardes: A Text Environment
|Architecture and implementation of the rewrite
@@ -9,7 +9,6 @@ tag [1/16] petscii:on palette:commodore ascii:on docs/design.pdf
|— where the prototype had three parallel implementations of one editor. Two se
|is a state machine over plain values: Event in, Surface and a queue of Effect
|said in those types exists in pardes. Downward, host.VTable is twenty-one opti
-|one answered in-process, so the zero-method host is both the test harness and
> graphics on
tag [1/16] petscii:off palette:commodore ascii:on docs/design.pdf
|
@@ -20,10 +19,9 @@ tag [1/16] petscii:off palette:commodore ascii:on docs/design.pdf
|
|
|
-|
-placement 794x1123 src 0,0 794x184 over 0,0 78x9 key 3017bc3ce49f9593 at 0,0 624x144
+placement 794x1123 src 0,0 794x163 over 0,0 78x8 key 3017bc3ce49f9593 at 0,0 624x128
> size 60 20
-window 58x7
+window 58x6
tag [1/16] petscii:off palette:commodore ascii:on docs/design.pdf
|
|
@@ -31,8 +29,7 @@ tag [1/16] petscii:off palette:commodore ascii:on docs/design.pdf
|
|
|
-|
-placement 794x1123 src 0,0 794x192 over 0,0 58x7 key 71e39225f0cec2a5 at 0,0 464x112
+placement 794x1123 src 0,0 794x165 over 0,0 58x6 key 71e39225f0cec2a5 at 0,0 464x96
> key j
tag [1/16] petscii:off palette:commodore ascii:on docs/design.pdf
|
@@ -41,8 +38,7 @@ tag [1/16] petscii:off palette:commodore ascii:on docs/design.pdf
|
|
|
-|
-placement 794x1123 src 0,27 794x193 over 0,0 58x7 key 71e39225f0cec2a5 at 0,0 464x112
+placement 794x1123 src 0,27 794x165 over 0,0 58x6 key 71e39225f0cec2a5 at 0,0 464x96
> key 3j
tag [1/16] petscii:off palette:commodore ascii:on docs/design.pdf
|
@@ -51,8 +47,7 @@ tag [1/16] petscii:off palette:commodore ascii:on docs/design.pdf
|
|
|
-|
-placement 794x1123 src 0,109 794x193 over 0,0 58x7 key 71e39225f0cec2a5 at 0,0 464x112
+placement 794x1123 src 0,109 794x166 over 0,0 58x6 key 71e39225f0cec2a5 at 0,0 464x96
> key G
tag [16/16] petscii:off palette:commodore ascii:on docs/design.pdf
|
@@ -61,8 +56,7 @@ tag [16/16] petscii:off palette:commodore ascii:on docs/design.pdf
|
|
|
-|
-placement 794x1123 src 0,0 794x192 over 0,0 58x7 key 1182c0220e1b5a25 at 0,0 464x112
+placement 794x1123 src 0,0 794x165 over 0,0 58x6 key 1182c0220e1b5a25 at 0,0 464x96
> key gg
tag [1/16] petscii:off palette:commodore ascii:on docs/design.pdf
|
@@ -71,8 +65,7 @@ tag [1/16] petscii:off palette:commodore ascii:on docs/design.pdf
|
|
|
-|
-placement 794x1123 src 0,0 794x192 over 0,0 58x7 key 5400263dddff499a at 0,0 464x112
+placement 794x1123 src 0,0 794x165 over 0,0 58x6 key 5400263dddff499a at 0,0 464x96
> key 3gg
tag [3/16] petscii:off palette:commodore ascii:on docs/design.pdf
|
@@ -81,8 +74,7 @@ tag [3/16] petscii:off palette:commodore ascii:on docs/design.pdf
|
|
|
-|
-placement 794x1123 src 0,0 794x192 over 0,0 58x7 key 1da05d9257cc481d at 0,0 464x112
+placement 794x1123 src 0,0 794x165 over 0,0 58x6 key 1da05d9257cc481d at 0,0 464x96
> PdfFit
tag [3/16] petscii:off palette:commodore ascii:on docs/design.pdf
|
@@ -91,8 +83,7 @@ tag [3/16] petscii:off palette:commodore ascii:on docs/design.pdf
|
|
|
-|
-placement 794x1123 src 0,0 794x1123 over 0,0 58x7 key acaee8c0ff4f63a6 at 192,0 79x112
+placement 794x1123 src 0,0 794x1123 over 0,0 58x6 key acaee8c0ff4f63a6 at 198,0 67x96
> ctl
=fit:height tint:filtered
> PdfTint full
@@ -103,30 +94,27 @@ tag [3/16] petscii:off palette:commodore ascii:on docs/design.pdf
|
|
|
-|
-placement 794x1123 src 0,0 794x1123 over 0,0 58x7 key 11acd08483d3011b at 192,0 79x112
+placement 794x1123 src 0,0 794x1123 over 0,0 58x6 key 11acd08483d3011b at 198,0 67x96
> ctl
=fit:height tint:full
> PdfTint loud
tag [3/16] petscii:off palette:commodore ascii:on docs/design.pdf
-|ent: PdfTint takes disabled, filtered or full, not "loud"
|
|
|
|
|
|
-placement 794x1123 src 0,0 794x1123 over 0,1 58x6 key a790cfe920570b8b at 198,0 67x96
+placement 794x1123 src 0,0 794x1123 over 0,0 58x6 key 11acd08483d3011b at 198,0 67x96
> key <esc>
tag [3/16] petscii:off palette:commodore ascii:on docs/design.pdf
-|ent: PdfTint takes disabled, filtered or full, not "loud"
-| Last
|
|
|
|
|
-placement 794x1123 src 0,0 794x1123 over 0,2 58x5 key b7d9755f4d1c3b06 at 204,0 56x80
+|
+placement 794x1123 src 0,0 794x1123 over 0,0 58x6 key 11acd08483d3011b at 198,0 67x96
> dump
dump 24 bytes
tag [3/16] petscii:off palette:commodore ascii:on docs/design.pdf
@@ -136,8 +124,7 @@ tag [3/16] petscii:off palette:commodore ascii:on docs/design.pdf
|
|
|
-|
-placement 794x1123 src 0,0 794x1123 over 0,0 58x7 key 4a2b3987bae4cbef at 192,0 79x112
+placement 794x1123 src 0,0 794x1123 over 0,0 58x6 key 4a2b3987bae4cbef at 198,0 67x96
> graphics off
tag [3/16] petscii:on palette:commodore ascii:on docs/design.pdf
|The watch path, in full, because it is the ask with the mo
@@ -146,7 +133,6 @@ tag [3/16] petscii:on palette:commodore ascii:on docs/design.pdf
|otify or a macOS kqueue behind one mark/reconcile transact
|the native macOS host watches with debounced DispatchSourc
|instead, then restats the exact path under a pane-generati
-|guard. All three macOS watchers mark the same two things f
> key j
tag [4/16] petscii:on palette:commodore ascii:on docs/design.pdf
|/// How to route a method, read off its own name. A method
@@ -155,7 +141,6 @@ tag [4/16] petscii:on palette:commodore ascii:on docs/design.pdf
|/// user: one Ctrl-V pasting twice.
|fn isPull(comptime name: []const u8) bool {
| if (std.mem.startsWith(u8, name, "pull_")) return true
-| if (std.mem.startsWith(u8, name, "push_")) {
> key 2k
tag [2/16] petscii:on palette:commodore ascii:on docs/design.pdf
|the core — src/pardes.zig
@@ -164,7 +149,6 @@ tag [2/16] petscii:on palette:commodore ascii:on docs/design.pdf
|emit(e) → fixed ring, limits.effect_cap
|nextEffect() → perform(e)
|single-threaded by construction
-|native input
> key 3gj
tag [2/16] petscii:on palette:commodore ascii:on docs/design.pdf
|emit(e) → fixed ring, limits.effect_cap
@@ -173,7 +157,6 @@ tag [2/16] petscii:on palette:commodore ascii:on docs/design.pdf
|native input
|termios+vaxis / SDL / DOM /
|AppKit / a byte sink on a UART
-|Event
> key gk
tag [2/16] petscii:on palette:commodore ascii:on docs/design.pdf
|render(arena) → *Surface
@@ -182,10 +165,8 @@ tag [2/16] petscii:on palette:commodore ascii:on docs/design.pdf
|single-threaded by construction
|native input
|termios+vaxis / SDL / DOM /
-|AppKit / a byte sink on a UART
> key 999gj
tag [2/16] petscii:on palette:commodore ascii:on docs/design.pdf
-|detach is served only by a detached core’s host, and the n
|is the point rather than an oversight — a local tty or SDL
|has no session to leave, so perform reports that on the pa
|message row instead of quietly quitting something (the .de
@@ -200,37 +181,36 @@ tag [3/16] petscii:on palette:commodore ascii:on docs/design.pdf
|otify or a macOS kqueue behind one mark/reconcile transact
|the native macOS host watches with debounced DispatchSourc
|instead, then restats the exact path under a pane-generati
-|guard. All three macOS watchers mark the same two things f
> open test/pdf-fixtures/huge-pages.pdf
-window 58x1
+window 58x2
tag [1/4] petscii:on palette:commodore ascii:on test/pdf-fixtures/huge-pages.pdf
-| a page past 16777216 pt on a side: laid out at that size
+|
|
> graphics on
tag [1/4] petscii:off palette:commodore ascii:on test/pdf-fixtures/huge-pages.pdf
-| a page past 16777216 pt on a side: laid out at that size
|
-placement 1x1 src 0,0 1x1 over 0,1 58x1 key fb85a0e4117bdb75 at 0,0 464x1
-placement 1200x1200 src 0,0 1200x19 over 0,1 58x1 key a44f40e9b170318e at 0,9 464x7
+|
+placement 1x1 src 0,0 1x1 over 0,0 58x2 key fb85a0e4117bdb75 at 0,0 464x1
+placement 1200x1200 src 0,0 1200x60 over 0,0 58x2 key a44f40e9b170318e at 0,9 464x23
> size 60 20
-window 58x1
+window 58x2
tag [1/4] petscii:off palette:commodore ascii:on test/pdf-fixtures/huge-pages.pdf
-| a page past 16777216 pt on a side: laid out at that size
|
-placement 1x1 src 0,0 1x1 over 0,1 58x1 key fb85a0e4117bdb75 at 0,0 464x1
-placement 1200x1200 src 0,0 1200x19 over 0,1 58x1 key a44f40e9b170318e at 0,9 464x7
+|
+placement 1x1 src 0,0 1x1 over 0,0 58x2 key fb85a0e4117bdb75 at 0,0 464x1
+placement 1200x1200 src 0,0 1200x60 over 0,0 58x2 key a44f40e9b170318e at 0,9 464x23
> key j
tag [2/4] petscii:off palette:commodore ascii:on test/pdf-fixtures/huge-pages.pdf
-| a page past 16777216 pt on a side: laid out at that size
|
-placement 1200x1200 src 0,18 1200x42 over 0,1 58x1 key a44f40e9b170318e at 0,0 464x16
+|
+placement 1200x1200 src 0,18 1200x83 over 0,0 58x2 key a44f40e9b170318e at 0,0 464x32
> key 2j
tag [2/4] petscii:off palette:commodore ascii:on test/pdf-fixtures/huge-pages.pdf
-| a page past 16777216 pt on a side: laid out at that size
|
-placement 1200x1200 src 0,100 1200x43 over 0,1 58x1 key a44f40e9b170318e at 0,0 464x16
+|
+placement 1200x1200 src 0,100 1200x84 over 0,0 58x2 key a44f40e9b170318e at 0,0 464x32
> key G
tag [4/4] petscii:off palette:commodore ascii:on test/pdf-fixtures/huge-pages.pdf
-| a page past 16777216 pt on a side: laid out at that size
|
-placement 816x64 src 0,0 816x29 over 0,1 58x1 key aa6de78f475e58f7 at 0,0 464x16
+|
+placement 816x64 src 0,0 816x57 over 0,0 58x2 key aa6de78f475e58f7 at 0,0 464x32
diff --git a/addons/snake/snake.out b/addons/snake/snake.out
index 6869c5cc..3249eaf9 100644
--- a/addons/snake/snake.out
+++ b/addons/snake/snake.out
@@ -1,6 +1,6 @@
> seed 3
> size 40 30
-window 38x13
+window 38x12
tag Snake 0
|######################
|# #
@@ -14,7 +14,6 @@ tag Snake 0
|
|
|
-|
> tick 150
tag Snake 0
|######################
@@ -29,7 +28,6 @@ tag Snake 0
|
|
|
-|
> tick 150
tag Snake 0
|######################
@@ -44,7 +42,6 @@ tag Snake 0
|
|
|
-|
> key k
tag Snake 0
|######################
@@ -59,7 +56,6 @@ tag Snake 0
|
|
|
-|
> tick 150
tag Snake 0
|######################
@@ -74,7 +70,6 @@ tag Snake 0
|
|
|
-|
> key l
tag Snake 0
|######################
@@ -89,7 +84,6 @@ tag Snake 0
|
|
|
-|
> tick 150
tag Snake 0
|######################
@@ -104,7 +98,6 @@ tag Snake 0
|
|
|
-|
> tick 150
tag Snake 1
|######################
@@ -119,7 +112,6 @@ tag Snake 1
|
|
|
-|
> key h
tag Snake 1
|######################
@@ -134,7 +126,6 @@ tag Snake 1
|
|
|
-|
> tick 150
tag Snake 1
|######################
@@ -149,7 +140,6 @@ tag Snake 1
|
|
|
-|
> key j
tag Snake 1
|######################
@@ -164,7 +154,6 @@ tag Snake 1
|
|
|
-|
> tick 150
tag Snake 1
|######################
@@ -179,7 +168,6 @@ tag Snake 1
|
|
|
-|
> ctl
=score 1
=length 4
@@ -202,7 +190,6 @@ tag Snake 1
|
|
|
-|
> settle
tag Snake 1
|######################
@@ -217,7 +204,6 @@ tag Snake 1
|
|
|
-|
> tick 600
tag Snake 1
|######################
@@ -232,7 +218,6 @@ tag Snake 1
|
|
|
-|
> focus
tag Snake 1
|######################
@@ -247,7 +232,6 @@ tag Snake 1
|
|
|
-|
> tick 150
tag Snake 1
|######################
@@ -262,7 +246,6 @@ tag Snake 1
|
|
|
-|
> tick 150
tag Snake 1
|######################
@@ -277,7 +260,6 @@ tag Snake 1
|
|
|
-|
> dump
dump 240 bytes
tag Snake 1
@@ -293,7 +275,6 @@ tag Snake 1
|
|
|
-|
> tick 150
tag Snake 1
|######################
@@ -308,7 +289,6 @@ tag Snake 1
|
|
|
-|
> tick 150
tag Snake 1 over
|######################
@@ -323,7 +303,6 @@ tag Snake 1 over
|
|
|
-|
> tick 150
tag Snake 1 over
|######################
@@ -338,7 +317,6 @@ tag Snake 1 over
|
|
|
-|
> settle
tag Snake 1 over
|######################
@@ -353,7 +331,6 @@ tag Snake 1 over
|
|
|
-|
> key x
tag Snake 0
|######################
@@ -368,7 +345,6 @@ tag Snake 0
|
|
|
-|
> tick 150
tag Snake 0
|######################
@@ -383,4 +359,3 @@ tag Snake 0
|
|
|
-|
diff --git a/core/Band.zig b/core/Band.zig
index 3c800bf0..835c249f 100644
--- a/core/Band.zig
+++ b/core/Band.zig
@@ -27,6 +27,7 @@ const panes = @import("panes.zig");
const builtins = @import("builtins.zig");
const TagState = @import("TagState.zig");
const Names = @import("Names.zig");
+const Prompt = @import("Prompt.zig");
const Pardes = pardes.Pardes;
const Pane = pardes.Pane;
const File = panes.File;
@@ -100,11 +101,15 @@ pub fn takes(p: *Pardes, id: usize) u16 {
return @max(doc_rows, levelRows(@intCast(bindings.level(p, s.scope_root.?, s.scope[0 .. s.scope_n - 1], &children).len)));
},
.pick => return @import("Pick.zig").bandRows(p),
+ .prompt => return Prompt.takes(p),
+ .rename => return 0,
}
if (!s.unrolled) return 0;
const cur = TagState.current(p, v) orelse return 0;
var children: [bindings.max_children]bindings.Child = undefined;
const n: u16 = @intCast(bindings.level(p, cur.root, cur.path, &children).len);
+ // The registers, one column of eleven at most (registerSteps).
+ if (cur.root == .register and cur.path.len == 0) return @max(doc_rows, @min(Cursor.shown, n));
return @max(doc_rows, levelRows(n));
}
@@ -149,8 +154,20 @@ pub fn of(p: *Pardes, arena: std.mem.Allocator, pane: *Pane, id: usize) !?Band {
try band.place(p, arena, pane, id);
return band;
},
+ .prompt => {
+ var steps: [max_steps]Step = undefined;
+ for (try Prompt.steps(p, arena, &steps)) |step| band.add(step);
+ try band.place(p, arena, pane, id);
+ return band;
+ },
+ .rename => return null,
}
const cur = TagState.current(p, v).?;
+ if (cur.root == .register) {
+ try band.registerSteps(p, arena, pane, cur.path);
+ try band.place(p, arena, pane, id);
+ return band;
+ }
// The level, its cursor on the child it names, else the leaf its group
// ran last, else the first; and that child's doc beside it.
const node = bindings.nodeAt(cur.root, cur.path);
@@ -196,6 +213,63 @@ fn helpSteps(band: *Band, p: *Pardes, arena: std.mem.Allocator, s: *const TagSta
band.add(try docStep(p, arena, at.root, at.path[0 .. at.path.len - 1], at.child));
}
+/// `"` unrolled (SPEC §9): the registers, a row each (its key, what it
+/// is, its first line) around the cursor, or under `"a` its verbs; beside
+/// them the value of the one on the cursor (or named) in full, as many of
+/// its lines as the band has rows, only those read.
+fn registerSteps(band: *Band, p: *Pardes, arena: std.mem.Allocator, pane: *const Pane, path: []const u8) !void {
+ const s = &p.view().tag_state;
+ var children: [bindings.max_children]bindings.Child = undefined;
+ const level = bindings.level(p, .register, path, &children);
+ const node = bindings.nodeAt(.register, path);
+ const used = if (node) |n| s.used[n.group] else 0;
+ var at: usize = 0;
+ for (level, 0..) |c, i| if (c.key == (if (s.hi != 0) s.hi else used)) {
+ at = i;
+ };
+ if (path.len > 0) band.add(try levelStep(arena, pane, level, at, used)) else {
+ const w = (Cursor{ .at = @intCast(at) }).window(@intCast(level.len));
+ const rows = try arena.alloc(Row, w.hi - w.lo);
+ for (rows, w.lo..) |*row, i| {
+ const c = level[i];
+ const name = for (bindings.register_names) |r| {
+ if (r.key == c.key) break r.name;
+ } else "named";
+ row.* = .{
+ .text = try std.fmt.allocPrint(arena, "{s} {s: <17} {s}{s}", .{ bindings.keyName(c.key), name, c.label, if (c.more) "…" else "" }),
+ .on = i == at,
+ .key = 1,
+ .under = c.key == used,
+ .index = @intCast(i),
+ };
+ }
+ band.add(.{ .rows = rows });
+ }
+ const key = if (path.len > 0) path[0] else level[at].key;
+ const name = for (bindings.register_names) |r| {
+ if (r.key == key) break r.name;
+ } else "named";
+ var rows: std.ArrayList(Row) = .empty;
+ try rows.append(arena, .{ .text = try std.fmt.allocPrint(arena, "\"{s} · {s}", .{ bindings.keyName(key), name }), .key = 2 });
+ const value = bindings.registerValue(p, key);
+ if (value.len == 0) try rows.append(arena, .{ .text = "(empty)", .dim = true });
+ // A line is cut at what the band could show of it: a long one is
+ // never scanned past that.
+ const most = @as(usize, band.columns) * band.height;
+ var rest = value;
+ while (rest.len > 0 and rows.items.len + 1 < band.height) {
+ const look = rest[0..@min(rest.len, most)];
+ const end = std.mem.indexOfScalar(u8, look, '\n') orelse {
+ try rows.append(arena, .{ .text = rest[0..if (look.len < rest.len) modal.graphemeStart(rest, look.len) else look.len] });
+ break;
+ };
+ try rows.append(arena, .{ .text = look[0..end] });
+ rest = rest[end + 1 ..];
+ }
+ if (path.len == 0) try rows.append(arena, .{ .text = "next p after P before R replace y into", .dim = true });
+ band.add(.{ .rows = rows.items, .doc = true });
+}
+
/// A list's cursor and the rows of it a band shows: eleven at most, around
/// the cursor (SPEC §3.6, the prototype's `H.window`). Each view's (a
/// tag state's field): Help's rows, a picker's, a prompt's history.
@@ -245,7 +319,7 @@ pub fn levelStep(arena: std.mem.Allocator, pane: *const Pane, level: []const bin
for (level, rows, 0..) |c, *row, i| {
const key = bindings.keyName(c.key);
row.* = .{
- .text = try std.fmt.allocPrint(arena, "{s} {s}{s}", .{ key, c.label, if (c.group) "…" else "" }),
+ .text = try std.fmt.allocPrint(arena, "{s} {s}{s}", .{ key, c.label, if (c.group or c.more) "…" else "" }),
.on = i == at,
.key = @intCast(key.len),
.dim = bindings.dimmed(pane, c),
@@ -340,24 +414,31 @@ fn findSpines(band: *Band, p: *Pardes, arena: std.mem.Allocator, pane: *Pane, id
}
/// `rows` wrapped at `width` display columns, word by word, `height` rows
-/// at most: a doc's paragraphs.
+/// at most: a doc's paragraphs, a line each in its text (builtins.Doc),
+/// each starting a row (a newline drawn in a row was a `�`).
fn wrap(arena: std.mem.Allocator, tab: u16, rows: []const Row, width: u16, max: u16) ![]const Row {
var out: std.ArrayList(Row) = .empty;
- for (rows) |row| {
- if (File.displayWidth(tab, row.text) <= width) {
- try out.append(arena, row);
- } else {
- var rest = row.text;
- while (rest.len > 0 and out.items.len < max) {
- var cut = File.byteAtDisplay(tab, rest, width);
- if (cut < rest.len) {
- if (std.mem.lastIndexOfScalar(u8, rest[0..cut], ' ')) |space| {
- if (space > 0) cut = space;
+ for (rows) |whole| {
+ var paragraphs = std.mem.splitScalar(u8, whole.text, '\n');
+ var row = whole;
+ while (paragraphs.next()) |text| : (row = .{ .text = "" }) {
+ if (out.items.len >= max) break;
+ row.text = text;
+ if (File.displayWidth(tab, row.text) <= width) {
+ try out.append(arena, row);
+ } else {
+ var rest = row.text;
+ while (rest.len > 0 and out.items.len < max) {
+ var cut = File.byteAtDisplay(tab, rest, width);
+ if (cut < rest.len) {
+ if (std.mem.lastIndexOfScalar(u8, rest[0..cut], ' ')) |space| {
+ if (space > 0) cut = space;
+ }
}
+ if (cut == 0) cut = modal.nextGrapheme(rest, 0);
+ try out.append(arena, .{ .text = std.mem.trimEnd(u8, rest[0..cut], " ") });
+ rest = std.mem.trimStart(u8, rest[cut..], " ");
}
- if (cut == 0) cut = modal.nextGrapheme(rest, 0);
- try out.append(arena, .{ .text = std.mem.trimEnd(u8, rest[0..cut], " ") });
- rest = std.mem.trimStart(u8, rest[cut..], " ");
}
}
if (out.items.len >= max) break;
@@ -427,8 +508,8 @@ pub fn wordAt(p: *Pardes, arena: std.mem.Allocator, id: usize, y: u16, col: u16)
}
fn bandLayer(p: *Pardes, id: usize) ?*pardes.Layer {
- const layer = &p.surface.tag_layers[pardes.BAND_LAYER_BASE + id];
- return if (layer.rows > 0 and layer.kind == .band) layer else null;
+ const layer = &p.surface.tag_layers[pardes.BAND_LAYER];
+ return if (layer.rows > 0 and layer.kind == .band and layer.id == id) layer else null;
}
fn layerRow(arena: std.mem.Allocator, layer: *const pardes.Layer, row: usize) ![]const u8 {
@@ -552,3 +633,23 @@ test "the band's words are read-only text: B2 runs one, the tag back at rest" {
try std.testing.expect(p.settings.wrap != wrapped);
try std.testing.expect(p.view().prefix == .none and !p.view().tag_state.unrolled);
}
+
+test "a doc's paragraphs are rows of their own: no newline in a band's row" {
+ const Key = pardes.Key;
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 120, .rows = 40 });
+ defer p.deinit();
+ _ = try p.setTestFile("one\n");
+ const id = p.view().active;
+ var frame = std.heap.ArenaAllocator.init(std.testing.allocator);
+ defer frame.deinit();
+ const a = frame.allocator();
+ // SPC b b is Panes, whose documentation has three paragraphs.
+ for ([_]u21{ ' ', 'b', Key.down }) |c| p.update(.{ .key = .{ .cp = c } });
+ const band = (try of(p, a, p.panes[id].?, id)).?;
+ var docs: usize = 0;
+ for (band.steps[0..band.nsteps]) |step| for (step.rows) |row| {
+ try std.testing.expect(std.mem.indexOfScalar(u8, row.text, '\n') == null);
+ if (step.doc) docs += 1;
+ };
+ try std.testing.expect(docs > 2);
+}
diff --git a/core/Core.zig b/core/Core.zig
index 6ee82370..2c04cc64 100644
--- a/core/Core.zig
+++ b/core/Core.zig
@@ -153,7 +153,13 @@ pub const View = struct {
/// Whether the host window has the keyboard (Event.focus), and the pane
/// whose program was last told it has it (reportFocus).
window_focused: bool = true,
- focus_told: ?struct { id: usize, serial: u32 } = null,
+ focus_told: ?struct {
+ // A slot of the session's, looked at before it is used, as
+ // `active` is (a damaged image's indexed past the panes).
+ pub const replica = .{ .index = .{.{ "id", Pardes, "panes" }} };
+ id: usize,
+ serial: u32,
+ } = null,
hover_col: u16 = 0,
hover_row: u16 = 0,
pointer_raw_col: u16 = 0,
@@ -177,6 +183,10 @@ pub const View = struct {
/// A key that waits for the next: the leader (SPC) or the window prefix
/// (Ctrl-w), one at a time.
prefix: enum { none, leader, window } = .none,
+ /// A background question SPC e gave the keyboard: the serial of the
+ /// pane it waits on (0: none). Its next key answers it; Esc leaves it
+ /// waiting (keys.zig handleKey).
+ answering: u32 = 0,
/// The register the running normal command names (`"<reg>`); 0 for the
/// default one.
register: u21 = 0,
@@ -337,6 +347,11 @@ locations_cache: locations.Cache = .{},
tty_filter_palette: pardes.Term.FilterPalette = .{},
font_request_taken: bool = false,
custom_theme: ?Theme = null,
+/// The theme the window wears while a picker of them (or `:theme `)
+/// previews one, by index, and its chrome (colors.previewTheme); the
+/// session's own theme untouched under it.
+theme_preview: ?u16 = null,
+preview_chrome: ChromeTheme = colors.initial_chrome,
/// bodyChrome's: the theme it was worked out for, and it.
body_chrome: ?struct { theme: Theme, chrome: ChromeTheme } = null,
theme_file_path: config.Settings.Text(limits.host_path_cap) = .{},
@@ -353,8 +368,8 @@ chrome: colors.ChromeTheme = colors.initial_chrome,
frames: *FrameStats = undefined,
own_frames: FrameStats = .{},
quit: bool = false,
-/// A detached session with no frontend attached: nothing renders, so
-/// no input ever dismisses a message (Messages.expireUnattended).
+/// A detached session with no frontend attached: nothing renders, and a
+/// 9P write may size its view (ninep/ctl.zig `size`).
unattended: bool = false,
haptic: HapticSlot = if (platform == .macos) .none else {},
/// The look just run found nothing (look.zig missed).
@@ -440,6 +455,9 @@ in_head: usize = 0,
in_len: usize = 0,
registers: Registers = .{},
+/// The text prompts' histories (Prompt.zig): search and select's, the
+/// pipes', the command line's.
+prompt_history: pardes.Prompt.History = .{},
macro: Macro = .{},
/// an edited text nothing kept (a tag's shown text): see edit.retireEditText
retired_edit: ?[]u8 = null,
@@ -525,7 +543,7 @@ pub const replica = .{
"opts", "dump_out", "dump_export",
"tape",
},
- .derived = .{ "shell_rows", "diff_output", "locations_cache", "retired_panes", "tty_filter_palette", "body_chrome" },
+ .derived = .{ "shell_rows", "diff_output", "locations_cache", "retired_panes", "tty_filter_palette", "body_chrome", "theme_preview", "preview_chrome" },
// The host's handles, the state file every session of the user
// shares (and Recent read from it), this session's closed panes, and
// the files of a host with no file system of its own. (The 9P
@@ -1033,7 +1051,8 @@ fn reportFocus(p: *Pardes) void {
// program hears of it a round trip later (a write there would stop the
// speculation: pty_write is `keeps_stopping`'s).
if (p.tape.speculating) return;
- if (v.focus_told) |old| if (p.panes[old.id]) |pane| {
+ // A damaged dump's pane past the slots names none.
+ if (v.focus_told) |old| if (old.id < MAX_PANES) if (p.panes[old.id]) |pane| {
if (pane.serial == old.serial and pardes.Term.modes(pane.terminal).focus) p.emitWrite(old.id, "\x1b[O");
};
if (want) |new| if (pardes.Term.modes(p.panes[new.id].?.terminal).focus) p.emitWrite(new.id, "\x1b[I");
@@ -1394,7 +1413,8 @@ fn refillPendingWrites(p: *Pardes) void {
/// may be handed to a different pane next frame.
pub fn dropPendingWrite(p: *Pardes, id: usize) void {
const pw = p.pending_write[id] orelse return;
- p.pending_write_bytes -= pw.bytes.len - pw.off;
+ // (Saturating: a damaged image's total may say less than its parts.)
+ p.pending_write_bytes -|= pw.bytes.len - pw.off;
p.gpa.free(pw.bytes);
p.pending_write[id] = null;
}
@@ -1583,11 +1603,6 @@ pub fn pump(p: *Pardes, host: Host) !void {
} else 0;
_ = p.tape.host(p, .wait_input, .{timeout});
}
- // Detached, nobody's key dismisses a message: they go on the clock,
- // here in the step, where the clock read is taped (the host's wait
- // did it, untaped, and a replay kept a message its session had let
- // go).
- Messages.expireUnattended(p);
p.frames.mark_start = FrameStats.nowNs();
if (p.tape.host(p, .now, .{})) |now| p.advance(now);
p.settle();
@@ -1708,18 +1723,13 @@ fn updateInner(p: *Pardes, ev: Event) void {
// Its bands as its state stands: a step reads them (a press on a chip, a
// body's top under them), and what a frame drew, a view put back or a
// dump left in Pane.notices (derived) is not what every core has.
- for (p.panes, 0..) |slot, id| if (slot) |pane| Messages.collectNotices(p, pane, v.rects[id], id);
+ for (p.panes, 0..) |slot, id| if (slot) |pane| Messages.collectNotices(p, pane, v.rects[id]);
defer pardes.panes.File.syncTwins(p);
defer p.reportFocus();
// A tick with no deadline due is the one event that cannot change
// the screen.
p.needs_frame = p.needs_frame or ev != .tick;
p.shell_rows.sweep(p.gpa);
- Messages.expireUnattended(p);
- // An announcement stands in only until its own step says more.
- for (p.panes) |slot| if (slot) |pane| {
- pane.msg_announcement = false;
- };
// A Look's hover outlives a tick, a batch of rows coming in (no
// gesture), a move with no button, and a change to another pane.
const hover_stays = switch (ev) {
@@ -1734,15 +1744,9 @@ fn updateInner(p: *Pardes, ev: Event) void {
look.cancelLookHover(p);
}
switch (ev) {
- .key, .mouse => {
- for (p.panes) |slot| {
- if (slot) |pane| Messages.dismissMessage(p, pane);
- }
- v.clip_pending = null;
- },
+ .key, .mouse => v.clip_pending = null,
.tick => {
Stream.step(p);
- Messages.advanceMessages(p);
for (0..p.panes.len) |id| exec.flushReplEnter(p, id, false);
},
else => {},
@@ -1826,6 +1830,8 @@ fn updateInner(p: *Pardes, ev: Event) void {
// Each pane's places find a frame's more on a tick, and on any other
// step the ones an edit or a scroll left unfound in the view.
for (p.panes) |slot| if (slot) |pane| pane.places.settle(p, pane, ev == .tick);
+ // Their search words and a search prompt with them (Prompt.zig).
+ pardes.Prompt.settle(p);
// Each live query pane's rows, made from what changed this step.
pardes.panes.Query.produceAll(p, ev == .tick, ev == .key);
pardes.Pick.produceAll(p, ev == .tick);
@@ -1910,10 +1916,10 @@ pub const SavePath = Effect.Buf(effect_path_cap);
pub const noteLateFailure = pardes.tape.taped(noteLateFailureInner);
fn noteLateFailureInner(p: *Pardes, id: Pane.Id) void {
// Said by reportFailure just now: its words fitted whole, the
- // reason kept; else what the message row has.
+ // reason kept; else what was said of the pane last.
const said = if (p.fs.said_at == p.fs.failures and p.fs.said_len > 0)
p.fs.said[0..p.fs.said_len]
- else if (p.panes[id.index()]) |pane| pane.msg[0..pane.msg_len] else return;
+ else if (p.panes[id.index()]) |pane| p.messages.saidBy(pane) else return;
const kept = @import("Messages.zig").clip(said, p.fs.late_failure.len);
@memcpy(p.fs.late_failure[0..kept.len], kept);
p.fs.late_failure_len = @intCast(kept.len);
@@ -1924,7 +1930,7 @@ fn noteLateFailureInner(p: *Pardes, id: Pane.Id) void {
pub const presented = pardes.tape.taped(presentedInner);
fn presentedInner(p: *Pardes) void {
const v = p.view();
- for (p.panes, 0..) |slot, id| if (slot) |pane| Messages.collectNotices(p, pane, v.rects[id], id);
+ for (p.panes, 0..) |slot, id| if (slot) |pane| Messages.collectNotices(p, pane, v.rects[id]);
if (v.pointer_inside and v.drag != .none) {
v.hover_col = v.pointer_raw_col;
v.hover_row = v.pointer_raw_row;
@@ -2033,6 +2039,15 @@ pub fn sync(p: *Pardes) void {
caret_row = std.mem.count(u8, shown.text[0..@min(shown.fromReal(cur), shown.text.len)], "\n");
}
if (!pane.tag_expanded) wanted = 1;
+ // Out of rest the head is the tag's text (TagState), and the tag
+ // keeps the rows its own text takes at least: a head shorter than
+ // it (a root's key cell, before its level shows) moved the body up
+ // and back down a moment later; a terminal's exactly those, its pty
+ // its body (a resize the program under it saw at every C-w and SPC).
+ if (pardes.TagState.hostOf(p) == id) {
+ const rest = layout.wantedTagRows(p, id);
+ wanted = if (pane.isTerminal()) rest else @max(wanted, rest);
+ }
pane.tag_rows = @intCast(@min(wanted, MAX_TAG_ROWS, @max(BOX_H, r.h -| 1)));
if (pane.collapsed) pane.tag_rows = BOX_H;
if (pane.focus == .tag and pane.prompt != .name) {
@@ -2040,7 +2055,7 @@ pub fn sync(p: *Pardes) void {
var top: usize = pane.tag_top;
if (cur < top) top = cur;
if (cur >= top + pane.tag_rows) top = cur + 1 - pane.tag_rows;
- pane.tag_top = @intCast(@min(top, lines - pane.tag_rows));
+ pane.tag_top = @intCast(@min(top, lines -| pane.tag_rows));
} else pane.tag_top = 0;
// The band unrolled under the tag's text pushes the body down:
// the tag's rows, as everything under them counts them.
@@ -2080,7 +2095,7 @@ pub fn sync(p: *Pardes) void {
}.ready, .{pane}));
// Which bands a pane shows is the step's, as its geometry is:
// what is drawn under them, and where a click lands, read it.
- Messages.collectNotices(p, pane, r, id);
+ Messages.collectNotices(p, pane, r);
// The greeting `ls` of a new terminal in a directory is typed at
// its shell's FIRST prompt, or never: typed later it would land
// in whatever runs then, or in the middle of a line someone
@@ -2130,12 +2145,14 @@ fn sizes(p: *const Pardes, pane: *const Pane) bool {
}
pub fn theme(p: *const Pardes) *const Theme {
+ if (p.theme_preview) |i| return &themes[i];
if (p.custom_theme) |*custom| return custom;
return &themes[p.settings.theme];
}
/// The colours of the chrome: the theme's, set as it changes.
pub fn chromeTheme(p: *const Pardes) *const ChromeTheme {
+ if (p.theme_preview != null) return &p.preview_chrome;
return &p.chrome;
}
@@ -2177,10 +2194,11 @@ pub fn nextWake(p: *const Pardes) ?u64 {
const delay = config.look_preview_delay_frames;
frames = @max(1, delay -| waiting.frames);
}
- for (p.panes) |slot| if (slot) |pane| {
- const wait = Messages.messageWake(p, pane) orelse continue;
+ // A message dims at the end of its bright time.
+ if (Messages.dimDue(p)) |due| {
+ const wait = @max(1, (due - p.clock.stepped_ns + frame_ns - 1) / frame_ns);
frames = if (frames) |soonest| @min(soonest, wait) else wait;
- };
+ }
// Del's question goes up at the end of its delay: a frame then, and
// none after (stepped time has reached it).
for (p.panes) |slot| if (slot) |pane| if (pane.prompt == .del_side and pane.question_due_ns > p.clock.stepped_ns and pane.question_due_ns != Pane.question_asked) {
@@ -2245,7 +2263,6 @@ fn advanceInner(p: *Pardes, now_ns: u64) void {
// Only waiting until `due`: its counters move there at once.
const held = (due - p.clock.stepped_ns) / frame;
if (held > 1) {
- Messages.holdMessages(p, held - 1);
if (p.look_hover_wait) |*waiting| waiting.frames +|= @intCast(@min(held - 1, std.math.maxInt(u16)));
p.clock.stepped_ns += (held - 1) * frame;
}
@@ -2297,7 +2314,17 @@ pub fn appendPlacement(p: *Pardes, place: Placement) bool {
return true;
}
-pub const PendingWrite = struct { bytes: []u8, off: usize = 0 };
+pub const PendingWrite = struct {
+ /// What is written held to the bytes (walk.zig `.place`): a damaged
+ /// image's past them freed a count below zero.
+ pub const replica = .{ .place = .{.{ "off", "lastOff" }} };
+ bytes: []u8,
+ off: usize = 0,
+
+ pub fn lastOff(pw: *const PendingWrite) usize {
+ return pw.bytes.len;
+ }
+};
/// The session layouts `init` can put on screen. One name each, so choosing
/// between them reads as a choice instead of a chain of ifs over four options.
@@ -2641,36 +2668,18 @@ test "TreeContext rows in the tag style keep the message rows" {
p.update(.{ .resize = .{ .cols = 60, .rows = 16, .row_metrics = .{ .body_w = 10, .body_h = 20, .tagline_w = 6, .tagline_h = 12 } } });
pane.file.?.tree_context = true;
pane.file.?.scroll = 8;
- pane.msg_len = 0;
+ p.messages.live_len = 0;
p.sync();
_ = try p.render(p.scratch.allocator());
const full_height = p.surface.body_layers[0].viewport.h;
try std.testing.expect(p.surface.body_layers[0].rows > full_height);
try std.testing.expectEqual(FontRole.tagline, p.surface.body_layers[0].cells[0].style.font_role);
- pane.msg[0] = '!';
- pane.msg_len = 1;
- p.sync();
- _ = try p.render(p.scratch.allocator());
- // An overlay takes nothing: the message is a chip OVER the body's first
- // row, so the viewport keeps every row it had.
- try std.testing.expectEqual(full_height, p.surface.body_layers[0].viewport.h);
- const r = p.view().rects[0];
- const band = for (p.surface.tagLayers()) |*layer| {
- if (layer.rows != 0 and layer.kind == .notice) break layer;
- } else return error.NoNoticeBand;
- try std.testing.expectEqual(p.bodyTop(pane, r), band.viewport.y);
- try std.testing.expectEqual(p.surface.body_layers[0].viewport.y, band.viewport.y);
- // Sized to its message, flush with the pane's right edge, and the text
- // right aligned a cell short of that edge.
- try std.testing.expectEqual(r.x + r.w, band.viewport.x + band.viewport.w);
- try std.testing.expect(band.viewport.w < r.w - config.GUTTER);
- try std.testing.expectEqualStrings("!", band.cells[layout.tagCapacity(p, band.viewport.w) - 2].grapheme());
- pane.msg_len = 0;
- p.view().prefix = .leader;
+ // A message is on the notice row, not over the body: the viewport
+ // keeps every row it had.
+ _ = Messages.keep(p, .notice, pane.serial, "", "!");
p.sync();
_ = try p.render(p.scratch.allocator());
try std.testing.expectEqual(full_height, p.surface.body_layers[0].viewport.h);
- p.view().prefix = .none;
}
test "TreeContext command and custom tag survive a workspace round trip" {
@@ -3052,7 +3061,7 @@ test "a REPL bound for a language takes the exec made on a body in it; tags, Exe
try std.testing.expect(file.repl == null);
try std.testing.expect(p.executeBuiltinLine(1, "Repl pithon"));
try std.testing.expect(p.panes[1].?.repl == null);
- try std.testing.expect(std.mem.indexOf(u8, p.panes[1].?.msg[0..p.panes[1].?.msg_len], "python") != null);
+ try std.testing.expect(std.mem.indexOf(u8, p.messages.saidBy(p.panes[1].?), "python") != null);
try std.testing.expect(p.executeBuiltinLine(1, "Repl python"));
// again, as a code fence may name it: no change
try std.testing.expect(p.executeBuiltinLine(1, "Repl PY"));
@@ -3066,8 +3075,7 @@ test "a REPL bound for a language takes the exec made on a body in it; tags, Exe
Sent.drain(p);
try std.testing.expectEqualStrings("ls\r", Sent.said(1));
try std.testing.expect(!Sent.spawned);
- try std.testing.expect(file.msg_sent);
- try std.testing.expectEqualStrings("\u{2192} python-a", file.msg[0..file.msg_len]);
+ try std.testing.expectEqualStrings("\u{2192} python-a", p.messages.saidBy(file));
// A body's click written back to event is done as the click: sent. A
// line written to exec came back as F and runs as the command it was.
{
@@ -3190,7 +3198,7 @@ test "a REPL bound for a language takes the exec made on a body in it; tags, Exe
p.update(.{ .key = .{ .cp = 'b' } });
Sent.drain(p);
try std.testing.expect(Sent.len[1] == 0 and Sent.len[2] == 0);
- try std.testing.expectEqualStrings("Repl: the REPL chosen is gone; nothing sent", file.msg[0..file.msg_len]);
+ try std.testing.expectEqualStrings("Repl: the REPL chosen is gone; nothing sent", p.messages.saidBy(file));
try std.testing.expect(p.executeBuiltinLine(2, "Repl python"));
try std.testing.expectEqualStrings("python-b", exec.replId(&idbuf, p.panes[2].?));
@@ -3207,7 +3215,7 @@ test "a REPL bound for a language takes the exec made on a body in it; tags, Exe
try std.testing.expectEqual(Pane.Prompt.none, file.prompt);
Sent.drain(p);
try std.testing.expect(Sent.len[1] == 0 and Sent.len[2] == 0 and !Sent.spawned);
- try std.testing.expect(std.mem.indexOf(u8, file.msg[0..file.msg_len], "no program running") != null);
+ try std.testing.expect(std.mem.indexOf(u8, p.messages.saidBy(file), "no program running") != null);
host.taken[1] = true;
host.taken[2] = true;
@@ -3217,7 +3225,7 @@ test "a REPL bound for a language takes the exec made on a body in it; tags, Exe
try std.testing.expect(p.executeBuiltinLine(1, "Repl python"));
try std.testing.expectEqualStrings("python-a", exec.replId(&idbuf, p.panes[1].?));
try std.testing.expect(p.executeBuiltinLine(2, "Repl"));
- try std.testing.expectEqualStrings("Repl: python-b", p.panes[2].?.msg[0..p.panes[2].?.msg_len]);
+ try std.testing.expectEqualStrings("Repl: python-b", p.messages.saidBy(p.panes[2].?));
// A command pane is a REPL while its command runs: done, it is none,
// and a done one cannot be bound. A document pane is no terminal.
@@ -3296,13 +3304,13 @@ test "Term+fish, one word a tag can hold, opens a terminal on that shell" {
const caller = p.panes[0].?;
try std.testing.expect(p.executeBuiltinLine(0, "Term /nonexistent"));
try std.testing.expect(p.view().active == before and caller.shell == null);
- try std.testing.expect(std.mem.indexOf(u8, caller.msg[0..caller.msg_len], "shell \"/nonexistent\" not found") != null);
+ try std.testing.expect(std.mem.indexOf(u8, p.messages.saidBy(caller), "shell \"/nonexistent\" not found") != null);
try std.testing.expect(p.executeBuiltinLine(0, "Term fsh-not-a-shell"));
try std.testing.expect(caller.shell == null);
// A directory passes access(X_OK); it is no shell either.
try std.testing.expect(p.executeBuiltinLine(0, "Term /etc"));
try std.testing.expect(p.view().active == before);
- try std.testing.expect(std.mem.indexOf(u8, caller.msg[0..caller.msg_len], "Term: not a shell: /etc is a directory") != null);
+ try std.testing.expect(std.mem.indexOf(u8, p.messages.saidBy(caller), "Term: not a shell: /etc is a directory") != null);
// Only a word that says so splits at `+`: `Dump+x.zon` is no Dump.
try std.testing.expect(!p.executeBuiltinLine(0, "Dump+x.zon"));
try std.testing.expect(!p.executeBuiltinLine(0, "Msg+hello"));
@@ -3662,7 +3670,7 @@ test "Tab N draws every pane's tab N cells wide and clicks count past it; bare T
try std.testing.expectEqual(@as(i32, 1), pane.body.cur_col);
// Bare, it says the width.
try std.testing.expect(p.executeBuiltinLine(0, "Tab"));
- try std.testing.expectEqualStrings("Tab 8", pane.msg[0..pane.msg_len]);
+ try std.testing.expectEqualStrings("Tab 8", p.messages.saidBy(pane));
// Out of range: refused, the width kept.
try std.testing.expect(p.executeBuiltinLine(0, "Tab 0"));
try std.testing.expectEqual(@as(u16, 8), p.settings.tab);
@@ -4092,7 +4100,7 @@ test "bytes for a terminal past what may wait for it are dropped and said, never
p.emitWrite(0, big);
try std.testing.expectEqual(@as(usize, 0), p.pending_write_bytes);
const pane = p.panes[0].?;
- try std.testing.expect(std.mem.indexOf(u8, pane.msg[0..pane.msg_len], "dropped") != null);
+ try std.testing.expect(std.mem.indexOf(u8, p.messages.saidBy(pane), "dropped") != null);
}
test "a bracketed paste larger than the ring still closes its bracket" {
diff --git a/core/Db.zig b/core/Db.zig
index eb8ee20c..4131ccbc 100644
--- a/core/Db.zig
+++ b/core/Db.zig
@@ -1424,7 +1424,7 @@ test "state file: Recent is read once from the file it replaced, else from the s
defer c.deinit();
try testing.expectEqual(@as(usize, 0), c.recent.entries.items.len);
const pane = c.panes[c.view().active].?;
- try testing.expect(std.mem.indexOf(u8, pane.msg[0..pane.msg_len], "Recent: the files before the state file were not read") != null);
+ try testing.expect(std.mem.indexOf(u8, c.messages.saidBy(pane), "Recent: the files before the state file were not read") != null);
}
// Both left where they were.
_ = try tmp.dir.statFile(testing.io, "old/recent", .{});
diff --git a/core/Effect.zig b/core/Effect.zig
index bf02c5b7..3bca04c9 100644
--- a/core/Effect.zig
+++ b/core/Effect.zig
@@ -346,7 +346,7 @@ test "Detach asks the host to let its terminal go, and says so when there is not
p.perform(.{ .detach = asked });
const pane = p.panes[0].?;
- try std.testing.expectEqualStrings("detach: not attached", pane.msg[0..pane.msg_len]);
+ try std.testing.expectEqualStrings("detach: not attached", p.messages.saidBy(pane));
try std.testing.expect(!p.quit);
}
diff --git a/core/Field.zig b/core/Field.zig
index 7b8ea399..2f668001 100644
--- a/core/Field.zig
+++ b/core/Field.zig
@@ -19,7 +19,13 @@ len: u16 = 0,
/// A byte offset in the text, at a character's start.
caret: u16 = 0,
-pub const replica = .{ .len = .{.{ "buf", "len" }} };
+/// The caret held to the text there is (walk.zig `.place`): a damaged
+/// image's past it typed out of the buffer.
+pub const replica = .{ .len = .{.{ "buf", "len" }}, .place = .{.{ "caret", "lastCaret" }} };
+
+pub fn lastCaret(f: *const Field) usize {
+ return f.len;
+}
pub fn text(f: *const Field) []const u8 {
return f.buf[0..f.len];
diff --git a/core/File.zig b/core/File.zig
index 2affde32..18745930 100644
--- a/core/File.zig
+++ b/core/File.zig
@@ -2441,8 +2441,9 @@ pub fn changed(p: *Pardes, id: u8, bytes: []const u8) void {
if (f.disk_newer == disk) return;
f.disk_newer = disk;
f.disk_newer_warned = false;
- var said: pardes.Kind.Buf(limits.host_path_cap + 64) = .{};
- p.setMessage(.at(id), said.print("{s} changed on disk (get reloads it, Save overwrites it)", .{f.path[0..@min(f.path.len, limits.host_path_cap)]}));
+ // A question in its tag, never the keyboard's (pick-ui SPEC §10.2):
+ // one waiting already is the one about it.
+ if (p.messages.waiting(pane) == null) pardes.Messages.say(p, .question, id, "changed on disk").asks = .disk;
var rec: [16]u8 = undefined;
pardes.ctlfs.events.notePath(p, "changed", std.fmt.bufPrint(&rec, "{d}", .{pane.serial}) catch unreachable); // a u32 fits 16
return;
@@ -3526,7 +3527,7 @@ test "a text replaced whole keeps its old buffer for its undo, swapped back and
setContent(p, f, try gpa.dupe(u8, t));
}
try std.testing.expectEqual(@as(usize, 2), j.done);
- try std.testing.expect(std.mem.indexOf(u8, pane.msg[0..pane.msg_len], "undo keeps the last two texts replaced whole") != null);
+ try std.testing.expect(std.mem.indexOf(u8, p.messages.saidBy(pane), "undo keeps the last two texts replaced whole") != null);
try undoStep(p, pane, true);
try undoStep(p, pane, true);
try std.testing.expectEqualStrings(texts[1], f.content);
diff --git a/core/Jump.zig b/core/Jump.zig
index 5cc9d624..b28698ee 100644
--- a/core/Jump.zig
+++ b/core/Jump.zig
@@ -158,7 +158,7 @@ const JumpsTest = struct {
try out.print("{s}{c}{d}", .{ if (out.end > 0) " " else "", letters[which], pane.body.cur_row + 1 });
} else return error.NoEnd;
const pane = t.p.panes[t.p.view().active].?;
- const said = pane.msg[0..pane.msg_len];
+ const said = t.p.messages.saidBy(pane);
try std.testing.expect(std.mem.indexOf(u8, said, if (delta < 0) "nothing further back" else "nothing further on") != null);
return out.buffered();
}
diff --git a/core/Kind.zig b/core/Kind.zig
index 764b6f06..4e1aa469 100644
--- a/core/Kind.zig
+++ b/core/Kind.zig
@@ -312,6 +312,9 @@ pub fn reopen(p: *Pardes, id: usize, s: *Slot, bytes: ?[]const u8) bool {
s.tail.len = @intCast(w.buffered().len);
}
s.opened = if (bytes) |b| std.hash.Wyhash.hash(0, b) else 0;
+ // A state made afresh is told every view afresh: the views told the
+ // one before (a file changed on disk, a Restore) are not its.
+ s.views = @splat(0);
// Its file not read (not here): it waits for it, a placeholder.
if (s.ops != null and bytes == null and s.path.len > 0) _ = cl.refused.print("{s} is not here", .{s.path}) else if (s.ops) |ops| {
const path_z = s.arena.allocator().dupeSentinel(u8, s.path, 0) catch "";
@@ -763,7 +766,7 @@ pub fn viewOf(p: *const Pardes, k: u8, id: usize) c.pa_view {
if (collapsed) return out;
// Its bands made again, never the copy a step or a park left: they are
// derived, so a client joined from a dump has none.
- const notices = pardes.Messages.bands(p, v, pane, tag_rows, r, id).span();
+ const notices = pardes.Messages.bands(p, pane, tag_rows, r).span();
const th = p.theme();
const rgb = struct {
fn f(x: [3]u8) u32 {
diff --git a/core/Layer.zig b/core/Layer.zig
index 4574aab7..43c8191c 100644
--- a/core/Layer.zig
+++ b/core/Layer.zig
@@ -16,12 +16,13 @@ const layout = @import("layout.zig");
const Layer = @This();
-/// `notice` is a pane's transient line -- a builtin's name, a pending leader
-/// chord -- carried as a tagline-shaped band so it gets the tagline's height,
+/// `notice` is a pane's transient line -- a prompt waiting for input --
+/// carried as a tagline-shaped band so it gets the tagline's height,
/// small-font metrics, band offset and border instead of being a body-grid row
/// wearing a tagline font.
/// `band` is the rows a pane's tag unrolls into below it (Band.zig).
-pub const Kind = enum(u8) { workspace, column, pane, notice, body, band };
+/// `notice_row` is the window's foot row, the live messages' index.
+pub const Kind = enum(u8) { workspace, column, pane, notice, body, band, notice_row };
pub const Metrics = struct {
body_w: u16 = 1,
diff --git a/core/Messages.zig b/core/Messages.zig
index 6b406e91..e2224337 100644
--- a/core/Messages.zig
+++ b/core/Messages.zig
@@ -1,6 +1,10 @@
-//! The message row: messages and statuses a pane shows between its body and
-//! its tagline, how each line lingers once dismissed, the notices
-//! built from them every frame, and the log of everything said.
+//! The session's messages (pick-ui SPEC §10): each a kind, its cause as a
+//! word a Look understands, its text, the places it names and the lines
+//! that explain it, kept in a fixed list while it lives; the log of
+//! everything said behind them (the history, `SPC h m`, and 9P `/log`);
+//! the notice row at the window's foot that indexes them; and the
+//! transient band a pane shows over its body's top rows (a prompt waiting
+//! for input).
const pardes = @import("root.zig");
const memory = @import("memory.zig");
const std = @import("std");
@@ -16,12 +20,14 @@ const BOX_H = pardes.BOX_H;
const Key = pardes.Key;
const Rect = layout.Rect;
const Pardes = pardes.Pardes;
+const Buf = pardes.Kind.Buf;
const Messages = @This();
/// Where its ring's next line goes and how many it holds, held to the ring
-/// where a dump is read back (walk.zig `.place`).
-pub const replica = .{ .place = .{ .{ "head", "lastSlot" }, .{ "len", "size" } } };
+/// where a dump is read back (walk.zig `.place`); the live messages as far
+/// as they go.
+pub const replica = .{ .place = .{ .{ "head", "lastSlot" }, .{ "len", "size" } }, .len = .{.{ "live", "live_len" }} };
/// The message-row log: a fixed ring, never allocated, never grown. See
/// `logMessage` and the `Messages` builtin.
@@ -29,6 +35,14 @@ log: [limits.message_log]LoggedMessage = @splat(.{}),
/// Next slot to write. `len` saturates at the ring's size.
head: usize = 0,
len: usize = 0,
+/// The messages that live, oldest first: what the notice row, the marks
+/// and the ghosts at a cause's line are drawn from each frame.
+live: [max_live]Said = undefined,
+live_len: u8 = 0,
+
+/// How many messages live at once: past it the oldest that is no
+/// question goes (a burst of distinct ones; a repeat only counts).
+pub const max_live = 16;
pub fn lastSlot(m: *const Messages) usize {
return m.log.len - 1;
@@ -38,6 +52,125 @@ pub fn size(m: *const Messages) usize {
return m.log.len;
}
+/// What a message is, which says how long it lives (SPEC §10.1): an echo
+/// and a notice until the next message, bright for `MessageLinger`; a
+/// warning bright twice that, until Esc; an error until Esc or the next
+/// error; a question until it is answered; progress while it runs, at the
+/// right end of its tag rather than on the notice row.
+pub const Kind = enum(u8) {
+ echo,
+ notice,
+ warn,
+ @"error",
+ question,
+ progress,
+
+ pub fn glyph(k: Kind) []const u8 {
+ return switch (k) {
+ .echo => "\u{2713}",
+ .notice => "\u{b7}",
+ .warn => "!",
+ .@"error" => "\u{2717}",
+ .question => "?",
+ .progress => "\u{22ef}",
+ };
+ }
+
+ /// Which wins the notice row and a mark: error, question, warning,
+ /// notice, echo; progress never.
+ pub fn rank(k: Kind) u8 {
+ return switch (k) {
+ .progress => 0,
+ .echo => 1,
+ .notice => 2,
+ .warn => 3,
+ .question => 4,
+ .@"error" => 5,
+ };
+ }
+};
+
+/// A place a message names: a file's line and column, and what it says
+/// there (a compiler's `error: ...`), which the body shows at that line.
+pub const Place = struct {
+ path: Buf(256) = .{},
+ line: u32 = 1,
+ col: u32 = 1,
+ text: Buf(128) = .{},
+};
+
+/// The questions the session asks in the background, and their answers.
+pub const Ask = enum(u8) {
+ none,
+ /// A file changed on disk under unsaved text.
+ disk,
+
+ /// Its answers, as its pane's tag offers them: the key that gives one,
+ /// and its word (an Exec of the word's first word gives it too).
+ pub fn answers(a: Ask) []const Answer {
+ return switch (a) {
+ .none => &.{},
+ .disk => &.{ .{ .key = 'r', .word = "Reload" }, .{ .key = 'k', .word = "Keep mine" }, .{ .key = 'd', .word = "Diff" } },
+ };
+ }
+};
+
+pub const Answer = struct { key: u8, word: []const u8 };
+
+/// One live message.
+pub const Said = struct {
+ pub const replica = .{ .len = .{ .{ "places", "places_len" }, .{ "detail", "detail_len" } } };
+ pub const max_places = 4;
+ pub const max_detail = 4;
+ kind: Kind = .notice,
+ /// Its cause, first, as a word a Look understands: a file's path, a
+ /// pane's `@pN` (and its command), a server's name.
+ src: Buf(96) = .{},
+ text: Buf(256) = .{},
+ places: [max_places]Place = undefined,
+ places_len: u8 = 0,
+ /// The lines that explain it, shown under its first place's line while
+ /// the caret is on it.
+ detail: [max_detail]Buf(128) = undefined,
+ detail_len: u8 = 0,
+ /// The serial of the pane it is about, 0 for none in particular.
+ pane: u32 = 0,
+ asks: Ask = .none,
+ /// Its detail shown under its first place's line whatever the caret
+ /// (a question's Diff).
+ open: bool = false,
+ /// How many times in a row it was said.
+ n: u16 = 1,
+ /// When it was last said, on the core's clock (`Pardes.clock.now_ns`).
+ t: u64 = 0,
+
+ /// Its words without the clock a host stamped on them (Message.stamp).
+ pub fn words(s: *const Said) []const u8 {
+ return Message.body(s.text.slice());
+ }
+
+ /// Whether it has dimmed: an echo or a notice past `linger_ms`, a
+ /// warning past twice that.
+ pub fn faded(s: *const Said, now_ns: u64, linger_ms: u16) bool {
+ const bright: u64 = switch (s.kind) {
+ .echo, .notice => linger_ms,
+ .warn => 2 * @as(u64, linger_ms),
+ else => return false,
+ };
+ return now_ns -| s.t >= bright * std.time.ns_per_ms;
+ }
+
+ /// Whether it is about `pane`: said of it, or naming its file (as its
+ /// cause or among its places).
+ pub fn about(s: *const Said, pane: *const Pane) bool {
+ if (s.pane != 0 and s.pane == pane.serial) return true;
+ const f = pane.file orelse return false;
+ if (std.mem.eql(u8, s.src.slice(), f.path)) return true;
+ for (s.places[0..s.places_len]) |*place| if (std.mem.eql(u8, place.path.slice(), f.path)) return true;
+ return false;
+ }
+};
+
pub const LoggedMessage = struct {
pub const cap = 256;
pub const replica = .{ .len = .{.{ "text", "len" }} };
@@ -50,22 +183,13 @@ pub const LoggedMessage = struct {
/// How many times in a row. Saturating: a key held down against the same
/// refusal is one event, not four hundred.
repeats: u16 = 0,
+ kind: Kind = .notice,
pub fn slice(m: *const LoggedMessage) []const u8 {
return m.text[0..m.len];
}
};
-/// The room the leader band's line takes (TagState.lastUsed): a leaf's
-/// key, word and summary (builtins.summary_max), and "(last used here)".
-pub const leader_room = 192;
-
-/// The leaf the current which-key level ran last, and what it does: the
-/// line under a rolled level (walk UI SPEC §3.7).
-fn leaderText(p: *const Pardes, buf: *[leader_room]u8) []const u8 {
- return pardes.TagState.lastUsed(p, p.view(), buf) orelse "";
-}
-
pub const Message = struct {
const libc = std.c;
const Tm = extern struct {
@@ -133,195 +257,504 @@ pub const Message = struct {
}
};
-/// A status updates the message line in place (a progress count does not
-/// pile up); a message is an event, and stacks.
+
+/// A status updates its line in place (a progress count does not pile up),
+/// and is not logged; a message is an event.
pub const setStatus = pardes.tape.taped(setStatusInner);
fn setStatusInner(p: *Pardes, id: Pane.Id, text: []const u8) void {
- showMessage(p, id.index(), text, false);
+ // No text: the pane's progress is over, and goes.
+ if (text.len == 0) {
+ const serial: u32 = if (id.index() < MAX_PANES) if (p.panes[id.index()]) |pane| pane.serial else 0 else 0;
+ const m = &p.messages;
+ for (m.live[0..m.live_len], 0..) |*s, i| if (s.kind == .progress and s.pane == serial) {
+ m.remove(i);
+ p.needs_frame = true;
+ break;
+ };
+ return;
+ }
+ _ = say(p, .progress, id.index(), text);
}
pub const setMessage = pardes.tape.taped(setMessageInner);
fn setMessageInner(p: *Pardes, id: Pane.Id, text: []const u8) void {
- logMessage(p, id.index(), text);
- showMessage(p, id.index(), text, true);
+ _ = say(p, .notice, id.index(), text);
}
-fn showMessage(p: *Pardes, id: usize, text: []const u8, stack: bool) void {
- if (id >= MAX_PANES) return;
- const pane = p.panes[id] orelse return;
+/// Say `text`, a message of `kind` about pane `id` (MAX_PANES and up:
+/// none in particular), its cause first: logged (progress is not), and
+/// live (`keep`); the message, for the places it names.
+pub fn say(p: *Pardes, kind: Kind, id: usize, text: []const u8) *Said {
+ if (kind != .progress) logMessage(p, id, kind, text);
+ const pane: ?*Pane = if (id < MAX_PANES and !p.fs.session_write) p.panes[id] else null;
+ var src: Buf(96) = .{};
+ if (pane) |cause| causeWord(cause, &src);
+ return keep(p, kind, if (pane) |cause| cause.serial else 0, src.slice(), text);
+}
+
+/// A pane as a message names its cause: a file's path (a kind's too), else
+/// `@pN` and the command it runs.
+fn causeWord(pane: *const Pane, out: *Buf(96)) void {
+ if (pane.file) |f| return out.set(f.path);
+ if (pane.addon) |k| if (k.path.len > 0) return out.set(k.path);
+ const line = pane.command orelse {
+ _ = out.print(config.pane_addr ++ "{d}", .{pane.serial});
+ return;
+ };
+ const first = line[0 .. std.mem.indexOfAny(u8, line, "\r\n") orelse line.len];
+ var cut = @min(first.len, 64);
+ while (cut < first.len and cut > 0 and first[cut] & 0xC0 == 0x80) cut -= 1;
+ _ = out.print(config.pane_addr ++ "{d} {s}", .{ pane.serial, first[0..cut] });
+}
+
+/// Make a message live, and return it (for its places and its detail):
+/// a new message retires every echo and notice, a new error the error
+/// before it; the same message again right after itself is counted. The
+/// list is in the order things were said.
+pub fn keep(p: *Pardes, kind: Kind, serial: u32, src: []const u8, text: []const u8) *Said {
+ const m = &p.messages;
+ p.needs_frame = true;
// One row of printable text: a language server's multi-line report
// reads as one line, and the cut never leaves half a glyph behind.
- var n: usize = @min(text.len, pane.msg.len);
+ var row: [256]u8 = undefined;
+ var n: usize = @min(text.len, row.len);
if (n < text.len) {
while (n > 0 and text[n] & 0xC0 == 0x80) n -= 1;
}
- const same = pane.msg_len == n and for (text[0..n], pane.msg[0..n]) |c, have| {
- if ((if (c < 0x20 or c == 0x7f) ' ' else c) != have) break false;
- } else true;
- // A new event moves the line on screen up the stack, where it keeps
- // its own timing, and falls in below it.
- // Only an event stacks on an event: an announcement or a status
- // stands in for whatever comes next.
- if (stack and pane.msg_len > 0 and !same and !pane.msg_announcement and !pane.msg_status)
- pane.pushOlderMessage();
- if (pane.msg_len == 0) pane.msg_slot = pane.freeMessageSlot();
- pane.msg_announcement = false;
- pane.msg_sent = false;
- pane.msg_status = !stack;
- for (text[0..n], pane.msg[0..n]) |c, *cell| cell.* = if (c < 0x20 or c == 0x7f) ' ' else c;
- pane.msg_len = @intCast(n);
- // The clock when it was said (the session clock is the last pump's,
- // and a 9P write after an idle hour would say it an hour ago).
- pane.msg_said_ms = p.tape.value(.clock, nowMs, .{});
- p.needs_frame = true;
- // New, the same line again or a status update: fresh, so it stays.
- pane.msg_life = .{};
+ for (text[0..n], row[0..n]) |c, *cell| cell.* = if (c < 0x20 or c == 0x7f) ' ' else c;
+ const line = row[0..n];
+ const now = p.clock.now_ns;
+ // Progress from the same cause is updated, and is the newest said.
+ if (kind == .progress) for (m.live[0..m.live_len], 0..) |*s, i| {
+ if (s.kind != .progress or s.pane != serial or !std.mem.eql(u8, s.src.slice(), src)) continue;
+ const kept = s.*;
+ m.remove(i);
+ const last = &m.live[m.live_len];
+ m.live_len += 1;
+ last.* = kept;
+ last.text.set(line);
+ last.t = now;
+ return last;
+ };
+ if (m.live_len > 0) {
+ // The NEWEST wording wins, so it carries the latest clock.
+ const last = &m.live[m.live_len - 1];
+ if (last.kind == kind and last.pane == serial and std.mem.eql(u8, last.src.slice(), src) and
+ std.mem.eql(u8, Message.body(last.text.slice()), Message.body(line)))
+ {
+ last.n +|= 1;
+ last.t = now;
+ last.text.set(line);
+ return last;
+ }
+ }
+ if (kind != .progress) {
+ var i: usize = 0;
+ while (i < m.live_len) {
+ const old = m.live[i].kind;
+ if (old == .echo or old == .notice or (kind == .@"error" and old == .@"error")) m.remove(i) else i += 1;
+ }
+ }
+ if (m.live_len == max_live) {
+ var oldest: usize = 0;
+ while (oldest + 1 < m.live_len and m.live[oldest].kind == .question) oldest += 1;
+ m.remove(oldest);
+ }
+ const s = &m.live[m.live_len];
+ m.live_len += 1;
+ s.* = .{ .kind = kind, .pane = serial, .t = now };
+ s.src.set(src);
+ s.text.set(line);
+ return s;
}
-/// With no frontend attached no input dismisses a message, and a detached
-/// session's /screen and messages kept what was said an hour ago: each
-/// pane's lines go once its newest has been up `message_linger_ms`, on the
-/// clock, checked as the core is stepped (each event, and each pump after
-/// its wait, which a message wakes) -- not as a 9P request is served, since
-/// a read is answered while a step is out and must change nothing, nor by
-/// the host, whose call is no input a replay makes.
-/// ponytail: a pane's older lines go with its newest, not each on its own
-/// clock; the render pipeline's clock will give every line its own.
-fn nowMs() i64 {
- var ts: std.c.timespec = undefined;
- if (std.c.clock_gettime(.MONOTONIC, &ts) != 0) return 0;
- return @as(i64, ts.sec) * 1000 + @divTrunc(@as(i64, ts.nsec), 1_000_000);
+pub fn remove(m: *Messages, i: usize) void {
+ std.mem.copyForwards(Said, m.live[i .. m.live_len - 1], m.live[i + 1 .. m.live_len]);
+ m.live_len -= 1;
}
-pub fn expireUnattended(p: *Pardes) void {
- if (!p.unattended) return;
- // The clock as the session that recorded read it (core/tape.zig).
- const now = p.tape.value(.clock, nowMs, .{});
- for (p.panes) |slot| {
- const pane = slot orelse continue;
- if (pane.msg_len == 0 and pane.msg_older_len == 0) continue;
- if (awaited(p, pane)) continue;
- if (now - pane.msg_said_ms < p.settings.message_linger_ms) continue;
- pane.msg_len = 0;
- pane.msg_life = .{};
- pane.msg_older_len = 0;
- p.needs_frame = true;
+/// Retire every live message of `kinds` (Esc: the warnings and errors);
+/// how many went.
+pub fn retire(m: *Messages, kinds: []const Kind) usize {
+ var gone: usize = 0;
+ var i: usize = 0;
+ while (i < m.live_len) {
+ if (std.mem.indexOfScalar(Kind, kinds, m.live[i].kind) != null) {
+ m.remove(i);
+ gone += 1;
+ } else i += 1;
}
+ return gone;
}
-/// A message waits for someone to see it, and a view kept for its client's
-/// return (views.away: an Upgrade's clients, a divergence's) is someone
-/// on the way: what its keyboard's pane says (an Upgrade's outcome,
-/// upgrade.zig `tellEveryView`) is that client's until it is back for its
-/// view (Pardes.rejoinView: its join's dump has it) or the view's kept
-/// time is up; no other view's input and no unattended clock take it. A
-/// pair's one client is such a client; the session's own frontend is
-/// none (its view is never away). A session no build could load starts
-/// afresh with no view kept: a pair's is held attended for its client
-/// instead (tui.zig `Own.start`).
-fn awaited(p: *const Pardes, pane: *const Pane) bool {
- if (p.views_away == 0) return false;
- for (p.views, 0..) |slot, k| if (slot) |v| {
- if (pardes.views.isAway(p, @intCast(k)) and p.panes[v.active] == pane and
- p.clock.now_ns -| v.away_ns < pardes.views.away_kept_ns) return true;
- };
- return false;
+/// The message the notice row leads with: the highest-ranked, the newest
+/// within a rank; progress never.
+pub fn headline(m: *const Messages) ?*const Said {
+ var best: ?*const Said = null;
+ for (m.live[0..m.live_len]) |*s| {
+ if (s.kind == .progress) continue;
+ if (best == null or s.kind.rank() >= best.?.kind.rank()) best = s;
+ }
+ return best;
}
-/// The key or click that used to clear the message row now starts each
-/// line's exit: it stays `message_linger_ms`, then goes. A line already
-/// on its way out keeps its own timing.
-pub fn dismissMessage(p: *Pardes, pane: *Pane) void {
- if (awaited(p, pane)) return;
- if (pane.msg_len > 0 and dismissLine(p, &pane.msg_life)) {
- pane.msg_len = 0;
- pane.msg_life = .{};
- }
- var i: usize = 0;
- while (i < pane.msg_older_len) {
- if (dismissLine(p, &pane.msg_older[i].life)) pane.removeOlderMessage(i) else i += 1;
+/// The kind a pane's mark shows, one cell after its box (SPEC §10.2): the
+/// most important live error, question, warning or progress about it (an
+/// echo or a notice marks nothing); null for none.
+pub fn markOf(m: *const Messages, pane: *const Pane) ?Kind {
+ var best: ?Kind = null;
+ for (m.live[0..m.live_len]) |*s| {
+ if (s.kind == .echo or s.kind == .notice or !s.about(pane)) continue;
+ if (best == null or s.kind.rank() > best.?.rank()) best = s.kind;
}
+ return best;
}
-/// Start one line's exit; true when it is gone at once (no linger).
-fn dismissLine(p: *const Pardes, life: *Pane.MessageLife) bool {
- if (life.phase == .lingering) return false;
- if (p.settings.message_linger_ms == 0) return true;
- life.* = .{ .phase = .lingering };
- return false;
+/// A kind's ink, for its glyph, its mark and its words at a line.
+pub fn ink(chrome: *const pardes.colors.ChromeTheme, kind: Kind) [3]u8 {
+ return switch (kind) {
+ .@"error" => chrome.diagnostic_error,
+ .warn => chrome.diagnostic_warning,
+ .question => chrome.diagnostic_info,
+ else => chrome.diagnostic_hint,
+ };
}
-/// One frame of every lingering message line. The one that goes owes a
-/// frame: a tick asks for none itself.
-pub fn advanceMessages(p: *Pardes) void {
- for (p.panes) |slot| {
- const pane = slot orelse continue;
- if (pane.msg_len > 0 and pane.msg_life.phase != .shown) {
- p.needs_frame = true;
- if (advanceLine(p, &pane.msg_life)) {
- pane.msg_len = 0;
- pane.msg_life = .{};
+/// The places a compiler's report names put on `s`: each
+/// `path:line:col: error|warning|note: words` row (a relative path is
+/// `dir`'s), its words there, and the rows after the first error, up to
+/// the next place, its detail. How many it found; none without an error.
+pub fn readPlaces(s: *Said, dir: []const u8, rows: []const []const u8) usize {
+ var errors: usize = 0;
+ var detailing = false;
+ for (rows) |raw| {
+ const row = std.mem.trimEnd(u8, raw, " \t\r\n");
+ const found = placeOf(row) orelse {
+ if (detailing and row.len > 0 and s.detail_len < Said.max_detail) {
+ s.detail[s.detail_len] = .{};
+ s.detail[s.detail_len].set(row);
+ s.detail_len += 1;
}
+ continue;
+ };
+ detailing = false;
+ const is_error = std.mem.startsWith(u8, found.text, "error");
+ if (is_error) {
+ detailing = errors == 0;
+ errors += 1;
}
- var i: usize = 0;
- while (i < pane.msg_older_len) {
- if (pane.msg_older[i].life.phase != .shown) p.needs_frame = true;
- if (advanceLine(p, &pane.msg_older[i].life)) pane.removeOlderMessage(i) else i += 1;
+ if (s.places_len == Said.max_places) continue;
+ const place = &s.places[s.places_len];
+ place.* = .{ .line = found.line, .col = found.col };
+ if (std.Io.Dir.path.isAbsolute(found.path)) place.path.set(found.path) else _ = place.path.print("{s}/{s}", .{ std.mem.trimEnd(u8, dir, "/"), found.path });
+ place.text.set(if (std.mem.startsWith(u8, found.text, "error: ")) found.text["error: ".len..] else found.text);
+ s.places_len += 1;
+ }
+ if (errors == 0) s.places_len = 0;
+ return s.places_len;
+}
+
+/// A compiler's place row: `path:line:col: error|warning|note...`.
+fn placeOf(row: []const u8) ?struct { path: []const u8, line: u32, col: u32, text: []const u8 } {
+ const a = std.mem.indexOfScalar(u8, row, ':') orelse return null;
+ const path = row[0..a];
+ if (path.len == 0 or std.mem.indexOfAny(u8, path, " \t") != null) return null;
+ var rest = row[a + 1 ..];
+ const b = std.mem.indexOfScalar(u8, rest, ':') orelse return null;
+ const line = std.fmt.parseInt(u32, rest[0..b], 10) catch return null;
+ rest = rest[b + 1 ..];
+ const c = std.mem.indexOfScalar(u8, rest, ':') orelse return null;
+ const col = std.fmt.parseInt(u32, rest[0..c], 10) catch return null;
+ const text = std.mem.trim(u8, rest[c + 1 ..], " ");
+ for ([_][]const u8{ "error", "warning", "note" }) |word| {
+ if (std.mem.startsWith(u8, text, word)) return .{ .path = path, .line = line, .col = col, .text = text };
+ }
+ return null;
+}
+
+/// The question waiting on `pane`, an index into `live`; null for none.
+pub fn waiting(m: *const Messages, pane: *const Pane) ?usize {
+ for (m.live[0..m.live_len], 0..) |*s, i| if (s.kind == .question and s.pane == pane.serial) return i;
+ return null;
+}
+
+/// The answers of the question waiting on `pane`: what a `:` lists first
+/// (pick-ui SPEC §10.4); none without one.
+pub fn waitingAnswers(m: *const Messages, pane: *const Pane) []const Answer {
+ const i = m.waiting(pane) orelse return &.{};
+ return m.live[i].asks.answers();
+}
+
+/// Answer live question `i` with `key`: `r` reads the file again over its
+/// unsaved text, `k` keeps the text and lets the disk's be, `d` shows (or
+/// hides again) the disk's lines where they differ, as ghosts in its
+/// body. False for a key that is none of its answers.
+pub fn answer(p: *Pardes, i: usize, key: u8) bool {
+ const m = &p.messages;
+ const s = &m.live[i];
+ const a = for (s.asks.answers()) |a| {
+ if (a.key == key) break a;
+ } else return false;
+ p.needs_frame = true;
+ const id = p.paneBySerial(s.pane) orelse {
+ m.remove(i);
+ return true;
+ };
+ var said: Buf(256) = .{};
+ if (key == 'd') {
+ if (s.open) {
+ s.open = false;
+ return true;
}
+ diskDiff(p, s, id);
+ return true;
+ }
+ logMessage(p, id, .echo, said.print("{s} {s} \u{b7} answered {s}", .{ s.src.slice(), s.words(), a.word }));
+ m.remove(i);
+ if (key == 'r') {
+ const pane = p.panes[id].?;
+ // The answer is the consent Get would ask for.
+ if (pane.file) |f| pane.discard_warned = .{ .revision = f.revision, .by = .get };
+ pardes.exec.runBuiltin(p, .Get, id, "", null);
+ } else _ = say(p, .echo, id, "kept yours; the disk's is not read");
+ return true;
+}
+
+/// SPC e (the Message word, SPEC §10.4), on the message the notice row
+/// leads with: an error that names places lands them as a list in pane
+/// `id`'s walk (Pick's `list`, its word `✗ <cause>` in the trail), the
+/// first landed on, n and N walking the rest, and the error goes (a
+/// +Search under the pane where jumps do not walk, or for a 9P script:
+/// Pick.asked); a question takes the keyboard in its pane's tag; anything
+/// else, or nothing, opens the history.
+pub fn act(p: *Pardes, id: usize) void {
+ const m = &p.messages;
+ const lead = m.headline() orelse return history(p, id);
+ if (lead.kind == .question) {
+ p.view().answering = lead.pane;
+ p.needs_frame = true;
+ return;
+ }
+ if (lead.kind != .@"error" or lead.places_len == 0 or id >= MAX_PANES) return history(p, id);
+ const pane = p.panes[id] orelse return;
+ var rows: std.Io.Writer.Allocating = .init(p.gpa);
+ errdefer rows.deinit();
+ for (lead.places[0..lead.places_len]) |*place| rows.writer.print("{s}:{d}:{d} {s}\n", .{ place.path.slice(), place.line, place.col, place.text.slice() }) catch |err| return reportError(p, .at(id), "Message", err);
+ const cause = lead.src;
+ const lead_at = for (m.live[0..m.live_len], 0..) |*s, k| {
+ if (s == lead) break k;
+ } else return;
+ m.remove(lead_at);
+ const content = rows.toOwnedSlice() catch |err| return reportError(p, .at(id), "Message", err);
+ if (pardes.Pick.asked(p)) {
+ defer p.gpa.free(content);
+ // The cause cut at a character's start to the word's room.
+ const src = cause.slice();
+ var cut = @min(src.len, 24 - "\u{2717} ".len);
+ while (cut > 0 and cut < src.len and src[cut] & 0xC0 == 0x80) cut -= 1;
+ var word: Buf(24) = .{};
+ pardes.Pick.open(p, id, .list, word.print("\u{2717} {s}", .{src[0..cut]}), "", content);
+ return pardes.Pick.landHere(p);
}
+ pardes.panes.Output.fillResults(p, id, pardes.panes.paneDir(pane), .search, cause.slice(), content, null) catch |err| return reportError(p, .at(id), "Message", err);
+ _ = @import("look.zig").searchStep(p, id, 1);
}
-/// One frame of one line's life; true once it has gone.
-fn advanceLine(p: *const Pardes, life: *Pane.MessageLife) bool {
- if (life.phase == .shown) return false;
- life.frame +|= 1;
- return life.frame >= messageFrames(p.settings.message_linger_ms);
+/// The history (SPC h m, the Messages word; SPC e with nothing to act on):
+/// where jumps walk a picker over it in pane `id`'s tag (Pick's
+/// `messages`), the newest first, Enter Looking a row, C-q keeping it as
+/// a +Messages; else (or for a 9P script, Pick.asked) the +Messages.
+pub fn history(p: *Pardes, id: usize) void {
+ if (pardes.Pick.asked(p) and id < MAX_PANES and p.panes[id] != null) return pardes.Pick.open(p, id, .messages, "", "", "");
+ pardes.panes.Output.openMessages(p, id) catch |err| reportError(p, .at(id), "messages", err);
+}
+
+/// An Exec of an answer's word in the tag of a pane a question waits on
+/// (B2 on `Reload`): that answer. False for any other word.
+pub fn answerWord(p: *Pardes, id: usize, word: []const u8) bool {
+ if (id >= MAX_PANES) return false;
+ const pane = p.panes[id] orelse return false;
+ const i = p.messages.waiting(pane) orelse return false;
+ const typed = std.mem.trim(u8, word, " \t\r\n");
+ for (p.messages.live[i].asks.answers()) |a| {
+ const first = a.word[0 .. std.mem.indexOfScalar(u8, a.word, ' ') orelse a.word.len];
+ if (std.mem.eql(u8, typed, first)) return answer(p, i, a.key);
+ }
+ return false;
}
-/// Move every lingering message line `frames` along its linger at once:
-/// how `advance` jumps a wait instead of stepping it frame by frame.
-pub fn holdMessages(p: *Pardes, frames: u64) void {
- const n: u16 = @intCast(@min(frames, std.math.maxInt(u16)));
- for (p.panes) |slot| {
- const pane = slot orelse continue;
- if (pane.msg_len > 0 and pane.msg_life.phase == .lingering) pane.msg_life.frame +|= n;
- for (pane.msg_older[0..pane.msg_older_len]) |*line| {
- if (line.life.phase == .lingering) line.life.frame +|= n;
+/// A question's Diff: the disk's text read (the host's read, taped) and
+/// set against the buffer's, the lines they share at either end left out;
+/// where they part, its place, and up to `Said.max_detail` of the lines
+/// there, the disk's `+` and then the buffer's `-`, its detail, shown.
+fn diskDiff(p: *Pardes, s: *Said, id: usize) void {
+ const pane = p.panes[id].?;
+ const f = if (pane.file) |*file| file else return;
+ const disk = @import("fs.zig").read(p, f.path) catch |err| return pardes.Messages.reportError(p, .at(id), "Diff", err);
+ defer p.gpa.free(disk);
+ const mine = pardes.panes.File.fileText(f, p.scratch.allocator()) catch return;
+ var a = std.mem.splitScalar(u8, mine, '\n');
+ var b = std.mem.splitScalar(u8, disk, '\n');
+ var line: u32 = 1;
+ var ours: []const u8 = "";
+ var theirs: []const u8 = "";
+ while (true) : (line += 1) {
+ const x = a.next();
+ const y = b.next();
+ if (x == null and y == null) return;
+ if (x != null and y != null and std.mem.eql(u8, x.?, y.?)) continue;
+ ours = if (x) |l| mine[@intFromPtr(l.ptr) - @intFromPtr(mine.ptr) ..] else "";
+ theirs = if (y) |l| disk[@intFromPtr(l.ptr) - @intFromPtr(disk.ptr) ..] else "";
+ break;
+ }
+ // The lines both end with, left out.
+ var ours_end = ours.len;
+ var theirs_end = theirs.len;
+ while (ours_end > 0 and theirs_end > 0) {
+ const ol = std.mem.lastIndexOfScalar(u8, ours[0 .. ours_end - 1], '\n');
+ const tl = std.mem.lastIndexOfScalar(u8, theirs[0 .. theirs_end - 1], '\n');
+ const o_line = ours[if (ol) |nl| nl + 1 else 0..ours_end];
+ const t_line = theirs[if (tl) |nl| nl + 1 else 0..theirs_end];
+ if (!std.mem.eql(u8, o_line, t_line)) break;
+ ours_end = if (ol) |nl| nl + 1 else 0;
+ theirs_end = if (tl) |nl| nl + 1 else 0;
+ }
+ s.places[0] = .{ .line = line, .col = 1 };
+ s.places[0].path.set(f.path);
+ s.places[0].text.set("the disk's differs here");
+ s.places_len = 1;
+ s.detail_len = 0;
+ // The disk's first: it is what the answer shows.
+ for ([_]struct { []const u8, []const u8 }{ .{ "+", theirs[0..theirs_end] }, .{ "-", ours[0..ours_end] } }) |side| {
+ var rows = std.mem.splitScalar(u8, std.mem.trimEnd(u8, side[1], "\n"), '\n');
+ while (rows.next()) |row| {
+ if (side[1].len == 0 or s.detail_len == Said.max_detail) break;
+ s.detail[s.detail_len] = .{};
+ _ = s.detail[s.detail_len].print("{s}{s}", .{ side[0], row });
+ s.detail_len += 1;
}
}
+ s.open = true;
}
-/// Frames until this pane's message lines next change: the rest of a
-/// linger, null when every line just shows.
-pub fn messageWake(p: *const Pardes, pane: *const Pane) ?u64 {
+/// The words the newest live message said of `pane` has, "" for none:
+/// what its band shows, and what a write that failed on it answers.
+pub fn saidBy(m: *const Messages, pane: *const Pane) []const u8 {
+ var i = m.live_len;
+ while (i > 0) {
+ i -= 1;
+ if (m.live[i].pane == pane.serial) return m.live[i].text.slice();
+ }
+ return "";
+}
+
+/// When the next live message dims, on the core's clock; null for none.
+pub fn dimDue(p: *const Pardes) ?u64 {
+ const m = &p.messages;
+ if (p.settings.message_linger_ms == 0) return null;
var soonest: ?u64 = null;
- const linger = messageFrames(p.settings.message_linger_ms);
- for (0..@as(usize, pane.msg_older_len) + 1) |i| {
- const life = if (i < pane.msg_older_len) pane.msg_older[i].life else if (pane.msg_len > 0) pane.msg_life else continue;
- if (life.phase == .shown) continue;
- const frames: u64 = @max(1, linger -| life.frame);
- soonest = if (soonest) |n| @min(n, frames) else frames;
+ for (m.live[0..m.live_len]) |*s| {
+ const bright: u64 = switch (s.kind) {
+ .echo, .notice => p.settings.message_linger_ms,
+ .warn => 2 * @as(u64, p.settings.message_linger_ms),
+ else => continue,
+ };
+ const due = s.t + bright * std.time.ns_per_ms;
+ if (due <= p.clock.stepped_ns) continue;
+ soonest = if (soonest) |first| @min(first, due) else due;
}
return soonest;
}
-/// Frames a message timing lasts; at least one.
-pub fn messageFrames(ms: u16) u16 {
- return @intCast(@max(1, (@as(u32, ms) + pardes.frame_ms - 1) / pardes.frame_ms));
+/// The notice row's line (SPEC §10.3), `width` columns: on the left the
+/// message the row leads with (`headline`), its glyph, its cause, its
+/// words, `×n` and the places it names; on the right how many more live,
+/// the questions waiting, or the way to the history. With nothing live the
+/// left says where the focused pane's caret is. Built each frame from the
+/// state, in `out`.
+pub const Row = struct {
+ /// The left part's end and the right part's start, in bytes of `text`.
+ left: usize = 0,
+ right: usize = 0,
+ text: []const u8 = "",
+ /// The message the left says, when it says one.
+ lead: ?*const Said = null,
+};
+
+/// Room for the notice row's line: the widest window's at the tagline's
+/// pitch (Layer.capacity) is cut to it.
+pub const notice_row_cap = 1024;
+
+pub fn noticeRow(p: *const Pardes, width: usize, out: *[notice_row_cap]u8) Row {
+ const m = &p.messages;
+ const tab = p.settings.tab;
+ // A rolled level's last leaf, while the level shows: what it does, the
+ // whole row (SPEC §3.7's first mockup).
+ if (pardes.TagState.lastUsed(p, p.view(), out)) |used| {
+ var end = @min(used.len, panes.File.rawAtDisplay(tab, used, width));
+ while (end > 0 and panes.File.displayWidth(tab, used[0..end]) > width) end -= 1;
+ while (end > 0 and end < used.len and used[end] & 0xC0 == 0x80) end -= 1;
+ return .{ .left = end, .right = end, .text = used[0..end] };
+ }
+ var w: std.Io.Writer = .fixed(out);
+ var live: usize = 0;
+ var questions: usize = 0;
+ for (m.live[0..m.live_len]) |*s| {
+ if (s.kind == .progress) continue;
+ live += 1;
+ if (s.kind == .question) questions += 1;
+ }
+ const lead = m.headline();
+ if (lead) |s| {
+ w.print("{s} ", .{s.kind.glyph()}) catch {};
+ // Its cause first, unless its words name it already.
+ const words = s.words();
+ if (s.src.len > 0 and std.mem.indexOf(u8, words, s.src.slice()) == null) w.print("{s} ", .{s.src.slice()}) catch {};
+ w.writeAll(words) catch {};
+ if (s.n > 1) w.print(" \u{d7}{d}", .{s.n}) catch {};
+ for (s.places[0..s.places_len], 0..) |*place, i| w.print("{s} {s}:{d}:{d}", .{ if (i > 0) " \u{b7}" else "", place.path.slice(), place.line, place.col }) catch {};
+ } else if (p.panes[p.view().active]) |pane| {
+ if (pane.file) |f| w.print("{s}:{d}", .{ f.path, pane.body.cur_row + 1 }) catch {} else w.writeAll(pane.cwdSlice()) catch {};
+ }
+ const left_end = w.end;
+ var right: [64]u8 = undefined;
+ var r: std.Io.Writer = .fixed(&right);
+ if (live > 1) r.print("+{d} \u{b7} ", .{live - 1}) catch {};
+ if (questions > 0)
+ r.print("{d} question{s} \u{b7} SPC e", .{ questions, if (questions == 1) "" else "s" }) catch {}
+ else if (lead != null and lead.?.kind == .@"error" and lead.?.places_len > 0)
+ r.writeAll("SPC e walk") catch {}
+ else if (m.len > 0)
+ r.print("{d} message{s} \u{b7} SPC h m", .{ m.len, if (m.len == 1) "" else "s" }) catch {};
+ const tail = r.buffered();
+ // The left cut to make room for the right, a blank between them.
+ const tail_w = panes.File.displayWidth(tab, tail);
+ const room = width -| (tail_w + 1);
+ var cut = left_end;
+ if (panes.File.displayWidth(tab, out[0..cut]) > room) {
+ cut = panes.File.rawAtDisplay(tab, out[0..left_end], room);
+ while (cut > 0 and panes.File.displayWidth(tab, out[0..cut]) > room) {
+ cut -= 1;
+ while (cut > 0 and out[cut] & 0xC0 == 0x80) cut -= 1;
+ }
+ }
+ w.end = cut;
+ const gap = width -| (panes.File.displayWidth(tab, out[0..cut]) + tail_w);
+ for (0..gap) |_| w.writeByte(' ') catch {};
+ const right_at = w.end;
+ w.writeAll(tail) catch {};
+ return .{ .left = cut, .right = right_at, .text = w.buffered(), .lead = lead };
}
/// What notice band `i` says. The grid pass and the band layers both
/// read it here, so a terminal and a pixel shell show the same line.
-pub fn noticeText(p: *const Pardes, pane: *const Pane, i: usize, leader_buf: *[leader_room]u8) []const u8 {
+pub fn noticeText(pane: *const Pane, i: usize) []const u8 {
return switch (pane.notices.kinds[i]) {
- .message => pane.msg[0..pane.msg_len],
- .older => pane.msg_older[pane.notices.index[i]].slice(),
- .leader => leaderText(p, leader_buf),
.prompt => pane.promptText() orelse "",
};
}
-fn logMessage(p: *Pardes, id: usize, text: []const u8) void {
+fn logMessage(p: *Pardes, id: usize, kind: Kind, text: []const u8) void {
if (text.len == 0) return;
const serial: u32 = if (p.fs.session_write) 0 else if (id < MAX_PANES) if (p.panes[id]) |pane| pane.serial else 0 else 0;
const kept = text[0..@min(text.len, LoggedMessage.cap)];
@@ -345,6 +778,7 @@ fn logMessage(p: *Pardes, id: usize, text: []const u8) void {
@memcpy(slot.text[0..slot.len], kept);
slot.serial = serial;
slot.repeats = 1;
+ slot.kind = kind;
p.messages.head = (p.messages.head + 1) % limits.message_log;
p.messages.len = @min(p.messages.len + 1, limits.message_log);
}
@@ -474,17 +908,23 @@ pub fn reportFailure(p: *Pardes, id: usize, text: []const u8) void {
if (failing_write) {
p.fs.unlogged = true;
defer p.fs.unlogged = false;
- return setMessage(p, .at(id), text);
+ _ = say(p, .@"error", id, text);
+ return;
}
- setMessage(p, .at(id), text);
+ _ = say(p, .@"error", id, text);
}
/// The one place that decides which transient lines a pane is showing and
/// in what order. Everything downstream reads the answer: the body layer
/// so it does not paint under them, and the paint pass so it can stack
/// them instead of letting the last one win the row.
-pub fn collectNotices(p: *Pardes, pane: *Pane, r: Rect, id: usize) void {
- pane.notices = bands(p, p.view(), pane, pane.tag_rows, r, id);
+pub fn collectNotices(p: *Pardes, pane: *Pane, r: Rect) void {
+ pane.notices = bands(p, pane, pane.tag_rows, r);
+ // A message's detail under the caret's line, where the body draws it
+ // and a click's row is read (Pane.textRow): the step's, as the bands.
+ const under = if (r.h > pane.tag_rows) detailUnder(p, pane, p.panes[p.view().active] == pane, r.h - pane.tag_rows) else null;
+ pane.ghost_at = if (under) |d| d.row else 0;
+ pane.ghost_rows = if (under) |d| d.rows else 0;
// Each band's chip at the right edge, as wide as its own text and a
// blank cell either side, the pane's width at most: a click finds it
// whether or not a frame has drawn it. An overlay over the body's top
@@ -493,25 +933,41 @@ pub fn collectNotices(p: *Pardes, pane: *Pane, r: Rect, id: usize) void {
// draws, and a chip narrower than its text there would clip it.
const tx = r.x + config.GUTTER;
const tw = r.w -| config.GUTTER;
- var leader_buf: [leader_room]u8 = undefined;
for (0..pane.notices.len) |i| {
- const chip = panes.File.displayWidth(p.settings.tab, noticeText(p, pane, i, &leader_buf)) + 2;
+ const chip = panes.File.displayWidth(p.settings.tab, noticeText(pane, i)) + 2;
pane.notices.left[i] = if (tw == 0) std.math.maxInt(u16) else tx + tw - @as(u16, @intCast(@min(chip, tw)));
}
}
-/// The bands pane `id` shows in view `v`, over `r` below its `tag_rows`:
-/// the live view's each step, and any view's for its kind's facts
-/// (Kind.viewOf), made from what a dump keeps (the bands are derived).
-pub fn bands(p: *const Pardes, v: *const Pardes.View, pane: *const Pane, tag_rows: u16, r: Rect, id: usize) Pane.Notices {
+/// A message's detail under the caret's line (SPEC §10.2), as a body of
+/// `body_h` rows shows it: the row of that line's last row, how many of the
+/// detail's lines fit under it, the message (the first naming the line, as
+/// the words after it are); only in the pane with the keyboard, in its body.
+/// Bounded by the live messages' places and the rows shown.
+pub fn detailUnder(p: *const Pardes, pane: *Pane, active: bool, body_h: u16) ?struct { row: u16, rows: u16, said: *const Said } {
+ if (!active or pane.focus != .body or p.messages.live_len == 0) return null;
+ const f = pane.file orelse return null;
+ const caret = @max(0, pane.body.cur_row);
+ const said = found: for (p.messages.live[0..p.messages.live_len]) |*s| {
+ for (s.places[0..s.places_len]) |*place| if (place.line == caret + 1 and std.mem.eql(u8, place.path.slice(), f.path)) break :found s;
+ } else return null;
+ if (said.detail_len == 0) return null;
+ var row: u16 = 0;
+ while (row < body_h) : (row += 1) {
+ if (pane.wrapAt(p.settings.tab, row).line != caret) continue;
+ if (row + 1 < body_h and pane.wrapAt(p.settings.tab, row + 1).line == caret) continue;
+ const k: u16 = @intCast(@min(said.detail_len, body_h - row - 1));
+ return if (k == 0) null else .{ .row = row, .rows = k, .said = said };
+ }
+ return null;
+}
+
+/// The bands a pane shows over `r` below its `tag_rows`: the live view's
+/// each step, and any view's for its kind's facts (Kind.viewOf), made from
+/// what a dump keeps (the bands are derived).
+pub fn bands(p: *const Pardes, pane: *const Pane, tag_rows: u16, r: Rect) Pane.Notices {
var n: Pane.Notices = .{};
if (r.w <= config.GUTTER or r.h <= tag_rows) return n;
- // Oldest message line on top, so lines already up do not move when a
- // new one lands under them; when rows run out the oldest go first.
- for (pane.msg_older[0..pane.msg_older_len], 0..) |line, i| n.pushAt(.older, @intCast(i), line.slot);
- if (pane.msg_len > 0) n.pushAt(.message, 0, pane.msg_slot);
- var used_buf: [leader_room]u8 = undefined;
- if (id == v.active and pardes.TagState.lastUsed(p, v, &used_buf) != null) n.push(.leader);
// Del's question shows once its delay is up: answered before that, it
// was never there.
const del_waiting = pane.prompt == .del_side and pane.question_due_ns > p.clock.now_ns;
@@ -522,28 +978,18 @@ pub fn bands(p: *const Pardes, v: *const Pardes.View, pane: *const Pane, tag_row
// into blind. A two-row pane spends its only body row on one notice,
// which is what the single shared row used to do anyway.
const room: u8 = @intCast(@min(@as(u16, Pane.Notices.max), r.h - tag_rows));
- if (n.span() <= room) return n;
- // Too short for the gaps: close them up in screen order, and if even
- // that does not fit, the top bands go.
- var i: usize = 1;
- while (i < n.len) : (i += 1) {
- var j = i;
- while (j > 0 and n.row[j - 1] > n.row[j]) : (j -= 1) {
- std.mem.swap(Pane.Notices.Kind, &n.kinds[j - 1], &n.kinds[j]);
- std.mem.swap(u8, &n.index[j - 1], &n.index[j]);
- std.mem.swap(u8, &n.row[j - 1], &n.row[j]);
- }
- }
- const drop = n.len -| room;
- for (0..n.len - drop) |k| {
+ if (n.len <= room) return n;
+ // Too short for them all: the top bands go.
+ const drop = n.len - room;
+ for (0..room) |k| {
n.kinds[k] = n.kinds[k + drop];
- n.index[k] = n.index[k + drop];
n.row[k] = @intCast(k);
}
- n.len -= @intCast(drop);
+ n.len = room;
return n;
}
+
test "errors are said in words, and a ZON failure names its line" {
var buf: [128]u8 = undefined;
try std.testing.expectEqualStrings("file not found", errorWords(error.FileNotFound, &buf));
@@ -605,180 +1051,87 @@ test "the message log keeps what the row forgets, and collapses repeats" {
try std.testing.expectEqualStrings(want_last, p.messages.at(limits.message_log - 1).?.slice());
}
-test "Msg writes the transient row by hand, bare or with text, and input ends it" {
+test "Msg says a notice by hand, bare or with text, and the next message retires it" {
if (pardes.Term.ops == null) return error.SkipZigTest; // the classic boot's three shells
const p = try Pardes.init(std.testing.allocator, .{ .shells = 3, .cols = 100, .rows = 30 });
defer p.deinit();
while (p.nextEffect()) |_| {}
- const row = struct {
- fn of(pp: *Pardes, i: usize) []const u8 {
- const pane = pp.panes[i].?;
- return pane.msg[0..pane.msg_len];
- }
- }.of;
-
// the whole tail, spaces and all: the row is a sentence, not a word
try std.testing.expect(p.executeBuiltinLine(2, "Msg saved /etc/hosts"));
- try std.testing.expectEqualStrings("saved /etc/hosts", row(p, 2));
- // ...on the pane that ran it, and nowhere else
- try std.testing.expectEqualStrings("", row(p, 0));
-
+ try std.testing.expectEqualStrings("saved /etc/hosts", p.messages.saidBy(p.panes[2].?));
+ // ...of the pane that ran it, its cause that pane's address
+ try std.testing.expectEqualStrings("", p.messages.saidBy(p.panes[0].?));
+ var want: [16]u8 = undefined;
+ try std.testing.expectEqualStrings(try std.fmt.bufPrint(&want, "@p{d}", .{p.panes[2].?.serial}), p.messages.headline().?.src.slice());
// Bare, it reports ITSELF through reportError — the `<operation>: <error in words>`
- // every failed save and refused Look arrives in.
+ // every failed save and refused Look arrives in: an error.
try std.testing.expect(p.executeBuiltinLine(2, "Msg"));
- try std.testing.expectEqualStrings("Msg: no message", row(p, 2));
-
- // Input starts its exit: it lingers, and is gone.
- p.update(.{ .key = .{ .cp = Key.escape } });
- try std.testing.expectEqualStrings("Msg: no message", row(p, 2));
- for (0..200) |_| p.update(.tick);
- try std.testing.expectEqualStrings("", row(p, 2));
- // ...and with no linger it is as old as your last input.
- try std.testing.expect(p.executeBuiltinLine(2, "MessageLinger 0"));
- try std.testing.expect(p.executeBuiltinLine(2, "Msg gone"));
+ try std.testing.expectEqualStrings("Msg: no message", p.messages.saidBy(p.panes[2].?));
+ try std.testing.expectEqual(Kind.@"error", p.messages.headline().?.kind);
+ // Input takes nothing away; the next message does what the notice
+ // was, and the error stays until Esc.
p.update(.{ .key = .{ .cp = 'h' } });
- try std.testing.expectEqualStrings("", row(p, 2));
+ for (0..200) |_| p.update(.tick);
+ try std.testing.expectEqualStrings("Msg: no message", p.messages.saidBy(p.panes[2].?));
+ try std.testing.expect(p.executeBuiltinLine(2, "Msg next"));
+ try std.testing.expectEqual(@as(u8, 2), p.messages.live_len);
+ try std.testing.expectEqual(Kind.@"error", p.messages.headline().?.kind);
- // Longer than the row's buffer is CUT, never refused and never overrun:
+ // Longer than a message's room is CUT, never refused and never overrun:
// this word is the only way to reach that boundary without a 300-byte path.
var long: [600]u8 = @splat('x');
var line: [608]u8 = undefined;
const cmd = try std.fmt.bufPrint(&line, "Msg {s}", .{&long});
try std.testing.expect(p.executeBuiltinLine(2, cmd));
- try std.testing.expectEqual(p.panes[2].?.msg.len, row(p, 2).len);
+ try std.testing.expectEqual(@as(usize, 256), p.messages.saidBy(p.panes[2].?).len);
}
-test "with no frontend attached a message goes once it has lingered, on the clock" {
- const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true });
+test "an echo or a notice retires those before it, an error the error before it, a repeat counts and progress runs in place" {
+ const p = try Pardes.init(std.testing.allocator, .{ .cols = 80, .rows = 24 });
defer p.deinit();
- const pane = p.panes[p.view().active].?;
- p.setMessage(.at(p.view().active), "said");
- p.setMessage(.at(p.view().active), "said again");
- // Attached: it waits for input, however long.
- pane.msg_said_ms -= 60_000;
- p.update(.tick);
- try std.testing.expect(pane.msg_len > 0);
- // Detached with nobody attached: past its linger it is gone, and the
- // line above it with it.
- p.unattended = true;
- // A read served meanwhile changes nothing; the session's step after its
- // wait expires, not the host (whose call no replay makes).
- _ = p.serveFs(.{ .tag = 1, .op = .read, .node = @backingInt(ctlfs.TopFile.index), .size = 64 });
- try std.testing.expect(pane.msg_len > 0);
- try p.pump(.{});
- try std.testing.expectEqual(@as(u16, 0), pane.msg_len);
- try std.testing.expectEqual(@as(u8, 0), pane.msg_older_len);
- // A fresh one stays until its linger is up.
- p.setMessage(.at(p.view().active), "fresh");
- p.update(.tick);
- try std.testing.expect(pane.msg_len > 0);
-}
-
-test "a message lingers past the input that dismisses it, and goes" {
- const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 80, .rows = 24 });
- defer p.deinit();
- while (p.nextEffect()) |_| {}
- const pane = p.panes[p.view().active].?;
- try std.testing.expect(p.executeBuiltinLine(p.view().active, "MessageLinger 160"));
- try std.testing.expect(p.executeBuiltinLine(p.view().active, "Msg hello"));
- // Shown at once, until input; the same line again stays shown.
- try std.testing.expectEqual(Pane.MessagePhase.shown, pane.msg_life.phase);
- try std.testing.expect(!p.animationActive());
- for (0..100) |_| p.update(.tick);
- try std.testing.expectEqual(Pane.MessagePhase.shown, pane.msg_life.phase);
- try std.testing.expect(p.executeBuiltinLine(p.view().active, "Msg hello"));
- try std.testing.expectEqual(Pane.MessagePhase.shown, pane.msg_life.phase);
- // Input (a key that announces nothing): 160 ms of lingering (ten frames), unaffected by more input...
- p.update(.{ .key = .{ .cp = 'h' } });
- try std.testing.expectEqual(Pane.MessagePhase.lingering, pane.msg_life.phase);
- for (0..9) |_| {
- p.update(.tick);
- p.update(.{ .key = .{ .cp = 'h' } });
+ _ = try p.setTestFile("text\n");
+ const id = p.view().active;
+ const m = &p.messages;
+ m.live_len = 0;
+ _ = say(p, .notice, id, "first");
+ _ = say(p, .echo, id, "second");
+ try std.testing.expectEqual(@as(u8, 1), m.live_len);
+ try std.testing.expectEqualStrings("second", m.headline().?.text.slice());
+ _ = say(p, .@"error", id, "broke");
+ _ = say(p, .warn, id, "careful");
+ // The echo went with the error; the warning stands beside it.
+ try std.testing.expectEqual(@as(u8, 2), m.live_len);
+ try std.testing.expectEqual(Kind.@"error", m.headline().?.kind);
+ _ = say(p, .@"error", id, "broke again");
+ try std.testing.expectEqual(@as(u8, 2), m.live_len);
+ try std.testing.expectEqualStrings("broke again", m.headline().?.text.slice());
+ // The same again right after itself: one message, counted, its newest
+ // wording (and clock) kept.
+ for (0..9) |_| _ = say(p, .@"error", id, "broke again");
+ try std.testing.expectEqual(@as(u8, 2), m.live_len);
+ try std.testing.expectEqual(@as(u16, 10), m.headline().?.n);
+ // Progress updates its line in place and retires nothing.
+ _ = say(p, .progress, id, "Changes: jj 1/4");
+ _ = say(p, .progress, id, "Changes: jj 3/4");
+ try std.testing.expectEqual(@as(u8, 3), m.live_len);
+ try std.testing.expectEqualStrings("Changes: jj 3/4", m.saidBy(p.panes[id].?));
+ try std.testing.expectEqual(Kind.@"error", m.headline().?.kind);
+ // Esc in normal mode takes the warnings and errors.
+ p.update(.{ .key = .{ .cp = Key.escape } });
+ try std.testing.expectEqual(@as(u8, 1), m.live_len);
+ try std.testing.expectEqual(Kind.progress, m.live[0].kind);
+ try std.testing.expect(m.headline() == null);
+ // Past the room, the oldest that is no question goes.
+ m.live_len = 0;
+ for (0..max_live + 3) |i| {
+ var buf: [16]u8 = undefined;
+ _ = say(p, .warn, id, std.fmt.bufPrint(&buf, "w{d}", .{i}) catch unreachable);
}
- try std.testing.expectEqual(Pane.MessagePhase.lingering, pane.msg_life.phase);
- // ...then it is gone, and the tick that clears it owes the frame that
- // shows it gone.
- p.needs_frame = false;
- p.update(.tick);
- try std.testing.expectEqual(@as(u16, 0), pane.msg_len);
- try std.testing.expect(p.needs_frame);
- try std.testing.expect(!p.animationActive());
- // Shown again while lingering: fresh, so it stays; a status update to a
- // line on screen swaps its text in place.
- try std.testing.expect(p.executeBuiltinLine(p.view().active, "Msg again"));
- p.update(.{ .key = .{ .cp = 'h' } });
- try std.testing.expectEqual(Pane.MessagePhase.lingering, pane.msg_life.phase);
- try std.testing.expect(p.executeBuiltinLine(p.view().active, "Msg again"));
- try std.testing.expectEqual(Pane.MessagePhase.shown, pane.msg_life.phase);
- setStatus(p, .at(p.view().active), "progress 50%");
- try std.testing.expectEqual(Pane.MessagePhase.shown, pane.msg_life.phase);
- try std.testing.expectEqualStrings("progress 50%", pane.msg[0..pane.msg_len]);
- try std.testing.expectEqual(@as(u8, 0), pane.msg_older_len);
-}
-
-test "messages stack, oldest on top, each on its own timing" {
- const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 80, .rows = 24 });
- defer p.deinit();
- while (p.nextEffect()) |_| {}
- const pane = p.panes[p.view().active].?;
- try std.testing.expect(p.executeBuiltinLine(p.view().active, "Verbose off"));
- try std.testing.expect(p.executeBuiltinLine(p.view().active, "MessageLinger 160"));
- // `Verbose off` announced itself before it took effect.
- pane.msg_len = 0;
- pane.msg_life = .{};
- setMessage(p, .at(p.view().active), "first");
- try std.testing.expectEqual(Pane.MessagePhase.shown, pane.msg_life.phase);
- // A second message stacks under the first instead of replacing it.
- setMessage(p, .at(p.view().active), "second");
- try std.testing.expectEqual(@as(u8, 1), pane.msg_older_len);
- try std.testing.expectEqualStrings("first", pane.msg_older[0].slice());
- try std.testing.expectEqualStrings("second", pane.msg[0..pane.msg_len]);
- collectNotices(p, pane, p.view().rects[p.view().active], p.view().active);
- try std.testing.expectEqual(Pane.Notices.Kind.older, pane.notices.kinds[0]);
- try std.testing.expectEqual(Pane.Notices.Kind.message, pane.notices.kinds[1]);
- // One key dismisses both, each on its own clock: a line already
- // lingering keeps its timing.
- p.update(.{ .key = .{ .cp = 'h' } });
- try std.testing.expectEqual(Pane.MessagePhase.lingering, pane.msg_older[0].life.phase);
- try std.testing.expectEqual(Pane.MessagePhase.lingering, pane.msg_life.phase);
- p.update(.tick);
- setMessage(p, .at(p.view().active), "third");
- try std.testing.expectEqual(@as(u8, 2), pane.msg_older_len);
- p.update(.{ .key = .{ .cp = 'h' } });
- const linger = messageFrames(p.settings.message_linger_ms);
- for (0..linger - 1) |_| p.update(.tick);
- // The first two are gone; the third, a frame later, still lingers.
- try std.testing.expectEqual(@as(u8, 0), pane.msg_older_len);
- try std.testing.expectEqualStrings("third", pane.msg[0..pane.msg_len]);
- try std.testing.expectEqual(Pane.MessagePhase.lingering, pane.msg_life.phase);
- p.update(.tick);
- try std.testing.expectEqual(@as(u16, 0), pane.msg_len);
- try std.testing.expect(!p.animationActive());
- // A status ticking in place does not pile up.
- setStatus(p, .at(p.view().active), "lsp 10%");
- setStatus(p, .at(p.view().active), "lsp 20%");
- try std.testing.expectEqual(@as(u8, 0), pane.msg_older_len);
- // Lines keep their rows: when the top one leaves, the one under it does
- // not move up, and the next message fills the gap instead.
- setMessage(p, .at(p.view().active), "top");
- setMessage(p, .at(p.view().active), "under");
- try std.testing.expectEqual(@as(u8, 0), pane.msg_older[0].slot);
- try std.testing.expectEqual(@as(u8, 1), pane.msg_slot);
- pane.removeOlderMessage(0);
- collectNotices(p, pane, p.view().rects[p.view().active], p.view().active);
- try std.testing.expectEqual(@as(u8, 1), pane.notices.row[0]);
- try std.testing.expectEqual(@as(u8, 2), pane.notices.span());
- setMessage(p, .at(p.view().active), "fills");
- try std.testing.expectEqual(@as(u8, 0), pane.msg_slot);
- try std.testing.expectEqual(@as(u8, 1), pane.msg_older[0].slot);
- // The stack keeps the newest few.
- for ([_][]const u8{ "a", "b", "c", "d", "e" }) |text| setMessage(p, .at(p.view().active), text);
- try std.testing.expectEqual(@as(u8, Pane.message_stack), pane.msg_older_len);
- try std.testing.expectEqualStrings("b", pane.msg_older[0].slice());
- try std.testing.expectEqualStrings("e", pane.msg[0..pane.msg_len]);
+ try std.testing.expectEqual(@as(u8, max_live), m.live_len);
+ try std.testing.expectEqualStrings("w3", m.live[0].text.slice());
}
-test "a builtin announces itself on the message row, and Verbose silences it" {
+test "a builtin announces itself on the notice row, an echo, and Verbose silences it" {
if (pardes.Term.ops == null) return error.SkipZigTest; // a terminal's tag row
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 80, .rows = 24 });
defer p.deinit();
@@ -786,136 +1139,385 @@ test "a builtin announces itself on the message row, and Verbose silences it" {
p.sync();
try std.testing.expect(p.settings.verbose);
- // Wrap, not Collapse: a builtin that folds its own pane away leaves no row
- // for its announcement, which is correct and not what this is testing.
+ // Wrap, not Collapse: a builtin that folds its own pane away is not
+ // what this is testing.
try std.testing.expect(p.executeBuiltinLine(p.view().active, "Wrap"));
- try std.testing.expectEqualStrings("Wrap", pane.msg[0..pane.msg_len]);
- // A value it does not take is said, in place of the announcement.
+ try std.testing.expectEqualStrings("Wrap", p.messages.saidBy(pane));
+ try std.testing.expectEqual(Kind.echo, p.messages.headline().?.kind);
+ // A value it does not take is said, an error, and leads the row.
const wrapped = p.settings.wrap;
try std.testing.expect(p.executeBuiltinLine(p.view().active, "Wrap maybe"));
- try std.testing.expectEqualStrings("Wrap: takes on, off", pane.msg[0..pane.msg_len]);
+ try std.testing.expectEqualStrings("Wrap: takes on, off", p.messages.saidBy(pane));
try std.testing.expectEqual(wrapped, p.settings.wrap);
- // The notice list is what the paint pass reads, so the announcement has to
- // reach it, not just the buffer.
- collectNotices(p, pane, p.view().rects[p.view().active], p.view().active);
- try std.testing.expect(pane.notices.len > 0);
- try std.testing.expectEqual(Pane.Notices.Kind.message, pane.notices.kinds[0]);
-
- // ...and it is carried as a tagline band, not a body row: that is what
- // gives it the tagline's height, its small font and its border.
+ // ...on the window's foot row, a tagline-shaped layer, not on a chip
+ // over the pane's body.
var frame = std.heap.ArenaAllocator.init(std.testing.allocator);
defer frame.deinit();
- _ = try p.render(frame.allocator());
- const r = p.view().rects[p.view().active];
- const band = for (p.surface.tagLayers()) |*layer| {
- if (layer.rows != 0 and layer.kind == .notice) break layer;
- } else return error.NoNoticeBand;
- try std.testing.expectEqual(@as(u16, 1), band.viewport.h);
- try std.testing.expectEqual(r.y + BOX_H, band.viewport.y);
- // Right aligned: the text ends at the band's right edge.
- const line = band.cells[0..band.cols];
- var last: usize = line.len;
- while (last > 0 and line[last - 1].grapheme()[0] == ' ') last -= 1;
- try std.testing.expect(last > 0);
- try std.testing.expect(line[0].grapheme()[0] == ' ');
+ const s = try p.render(frame.allocator());
+ try std.testing.expectEqual(@as(u8, 0), pane.notices.len);
+ const row = for (s.tagLayers()) |*layer| {
+ if (layer.rows != 0 and layer.kind == .notice_row) break layer;
+ } else return error.NoNoticeRow;
+ try std.testing.expectEqual(@as(u16, 1), row.viewport.h);
+ try std.testing.expectEqual(p.view().screen_h - 1, row.viewport.y);
+ var want: [64]u8 = undefined;
+ const said = try std.fmt.bufPrint(&want, "\u{2717} @p{d} Wrap: takes on, off", .{pane.serial});
+ const grid = s.cells[@as(usize, row.viewport.y) * s.cols ..][0..s.cols];
+ var text: std.ArrayList(u8) = .empty;
+ defer text.deinit(std.testing.allocator);
+ for (grid) |cell| try text.appendSlice(std.testing.allocator, cell.grapheme());
+ try std.testing.expect(std.mem.indexOf(u8, text.items, said) != null);
// Msg owns the row itself, so it does not announce over its own text.
try std.testing.expect(p.executeBuiltinLine(p.view().active, "Msg hello"));
- try std.testing.expectEqualStrings("hello", pane.msg[0..pane.msg_len]);
+ try std.testing.expectEqualStrings("hello", p.messages.saidBy(pane));
- pane.msg_len = 0;
+ p.messages.live_len = 0;
p.settings.verbose = false;
try std.testing.expect(p.executeBuiltinLine(p.view().active, "Wrap"));
- try std.testing.expectEqual(@as(u16, 0), pane.msg_len);
+ try std.testing.expectEqual(@as(usize, 0), p.messages.saidBy(pane).len);
}
-test "notices stack over the body's top rows without moving them" {
- const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 200, .rows = 24 });
+test "the notice row leads with the most important live message, its count and places, and says how many more; with none, where the caret is" {
+ const p = try Pardes.init(std.testing.allocator, .{ .cols = 80, .rows = 24 });
defer p.deinit();
+ const pane = try p.setTestFile("one\ntwo\nthree\n");
const id = p.view().active;
- const pane = p.panes[id].?;
- p.sync();
- var frame = std.heap.ArenaAllocator.init(std.testing.allocator);
- defer frame.deinit();
-
- const r = p.view().rects[id];
- const top = p.bodyTop(pane, r);
-
- // A message and the leader's line (a shown level's last leaf) at once:
- // two chips, in the order collectNotices chose, each one row tall and
- // each one row further down.
- try std.testing.expect(p.executeBuiltinLine(id, "Msg first message here"));
- p.view().prefix = .leader;
- p.view().leader_n = 0;
- p.view().tag_state.used[0] = 'q';
- p.view().tag_state.due_ns = 1;
- p.clock.now_ns = 1;
- _ = frame.reset(.retain_capacity);
- _ = try p.render(frame.allocator());
- try std.testing.expectEqual(@as(u8, 2), pane.notices.len);
- // An overlay, not a reservation: the body still starts where it did.
- try std.testing.expectEqual(top, p.bodyTop(pane, r));
-
- var seen: usize = 0;
- for (p.surface.tagLayers()) |*layer| {
- if (layer.rows == 0 or layer.kind != .notice) continue;
- try std.testing.expectEqual(@as(u16, 1), layer.viewport.h);
- // Sized to its own message, right up against the pane's right edge --
- // not the width of the pane.
- try std.testing.expectEqual(r.x + r.w, layer.viewport.x + layer.viewport.w);
- try std.testing.expect(layer.viewport.w < r.w - config.GUTTER);
- try std.testing.expect(layer.viewport.y == top or layer.viewport.y == top + 1);
- try std.testing.expectEqual(pane.notices.left[layer.viewport.y - top], layer.viewport.x);
- seen += 1;
- }
- try std.testing.expectEqual(@as(usize, 2), seen);
- // The leader's line is longer than the message, so its chip is wider.
- try std.testing.expect(pane.notices.left[0] > pane.notices.left[1]);
+ p.messages.live_len = 0;
+ p.messages.len = 0;
+ pane.body.cur_row = 1;
+ var buf: [notice_row_cap]u8 = undefined;
+ var row = noticeRow(p, 60, &buf);
+ try std.testing.expectEqualStrings("/test.txt:2", row.text[0..row.left]);
+ try std.testing.expectEqual(@as(usize, 60), panes.File.displayWidth(p.settings.tab, row.text));
+ // A notice, then an error and a warning: the error leads, newest first
+ // within a rank; the others are counted.
+ _ = say(p, .notice, id, "indexed");
+ _ = say(p, .warn, id, "careful");
+ _ = say(p, .@"error", id, "broke");
+ row = noticeRow(p, 60, &buf);
+ try std.testing.expectEqualStrings("\u{2717} /test.txt broke", row.text[0..row.left]);
+ try std.testing.expect(std.mem.endsWith(u8, row.text, "+1 \u{b7} 3 messages \u{b7} SPC h m"));
+ // A burst of the same: one message, counted; the row keeps its width.
+ for (0..9) |_| _ = say(p, .@"error", id, "broke");
+ row = noticeRow(p, 60, &buf);
+ try std.testing.expectEqualStrings("\u{2717} /test.txt broke \u{d7}10", row.text[0..row.left]);
+ try std.testing.expectEqual(@as(usize, 60), panes.File.displayWidth(p.settings.tab, row.text));
+ // An error that names places offers the walk, its places as words.
+ const err = keep(p, .@"error", 0, "@p9 zig build", "exit 1");
+ err.places[0] = .{ .line = 25, .col = 12 };
+ err.places[0].path.set("core/pick.zig");
+ err.places_len = 1;
+ row = noticeRow(p, 80, &buf);
+ try std.testing.expectEqualStrings("\u{2717} @p9 zig build exit 1 core/pick.zig:25:12", row.text[0..row.left]);
+ try std.testing.expect(std.mem.endsWith(u8, row.text, "+1 \u{b7} SPC e walk"));
+ // Too narrow: the left gives way, the right stays whole.
+ row = noticeRow(p, 30, &buf);
+ try std.testing.expect(std.mem.endsWith(u8, row.text, "+1 \u{b7} SPC e walk"));
+ try std.testing.expect(panes.File.displayWidth(p.settings.tab, row.text) <= 30);
+ // A question outranks a warning, not an error; it is counted on the right.
+ _ = keep(p, .question, pane.serial, "/test.txt", "changed on disk");
+ row = noticeRow(p, 80, &buf);
+ try std.testing.expect(std.mem.startsWith(u8, row.text, "\u{2717} @p9"));
+ try std.testing.expect(std.mem.endsWith(u8, row.text, "+2 \u{b7} 1 question \u{b7} SPC e"));
+}
- // Gone with the notices: no stale chip left behind.
- p.view().prefix = .none;
- pane.msg_len = 0;
- _ = frame.reset(.retain_capacity);
- _ = try p.render(frame.allocator());
- for (p.surface.tagLayers()) |*layer|
- try std.testing.expect(layer.rows == 0 or layer.kind != .notice);
+test "a rolled level's last leaf is said on the notice row, the whole row, never in a chip over the body; at rest the row is the messages' again" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 120, .rows = 30 });
+ defer p.deinit();
+ const pane = try p.setTestFile("one\n");
+ p.messages.live_len = 0;
+ p.clock.now_ns = 5 * std.time.ns_per_s;
+ p.clock.stepped_ns = p.clock.now_ns;
+ // SPC t w: Wrap, run from SPC t; then SPC t again, shown.
+ for (" tw t") |c| p.update(.{ .key = .{ .cp = c } });
+ p.advance(p.clock.now_ns);
+ p.clock.now_ns = p.view().tag_state.due_ns;
+ p.sync();
+ _ = try p.render(p.scratch.allocator());
+ var buf: [notice_row_cap]u8 = undefined;
+ var row = noticeRow(p, 110, &buf);
+ try std.testing.expect(std.mem.startsWith(u8, row.text, "w Wrap: "));
+ try std.testing.expect(std.mem.endsWith(u8, row.text, " (last used here)"));
+ try std.testing.expectEqual(row.text.len, row.right);
+ try std.testing.expect(row.lead == null);
+ try std.testing.expectEqual(@as(u8, 0), pane.notices.len);
+ // Narrower than the line: cut to the width, never past it.
+ row = noticeRow(p, 12, &buf);
+ try std.testing.expectEqualStrings("w Wrap: Long", row.text);
+ // Esc: at rest, the messages' (Wrap's echo), and with none where the
+ // caret is.
+ p.update(.{ .key = .{ .cp = pardes.Key.escape } });
+ row = noticeRow(p, 110, &buf);
+ try std.testing.expect(row.lead != null);
+ p.messages.live_len = 0;
+ row = noticeRow(p, 110, &buf);
+ try std.testing.expect(std.mem.startsWith(u8, row.text, "/test.txt:1"));
}
-test "an idle core wants no wake and a lingering message sleeps to its linger's end" {
+test "an idle core wants no wake, and a message wakes it once, when it dims" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 80, .rows = 24 });
defer p.deinit();
while (p.nextEffect()) |_| {}
- const frame = pardes.frame_ns;
p.advance(1_000_000);
+ p.messages.live_len = 0;
try std.testing.expectEqual(@as(?u64, null), p.nextWake());
- const pane = p.panes[p.view().active].?;
- // Shown, a message asks for no wake.
+ try std.testing.expect(p.executeBuiltinLine(p.view().active, "MessageLinger 160"));
try std.testing.expect(p.executeBuiltinLine(p.view().active, "Msg hello"));
- try std.testing.expectEqual(Pane.MessagePhase.shown, pane.msg_life.phase);
+ const said = p.messages.headline().?;
+ try std.testing.expect(!said.faded(p.clock.now_ns, p.settings.message_linger_ms));
+ // The core sleeps to its dimming, not a frame at a time.
+ const frame = pardes.frame_ns;
+ const due = said.t + 160 * std.time.ns_per_ms;
+ const woken = p.nextWake().?;
+ try std.testing.expect(woken >= due and woken < due + frame);
+ p.advance(woken);
+ try std.testing.expect(said.faded(p.clock.now_ns, p.settings.message_linger_ms));
try std.testing.expectEqual(@as(?u64, null), p.nextWake());
- // A key starts the 800 ms linger: the core sleeps to its end, not a
- // frame at a time, and the frames it jumps draw nothing.
- p.update(.{ .key = .{ .cp = 'x' } });
- try std.testing.expectEqual(Pane.MessagePhase.lingering, pane.msg_life.phase);
- const linger = messageFrames(p.settings.message_linger_ms);
- const due = p.clock.stepped_ns + linger * frame;
- try std.testing.expectEqual(@as(?u64, due), p.nextWake());
- p.needs_frame = false;
- p.advance(due - frame);
- try std.testing.expectEqual(@as(?u64, due), p.nextWake());
- try std.testing.expectEqual(Pane.MessagePhase.lingering, pane.msg_life.phase);
- p.advance(due);
- try std.testing.expectEqual(@as(usize, 0), pane.msg_len);
+ // A warning is bright twice as long; with no linger nothing wakes.
+ try std.testing.expect(p.executeBuiltinLine(p.view().active, "MessageLinger 0"));
+ _ = say(p, .warn, p.view().active, "careful");
try std.testing.expectEqual(@as(?u64, null), p.nextWake());
+}
+
+test "a compiler's report names its places: each place's words, the first error's rows after it its detail, a relative path the run's directory's" {
+ var s: Said = .{};
+ const rows = [_][]const u8{
+ "install",
+ "+- compile exe pardes Debug native 1 errors",
+ "core/pick.zig:25:12: error: expected 2 argument(s), found 3",
+ " const best = rank(q, name, 3) orelse continue;",
+ " ^~~~",
+ "core/look.zig:14:5: note: function declared here",
+ "pub fn rank(q: []const u8, name: []const u8) ?u32 {",
+ "error: the following command failed with 1 compilation errors:",
+ };
+ try std.testing.expectEqual(@as(usize, 2), readPlaces(&s, "/src/pardes/", &rows));
+ try std.testing.expectEqualStrings("/src/pardes/core/pick.zig", s.places[0].path.slice());
+ try std.testing.expectEqual(@as(u32, 25), s.places[0].line);
+ try std.testing.expectEqual(@as(u32, 12), s.places[0].col);
+ try std.testing.expectEqualStrings("expected 2 argument(s), found 3", s.places[0].text.slice());
+ try std.testing.expectEqualStrings("note: function declared here", s.places[1].text.slice());
+ try std.testing.expectEqual(@as(u8, 2), s.detail_len);
+ try std.testing.expectEqualStrings(" const best = rank(q, name, 3) orelse continue;", s.detail[0].slice());
+ try std.testing.expectEqualStrings(" ^~~~", s.detail[1].slice());
+ // No error among them: no places.
+ var none: Said = .{};
+ try std.testing.expectEqual(@as(usize, 0), readPlaces(&none, "/", &.{ "x.zig:1:1: note: only a note", "grep: nothing" }));
+}
+
+test "a burst of the same message is one message, counted, and moves nothing on the screen" {
+ const p = try Pardes.init(std.testing.allocator, .{ .cols = 80, .rows = 20 });
+ defer p.deinit();
+ const pane = try p.setTestFile("text\n");
+ const id = p.view().active;
+ _ = say(p, .@"error", id, "workspace/didChangeWatchedFiles: 3 files");
+ p.sync();
+ const rects = p.view().rects;
+ const tag_rows = pane.tag_rows;
+ for (0..9) |_| _ = say(p, .@"error", id, "workspace/didChangeWatchedFiles: 3 files");
+ p.sync();
+ try std.testing.expectEqual(@as(u8, 1), p.messages.live_len);
+ try std.testing.expectEqual(@as(u16, 10), p.messages.headline().?.n);
+ try std.testing.expectEqual(rects, p.view().rects);
+ try std.testing.expectEqual(tag_rows, pane.tag_rows);
+ var buf: [notice_row_cap]u8 = undefined;
+ const row = noticeRow(p, 78, &buf);
+ try std.testing.expect(std.mem.endsWith(u8, row.text[0..row.left], "3 files \u{d7}10"));
+}
+
+test "a file changed on disk under unsaved text asks in its tag and never takes the keyboard: SPC e's keyboard answers, d shows the disk's lines as ghosts, Esc leaves it waiting, B2 on Reload reads it again" {
+ const p = try Pardes.init(std.testing.allocator, .{ .cols = 120, .rows = 20 });
+ defer p.deinit();
+ var tmp = std.testing.tmpDir(.{});
+ defer tmp.cleanup();
+ try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "c.zig", .data = "one\ntwo\nthree\n" });
+ var dir: [4096]u8 = undefined;
+ const path = try std.fmt.allocPrint(std.testing.allocator, "{s}/c.zig", .{dir[0..try tmp.dir.realPath(std.testing.io, &dir)]});
+ defer std.testing.allocator.free(path);
+ const pane = try p.setTestFile("one\ntwo\nthree\n");
+ const id = p.view().active;
+ p.gpa.free(pane.file.?.path);
+ pane.file.?.path = try p.gpa.dupe(u8, path);
+ const f = &pane.file.?;
+ f.saved_hash = panes.File.fileHash(f);
+ // Unsaved: a line typed at the end.
+ for ([_]u21{ 'G', 'o', 'f', 'o', 'u', 'r', Key.escape }) |cp| p.update(.{ .key = .{ .cp = cp } });
+ try std.testing.expect(f.revision != f.saved_revision);
+ const disk = "zero\none\ntwo\nthree\n";
+ try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "c.zig", .data = disk });
+ p.update(.{ .file_changed = .{ .pane = .at(id), .bytes = disk } });
+ const i = p.messages.waiting(pane) orelse return error.NotAsked;
+ try std.testing.expectEqual(Kind.question, p.messages.live[i].kind);
+ // In its tag at rest, its answers offered in place of the tag's own
+ // words (the head, walk UI R1), read-only; its mark `?`.
+ var frame = std.heap.ArenaAllocator.init(std.testing.allocator);
+ defer frame.deinit();
+ const shown = try pardes.tagline.tagText(p, frame.allocator(), pane);
+ try std.testing.expect(std.mem.endsWith(u8, shown, " changed on disk \u{25b8} r Reload k Keep mine d Diff \u{b7} SPC e to answer"));
+ try std.testing.expect(std.mem.startsWith(u8, shown, path));
+ try std.testing.expectEqual(Kind.question, p.messages.markOf(pane).?);
+ try std.testing.expect(std.mem.indexOf(u8, shown, "Save") == null);
+ const prefix = try pardes.tagline.tagPrefix(p, pane);
+ try std.testing.expect(std.mem.indexOf(u8, prefix, "changed on disk") == null);
+ // The tag's own text is no one's to edit meanwhile.
+ try std.testing.expect((try pardes.TagState.head(p, frame.allocator(), pane)) != null);
+ // Out of rest (SPC: its key cell at once) the level's head, not the
+ // question; at rest again, the question.
+ p.update(.{ .key = .{ .cp = ' ' } });
+ try std.testing.expect(std.mem.indexOf(u8, try pardes.tagline.tagText(p, frame.allocator(), pane), "changed on disk") == null);
+ p.update(.{ .key = .{ .cp = Key.escape } });
+ try std.testing.expect(std.mem.indexOf(u8, try pardes.tagline.tagText(p, frame.allocator(), pane), "changed on disk") != null);
+ try std.testing.expectEqualStrings("Reload", p.messages.waitingAnswers(pane)[0].word);
+ // The keyboard is not its: `r` is the body's (helix's replace).
+ p.update(.{ .key = .{ .cp = 'k' } });
+ try std.testing.expect(p.messages.waiting(pane) != null);
+ // Given the keyboard: `d` shows the disk's lines and keeps asking; Esc
+ // leaves it waiting.
+ p.view().answering = pane.serial;
+ p.update(.{ .key = .{ .cp = 'd' } });
+ const asked = &p.messages.live[p.messages.waiting(pane).?];
+ try std.testing.expect(asked.open);
+ try std.testing.expectEqual(@as(u32, 1), asked.places[0].line);
+ try std.testing.expectEqualStrings("+zero", asked.detail[0].slice());
+ try std.testing.expectEqual(pane.serial, p.view().answering);
+ p.update(.{ .key = .{ .cp = Key.escape } });
+ try std.testing.expectEqual(@as(u32, 0), p.view().answering);
+ try std.testing.expect(p.messages.waiting(pane) != null);
+ // B2 on `Reload` in its tag: read again, the question gone.
+ try std.testing.expectEqual(@as(?usize, null), pardes.exec.execute(p, id, "Reload"));
+ while (p.nextEffect()) |_| {}
+ try std.testing.expect(p.messages.waiting(pane) == null);
+ try std.testing.expectEqualStrings(disk, p.panes[id].?.file.?.content);
+}
- // A long linger ends when it says, jumped in one step, not stretched by
- // the cap on catching up with moving frames.
- try std.testing.expect(p.executeBuiltinLine(p.view().active, "MessageLinger 5000"));
- try std.testing.expect(p.executeBuiltinLine(p.view().active, "Msg again"));
- p.update(.{ .key = .{ .cp = 'x' } });
- const long_due = p.clock.stepped_ns + messageFrames(5000) * frame;
- try std.testing.expectEqual(@as(?u64, long_due), p.nextWake());
- p.advance(long_due);
- try std.testing.expectEqual(@as(usize, 0), pane.msg_len);
+test "SPC e on an error that names places lists them under the pane and lands on the first, on a question gives its tag the keyboard, and on anything else opens the history, the newest first" {
+ const p = try Pardes.init(std.testing.allocator, .{ .cols = 100, .rows = 30 });
+ defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
+ const pane = try p.setTestFile("one\ntwo\nthree\nfour\nfive\n");
+ const serial = pane.serial;
+ p.messages.live_len = 0;
+ const err = keep(p, .@"error", 0, "@p9 zig build", "exit 1");
+ for ([_]u32{ 2, 4 }, 0..) |line, k| {
+ err.places[k] = .{ .line = line, .col = 1 };
+ err.places[k].path.set("/test.txt");
+ err.places[k].text.set("bad");
+ }
+ err.places_len = 2;
+ p.update(.{ .key = .{ .cp = ' ' } });
+ p.update(.{ .key = .{ .cp = 'e' } });
+ while (p.nextEffect()) |_| {}
+ try std.testing.expect(p.messages.headline() == null);
+ const here = p.paneBySerial(serial).?;
+ const list = p.panes[p.panes[here].?.search_pane orelse return error.NoList].?;
+ try std.testing.expect(std.mem.indexOf(u8, list.file.?.content, "/test.txt:4:1") != null);
+ try std.testing.expectEqual(@as(i32, 1), p.panes[here].?.body.cur_row);
+ // A question: its tag gets the keyboard.
+ keep(p, .question, serial, "/test.txt", "changed on disk").asks = .disk;
+ try std.testing.expect(p.executeBuiltinLine(here, "Message"));
+ try std.testing.expectEqual(serial, p.view().answering);
+ p.update(.{ .key = .{ .cp = Key.escape } });
+ try std.testing.expectEqual(@as(u32, 0), p.view().answering);
+ // Anything else: the history, the newest first, each with its glyph.
+ p.messages.live_len = 0;
+ _ = say(p, .notice, here, "older words");
+ _ = say(p, .warn, here, "newer words");
+ try std.testing.expect(p.executeBuiltinLine(here, "Message"));
+ const said_so_far = for (p.panes) |slot| {
+ const shown = slot orelse continue;
+ const f = shown.file orelse continue;
+ if (std.mem.endsWith(u8, f.path, config.messages_buffer)) break f.content;
+ } else return error.NoHistory;
+ const newer = std.mem.indexOf(u8, said_so_far, "! ") orelse return error.NoGlyph;
+ try std.testing.expect(newer < std.mem.indexOf(u8, said_so_far, "older words").?);
+}
+
+test "where jumps walk, SPC e lands an error's places as a list in the pane's walk, n walking them; SPC h m is a picker over the history in the pane's tag, the newest first, Enter on a message going to its cause, C-q keeping it as a +Messages" {
+ const p = try Pardes.init(std.testing.allocator, .{ .cols = 100, .rows = 30 });
+ defer p.deinit();
+ p.settings.jumps = .walk;
+ const pane = try p.setTestFile("one\ntwo\nthree\nfour\nfive\n");
+ const id = p.view().active;
+ p.messages.live_len = 0;
+ const err = keep(p, .@"error", 0, "@p9 zig build", "exit 1");
+ for ([_]u32{ 2, 4 }, 0..) |line, k| {
+ err.places[k] = .{ .line = line, .col = 1 };
+ err.places[k].path.set("/test.txt");
+ err.places[k].text.set("bad");
+ }
+ err.places_len = 2;
+ var panes_before: usize = 0;
+ for (p.panes) |slot| panes_before += @intFromBool(slot != null);
+ for (" e") |c| p.update(.{ .key = .{ .cp = c } });
+ while (p.nextEffect()) |_| {}
+ try std.testing.expect(p.messages.headline() == null);
+ // Landed in this reading pane, no pane made: on the first place, the
+ // list's word in its trail.
+ var panes_now: usize = 0;
+ for (p.panes) |slot| panes_now += @intFromBool(slot != null);
+ try std.testing.expectEqual(panes_before, panes_now);
+ try std.testing.expectEqual(id, p.view().active);
+ try std.testing.expectEqual(@as(i32, 1), pane.body.cur_row);
+ var frame = std.heap.ArenaAllocator.init(std.testing.allocator);
+ defer frame.deinit();
+ try std.testing.expect(std.mem.indexOf(u8, try pardes.tagline.tagText(p, frame.allocator(), pane), "\u{2717} @p9 zig build 1/2") != null);
+ // n: the next place, the word saying so.
+ p.update(.{ .key = .{ .cp = 'n' } });
+ try std.testing.expectEqual(@as(i32, 3), pane.body.cur_row);
+ try std.testing.expect(std.mem.indexOf(u8, try pardes.tagline.tagText(p, frame.allocator(), pane), "\u{2717} @p9 zig build 2/2") != null);
+ // SPC h m: the history in this pane's tag, a row a message, the newest
+ // first; no pane made.
+ _ = say(p, .echo, id, "older");
+ _ = say(p, .warn, id, "newest");
+ for (" hm") |c| p.update(.{ .key = .{ .cp = c } });
+ while (p.nextEffect()) |_| {}
+ try std.testing.expectEqual(pardes.TagState.Kind.pick, p.view().tag_state.kind);
+ const pk = pardes.Pick.live(p).?;
+ try std.testing.expectEqual(pardes.Pick.Source.messages, pk.source);
+ var marks: [256]u16 = undefined;
+ var nmarks: usize = 0;
+ // (Row 0 is the word's own echo, `Messages`, said as it ran.)
+ try std.testing.expect(std.mem.indexOf(u8, pk.names.row(1, &marks, &nmarks), "newest") != null);
+ try std.testing.expect(std.mem.indexOf(u8, pk.names.row(2, &marks, &nmarks), "older") != null);
+ // Enter on a message: its cause's pane has the keyboard, the picker
+ // rolled up; then the history again.
+ p.update(.{ .key = .{ .cp = Key.down } });
+ p.update(.{ .key = .{ .cp = Key.enter } });
+ while (p.nextEffect()) |_| {}
+ try std.testing.expectEqual(pardes.TagState.Kind.rest, p.view().tag_state.kind);
+ try std.testing.expectEqual(id, p.view().active);
+ for (" hm") |c| p.update(.{ .key = .{ .cp = c } });
+ while (p.nextEffect()) |_| {}
+ try std.testing.expectEqual(pardes.TagState.Kind.pick, p.view().tag_state.kind);
+ // C-q: kept as the +Messages, the picker rolled up.
+ p.update(.{ .key = .{ .cp = 'q', .ctrl = true } });
+ while (p.nextEffect()) |_| {}
+ try std.testing.expectEqual(pardes.TagState.Kind.rest, p.view().tag_state.kind);
+ panes_now = 0;
+ for (p.panes) |slot| panes_now += @intFromBool(slot != null);
+ try std.testing.expectEqual(panes_before + 1, panes_now);
+ const kept = p.panes[p.view().active].?;
+ try std.testing.expect(std.mem.endsWith(u8, kept.file.?.path, config.messages_buffer));
+}
+
+test "Esc at rest takes a search's tints first, then the warnings and errors, and only then goes back" {
+ const p = try Pardes.init(std.testing.allocator, .{ .cols = 100, .rows = 30 });
+ defer p.deinit();
+ const pane = try p.setTestFile("alpha beta alpha\n");
+ const id = p.view().active;
+ p.messages.live_len = 0;
+ p.update(.{ .key = .{ .cp = '*' } });
+ p.update(.{ .key = .{ .cp = 'n' } });
+ while (p.nextEffect()) |_| {}
+ if (pane.places.pattern.len == 0 and pane.places.hits.items.len == 0) return error.NoTints;
+ _ = say(p, .@"error", id, "broke");
+ p.update(.{ .key = .{ .cp = Key.escape } });
+ try std.testing.expect(pane.places.pattern.len == 0 and pane.places.hits.items.len == 0);
+ try std.testing.expectEqual(@as(u8, 1), p.messages.live_len);
+ p.update(.{ .key = .{ .cp = Key.escape } });
+ try std.testing.expectEqual(@as(u8, 0), p.messages.live_len);
+ try std.testing.expectEqual(id, p.view().active);
}
diff --git a/core/Output.zig b/core/Output.zig
index b64d2ff3..fe1543fe 100644
--- a/core/Output.zig
+++ b/core/Output.zig
@@ -985,19 +985,32 @@ pub fn openConfig(p: *Pardes, id: usize) !void {
return openRead(p, id, .{ .cmd = .DumpConfig }, "", content);
}
-/// The message-row log, oldest first — the lines that were said in passing and
-/// then cleared by the next keystroke.
+/// The messages' history (the log ring), the newest first, each with its
+/// kind's glyph, a live error's places under it: the +Messages' text and
+/// the Messages picker's rows (SPC h m).
+pub fn messagesText(p: *Pardes, w: *std.Io.Writer) !void {
+ var i: usize = p.messages.len;
+ while (i > 0) {
+ i -= 1;
+ const m = p.messages.at(i).?;
+ try w.print("{s} ", .{m.kind.glyph()});
+ if (m.serial != 0) try w.print("{d}: ", .{m.serial});
+ try w.writeAll(m.slice());
+ if (m.repeats > 1) try w.print(" (x{d})", .{m.repeats});
+ try w.writeByte('\n');
+ for (p.messages.live[0..p.messages.live_len]) |*s| {
+ if (s.kind != .@"error" or s.places_len == 0 or !std.mem.eql(u8, pardes.Messages.Message.body(s.text.slice()), pardes.Messages.Message.body(m.slice()))) continue;
+ for (s.places[0..s.places_len]) |*place| try w.print(" {s}:{d}:{d} {s}\n", .{ place.path.slice(), place.line, place.col, place.text.slice() });
+ break;
+ }
+ }
+ if (p.messages.len == 0) try w.writeAll("nothing has been said yet\n");
+}
+
pub fn openMessages(p: *Pardes, id: usize) !void {
var out: std.Io.Writer.Allocating = .init(p.gpa);
errdefer out.deinit();
- var i: usize = 0;
- while (p.messages.at(i)) |m| : (i += 1) {
- if (m.serial != 0) try out.writer.print("{d}: ", .{m.serial});
- try out.writer.writeAll(m.slice());
- if (m.repeats > 1) try out.writer.print(" (x{d})", .{m.repeats});
- try out.writer.writeByte('\n');
- }
- if (i == 0) try out.writer.writeAll("nothing has been said yet\n");
+ try messagesText(p, &out.writer);
const content = try out.toOwnedSlice();
return openRead(p, id, .{ .cmd = .Messages }, "", content);
}
diff --git a/core/Pick.zig b/core/Pick.zig
index 7913a7e0..6c86cb98 100644
--- a/core/Pick.zig
+++ b/core/Pick.zig
@@ -46,9 +46,11 @@ const Key = pardes.Key;
/// under the asking pane's directory, the lines of them holding the
/// query, the files opened lately, the panes, the asking text's
/// declarations, the lines holding the query in every open pane (All, its
-/// places in each), the jump list, and rows handed over (a language
-/// server's answer), titled by their word.
-pub const Source = enum { find, grep, recent, panes, symbols, all, jumplist, list };
+/// places in each), the jump list, rows handed over (a language server's
+/// answer, SPC e's places), titled by their word, the messages' history
+/// (SPC h m), and the themes (SPC t t, the window wearing the one under
+/// the cursor).
+pub const Source = enum { find, grep, recent, panes, symbols, all, jumplist, list, messages, themes };
/// Each source's word in the tag and the leader keys of the builtin that
/// opens it, its key cells (`␣ f Find`).
@@ -61,6 +63,8 @@ const words = std.EnumArray(Source, struct { word: []const u8, keys: []const u8
.all = .{ .word = "All", .keys = "" },
.jumplist = .{ .word = "Jumplist", .keys = "j" },
.list = .{ .word = "List", .keys = "l" },
+ .messages = .{ .word = "Messages", .keys = "hm" },
+ .themes = .{ .word = "Themes", .keys = "t" },
});
/// The pickers kept after they roll up, for their list words and Resume.
@@ -181,6 +185,8 @@ pub fn open(p: *Pardes, from: usize, source: Source, word: []const u8, query: []
unroll(p, pk, query);
start(p, pk);
filter(p, pk);
+ // The themes: the cursor on the one worn (their order, the field empty).
+ if (source == .themes and query.len == 0 and p.custom_theme == null) p.view().tag_state.rows.at = @intCast(p.settings.theme);
}
/// A new picker in the ring, the oldest kept one dropped for it.
@@ -217,6 +223,13 @@ fn hostIn(p: *Pardes, pk: *Pick, from: usize) !void {
const asker = p.panes[from].?;
pk.owner = asker.serial;
pk.made = false;
+ // A theme is no place: its list is the asking pane's own tag (§3.5),
+ // and its preview the whole window.
+ if (pk.source == .themes) {
+ pk.landing = asker.serial;
+ p.view().active = from;
+ return;
+ }
const reader = if (Trail.reading(p, asker)) from else Trail.readerOf(p, asker);
pk.landing = p.panes[reader orelse try landingFor(p, from)].?.serial;
pk.made = reader == null;
@@ -247,6 +260,8 @@ fn unroll(p: *Pardes, pk: *Pick, query: []const u8) void {
s.rows = .{ .at = @intCast(@min(pk.at, std.math.maxInt(u16))) };
pk.unrolled = true;
pk.shown = no_row;
+ // The whole window previews a theme: no pane dimmed (SPEC §3.6).
+ if (pk.source == .themes) s.previewing = .full;
if (p.paneBySerial(pk.landing)) |id| {
s.previewing.set(id);
const pane = p.panes[id].?;
@@ -278,6 +293,15 @@ fn start(p: *Pardes, pk: *Pick) void {
addRows(p, pk, out.written());
},
.list => addRows(p, pk, pk.rows),
+ .messages => {
+ var out: std.Io.Writer.Allocating = .init(p.gpa);
+ defer out.deinit();
+ Output.messagesText(p, &out.writer) catch return;
+ addRows(p, pk, out.written());
+ },
+ .themes => for (pardes.colors.themes, 0..) |t, i| {
+ pk.names.add(p.gpa, t.name, 0, t.name.len, 0, @intCast(i)) catch return;
+ },
}
}
@@ -375,6 +399,8 @@ pub fn declsArrived(p: *Pardes, serial: u32) void {
pub fn produceAll(p: *Pardes, tick: bool) void {
for (p.picks) |slot| if (slot) |pk| if (pk.unrolled) {
if (pk.names.busy()) pk.names.rescore(p.gpa);
+ // A theme's preview in the step of the key that moved to it.
+ if (pk.source == .themes) pardes.colors.previewTheme(p, themeAt(p, pk));
if (tick) preview(p, pk);
};
}
@@ -389,6 +415,14 @@ pub fn busy(p: *const Pardes) bool {
// ---- the rows ----
+/// The theme the cursor of a themes picker is on.
+fn themeAt(p: *const Pardes, pk: *const Pick) ?usize {
+ const n = pk.names.hits.items.len;
+ if (n == 0) return null;
+ const at = @min(p.view().tag_state.rows.at, n - 1);
+ return pk.names.cands.items[pk.names.hits.items[at].cand].ref;
+}
+
/// The rows the list has now.
pub fn count(p: *const Pardes, pk: *const Pick) usize {
if (fuzzy(pk)) return pk.names.hits.items.len;
@@ -492,6 +526,7 @@ fn rowAt(p: *Pardes, pk: *const Pick, arena: std.mem.Allocator, i: usize) !Row {
const f = owner.file orelse return row;
row.target = .{ .place = .{ .path = f.path, .at = .{ .line = cand.ref } } };
},
+ .themes => {},
.recent, .jumplist, .list, .grep, .all => {
const t = look.parsePathLine(text);
row.pre = @intCast(t.end);
@@ -499,6 +534,24 @@ fn rowAt(p: *Pardes, pk: *const Pick, arena: std.mem.Allocator, i: usize) !Row {
const path = if (t.path[0] == '/' or t.path[0] == '@') t.path else try std.Io.Dir.path.join(arena, &.{ dir, t.path });
row.target = .{ .place = .{ .path = path, .at = t.at } };
},
+ // A message (`✗ 3: words`, Output.messagesText): its cause's pane
+ // while it is open; a place under it (indented): that place.
+ .messages => {
+ const lead = text.len - std.mem.trimStart(u8, text, " ").len;
+ if (lead == 0) {
+ const sp = std.mem.indexOfScalar(u8, text, ' ') orelse return row;
+ const digits = text[sp + 1 ..];
+ const n = std.mem.indexOfNone(u8, digits, "0123456789") orelse return row;
+ if (n == 0 or digits[n] != ':') return row;
+ const serial = std.fmt.parseInt(u32, digits[0..n], 10) catch return row;
+ if (p.paneBySerial(serial) != null) row.target = .{ .pane = serial };
+ return row;
+ }
+ const t = look.parsePathLine(text[lead..]);
+ row.pre = @intCast(lead + t.end);
+ if (t.path.len == 0) return row;
+ row.target = .{ .place = .{ .path = t.path, .at = t.at } };
+ },
}
return row;
}
@@ -534,6 +587,12 @@ pub fn head(p: *Pardes, arena: std.mem.Allocator, pane: *Pane) !?TagState.Head {
try text.print(arena, " {d}/{d}", .{ if (n == 0) 0 else s.rows.at + 1, n });
if (pk.marks.items.len > 0) try text.print(arena, " •{d}", .{pk.marks.items.len});
if (pk.names.busy() or p.stream.busyFor(pk.id)) try text.appendSlice(arena, " ⋯");
+ // Themes have no acts and no other sources: no second row.
+ if (pk.source == .themes) {
+ try text.appendSlice(arena, " ⏎ wear it · esc");
+ for (cells[0..ncells]) |c| try spans.append(arena, .{ .lo = c[0], .hi = c[1], .style = .key });
+ return .{ .text = text.items, .spans = spans.items, .cells = @intCast(ncells), .caret = caret };
+ }
// The second row: the spines go on through it from the key cells,
// then the other sources' words, each switching to it.
try text.append(arena, '\n');
@@ -553,7 +612,7 @@ pub fn head(p: *Pardes, arena: std.mem.Allocator, pane: *Pane) !?TagState.Head {
for (acts) |act| if (offered(pk, act)) try text.print(arena, "{s} ", .{act.word});
try text.appendSlice(arena, "|");
var first = false;
- inline for (comptime std.enums.values(Source)) |src| if (src != .list) {
+ inline for (comptime std.enums.values(Source)) |src| if (src != .list and src != .messages and src != .themes) {
if (src != pk.source) {
if (!first) try text.append(arena, ' ');
first = false;
@@ -697,6 +756,7 @@ fn openText(p: *Pardes, path: []const u8) ?[]u8 {
/// The landing pane as the picker found it: its own text back, or the
/// pane made for the picker taken away; the places it lit put out.
fn restore(p: *Pardes, pk: *Pick) void {
+ if (pk.source == .themes) return pardes.colors.previewTheme(p, null);
const id = p.paneBySerial(pk.landing) orelse return;
for (p.panes) |slot| if (slot) |tp| if (tp.places.from == pk.id) tp.places.clear(p.gpa);
if (pk.made) {
@@ -779,6 +839,18 @@ pub fn key(p: *Pardes, k: Key) void {
return;
}
if (pk.spine == .acts) return actKey(p, pk, k);
+ // Themes: Enter wears the one under the cursor; the rows and the field.
+ if (pk.source == .themes) {
+ if (plain and k.cp == Key.enter) {
+ const at = themeAt(p, pk) orelse return;
+ TagState.toRest(p);
+ pardes.colors.setThemeIndex(p, at);
+ return;
+ }
+ if (s.rows.key(k, n)) return;
+ if (s.field.key(k)) filter(p, pk);
+ return;
+ }
if (pk.spine == .edit) {
if (plain and k.cp == Key.enter) return editRows(p, pk);
if (plain and k.cp == Key.backspace and s.field.len == 0 or alt and k.cp == 'h') {
@@ -961,6 +1033,11 @@ fn back(p: *Pardes, pk: *Pick) void {
fn keep(p: *Pardes, pk: *Pick) void {
const s = &p.view().tag_state;
const from = p.paneBySerial(pk.owner) orelse p.view().active;
+ // The history kept is the +Messages (SPEC §10.4).
+ if (pk.source == .messages) {
+ TagState.toRest(p);
+ return Output.openMessages(p, from) catch |err| p.reportError(.at(from), "messages", err);
+ }
var out: std.Io.Writer.Allocating = .init(p.gpa);
defer out.deinit();
var arena = std.heap.ArenaAllocator.init(p.gpa);
@@ -1779,3 +1856,41 @@ test "a picker from a reading pane unrolls in that pane, its own text set aside
try std.testing.expect(p.panes[id].?.file.?.output == null);
try std.testing.expectEqual(npanes, paneCount(p));
}
+
+test "SPC t t is a picker of the themes in the asking pane's tag, the whole window wearing the row under the cursor and nothing dimmed; Esc puts the theme back, Enter wears it" {
+ const Key_ = pardes.Key;
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 120, .rows = 30 });
+ defer p.deinit();
+ _ = try p.setTestFile("one\n");
+ const asker = p.view().active;
+ p.newScratchBelow(asker);
+ p.view().active = asker;
+ p.settings.jumps = .walk;
+ const themes = pardes.colors.themes;
+ const was = p.settings.theme;
+ const worn = p.theme().name;
+ for (" tt") |c| p.update(.{ .key = .{ .cp = c } });
+ const s = &p.view().tag_state;
+ try std.testing.expectEqual(TagState.Kind.pick, s.kind);
+ try std.testing.expectEqual(Source.themes, live(p).?.source);
+ try std.testing.expectEqual(p.panes[asker].?.serial, s.host);
+ try std.testing.expectEqual(@as(u16, @intCast(was)), s.rows.at);
+ try std.testing.expectEqual(pardes.MAX_PANES, s.previewing.count());
+ // Down: the window wears the next theme, the session's unchanged.
+ p.update(.{ .key = .{ .cp = if (was + 1 < themes.len) Key_.down else Key_.up } });
+ const shown = s.rows.at;
+ try std.testing.expect(std.mem.eql(u8, p.theme().name, themes[shown].name) and shown != was);
+ try std.testing.expectEqual(was, p.settings.theme);
+ // Esc: its own again.
+ p.update(.{ .key = .{ .cp = Key_.escape } });
+ try std.testing.expectEqualStrings(worn, p.theme().name);
+ try std.testing.expect(p.theme_preview == null);
+ // Again, and Enter wears it.
+ for (" tt") |c| p.update(.{ .key = .{ .cp = c } });
+ p.update(.{ .key = .{ .cp = if (was + 1 < themes.len) Key_.down else Key_.up } });
+ p.update(.{ .key = .{ .cp = Key_.enter } });
+ try std.testing.expectEqual(@as(@TypeOf(p.settings.theme), @intCast(shown)), p.settings.theme);
+ try std.testing.expectEqual(TagState.Kind.rest, s.kind);
+ try std.testing.expect(p.theme_preview == null);
+ try std.testing.expectEqualStrings(themes[shown].name, p.theme().name);
+}
diff --git a/core/Pipe.zig b/core/Pipe.zig
index 012ce689..1dc69d49 100644
--- a/core/Pipe.zig
+++ b/core/Pipe.zig
@@ -18,12 +18,17 @@ const Pipe = @This();
/// A pipe's run, an Edit's and its writes, out with the host: errands of
/// the session that performs them, not a dump's (core/walk.zig).
-pub const replica = .{ .authority = .{ "wait", "edit_run", "writes" } };
+pub const replica = .{ .authority = .{ "wait", "preview", "edit_run", "writes" } };
/// Bumped for every request, so a late answer to an older one is ignored.
seq: u32 = 0,
/// The request in flight, and what it needs to apply its answer.
wait: ?PendingPipe = null,
+/// A pipe prompt's live run (Prompt.zig, pick-ui SPEC §7.4): each
+/// selection through the command as typed, each run's outcome its own
+/// (`framed`), drawn as ghost lines and counted; Enter applies the ones
+/// that worked from it.
+preview: ?PendingPipe = null,
/// An Edit waiting on its `<`, `|` and `>` commands, which share the ids.
edit_run: ?*edit_cmd.Pending = null,
/// What an Edit's `w` took, for the `edit_write` effect to write.
@@ -31,6 +36,7 @@ writes: std.ArrayList(edit_cmd.Write) = .empty,
pub fn deinit(pipe: *Pipe, gpa: std.mem.Allocator) void {
if (pipe.wait) |*wait| wait.deinit();
+ if (pipe.preview) |*running| running.deinit();
if (pipe.edit_run) |pending| pending.deinit(gpa);
for (pipe.writes.items) |*w| w.deinit(gpa);
pipe.writes.deinit(gpa);
@@ -72,6 +78,12 @@ pub const PendingPipe = struct {
explicit: bool,
how: modal.Normal.PipeBehavior,
nranges: u16,
+ /// A live run's: the command as typed, and once answered each run's
+ /// output, stderr and exit status (`framed`).
+ typed: []u8 = &.{},
+ outs: [][]const u8 = &.{},
+ errs: [][]const u8 = &.{},
+ codes: []u8 = &.{},
pub fn deinit(wait: *PendingPipe) void {
wait.arena.deinit();
@@ -88,14 +100,10 @@ pub const PendingPipe = struct {
}
};
+/// The notice band's pipe prompt answered (a tag's text, a header's).
pub fn submitPipe(p: *Pardes, id: usize) void {
const pane = p.panes[id] orelse return;
const t = panes.promptTarget(p, pane) orelse return;
- if (t.what == .body) {
- const f = pane.file orelse return;
- if (!panes.Output.fileTraits(f.output).saves) return;
- }
- const content = edit.flatSurface(p.editor(), t) catch |err| return p.reportError(.at(id), "pipe", err);
const how = switch (pane.prompt) {
.pipe => |pipe| pipe,
else => return,
@@ -103,7 +111,39 @@ pub fn submitPipe(p: *Pardes, id: usize) void {
const armed = pane.promptText() orelse return;
const marker = pipeMarker(how);
if (!std.mem.startsWith(u8, armed, marker)) return;
- const command = armed[marker.len..];
+ submit(p, id, t, how, armed[marker.len..]);
+}
+
+/// Pipe text `t` of pane `id` through `command`, `how` says: one run per
+/// selection, off the loop.
+pub fn submit(p: *Pardes, id: usize, t: *Text, how: modal.Normal.PipeBehavior, command: []const u8) void {
+ send(p, id, t, how, command, false);
+}
+
+/// The same run, live under a pipe prompt (`preview`): its outcome per
+/// selection, the text left alone.
+pub fn live(p: *Pardes, id: usize, t: *Text, how: modal.Normal.PipeBehavior, command: []const u8) void {
+ send(p, id, t, how, command, true);
+}
+
+/// The live run let go: its answer, when it comes, is no one's.
+pub fn dropLive(p: *Pardes) void {
+ if (p.pipe.preview) |*old| old.deinit();
+ p.pipe.preview = null;
+}
+
+/// A live run's command: its stdout as it is, then its stderr and its exit
+/// status after a record separator each, so that each selection's run says
+/// how it went where the runner's answer is all or nothing (as `$` does).
+const framed = "exec 3>&1; e=$( {{ (\n{s}\n) 1>&3; }} 2>&1 ); s=$?; printf '\\036%s\\036%s' \"$e\" \"$s\"";
+
+fn send(p: *Pardes, id: usize, t: *Text, how: modal.Normal.PipeBehavior, command: []const u8, preview: bool) void {
+ const pane = p.panes[id] orelse return;
+ if (t.what == .body) {
+ const f = pane.file orelse return;
+ if (!panes.Output.fileTraits(f.output).saves) return;
+ }
+ const content = edit.flatSurface(p.editor(), t) catch |err| return p.reportError(.at(id), "pipe", err);
if (command.len == 0) return;
var ranges: [panes.Text.max_selections]modal.Selection = undefined;
@@ -123,15 +163,20 @@ pub fn submitPipe(p: *Pardes, id: usize) void {
// `$` wants a verdict per selection where the runner's is all or
// nothing: the command runs in a subshell whose exit status becomes the
// output, so the runner always succeeds and the answer says which kept
- const command_copy = (if (how == .keep)
+ const command_copy = (if (preview)
+ std.fmt.allocPrint(arena, framed, .{command})
+ else if (how == .keep)
std.fmt.allocPrint(arena, "(\n{s}\n) >/dev/null; echo $?", .{command})
else
arena.dupe(u8, command)) catch return arena_state.deinit();
+ const typed: []u8 = if (preview) arena.dupe(u8, command) catch return arena_state.deinit() else &.{};
const cwd_copy = arena.dupe(u8, Pardes.paneDir(pane)) catch return arena_state.deinit();
p.pipe.seq +%= 1;
- if (p.pipe.wait) |*old| old.deinit();
- p.pipe.wait = .{
+ const slot = if (preview) &p.pipe.preview else &p.pipe.wait;
+ if (slot.*) |*old| old.deinit();
+ slot.* = .{
+ .typed = typed,
.id = p.pipe.seq,
.pane = .at(id),
.serial = pane.serial,
@@ -158,6 +203,9 @@ pub fn pipeRequest(pipe: *const Pipe, id: u32) ?selection_pipe.Request {
if (pipe.wait) |*wait| {
if (wait.id == id) return wait.request();
}
+ if (pipe.preview) |*live_run| {
+ if (live_run.id == id) return live_run.request();
+ }
if (pipe.edit_run) |pending| if (pending.id == id) return pending.request;
return null;
}
@@ -241,6 +289,7 @@ pub fn pipeResponse(
failure: ?selection_pipe.Failure,
) void {
if (p.pipe.edit_run) |pending| if (pending.id == id) return edit_cmd.finish(p, success, outputs, failure);
+ if (p.pipe.preview) |*live_run| if (live_run.id == id) return answered(live_run, success, outputs, failure);
// A SUPERSEDED OR UNKNOWN id is the one silence worth keeping: it is
// the answer to a question nobody is still asking.
if (p.pipe.wait == null or p.pipe.wait.?.id != id) return;
@@ -249,6 +298,60 @@ pub fn pipeResponse(
defer wait.deinit();
if (!success or outputs.len != wait.inputs.len) return pipeFailed(p, &wait, failure);
+ apply(p, &wait, outputs, null);
+}
+
+/// A live run answered: each run's stdout, stderr and status from what
+/// `framed` made of it; a run the runner itself failed (no shell, too
+/// much output) says so, as each of them.
+fn answered(live_run: *PendingPipe, success: bool, outputs: []const []const u8, failure: ?selection_pipe.Failure) void {
+ const a = live_run.arena.allocator();
+ const n = live_run.inputs.len;
+ const outs = a.alloc([]const u8, n) catch return;
+ const errs = a.alloc([]const u8, n) catch return;
+ const codes = a.alloc(u8, n) catch return;
+ for (outs, errs, codes, 0..) |*out, *err, *code, i| {
+ out.* = "";
+ err.* = "";
+ code.* = 255;
+ if (!success or outputs.len != n) {
+ if (failure) |f| {
+ code.* = if (f.kind == .exit) f.code else 255;
+ err.* = a.dupe(u8, f.stderr) catch "";
+ }
+ continue;
+ }
+ const o = outputs[i];
+ const last = std.mem.lastIndexOfScalar(u8, o, 0x1e) orelse continue;
+ const mid = std.mem.lastIndexOfScalar(u8, o[0..last], 0x1e) orelse continue;
+ out.* = a.dupe(u8, o[0..mid]) catch return;
+ err.* = a.dupe(u8, o[mid + 1 .. last]) catch return;
+ code.* = std.fmt.parseInt(u8, std.mem.trim(u8, o[last + 1 ..], " \n"), 10) catch 255;
+ }
+ live_run.outs = outs;
+ live_run.errs = errs;
+ live_run.codes = codes;
+}
+
+/// Enter in a pipe prompt whose live run answered for the text as it is:
+/// the outputs of the runs that worked applied from it, the selections of
+/// the ones that failed left as they are. False when it has nothing to
+/// apply from (the caller runs the command).
+pub fn applyLive(p: *Pardes, serial: u32, typed: []const u8) bool {
+ var live_run = p.pipe.preview orelse return false;
+ p.pipe.preview = null;
+ defer live_run.deinit();
+ const pane = p.panes[live_run.pane.index()] orelse return false;
+ if (pane.serial != serial or live_run.codes.len == 0 or !std.mem.eql(u8, live_run.typed, typed)) return false;
+ if (pane.file == null or pane.file.?.revision != live_run.revision) return false;
+ apply(p, &live_run, live_run.outs, live_run.codes);
+ return true;
+}
+
+/// `wait`'s outputs applied to the text it piped: each range's cut with its
+/// output in place, `$`'s kept; with `codes`, a run that failed leaves its
+/// range as it was (`$`: a run's status is its verdict).
+fn apply(p: *Pardes, wait: *const PendingPipe, outputs: []const []const u8, codes: ?[]const u8) void {
const pane = p.panes[wait.pane.index()] orelse return;
if (pane.serial != wait.serial) return;
@@ -275,7 +378,8 @@ pub fn pipeResponse(
var m: usize = 0;
var pri: ?usize = null;
for (0..wait.nranges) |i| {
- if (!std.mem.eql(u8, std.mem.trim(u8, outputs[i], " \n"), "0")) continue;
+ const kept_here = if (codes) |c| c[i] == 0 else std.mem.eql(u8, std.mem.trim(u8, outputs[i], " \n"), "0");
+ if (!kept_here) continue;
if (i == wait.primary) pri = m;
kept[m] = wait.ranges[i];
m += 1;
@@ -293,8 +397,9 @@ pub fn pipeResponse(
// answer from elsewhere past them is said, the text left as it was.
var said: [128]u8 = undefined;
for (0..n) |i| {
- const cut = pipeCut(&wait, content, i) orelse return;
- const output = pipeOutput(&wait, outputs, content, i);
+ const cut = pipeCut(wait, content, i) orelse return;
+ const failed = if (codes) |c| c[if (wait.how.pipes()) i else 0] != 0 else false;
+ const output = if (failed) content[cut.lo..cut.hi] else pipeOutput(wait, outputs, content, i);
if (output.len > selection_pipe.max_stdout_bytes)
return p.setMessage(wait.pane, std.fmt.bufPrint(&said, "pipe: an output of {d} bytes, past {d}: the text is left as it was", .{ output.len, selection_pipe.max_stdout_bytes }) catch unreachable); // two numbers fit 128
total_output += output.len; // each under 1 MiB, at most max_selections of them
@@ -325,12 +430,15 @@ pub fn pipeResponse(
t.show(p.settings.tab);
}
+/// The pipe request the keys made last: a known filter typed in a body's
+/// prompt runs live at each key before Enter runs it (Prompt.zig).
fn nextPipeEffect(p: *Pardes) ?u32 {
+ var last: ?u32 = null;
while (p.nextEffect()) |effect| switch (effect) {
- .pipe => |request| return request.id,
+ .pipe => |asked| last = asked.id,
else => {},
};
- return null;
+ return last;
}
test "selection pipe prompt submits exact request and Escape cancels" {
@@ -344,12 +452,11 @@ test "selection pipe prompt submits exact request and Escape cancels" {
pane.body.vsel = .{ .active = true, .row = 0, .col = 0, .explicit = true };
p.update(.{ .key = .{ .cp = '|' } });
- try std.testing.expect(pane.focus == .body and pane.prompt == .pipe);
- try std.testing.expectEqualStrings(config.pipe_marker, pane.promptText().?);
+ try std.testing.expect(pane.focus == .body and p.view().tag_state.kind == .prompt);
try std.testing.expect(nextPipeEffect(p) == null);
p.update(.{ .key = .{ .cp = 't', .text = "tr a-z A-Z" } });
p.update(.{ .key = .{ .cp = Key.enter } });
- try std.testing.expect(pane.focus == .body and pane.prompt != .pipe and pane.input.own == null);
+ try std.testing.expect(pane.focus == .body and p.view().tag_state.kind == .rest);
const id = nextPipeEffect(p) orelse return error.MissingPipeEffect;
const request = p.pipe.pipeRequest(id) orelse return error.MissingPipeRequest;
try std.testing.expectEqualStrings("tr a-z A-Z", request.command);
@@ -361,9 +468,10 @@ test "selection pipe prompt submits exact request and Escape cancels" {
p.update(.{ .key = .{ .cp = '|' } });
p.update(.{ .key = .{ .cp = 'c', .text = "cat" } });
p.update(.{ .key = .{ .cp = Key.escape } });
- try std.testing.expect(pane.focus == .body and pane.prompt != .pipe);
+ try std.testing.expect(pane.focus == .body and p.view().tag_state.kind == .rest);
try std.testing.expectEqualSlices(u8, before, pane.file.?.content);
- try std.testing.expect(nextPipeEffect(p) == null);
+ // `cat`, a known filter, ran live as it was typed: Esc drops it.
+ try std.testing.expect(p.pipe.preview == null);
}
test "| in a tag pipes the tag's own text, and undo there brings it back" {
@@ -404,7 +512,7 @@ test "$ keeps the selections the command exits 0 on, and a real shell gives that
};
pane.body.setRanges(config.tab_width, pane.file.?.content, &ranges, &.{}, 1, true);
p.update(.{ .key = .{ .cp = '$' } });
- try std.testing.expectEqualStrings(config.pipe_marker_keep, pane.promptText().?);
+ try std.testing.expectEqual(pardes.Prompt.Op.keep_pipe, p.view().tag_state.prompt.op);
p.update(.{ .key = .{ .cp = 'g', .text = "grep -v b" } });
p.update(.{ .key = .{ .cp = Key.enter } });
const id = nextPipeEffect(p) orelse return error.MissingPipeEffect;
@@ -483,7 +591,7 @@ test "a pipe's output past its cap leaves the text as it was, and says so" {
const outputs: []const []const u8 = &.{ "AA", big };
p.update(.{ .pipe_resp = .{ .id = id, .success = true, .outputs = outputs } });
try std.testing.expectEqualSlices(u8, "aa bb cc\n", pane.file.?.content);
- try std.testing.expect(std.mem.indexOf(u8, pane.msg[0..pane.msg_len], "past") != null);
+ try std.testing.expect(std.mem.indexOf(u8, p.messages.saidBy(pane), "past") != null);
}
test "the four shell behaviours put their output where helix puts it" {
@@ -663,10 +771,10 @@ test "selection pipe binding is file-normal-only" {
pane.file.?.output = .{ .from = .search };
p.update(.{ .key = .{ .cp = '|' } });
- try std.testing.expect(pane.prompt != .pipe);
+ try std.testing.expect(p.view().tag_state.kind != .prompt);
pane.file.?.output = null;
pane.body.mode = .insert;
p.update(.{ .key = .{ .cp = '|', .text = "|" } });
- try std.testing.expect(pane.prompt != .pipe);
+ try std.testing.expect(p.view().tag_state.kind != .prompt);
try std.testing.expectEqualSlices(u8, "|x", pane.file.?.content);
}
diff --git a/core/Places.zig b/core/Places.zig
index 6c3ac9ab..7f847f6a 100644
--- a/core/Places.zig
+++ b/core/Places.zig
@@ -664,8 +664,13 @@ pub fn paint(set: *Places, p: *Pardes, s: *Surface, pane: *Pane, r: pardes.Rect,
if (!set.shows(pane)) return;
const f = &pane.file.?;
const th = p.theme();
- const strong = p.chromeTheme().search_bg;
- const quiet = colors.mix(th.bg orelse th.tag_bg, strong);
+ var strong = p.chromeTheme().search_bg;
+ var quiet = colors.mix(th.bg orelse th.tag_bg, strong);
+ // A search prompt's pattern that is no regex: its last places, dimmed.
+ if (pardes.Prompt.dims(p, pane)) {
+ strong = quiet;
+ quiet = colors.mix(th.bg orelse th.tag_bg, quiet);
+ }
const hits = set.hits.items;
if (hits.len == 0) return;
const nlines = File.nlines(p.gpa, f);
@@ -728,7 +733,8 @@ pub fn addTicks(set: *Places, p: *Pardes, pane: *Pane, s: *Surface, owner: u8) v
if (!set.shows(pane)) return;
const f = &pane.file.?;
set.buildTicks(p, f);
- const cur = if (set.current) |c| set.tickOf(p, f, c) else null;
+ // (A damaged image's `current` may name no place: none current then.)
+ const cur = if (set.current) |c| (if (c < set.hits.items.len) set.tickOf(p, f, c) else null) else null;
for (set.ticks.items) |b| {
if (s.nrail_ticks == s.rail_ticks.len) return;
s.rail_ticks[s.nrail_ticks] = .{ .owner = owner, .at = b, .current = cur != null and cur.? == b };
@@ -792,11 +798,11 @@ test "places: * finds them all, n and N step them round the end silently, an edi
try std.testing.expectEqual(@as(?usize, 1), set.current);
typeKeys(p, "n");
try std.testing.expectEqual(@as(?usize, 2), set.current);
- const logged = p.messages.len;
typeKeys(p, "n");
try std.testing.expectEqual(@as(?usize, 0), set.current);
- // round the end without a word anywhere
- try std.testing.expectEqual(logged, p.messages.len);
+ // round the end: the search word says so, and the message row echoes
+ // it (Prompt.zig, pick-ui SPEC §7.3)
+ try std.testing.expect(std.mem.indexOf(u8, p.messages.saidBy(pane), "1/3 ↻ · line 1") != null);
typeKeys(p, "N");
try std.testing.expectEqual(@as(?usize, 2), set.current);
diff --git a/core/Plumb.zig b/core/Plumb.zig
index e1b09e69..402752a3 100644
--- a/core/Plumb.zig
+++ b/core/Plumb.zig
@@ -1345,7 +1345,7 @@ test "plumb: dispose: no rule and no dst, a start, the web port, a port no rule
// A start of a builtin runs it in place.
try testing.expect(send(p, null, .{ .type = "msg", .data = "hello" }, null) == .done);
const pane = p.panes[p.view().active].?;
- try testing.expectEqualStrings("hello", pane.msg[0..pane.msg_len]);
+ try testing.expectEqualStrings("hello", p.messages.saidBy(pane));
try testing.expectEqualStrings(e_client, send(p, null, .{ .type = "client" }, null).refused);
try testing.expectEqualStrings(e_no_start, send(p, null, .{ .type = "none" }, null).refused);
try testing.expectEqualStrings(e_no_start, send(p, null, .{ .dst = "nobody", .type = "x" }, null).refused);
@@ -1499,12 +1499,12 @@ test "plumb: the Plumb word opens the plumbing file, include basic until one is
// A rule after the word is refused, in words.
try testing.expect(p.executeBuiltinLine(0, "Plumb suffix .svg to image"));
const first = p.panes[0].?;
- try testing.expectEqualStrings(e_word, first.msg[0..first.msg_len]);
+ try testing.expectEqualStrings(e_word, p.messages.saidBy(first));
// Saved: its rules, or why not, the rules as they were.
saved(p, 0, path, "type is text\ndata matches 'x.*'\nplumb to web\n");
try testing.expectEqualStrings("type\tis\ttext\ndata\tmatches\t'x.*'\nplumb\tto\tweb\n\n", inForce(p));
saved(p, 0, path, "type is text\ndata isnt x\nplumb to web\n");
- try testing.expectEqualStrings("plumbing:2: unknown verb isnt", first.msg[0..first.msg_len]);
+ try testing.expectEqualStrings("plumbing:2: unknown verb isnt", p.messages.saidBy(first));
try testing.expectEqualStrings("type\tis\ttext\ndata\tmatches\t'x.*'\nplumb\tto\tweb\n\n", inForce(p));
// Another file saved is no plumbing.
saved(p, 0, "/elsewhere/plumbing", "type is text\nplumb to edit\n");
diff --git a/core/Prompt.zig b/core/Prompt.zig
new file mode 100644
index 00000000..8081f7f9
--- /dev/null
+++ b/core/Prompt.zig
@@ -0,0 +1,1514 @@
+//! A text prompt in a pane's tag (walk UI, pick-ui SPEC.md §7): `/ ?`
+//! search the body, `s S K A-K` select by a pattern, `| A-| ! A-! $` pipe
+//! through a command, typed in
+//! the head's field after the prompt's key cell, the plain word it stands
+//! for and its count beside it (`s self = Exec Edit x/self/ 4 selections in
+//! 6 lines`), its effect drawn live in the body on every key; Enter applies
+//! it and keeps the line in its history, Esc puts the body back.
+//!
+//! A sam prompt (`s S K A-K | A-|`, sam's `x y g v | >`) right after
+//! another of the same pane's, no key between, extends one recipe word in
+//! the pane's trail, the Edit line it is (`Edit x/self/ |tr a-z A-Z`): Look
+//! on it puts back the selections it made, Exec runs it as Edit (SPEC §7.5).
+//!
+//! A view's own (TagState.prompt, the coordinator's R4): its field the
+//! head's (TagState.field); its histories the session's, three of them
+//! (`/ ? s S K A-K` share one, the pipes another, `:` its own). A prompt for
+//! a tag's text or a header's still asks on the notice band (panes.zig
+//! startPrompt), as does Save's.
+const Prompt = @This();
+
+const std = @import("std");
+const pardes = @import("root.zig");
+const config = @import("config.zig");
+const modal = @import("modal.zig");
+const panes = @import("panes.zig");
+const normal = @import("normal.zig");
+const edit = @import("edit.zig");
+const regexp = @import("regexp.zig");
+const tagline = @import("tagline.zig");
+const Pipe = @import("Pipe.zig");
+const Field = @import("Field.zig");
+const Band = @import("Band.zig");
+const TagState = @import("TagState.zig");
+const Kind = @import("Kind.zig");
+const Places = @import("Places.zig");
+const Trail = @import("Trail.zig");
+const colors = @import("colors.zig");
+const Surface = @import("surface.zig").Surface;
+const Cell = @import("surface.zig").Cell;
+const File = panes.File;
+const Pardes = pardes.Pardes;
+const Pane = panes.Pane;
+const Text = panes.Text;
+const Key = pardes.Key;
+const hit = pardes.hit;
+
+pub const Op = enum(u8) { search, search_back, select, split, keep, remove, pipe, pipe_to, insert, append, keep_pipe, command };
+
+op: Op = .select,
+/// Up and Down's place in its history: 0 the field as typed, n the n-th
+/// newest line.
+recall: u8 = 0,
+/// Ctrl-r: its history unrolled under the tag, filtered by the field.
+history: bool = false,
+/// The field is no regex: the body keeps the last result, dimmed, and the
+/// count says why.
+bad: bool = false,
+/// The ranges the last pattern found (0: none, the selections it started
+/// from back), and the lines those it started from cover.
+found: u16 = 0,
+scope: u32 = 0,
+/// `?` waits for its place: the last before where it began, once the text
+/// between them is searched.
+seeking: bool = false,
+/// The lines a search's places are on, counted once they are all found, at
+/// the places' `hits_gen` `counted`.
+lines: u32 = 0,
+counted: u32 = std.math.maxInt(u32),
+/// The pane, by serial, whose sam prompt Enter took last with no key since:
+/// the next one extends its recipe (0: none).
+chain: u32 = 0,
+/// A pipe's: Ctrl-p ran a command that is no known filter live; Enter was
+/// refused once over runs that failed.
+forced: bool = false,
+refused: bool = false,
+
+/// The session's prompt histories: the lines Enter took, newest last.
+pub const History = struct {
+ search: Ring = .{},
+ pipe: Ring = .{},
+ command: Ring = .{},
+};
+
+pub const Ring = struct {
+ pub const replica = .{ .len = .{.{ "lines", "n" }} };
+ /// The lines a history keeps; past it the oldest goes.
+ pub const max = 16;
+ /// Empty, not undefined: a damaged image's count past the lines it
+ /// holds reads empty lines, never undefined bytes.
+ lines: [max]Kind.Buf(Field.max) = @splat(.{}),
+ n: u8 = 0,
+
+ /// `line` the newest, an older copy of it gone.
+ pub fn add(r: *Ring, line: []const u8) void {
+ if (line.len == 0) return;
+ var w: u8 = 0;
+ for (r.lines[0..r.n]) |l| if (!std.mem.eql(u8, l.slice(), line)) {
+ r.lines[w] = l;
+ w += 1;
+ };
+ r.n = w;
+ if (r.n == max) {
+ std.mem.copyForwards(Kind.Buf(Field.max), r.lines[0 .. max - 1], r.lines[1..]);
+ r.n -= 1;
+ }
+ r.lines[r.n].set(line);
+ r.n += 1;
+ }
+
+ /// The `back`-th newest line, 1 the newest.
+ pub fn get(r: *const Ring, back: u8) ?[]const u8 {
+ if (back == 0 or back > r.n) return null;
+ return r.lines[r.n - back].slice();
+ }
+};
+
+const Info = struct {
+ /// Its key cell.
+ cell: []const u8,
+ hint: []const u8,
+};
+
+const info = std.EnumArray(Op, Info).init(.{
+ .search = .{ .cell = "/", .hint = "⏎ land · M-⏎ as a list · C-r history · esc" },
+ .search_back = .{ .cell = "?", .hint = "⏎ land · M-⏎ as a list · C-r history · esc" },
+ .select = .{ .cell = "s", .hint = "⏎ select · C-r history · esc" },
+ .split = .{ .cell = "S", .hint = "⏎ select · C-r history · esc" },
+ .keep = .{ .cell = "K", .hint = "⏎ keep · C-r history · esc" },
+ .remove = .{ .cell = "A-K", .hint = "⏎ keep · C-r history · esc" },
+ .pipe = .{ .cell = "|", .hint = "⏎ replace · C-r history · esc" },
+ .pipe_to = .{ .cell = "A-|", .hint = "⏎ run · C-r history · esc" },
+ .insert = .{ .cell = "!", .hint = "⏎ insert · C-r history · esc" },
+ .append = .{ .cell = "A-!", .hint = "⏎ append · C-r history · esc" },
+ .keep_pipe = .{ .cell = "$", .hint = "⏎ keep · C-r history · esc" },
+ .command = .{ .cell = ":", .hint = "⏎ run · C-r history · esc" },
+});
+
+/// The history `op` reads and Enter adds to.
+fn ring(p: *Pardes, op: Op) *Ring {
+ return switch (op) {
+ .search, .search_back, .select, .split, .keep, .remove => &p.prompt_history.search,
+ .pipe, .pipe_to, .insert, .append, .keep_pipe => &p.prompt_history.pipe,
+ .command => &p.prompt_history.command,
+ };
+}
+
+pub fn ofMode(m: modal.Normal.RegexMode) Op {
+ return switch (m) {
+ .select => .select,
+ .split => .split,
+ .keep => .keep,
+ .remove => .remove,
+ };
+}
+
+fn mode(op: Op) ?modal.Normal.RegexMode {
+ return switch (op) {
+ .select => .select,
+ .split => .split,
+ .keep => .keep,
+ .remove => .remove,
+ else => null,
+ };
+}
+
+pub fn ofBehavior(how: modal.Normal.PipeBehavior) Op {
+ return switch (how) {
+ .replace => .pipe,
+ .ignore => .pipe_to,
+ .insert => .insert,
+ .append => .append,
+ .keep => .keep_pipe,
+ };
+}
+
+fn searches(op: Op) bool {
+ return op == .search or op == .search_back;
+}
+
+fn behavior(op: Op) ?modal.Normal.PipeBehavior {
+ return switch (op) {
+ .pipe => .replace,
+ .pipe_to => .ignore,
+ .insert => .insert,
+ .append => .append,
+ .keep_pipe => .keep,
+ else => null,
+ };
+}
+
+/// Prompt `op` in the tag of `pane`, the pane with the keyboard, for its
+/// body: its field empty, the body's selections as they are (`s S K A-K`
+/// select inside them, `/ ?` search from the primary one; Esc puts them
+/// back). `/ ?` search a file's body only.
+pub fn open(p: *Pardes, pane: *Pane, op: Op) void {
+ // Nobody is at the keyboard to answer a command a script wrote to a
+ // ctl file: the write fails instead (core/ninep/ctl.zig).
+ if (p.fs.no_prompt) {
+ p.fs.refused = true;
+ p.fs.failures +%= 1;
+ return;
+ }
+ const t = &pane.body;
+ // A body is piped only when it is a file that saves.
+ if (behavior(op) != null) {
+ const f = pane.file orelse return;
+ if (!panes.Output.fileTraits(f.output).saves) return;
+ }
+ var scope: u32 = 0;
+ if (mode(op) != null) {
+ const text = edit.flatSurface(p.editor(), t) catch |err| return p.reportError(.at(p.view().active), "prompt", err);
+ const got = t.ranges(text, 0, &pane.sel_snap);
+ pane.nsel_snap = @intCast(got.n);
+ pane.sel_snap_pri = @intCast(got.pri);
+ pane.sel_snap_expl = t.vsel.active and t.vsel.explicit;
+ for (pane.sel_snap[0..got.n]) |r| {
+ const lo = @min(r.anchor, r.head, text.len);
+ const hi = @min(@max(r.anchor, r.head), text.len);
+ scope += @intCast(std.mem.count(u8, text[lo..hi -| @intFromBool(hi > lo and text[hi - 1] == '\n')], "\n") + 1);
+ }
+ }
+ if (searches(op)) pane.places.remember(p, pane);
+ pane.focus = .body;
+ tagline.exitHeader(p);
+ t.mode = .normal;
+ t.normal.clear();
+ TagState.toRest(p);
+ const s = &p.view().tag_state;
+ s.kind = .prompt;
+ s.host = pane.serial;
+ s.field.clear();
+ s.rows = .{};
+ s.prompt = .{ .op = op, .scope = scope, .chain = s.prompt.chain };
+ if (behavior(op) != null) Pipe.dropLive(p);
+}
+
+/// A key the tag at rest takes (keys.handleKey): any but one that opens a
+/// sam prompt ends the recipe Enter left open (a motion, an edit).
+pub fn keyAtRest(p: *Pardes, k: Key) void {
+ const s = &p.view().tag_state;
+ if (s.prompt.chain == 0) return;
+ if (hit(k, config.select_regex) or hit(k, config.split_regex) or hit(k, config.keep_regex) or
+ hit(k, config.remove_regex) or hit(k, config.pipe_selection) or hit(k, config.pipe_selection_to)) return;
+ s.prompt.chain = 0;
+}
+
+/// A key in the prompt of the live view's tag: the field's editing keys,
+/// and the prompt's own.
+pub fn key(p: *Pardes, k: Key) void {
+ const v = p.view();
+ const s = &v.tag_state;
+ const id = TagState.hostOf(p) orelse return TagState.toRest(p);
+ const pane = p.panes[id].?;
+ const plain = !k.ctrl and !k.alt;
+ const ctrl = k.ctrl and !k.alt;
+ if (hit(k, config.escape)) return cancel(p, pane);
+ if (plain and k.cp == Key.enter) return commit(p, id, pane);
+ if (k.alt and !k.ctrl and k.cp == Key.enter) return asList(p, id, pane);
+ // Backspace on an empty field: the prompt goes, as Esc.
+ if (plain and k.cp == Key.backspace and s.field.len == 0) return cancel(p, pane);
+ // Up and Down bring its history's lines into the field, the newest first.
+ if (plain and (k.cp == Key.up or k.cp == Key.down)) {
+ const r = ring(p, s.prompt.op);
+ const to: u8 = if (k.cp == Key.up) @min(r.n, s.prompt.recall + 1) else s.prompt.recall -| 1;
+ if (to == s.prompt.recall) return;
+ s.prompt.recall = to;
+ s.field.set(r.get(to) orelse "");
+ return live(p, pane);
+ }
+ if (ctrl and k.cp == 'r') {
+ s.prompt.history = !s.prompt.history;
+ return;
+ }
+ // A command no known filter: Ctrl-p runs it live all the same.
+ if (ctrl and k.cp == 'p' and behavior(s.prompt.op) != null) {
+ s.prompt.forced = true;
+ return live(p, pane);
+ }
+ if (!s.field.key(k)) return;
+ s.prompt.recall = 0;
+ s.prompt.forced = false;
+ live(p, pane);
+}
+
+/// What the field says now, done to the body: the selections a pattern
+/// finds inside the ones the prompt began with; none, or no pattern, those
+/// it began with. A pattern that is no regex changes nothing, and the
+/// prompt says why.
+fn live(p: *Pardes, pane: *Pane) void {
+ const s = &p.view().tag_state;
+ const pat = s.field.text();
+ if (behavior(s.prompt.op)) |how| {
+ // A pipe: run live per selection when it is a known filter (or
+ // Ctrl-p said so), off the loop; Enter is asked again.
+ s.prompt.refused = false;
+ if (pat.len == 0 or !(s.prompt.forced or pure(pat))) return Pipe.dropLive(p);
+ return Pipe.live(p, p.view().active, &pane.body, how, pat);
+ }
+ if (mode(s.prompt.op) == null and !searches(s.prompt.op)) return;
+ s.prompt.bad = pat.len > 0 and if (regexp.Regex.compile(pat)) |_| false else |_| true;
+ if (s.prompt.bad) return;
+ if (mode(s.prompt.op)) |m| {
+ s.prompt.found = @intCast(normal.applySelRegex(p, pane, &pane.body, pat, m));
+ return;
+ }
+ // A search: its places found from where it began, the view's first,
+ // the rest a frame's budget a tick (Places.zig); `/` selects the first
+ // at or after the caret as soon as it is found, `?` the last before it.
+ const set = &pane.places;
+ s.prompt.counted = std.math.maxInt(u32);
+ if (pat.len == 0) {
+ if (set.from == 0) set.clear(p.gpa);
+ set.restore(p.settings.tab, pane);
+ return;
+ }
+ const back = s.prompt.op == .search_back;
+ set.search(p, pane, .typed, 0, pat, false, if (back) null else set.origin(pane), !back);
+ s.prompt.seeking = back;
+ if (back) seekBack(p, pane);
+}
+
+/// `?`'s place: the last before where it began once the text between is
+/// searched, past the top the last of all once every place is found;
+/// none, the body as it was.
+fn seekBack(p: *Pardes, pane: *Pane) void {
+ const s = &p.view().tag_state;
+ const set = &pane.places;
+ if (!set.started) return;
+ const origin = set.origin(pane);
+ const hits = set.hits.items;
+ const i = Places.firstFrom(hits, origin);
+ const whole = set.head_to >= set.lo;
+ const to: ?usize = if (i > 0 and origin <= set.hi and (whole or hits[i - 1].start >= set.lo))
+ i - 1
+ else if (set.complete() and hits.len > 0)
+ hits.len - 1
+ else
+ null;
+ if (to) |at| {
+ s.prompt.seeking = false;
+ return set.goTo(p.settings.tab, pane, at, false);
+ }
+ if (!set.complete()) return;
+ s.prompt.seeking = false;
+ set.restore(p.settings.tab, pane);
+}
+
+/// Enter: what the field says, applied, and the line kept in its history
+/// and its register (`/` a pattern's, `|` a command's).
+fn commit(p: *Pardes, id: usize, pane: *Pane) void {
+ const s = &p.view().tag_state;
+ const op = s.prompt.op;
+ if (behavior(op) != null and refuses(p, id, pane)) return;
+ const line = s.field.text();
+ // The field is the view's: what is kept of it is copied before rest.
+ var kept: [Field.max]u8 = undefined;
+ @memcpy(kept[0..line.len], line);
+ const typed = kept[0..line.len];
+ const bad = s.prompt.bad;
+ s.kind = .rest;
+ TagState.toRest(p);
+ if (typed.len == 0) return undo(p, pane, op);
+ ring(p, op).add(typed);
+ if (searches(op)) return land(p, id, pane, op, typed, bad);
+ if (mode(op) != null) {
+ // No regex: the selections it began with, and why.
+ if (bad) {
+ undo(p, pane, op);
+ return p.setMessage(.at(id), regexMessage(typed));
+ }
+ // helix keeps the pattern in `/`
+ p.registers.put(p.gpa, '/', typed, 0, 1, true) catch |err| return p.reportError(.at(id), "prompt", err);
+ p.registers.last_search = '/';
+ // Nothing found: nothing changed, no link.
+ if (s.prompt.found == 0) return;
+ link(p, pane, op, typed);
+ keepSelections(p, pane);
+ return;
+ }
+ if (behavior(op)) |how| {
+ p.registers.put(p.gpa, '|', typed, 0, 1, true) catch |err| return p.reportError(.at(id), "prompt", err);
+ // `! A-! $` apply, and end the recipe: no Edit line says them.
+ if (op == .pipe or op == .pipe_to) link(p, pane, op, typed) else s.prompt.chain = 0;
+ // What the live run made, applied (the runs that failed leaving
+ // their selections); else, or `A-|` (its point is what it does),
+ // the command run now.
+ if (op != .pipe_to and Pipe.applyLive(p, pane.serial, typed)) return;
+ Pipe.dropLive(p);
+ return Pipe.submit(p, id, &pane.body, how, typed);
+ }
+}
+
+/// Enter in `/` or `?`: the place found current, its places tinted from
+/// now on for n and N, the pattern in `/`, and the pane's search word
+/// `/re/ 3/7` in its trail (SPEC §7.3).
+fn land(p: *Pardes, id: usize, pane: *Pane, op: Op, pat: []const u8, bad: bool) void {
+ const set = &pane.places;
+ // A search moves the selection: the recipe ends.
+ p.view().tag_state.prompt.chain = 0;
+ if (bad) {
+ undo(p, pane, op);
+ return p.setMessage(.at(id), regexMessage(pat));
+ }
+ set.fill(p, pane, std.math.maxInt(usize), regexp.Regex.budget);
+ if (op == .search_back) seekBack(p, pane);
+ if (set.hits.items.len == 0) {
+ undo(p, pane, op);
+ var said: [Field.max + 16]u8 = undefined;
+ return p.setMessage(.at(id), std.fmt.bufPrint(&said, "/{s}/: no match", .{pat}) catch "no match");
+ }
+ p.registers.put(p.gpa, '/', pat, 0, 1, true) catch |err| return p.reportError(.at(id), "search", err);
+ p.registers.last_search = '/';
+ set.provenance = .search;
+ set.forget(p.gpa);
+ word(pane, if (op == .search_back) '?' else '/', pat);
+}
+
+/// Alt-Enter in `/` or `?`: the places kept as a list, a row each, in the
+/// pane's query pane (Query.zig), the body as it was before the prompt.
+fn asList(p: *Pardes, id: usize, pane: *Pane) void {
+ const s = &p.view().tag_state;
+ const op = s.prompt.op;
+ if (!searches(op)) return;
+ var kept: [Field.max]u8 = undefined;
+ const typed = kept[0..s.field.len];
+ @memcpy(typed, s.field.text());
+ s.kind = .rest;
+ TagState.toRest(p);
+ undo(p, pane, op);
+ panes.Query.open(p, id, .text, typed, true);
+}
+
+/// The filters a pipe prompt runs live as it is typed: commands that
+/// only read their input and write their output (SPEC §7.4).
+const filters = [_][]const u8{ "sort", "uniq", "tr", "cut", "sed", "awk", "jq", "column", "fmt", "fold", "rev", "head", "tail", "wc", "grep", "nl", "tac", "cat" };
+
+fn pure(line: []const u8) bool {
+ const name = commandName(line);
+ for (filters) |f| if (std.mem.eql(u8, f, name)) return true;
+ return false;
+}
+
+fn commandName(line: []const u8) []const u8 {
+ var words = std.mem.tokenizeAny(u8, line, " \t");
+ return words.next() orelse "";
+}
+
+/// The pipe prompt's live run, answered, for its field and `pane`'s text
+/// as they are.
+fn answered(p: *const Pardes, pane: *const Pane, line: []const u8) ?*const Pipe.PendingPipe {
+ const live_run = if (p.pipe.preview) |*l| l else return null;
+ if (live_run.serial != pane.serial or live_run.codes.len == 0 or !std.mem.eql(u8, live_run.typed, line)) return null;
+ if (pane.file == null or pane.file.?.revision != live_run.revision) return null;
+ return live_run;
+}
+
+/// Enter over runs that failed: refused once, the count saying what a
+/// second Enter applies; refused for good when every run failed.
+fn refuses(p: *Pardes, id: usize, pane: *Pane) bool {
+ const s = &p.view().tag_state;
+ if (s.prompt.op == .keep_pipe or s.prompt.op == .pipe_to) return false;
+ const live_run = answered(p, pane, s.field.text()) orelse return false;
+ var failed: usize = 0;
+ for (live_run.codes) |c| failed += @intFromBool(c != 0);
+ if (failed == 0) return false;
+ if (failed == live_run.codes.len) {
+ p.setMessage(.at(id), "every run failed: nothing to apply");
+ return true;
+ }
+ if (s.prompt.refused) return false;
+ s.prompt.refused = true;
+ return true;
+}
+
+/// Esc: the prompt goes and the body is as it was before it.
+fn cancel(p: *Pardes, pane: *Pane) void {
+ const op = p.view().tag_state.prompt.op;
+ p.view().tag_state.kind = .rest;
+ TagState.toRest(p);
+ undo(p, pane, op);
+}
+
+/// The live effect of prompt `op` on `pane`'s body taken back.
+fn undo(p: *Pardes, pane: *Pane, op: Op) void {
+ if (behavior(op) != null) Pipe.dropLive(p);
+ if (mode(op)) |m| _ = normal.applySelRegex(p, pane, &pane.body, "", m);
+ pane.nsel_snap = 0;
+ if (!searches(op)) return;
+ const set = &pane.places;
+ if (set.from == 0 and set.provenance == .typed) set.clear(p.gpa);
+ set.restore(p.settings.tab, pane);
+ set.forget(p.gpa);
+}
+
+/// The prompt left by something else than its keys (TagState.toRest: a
+/// click, a word run from the band): its effect taken back, as Esc's.
+pub fn leave(p: *Pardes) void {
+ const s = &p.view().tag_state;
+ const pane = p.panes[TagState.hostOf(p) orelse return] orelse return;
+ s.kind = .rest;
+ undo(p, pane, s.prompt.op);
+}
+
+/// A paste into the field: its first line.
+pub fn paste(p: *Pardes, bytes: []const u8) void {
+ const s = &p.view().tag_state;
+ const pane = p.panes[TagState.hostOf(p) orelse return] orelse return;
+ const line = bytes[0 .. std.mem.indexOfAny(u8, bytes, "\r\n") orelse bytes.len];
+ s.field.insert(line[0..modal.graphemeStart(line, @min(line.len, Field.max - s.field.len))]);
+ s.prompt.recall = 0;
+ live(p, pane);
+}
+
+/// Whether `pane`'s body shows a selecting prompt's live result: its
+/// selections drawn as a preview (body_layer), dimmed while the field is
+/// no regex.
+pub fn selecting(p: *const Pardes, pane: *const Pane) ?struct { dim: bool } {
+ const s = &p.view().tag_state;
+ if (s.kind != .prompt or mode(s.prompt.op) == null or s.host != pane.serial) return null;
+ return .{ .dim = s.prompt.bad };
+}
+
+/// Whether `pane`'s places are a search prompt's last good ones, its field
+/// no regex now: tinted dimmed (Places.paint).
+pub fn dims(p: *const Pardes, pane: *const Pane) bool {
+ const s = &p.view().tag_state;
+ return s.kind == .prompt and searches(s.prompt.op) and s.host == pane.serial and s.prompt.bad;
+}
+
+// ---- the recipe word (SPEC §7.5) ----
+
+fn recipeOf(pane: *Pane) ?*Trail.Word {
+ for (pane.trail.steps[0..pane.trail.n]) |*step| if (step.* == .recipe) return &step.recipe;
+ return null;
+}
+
+/// Sam prompt `op`'s `line` as a link of `pane`'s recipe: after the one
+/// its last sam prompt left open, else a recipe of its own in place of the
+/// pane's one. One past the trail's room starts none.
+fn link(p: *Pardes, pane: *Pane, op: Op, line: []const u8) void {
+ const s = &p.view().tag_state;
+ var buf: [Trail.max_text]u8 = undefined;
+ var w: std.Io.Writer = .fixed(&buf);
+ const open_recipe = if (s.prompt.chain == pane.serial) recipeOf(pane) else null;
+ s.prompt.chain = 0;
+ (if (open_recipe) |r| w.writeAll(r.text.slice()) else w.writeAll("Edit")) catch return;
+ w.writeByte(' ') catch return;
+ const said = switch (op) {
+ .select => samWord(&w, 'x', line),
+ .split => samWord(&w, 'y', line),
+ .keep => samWord(&w, 'g', line),
+ .remove => samWord(&w, 'v', line),
+ .pipe => w.print("|{s}", .{line}),
+ .pipe_to => w.print(">{s}", .{line}),
+ else => return,
+ };
+ said catch return;
+ var word_: Trail.Word = .{};
+ word_.text.set(w.buffered());
+ pane.trail.setWord(.{ .recipe = word_ });
+ s.prompt.chain = pane.serial;
+}
+
+/// The selections a recipe's sam prompts made, kept for Look on its word.
+fn keepSelections(p: *Pardes, pane: *Pane) void {
+ const text = edit.flatSurface(p.editor(), &pane.body) catch return;
+ var ranges: [Text.max_selections]modal.Selection = undefined;
+ const got = pane.body.ranges(text, 0, &ranges);
+ const kept = p.gpa.dupe(modal.Selection, ranges[0..got.n]) catch return;
+ p.gpa.free(pane.recipe_sels);
+ pane.recipe_sels = kept;
+ pane.recipe_pri = @intCast(got.pri);
+}
+
+/// Look on pane `id`'s recipe word: the selections it made, again.
+pub fn lookRecipe(p: *Pardes, id: usize) void {
+ const pane = p.panes[id] orelse return;
+ p.view().active = id;
+ if (pane.recipe_sels.len == 0) return;
+ const text = edit.flatSurface(p.editor(), &pane.body) catch |err| return p.reportError(.at(id), "recipe", err);
+ for (pane.recipe_sels) |*r| {
+ r.anchor = @min(r.anchor, text.len);
+ r.head = @min(r.head, text.len);
+ }
+ pane.body.setRanges(p.settings.tab, text, pane.recipe_sels, &.{}, @min(pane.recipe_pri, pane.recipe_sels.len - 1), true);
+ pane.body.show(p.settings.tab);
+}
+
+/// Exec on it: the Edit line it is, run on what is selected now
+/// (edit_cmd.zig, sam's dot the primary selection).
+pub fn execRecipe(p: *Pardes, id: usize) void {
+ const pane = p.panes[id] orelse return;
+ const r = recipeOf(pane) orelse return;
+ var line: [Trail.max_text]u8 = undefined;
+ const text = r.text.slice();
+ @memcpy(line[0..text.len], text);
+ p.view().active = id;
+ pardes.edit_cmd.run(p, id, line["Edit ".len..text.len]);
+}
+
+// ---- the search word (SPEC §7.3) ----
+
+/// Pane `pane`'s search word, `/re/ 3/7`: one a pane, its `index` the
+/// length of its `/re/` with bit 16 set after n or N went round an end.
+fn wordOf(pane: *Pane) ?*Trail.Word {
+ for (pane.trail.steps[0..pane.trail.n]) |*step| if (step.* == .search) return &step.search;
+ return null;
+}
+
+fn patternOf(w: *const Trail.Word) []const u8 {
+ const end = patternEnd(w);
+ return if (end < 2) "" else w.text.slice()[1 .. end - 1];
+}
+
+/// Where a search word's `/re/` ends: held to its text (a damaged image's
+/// says anything).
+fn patternEnd(w: *const Trail.Word) u16 {
+ return std.math.clamp(@as(u16, @truncate(w.index)), @min(2, w.text.len), w.text.len);
+}
+
+/// Whether the places the pane's body shows are its search word's.
+fn lights(pane: *const Pane, w: *const Trail.Word) bool {
+ const set = &pane.places;
+ return set.shows(pane) and set.provenance == .search and !set.literal and std.mem.eql(u8, set.pattern, patternOf(w));
+}
+
+/// `pat`, delimited by `delim`, as pane `pane`'s one search word, in place
+/// of the one it had, written for where its places stand.
+fn word(pane: *Pane, delim: u8, pat: []const u8) void {
+ // Its pattern and its place in the trail's room, else none.
+ if (pat.len + 2 + 32 > Trail.max_text) return;
+ var w: Trail.Word = .{};
+ _ = w.text.print("{c}{s}{c}", .{ delim, pat, delim });
+ w.index = w.text.len;
+ pane.trail.setWord(.{ .search = w });
+ refresh(pane, false);
+}
+
+/// The search word's place among its places written after its pattern:
+/// `3/7`, `–/7` with the selection off them, `⋯` for the count while they
+/// are found, ` ↻` after n or N went round an end (`wrapped`; null keeps
+/// what it said).
+fn refresh(pane: *Pane, wrapped: ?bool) void {
+ const w = wordOf(pane) orelse return;
+ if (!lights(pane, w)) return;
+ const set = &pane.places;
+ const f = &pane.file.?;
+ const end = patternEnd(w);
+ const round = wrapped orelse (w.index >> 16 != 0);
+ const hits = set.hits.items;
+ const sel = pane.body.primaryRange(f.content, 0);
+ const on: ?usize = if (set.current) |c| (if (c < hits.len and hits[c].start == @min(sel.anchor, sel.head) and hits[c].end == @max(sel.anchor, sel.head)) c else null) else null;
+ var buf: [48]u8 = undefined;
+ var out: std.Io.Writer = .fixed(&buf);
+ out.writeByte(' ') catch return;
+ if (on) |c| out.print("{d}", .{c + 1}) catch return else out.writeAll("–") catch return;
+ if (set.complete()) out.print("/{d}", .{hits.len}) catch return else out.writeAll("/⋯") catch return;
+ if (round) out.writeAll(" ↻") catch return;
+ const now = w.text.slice();
+ if (std.mem.eql(u8, now[end..], out.buffered()) and (w.index >> 16 != 0) == round) return;
+ var text: [Trail.max_text]u8 = undefined;
+ @memcpy(text[0..end], now[0..end]);
+ @memcpy(text[end..][0..out.buffered().len], out.buffered());
+ w.text.set(text[0 .. end + out.buffered().len]);
+ w.index = end | @as(u32, @intFromBool(round)) << 16;
+}
+
+/// After each step (Core.zig, beside the places'): every search word says
+/// where its places stand; the live view's search prompt finds `?`'s place
+/// and counts the lines its places are on once they are all found.
+pub fn settle(p: *Pardes) void {
+ for (p.panes) |slot| if (slot) |pane| refresh(pane, null);
+ const s = &p.view().tag_state;
+ if (s.kind != .prompt or !searches(s.prompt.op)) return;
+ const pane = p.panes[TagState.hostOf(p) orelse return].?;
+ if (s.prompt.seeking) seekBack(p, pane);
+ const set = &pane.places;
+ if (!set.shows(pane) or !set.complete() or s.prompt.counted == set.hits_gen) return;
+ // A line holds the next place unless a newline lies between them: a
+ // pass over the text to the last place, once.
+ const text = pane.file.?.content;
+ var lines: u32 = 0;
+ var prev: ?usize = null;
+ for (set.hits.items) |h| {
+ if (prev == null or std.mem.indexOfScalarPos(u8, text[0..h.start], prev.?, '\n') != null) lines += 1;
+ prev = h.start;
+ }
+ s.prompt.lines = lines;
+ s.prompt.counted = set.hits_gen;
+}
+
+/// n or N stepped pane `id`'s places from place `before`: its search word
+/// says where they stand, ` ↻` when the step went round an end, and the
+/// message row echoes it with the line: `/dirty/ 4/7 · line 112`.
+pub fn stepped(p: *Pardes, id: usize, forward: bool, before: ?usize) void {
+ const pane = p.panes[id] orelse return;
+ const w = wordOf(pane) orelse return;
+ const set = &pane.places;
+ if (!lights(pane, w)) return;
+ const after = set.current orelse return;
+ if (after >= set.hits.items.len) return;
+ refresh(pane, if (before) |b| (if (forward) after <= b else after >= b) else false);
+ const index = File.lineIndex(p.gpa, &pane.file.?) catch return;
+ var said: [Trail.max_text + 32]u8 = undefined;
+ p.setMessage(.at(id), std.fmt.bufPrint(&said, "{s} · line {d}", .{ w.text.slice(), Places.lineOf(index, set.hits.items[after].start) + 1 }) catch return);
+}
+
+/// `*`: pattern `pat`, the selection's (in `/` already), lights its places
+/// in `pane`'s body and is its search word, no prompt asked (SPEC §7.3).
+pub fn star(p: *Pardes, pane: *Pane, pat: []const u8) void {
+ pane.places.search(p, pane, .search, 0, pat, false, null, false);
+ word(pane, '/', pat);
+}
+
+/// Look on pane `id`'s search word (SPEC §6.3): its places lit again and
+/// the one it was on selected.
+pub fn lookWord(p: *Pardes, id: usize) void {
+ const pane = p.panes[id] orelse return;
+ const w = wordOf(pane) orelse return;
+ const set = &pane.places;
+ const pat = patternOf(w);
+ p.registers.put(p.gpa, '/', pat, 0, 1, true) catch |err| return p.reportError(.at(id), "search", err);
+ p.registers.last_search = '/';
+ set.search(p, pane, .search, 0, pat, false, null, false);
+ set.fill(p, pane, std.math.maxInt(usize), regexp.Regex.budget);
+ p.view().active = id;
+ const rest = w.text.slice()[patternEnd(w)..];
+ const n = std.fmt.parseInt(usize, std.mem.trim(u8, rest[0 .. std.mem.indexOfScalar(u8, rest, '/') orelse rest.len], " "), 10) catch return;
+ if (n > 0 and n <= set.hits.items.len) set.goTo(p.settings.tab, pane, n - 1, false);
+}
+
+/// Exec on it: searched again from the caret, as its prompt and Enter
+/// would, the next place when they are lit already (n).
+pub fn execWord(p: *Pardes, id: usize) void {
+ const pane = p.panes[id] orelse return;
+ const w = wordOf(pane) orelse return;
+ const set = &pane.places;
+ const pat = patternOf(w);
+ p.registers.put(p.gpa, '/', pat, 0, 1, true) catch |err| return p.reportError(.at(id), "search", err);
+ p.registers.last_search = '/';
+ p.view().active = id;
+ if (lights(pane, w)) {
+ const before = set.current;
+ set.step(p, pane, true, 1, false);
+ return stepped(p, id, true, before);
+ }
+ set.search(p, pane, .search, 0, pat, false, set.origin(pane), true);
+}
+
+/// The span of pane `pane`'s tag its search word takes while its places no
+/// longer light it (the first Esc cleared them): drawn dimmed (draw.zig).
+pub fn unlit(p: *const Pardes, pane: *Pane) ?[2]usize {
+ const t = &pane.trail;
+ const whole = Trail.folded(p, pane);
+ for (t.steps[0..t.cur], 0..) |*step, i| if (step.* == .search) {
+ if (lights(pane, &step.search) or t.cur - i > whole) return null;
+ return t.spanOf(i, whole);
+ };
+ return null;
+}
+
+/// The gutter's marks while a prompt is typed (SPEC §7.1): `▸` on the
+/// current place's line and `▪` on every other line holding a place (`/
+/// ?`); `┃` on each line the selections a sam prompt began with cover (`s
+/// S K A-K`), its scope. In the blank after a row's line number, on a
+/// line's first row.
+pub fn paintGutter(p: *Pardes, s: *Surface, pane: *Pane, r: pardes.Rect, body_h: u16) void {
+ const ts = &p.view().tag_state;
+ if (ts.kind != .prompt or ts.host != pane.serial) return;
+ const f = &(pane.file orelse return);
+ if (mode(ts.prompt.op) != null) return fence(p, s, pane, r, body_h);
+ if (!searches(ts.prompt.op)) return;
+ const set = &pane.places;
+ if (!set.shows(pane)) return;
+ const hits = set.hits.items;
+ if (hits.len == 0) return;
+ const tab = p.settings.tab;
+ const x = gutterX(pane, r);
+ const y = p.bodyTop(pane, r);
+ const ink = p.chromeTheme().box;
+ const nlines = File.nlines(p.gpa, f);
+ var last: i32 = -1;
+ var vr: u16 = 0;
+ while (vr < body_h) : (vr += 1) {
+ const line = pane.wrapAt(tab, vr).line;
+ if (line == last or line < 0) continue;
+ if (line >= nlines) break;
+ last = line;
+ const ls = File.lineStart(p.gpa, f, @intCast(line));
+ const next = File.lineStart(p.gpa, f, @intCast(line + 1));
+ const i = Places.firstFrom(hits, ls);
+ if (i == hits.len or hits[i].start >= @max(next, ls + 1)) continue;
+ const current = if (set.current) |c| c < hits.len and hits[c].start >= ls and hits[c].start < @max(next, ls + 1) else false;
+ var style = s.at(x, y + vr).style;
+ style.fg = .{ .rgb = ink };
+ s.set(x, y + vr, if (current) "▸" else "▪", style);
+ }
+}
+
+fn regexMessage(pat: []const u8) []const u8 {
+ return if (regexp.Regex.compile(pat)) |_| "" else |err| regexp.Regex.message(err);
+}
+
+/// The sam command a pattern prompt is (`s S K A-K` are sam's `x y g v`),
+/// its `/` written `\/`.
+fn samWord(w: *std.Io.Writer, c: u8, pat: []const u8) !void {
+ try w.print("{c}/", .{c});
+ for (pat) |b| if (b == '/') try w.writeAll("\\/") else try w.writeByte(b);
+ try w.writeByte('/');
+}
+
+/// The plain word prompt `op` with field `line` stands for: what Look or
+/// Exec would do typed in a tag. None for `! A-! $`, which sam cannot say.
+fn plainWord(w: *std.Io.Writer, op: Op, line: []const u8) !?[]const u8 {
+ switch (op) {
+ .search => try w.print("/{s}/", .{line}),
+ .search_back => try w.print("?{s}?", .{line}),
+ .select, .split, .keep, .remove => {
+ try w.writeAll("Edit ");
+ try samWord(w, switch (op) {
+ .select => 'x',
+ .split => 'y',
+ .keep => 'g',
+ else => 'v',
+ }, line);
+ },
+ .pipe => try w.print("Edit |{s}", .{line}),
+ .pipe_to => try w.print("Edit >{s}", .{line}),
+ .insert, .append, .keep_pipe => return null,
+ .command => try w.writeAll(line),
+ }
+ return if (op == .search or op == .search_back) "Look" else "Exec";
+}
+
+/// A pipe prompt's live run in pane `pane`'s body, its rows painted in `s`
+/// (joinBody's): each replaced selection's lines on the diff's deleted
+/// ground, its run's output after them as ghost lines on the added ground
+/// (`!` before them, `A-!` after, the text kept), the rows below pushed
+/// down and the last ones off the view. Drawn, never written (the
+/// coordinator's R3); a run that failed shows nothing.
+pub fn ghosts(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, r: pardes.Rect, body_h: u16) !void {
+ const ts = &p.view().tag_state;
+ if (ts.kind != .prompt or ts.host != pane.serial) return;
+ const how = behavior(ts.prompt.op) orelse return;
+ if (how == .ignore or how == .keep) return;
+ const live_run = answered(p, pane, ts.field.text()) orelse return;
+ const f = &pane.file.?;
+ const tab = p.settings.tab;
+ const index = try File.lineIndex(p.gpa, f);
+ const y0 = p.bodyTop(pane, r);
+ const rows: usize = @min(body_h, s.rows -| y0);
+ const first: usize = pane.context_rows;
+ if (rows <= first) return;
+ const w: usize = s.cols;
+ const old = try arena.dupe(Cell, s.cells[(y0 + first) * w .. (y0 + rows) * w]);
+ const grounds = colors.Grounds.of(p.theme());
+ const ink = p.theme().fg orelse p.theme().tag_fg;
+ const x0 = r.x + config.GUTTER + File.gutterWidth(pane);
+ const width = r.w -| (x0 - r.x);
+ const ranges = live_run.ranges[0..live_run.nranges];
+ var out: usize = first;
+ var k: usize = 0;
+ var vr: usize = first;
+ while (vr < rows and out < rows) : (vr += 1) {
+ const line: usize = @intCast(@max(0, pane.wrapAt(tab, @intCast(vr)).line));
+ const opens = vr == first or pane.wrapAt(tab, @intCast(vr - 1)).line != line;
+ const closes = vr + 1 >= rows or pane.wrapAt(tab, @intCast(vr + 1)).line != line;
+ while (k < ranges.len and lineAt(index, @max(ranges[k].anchor, ranges[k].head) -| 1) < line) k += 1;
+ // `!`: its output before the selection's first line.
+ var j = k;
+ if (how == .insert and opens) while (j < ranges.len and lineAt(index, @min(ranges[j].anchor, ranges[j].head)) == line) : (j += 1) {
+ out = ghostRows(s, live_run, j, out, rows, y0, x0, width, grounds.add.row, ink);
+ };
+ if (out >= rows) break;
+ @memcpy(s.cells[(y0 + out) * w ..][0..w], old[(vr - first) * w ..][0..w]);
+ j = k;
+ while (j < ranges.len and lineAt(index, @min(ranges[j].anchor, ranges[j].head)) <= line) : (j += 1) {
+ if (how == .replace and outcome(live_run, j) == 0) s.tint(x0, @intCast(y0 + out), width, grounds.del.row, null);
+ }
+ out += 1;
+ // `|` and `A-!`: after the selection's last line.
+ if (how != .insert and closes) while (k < ranges.len and lineAt(index, @max(ranges[k].anchor, ranges[k].head) -| 1) == line) : (k += 1) {
+ out = ghostRows(s, live_run, k, out, rows, y0, x0, width, grounds.add.row, ink);
+ };
+ }
+ // What was pushed past the view leaves blank rows behind it, none.
+}
+
+fn lineAt(index: []const usize, at: usize) usize {
+ return Places.lineOf(index, at);
+}
+
+/// Run `i`'s exit status (`!` and `A-!` run once for them all).
+fn outcome(live_run: *const Pipe.PendingPipe, i: usize) u8 {
+ return live_run.codes[if (live_run.how.pipes()) i else 0];
+}
+
+/// Range `i`'s output as ghost rows from body row `out`, the rows it
+/// reaches; none for a run that failed.
+fn ghostRows(s: *Surface, live_run: *const Pipe.PendingPipe, i: usize, out_: usize, rows: usize, y0: usize, x0: u16, width: u16, ground: [3]u8, ink: [3]u8) usize {
+ if (outcome(live_run, i) != 0) return out_;
+ var out = out_;
+ const text = live_run.outs[if (live_run.how.pipes()) i else 0];
+ var lines = std.mem.splitScalar(u8, if (std.mem.endsWith(u8, text, "\n")) text[0 .. text.len - 1] else text, '\n');
+ while (lines.next()) |l| {
+ if (out >= rows) break;
+ const y: u16 = @intCast(y0 + out);
+ s.fill(0, y, @intCast(s.cols), 1, .{});
+ s.fill(x0, y, width, 1, .{ .bg = .{ .rgb = ground } });
+ _ = s.print(x0, y, width, l, .{ .fg = .{ .rgb = ink }, .bg = .{ .rgb = ground } });
+ out += 1;
+ }
+ return out;
+}
+
+/// The x of the blank after pane `pane`'s line numbers.
+fn gutterX(pane: *const Pane, r: pardes.Rect) u16 {
+ return r.x + config.GUTTER + (File.gutterWidth(pane) -| File.laneCells(pane) -| pane.layers.heat -| 1);
+}
+
+/// `┃` on the lines the selections a sam prompt began with cover, and
+/// the ones `K` or `A-K` would drop dimmed and struck through.
+fn fence(p: *Pardes, s: *Surface, pane: *Pane, r: pardes.Rect, body_h: u16) void {
+ const f = &pane.file.?;
+ const tab = p.settings.tab;
+ const snap = pane.sel_snap[0..pane.nsel_snap];
+ if (snap.len == 0) return;
+ const x = gutterX(pane, r);
+ const y = p.bodyTop(pane, r);
+ const ink = p.chromeTheme().box;
+ const nlines = File.nlines(p.gpa, f);
+ const op = p.view().tag_state.prompt.op;
+ var kept: [Text.max_selections]modal.Selection = undefined;
+ const now = if (op == .keep or op == .remove) pane.body.ranges(f.content, 0, &kept).n else 0;
+ var last: i32 = -1;
+ var vr: u16 = 0;
+ while (vr < body_h) : (vr += 1) {
+ const line = pane.wrapAt(tab, vr).line;
+ if (line == last or line < 0) continue;
+ if (line >= nlines) break;
+ last = line;
+ const ls = File.lineStart(p.gpa, f, @intCast(line));
+ const le = File.lineStart(p.gpa, f, @intCast(line + 1));
+ // The ranges are in the text's order: the first ending past the
+ // line's start, on while they start before its end.
+ var i = endingPast(snap, ls);
+ if (i < snap.len and @min(snap[i].anchor, snap[i].head) < @max(le, ls + 1)) {
+ var style = s.at(x, y + vr).style;
+ style.fg = .{ .rgb = ink };
+ s.set(x, y + vr, "┃", style);
+ }
+ // K and A-K: the selections that would go, on this line.
+ if (op != .keep and op != .remove) continue;
+ while (i < snap.len and @min(snap[i].anchor, snap[i].head) < le) : (i += 1) {
+ const lo = @min(snap[i].anchor, snap[i].head);
+ const hi = @max(snap[i].anchor, snap[i].head);
+ const k = endingPast(kept[0..now], lo);
+ const stays = k < now and @min(kept[k].anchor, kept[k].head) == lo and @max(kept[k].anchor, kept[k].head) == hi;
+ if (!stays) strike(p, s, pane, r, line, @intCast(@max(lo, ls) - ls), @intCast(@min(hi, le) - ls));
+ }
+ }
+}
+
+/// The first of `ranges` (in the text's order) ending past byte `at`.
+fn endingPast(ranges: []const modal.Selection, at: usize) usize {
+ return std.sort.partitionPoint(modal.Selection, ranges, at, struct {
+ fn before(byte: usize, r: modal.Selection) bool {
+ return @max(r.anchor, r.head) <= byte;
+ }
+ }.before);
+}
+
+/// Bytes [lo, hi) of `line`, as many of its rows as show them, dimmed and
+/// struck through (File.paintWordSelection's walk).
+fn strike(p: *Pardes, s: *Surface, pane: *Pane, r: pardes.Rect, line: i32, lo_: i32, hi_: i32) void {
+ const tab = p.settings.tab;
+ const tw = r.w - config.GUTTER;
+ const prefix: i32 = File.gutterWidth(pane);
+ const body_y = p.bodyTop(pane, r);
+ var vr: i32 = 0;
+ while (vr + @as(i32, pane.tag_rows) < @as(i32, r.h)) : (vr += 1) {
+ const here = pane.wrapAt(tab, vr);
+ if (here.line != line) continue;
+ var hi = hi_;
+ const next = pane.wrapAt(tab, vr + 1);
+ if (next.line == line) hi = @min(hi, next.at);
+ const lo = @max(lo_, here.at);
+ if (hi <= lo) continue;
+ const c0 = prefix + here.pad + File.displayOffset(tab, pane, line, here.at, lo);
+ const c1 = prefix + here.pad + File.displayEndOffset(tab, pane, line, here.at, hi - 1);
+ var col = @max(prefix, c0);
+ while (col <= c1 and col < tw) : (col += 1) {
+ const style = &s.at(r.x + config.GUTTER + @as(u16, @intCast(col)), body_y + @as(u16, @intCast(vr))).style;
+ style.dim = true;
+ style.strikethrough = true;
+ }
+ }
+}
+
+/// The head of the prompt's tag: ` s self▌ = Exec Edit x/self/ 4
+/// selections in 6 lines ⏎ select · C-r history · esc`.
+pub fn head(p: *Pardes, arena: std.mem.Allocator, pane: *Pane) !TagState.Head {
+ const s = &p.view().tag_state;
+ const pr = &s.prompt;
+ var text: std.ArrayList(u8) = .empty;
+ var spans: std.ArrayList(TagState.Span) = .empty;
+ try text.append(arena, ' ');
+ try styled(arena, &text, &spans, info.get(pr.op).cell, .key);
+ try text.append(arena, ' ');
+ const caret: u32 = @intCast(text.items.len + s.field.caret);
+ const line = s.field.text();
+ try text.appendSlice(arena, line);
+ if (line.len > 0) {
+ var buf: [Field.max + 16]u8 = undefined;
+ var w: std.Io.Writer = .fixed(&buf);
+ if (plainWord(&w, pr.op, line) catch null) |verb| {
+ try styled(arena, &text, &spans, try std.fmt.allocPrint(arena, " = {s}", .{verb}), .dim);
+ try text.print(arena, " {s}", .{w.buffered()});
+ }
+ if (pr.bad) {
+ try text.appendSlice(arena, " ");
+ try styled(arena, &text, &spans, regexMessage(line), .err);
+ try text.print(arena, " · the {d} from before shown, dimmed", .{@as(usize, pane.body.nsel) + 1});
+ } else if (behavior(pr.op) != null) {
+ try pipeCount(p, arena, &text, &spans, pane, pr, line);
+ } else try count(arena, &text, pane, pr);
+ }
+ try text.appendSlice(arena, " ");
+ try styled(arena, &text, &spans, info.get(pr.op).hint, .dim);
+ return .{ .text = text.items, .spans = spans.items, .cells = 1, .caret = caret };
+}
+
+fn styled(arena: std.mem.Allocator, text: *std.ArrayList(u8), spans: *std.ArrayList(TagState.Span), s: []const u8, style: TagState.Style) !void {
+ const lo: u32 = @intCast(text.items.len);
+ try text.appendSlice(arena, s);
+ try spans.append(arena, .{ .lo = lo, .hi = @intCast(text.items.len), .style = style });
+}
+
+/// The prompt's count after its field: what it found (`4 selections in 6
+/// lines`, `keeps 3 of 9`, `3/7 · 5 lines`, `3/⋯` while its places are
+/// found, `0`).
+fn count(arena: std.mem.Allocator, text: *std.ArrayList(u8), pane: *Pane, pr: *const Prompt) !void {
+ switch (pr.op) {
+ .search, .search_back => {
+ const set = &pane.places;
+ if (!set.shows(pane)) return;
+ const hits = set.hits.items;
+ if (set.complete() and hits.len == 0) return text.appendSlice(arena, " 0");
+ try text.appendSlice(arena, " ");
+ const at = if (set.current) |c| (if (c < hits.len) c else null) else null;
+ if (at) |c| try text.print(arena, "{d}", .{c + 1}) else try text.appendSlice(arena, "–");
+ if (!set.complete()) return text.appendSlice(arena, "/⋯");
+ try text.print(arena, "/{d} · {d} line{s}", .{ hits.len, pr.lines, plural(pr.lines) });
+ // Round the end from where it began.
+ const c = at orelse return;
+ const origin = set.origin(pane);
+ if (if (pr.op == .search) hits[c].start < origin else hits[c].start > origin) try text.appendSlice(arena, " · wrapped");
+ },
+ .select, .split => if (pr.found == 0)
+ try text.appendSlice(arena, " 0")
+ else
+ try text.print(arena, " {d} selection{s} in {d} line{s}", .{ pr.found, plural(pr.found), pr.scope, plural(pr.scope) }),
+ .keep, .remove => try text.print(arena, " keeps {d} of {d}", .{ pr.found, pane.nsel_snap }),
+ else => {},
+ }
+}
+
+/// A pipe prompt's count: `6 lines → 5 · exit 0`, `6 runs · 5 ok · 1 exit 2
+/// <its stderr's first line>`, `keeps 4 of 6`, `⋯` while it runs, or why
+/// it does not run live.
+fn pipeCount(p: *const Pardes, arena: std.mem.Allocator, text: *std.ArrayList(u8), spans: *std.ArrayList(TagState.Span), pane: *const Pane, pr: *const Prompt, line: []const u8) !void {
+ if (!pr.forced and !pure(line)) {
+ try text.appendSlice(arena, " ");
+ try styled(arena, text, spans, commandName(line), .err);
+ return text.appendSlice(arena, " isn't a known filter · C-p runs it");
+ }
+ const live_run = answered(p, pane, line) orelse return text.appendSlice(arena, " ⋯");
+ const n = live_run.codes.len;
+ var ok: usize = 0;
+ var bad: ?usize = null;
+ for (live_run.codes, 0..) |c, i| {
+ if (c == 0) ok += 1 else if (bad == null) bad = i;
+ }
+ if (pr.op == .keep_pipe) return text.print(arena, " keeps {d} of {d}", .{ ok, n });
+ if (bad) |i| {
+ const err = live_run.errs[i];
+ try text.print(arena, " {d} run{s} · {d} ok · {d} exit {d} ", .{ n, plural(n), ok, n - ok, live_run.codes[i] });
+ try styled(arena, text, spans, err[0 .. std.mem.indexOfScalar(u8, err, '\n') orelse err.len], .err);
+ if (pr.refused and ok > 0) try text.print(arena, " — ⏎ again applies the {d} that worked", .{ok});
+ return;
+ }
+ if (pr.op == .pipe_to) return text.print(arena, " {d} run{s} · output below, the text stays", .{ n, plural(n) });
+ var in: usize = 0;
+ for (live_run.inputs) |input| in += lineCount(input);
+ var out: usize = 0;
+ for (live_run.outs) |o| out += lineCount(o);
+ try text.print(arena, " {d} line{s} → {d} · exit 0", .{ in, plural(in), out });
+}
+
+fn lineCount(s: []const u8) usize {
+ if (s.len == 0) return 0;
+ return std.mem.count(u8, s, "\n") + @intFromBool(s[s.len - 1] != '\n');
+}
+
+fn plural(n: usize) []const u8 {
+ return if (n == 1) "" else "s";
+}
+
+/// The rows the prompt's band takes: its history unrolled (Ctrl-r), the
+/// lines the field is in, eleven at most.
+pub fn takes(p: *Pardes) u16 {
+ const s = &p.view().tag_state;
+ if (s.prompt.op == .pipe_to) if (p.panes[TagState.hostOf(p) orelse return 0]) |pane| if (answered(p, pane, s.field.text())) |l|
+ return @max(runRows(l), if (s.prompt.history) historyRows(p) else 0);
+ if (!s.prompt.history) return 0;
+ return historyRows(p);
+}
+
+/// `A-|`'s runs as rows: each `#1 exit 0`, then its output's lines.
+fn runRows(l: *const Pipe.PendingPipe) u16 {
+ var n: usize = 0;
+ for (l.outs) |o| n += 1 + lineCount(o);
+ return @intCast(@min(Band.Cursor.shown, n));
+}
+
+fn historyRows(p: *Pardes) u16 {
+ const s = &p.view().tag_state;
+ var n: u16 = 0;
+ const r = ring(p, s.prompt.op);
+ for (r.lines[0..r.n]) |l| {
+ if (std.mem.indexOf(u8, l.slice(), s.field.text()) != null) n += 1;
+ }
+ return @max(1, @min(Band.Cursor.shown, n));
+}
+
+/// The prompt's steps in its band: its history, newest first, the lines
+/// holding the field, the one Up recalled on.
+pub fn steps(p: *Pardes, arena: std.mem.Allocator, out: *[Band.max_steps]Band.Step) ![]Band.Step {
+ const s = &p.view().tag_state;
+ var made: usize = 0;
+ if (s.prompt.op == .pipe_to) if (p.panes[TagState.hostOf(p) orelse return out[0..0]]) |pane| if (answered(p, pane, s.field.text())) |l| {
+ var rows: std.ArrayList(Band.Row) = .empty;
+ for (l.outs, l.codes, 0..) |o, c, i| {
+ if (rows.items.len >= Band.Cursor.shown) break;
+ const said = try std.fmt.allocPrint(arena, "#{d} exit {d}", .{ i + 1, c });
+ try rows.append(arena, .{ .text = said, .key = @intCast(said.len) });
+ var lines = std.mem.splitScalar(u8, if (c == 0) o else l.errs[i], '\n');
+ while (lines.next()) |line| {
+ if (rows.items.len >= Band.Cursor.shown) break;
+ if (line.len > 0) try rows.append(arena, .{ .text = line });
+ }
+ }
+ out[made] = .{ .rows = rows.items, .doc = true };
+ made += 1;
+ };
+ if (!s.prompt.history) return out[0..made];
+ return out[0 .. made + try historyStep(p, arena, &out[made])];
+}
+
+/// The history step (Ctrl-r): its lines newest first, those holding the
+/// field, the one Up recalled on.
+fn historyStep(p: *Pardes, arena: std.mem.Allocator, out: *Band.Step) !usize {
+ const s = &p.view().tag_state;
+ const r = ring(p, s.prompt.op);
+ var rows: std.ArrayList(Band.Row) = .empty;
+ const q = s.field.text();
+ var back: u8 = 1;
+ while (back <= r.n and rows.items.len < Band.Cursor.shown) : (back += 1) {
+ const l = r.get(back).?;
+ if (std.mem.indexOf(u8, l, q) == null) continue;
+ try rows.append(arena, .{ .text = l, .on = back == s.prompt.recall, .index = back });
+ }
+ if (rows.items.len == 0) try rows.append(arena, .{ .text = if (r.n == 0) "no history yet" else "no line holds it", .dim = true });
+ out.* = .{ .rows = rows.items };
+ return 1;
+}
+
+fn typeKeys(p: *Pardes, keys: []const u8) void {
+ for (keys) |c| p.update(.{ .key = .{ .cp = c, .text = &[_]u8{c} } });
+}
+
+fn tagOf(p: *Pardes) ![]const u8 {
+ return tagline.tagText(p, p.scratch.allocator(), p.panes[p.view().active].?);
+}
+
+fn has(hay: []const u8, needle: []const u8) bool {
+ return std.mem.indexOf(u8, hay, needle) != null;
+}
+
+test "s asks in the tag's head: its key cell, the field, the plain word and the count, the selections live in the body; no match is 0, a pattern that is no regex keeps the last result dimmed and says why, Esc puts them back" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 200, .rows = 30 });
+ defer p.deinit();
+ const pane = try p.setTestFile("self.a = 1;\nself.b = 2;\nother = 3;\n");
+ const rest = try std.testing.allocator.dupe(u8, try tagOf(p));
+ defer std.testing.allocator.free(rest);
+ typeKeys(p, "%s");
+ try std.testing.expectEqual(TagState.Kind.prompt, p.view().tag_state.kind);
+ // No chip on the notice band: the prompt is the tag's.
+ try std.testing.expectEqual(Pane.Prompt.none, pane.prompt);
+ try std.testing.expect(std.mem.endsWith(u8, try tagOf(p), " s ⏎ select · C-r history · esc"));
+ typeKeys(p, "self");
+ try std.testing.expect(has(try tagOf(p), " s self = Exec Edit x/self/ 2 selections in 3 lines ⏎ select"));
+ try std.testing.expectEqual(@as(u16, 1), pane.body.nsel);
+ try std.testing.expect(selecting(p, pane).?.dim == false);
+ // No match: 0, and the selection it began with.
+ typeKeys(p, "x");
+ try std.testing.expect(has(try tagOf(p), "= Exec Edit x/selfx/ 0 "));
+ try std.testing.expectEqual(@as(u16, 0), pane.body.nsel);
+ p.update(.{ .key = .{ .cp = Key.backspace } });
+ try std.testing.expectEqual(@as(u16, 1), pane.body.nsel);
+ // No regex: the two from before, dimmed, and why.
+ typeKeys(p, "(");
+ try std.testing.expect(has(try tagOf(p), " bad regular expression · the 2 from before shown, dimmed "));
+ try std.testing.expectEqual(@as(u16, 1), pane.body.nsel);
+ try std.testing.expect(selecting(p, pane).?.dim);
+ // Esc: rest, the tag and the selection as they were.
+ p.update(.{ .key = .{ .cp = Key.escape } });
+ try std.testing.expectEqual(TagState.Kind.rest, p.view().tag_state.kind);
+ try std.testing.expectEqualStrings(rest, try tagOf(p));
+ try std.testing.expectEqual(@as(u16, 0), pane.body.nsel);
+ const r = pane.body.primaryRange(pane.file.?.content, 0);
+ try std.testing.expectEqual(pane.file.?.content.len, @max(r.anchor, r.head));
+ try std.testing.expect(selecting(p, pane) == null);
+}
+
+test "Enter keeps what s found, the pattern in / and in the history Up brings back; K keeps, counted; a pipe from the body asks in the tag and runs off the loop" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 200, .rows = 30 });
+ defer p.deinit();
+ while (p.nextEffect()) |_| {}
+ const pane = try p.setTestFile("self.a = 1;\nself.b = 2;\nother = 3;\n");
+ typeKeys(p, "%sself..");
+ p.update(.{ .key = .{ .cp = Key.enter } });
+ try std.testing.expectEqual(TagState.Kind.rest, p.view().tag_state.kind);
+ try std.testing.expectEqual(@as(u16, 1), pane.body.nsel);
+ try std.testing.expectEqualStrings("self..", p.registers.value('/', 0).?);
+ try std.testing.expectEqualStrings("self..", p.prompt_history.search.get(1).?);
+ // K over the two: Up brings `self..` back, `b` keeps one of them.
+ typeKeys(p, "K");
+ p.update(.{ .key = .{ .cp = Key.up } });
+ try std.testing.expectEqualStrings("self..", p.view().tag_state.field.text());
+ try std.testing.expect(has(try tagOf(p), " K self.. = Exec Edit g/self../ keeps 2 of 2"));
+ p.update(.{ .key = .{ .cp = Key.down } });
+ typeKeys(p, "b");
+ try std.testing.expect(has(try tagOf(p), " K b = Exec Edit g/b/ keeps 1 of 2 ⏎ keep"));
+ // Ctrl-r: the history under the tag, a row a line.
+ p.update(.{ .key = .{ .cp = 'r', .ctrl = true } });
+ try std.testing.expectEqual(@as(u16, 1), Band.takes(p, p.view().active));
+ p.update(.{ .key = .{ .cp = Key.enter } });
+ try std.testing.expectEqual(@as(u16, 0), pane.body.nsel);
+ try std.testing.expectEqualStrings("b", p.prompt_history.search.get(1).?);
+ try std.testing.expectEqualStrings("self..", p.prompt_history.search.get(2).?);
+ // | from the body: in the tag, the plain word Edit's, Enter pipes.
+ typeKeys(p, "|");
+ try std.testing.expectEqual(Pane.Prompt.none, pane.prompt);
+ p.update(.{ .key = .{ .cp = 't', .text = "tr a-z A-Z" } });
+ try std.testing.expect(has(try tagOf(p), " | tr a-z A-Z = Exec Edit |tr a-z A-Z ⋯ ⏎ replace"));
+ p.update(.{ .key = .{ .cp = Key.enter } });
+ try std.testing.expectEqualStrings("tr a-z A-Z", p.registers.value('|', 0).?);
+ var asked: ?u32 = null;
+ while (p.nextEffect()) |effect| if (effect == .pipe) {
+ asked = effect.pipe.id;
+ };
+ const request = p.pipe.pipeRequest(asked orelse return error.MissingPipeEffect).?;
+ try std.testing.expectEqualStrings("tr a-z A-Z", request.command);
+ try std.testing.expectEqualSlices(u8, "self.b", request.inputs[0]);
+ // Esc in a pipe's prompt applies nothing: the live run dropped.
+ typeKeys(p, "|cat");
+ p.update(.{ .key = .{ .cp = Key.escape } });
+ try std.testing.expect(p.pipe.preview == null);
+}
+
+const dirty = "dirty one\nclean\ndirty two dirty\nclean\ndirty three\ndirty four dirty\nclean\ndirty five\n";
+
+/// The glyph in the blank after the line number of body row `row`.
+fn gutterAt(p: *Pardes, arena: std.mem.Allocator, row: u16) ![]const u8 {
+ p.sync();
+ const s = try p.render(arena);
+ const pane = p.panes[0].?;
+ const r = p.view().rects[0];
+ const x = r.x + config.GUTTER + (File.gutterWidth(pane) -| File.laneCells(pane) -| pane.layers.heat -| 1);
+ return s.at(x, p.bodyTop(pane, r) + row).grapheme();
+}
+
+test "/ searches the body as it is typed: the current place selected, the gutter marked, counted 3/7 · 5 lines; Enter folds /dirty/ 3/7 into the trail; n says where it went, round the end too; the first Esc clears the tints and dims the word, Look on it lights them again" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 200, .rows = 30 });
+ defer p.deinit();
+ var frame = std.heap.ArenaAllocator.init(std.testing.allocator);
+ defer frame.deinit();
+ const pane = try p.setTestFile(dirty);
+ pane.body.cur_row = 2;
+ pane.body.cur_col = 6;
+ typeKeys(p, "/dirty");
+ try std.testing.expect(has(try tagOf(p), " / dirty = Look /dirty/ 3/7 · 5 lines ⏎ land · M-⏎ as a list"));
+ try std.testing.expectEqual(@as(?usize, 2), pane.places.current);
+ try std.testing.expectEqualStrings("▪", try gutterAt(p, frame.allocator(), 0));
+ try std.testing.expectEqualStrings(" ", try gutterAt(p, frame.allocator(), 1));
+ try std.testing.expectEqualStrings("▸", try gutterAt(p, frame.allocator(), 2));
+ try std.testing.expectEqualStrings("▪", try gutterAt(p, frame.allocator(), 7));
+ p.update(.{ .key = .{ .cp = Key.enter } });
+ try std.testing.expectEqual(TagState.Kind.rest, p.view().tag_state.kind);
+ try std.testing.expect(std.mem.startsWith(u8, try tagOf(p), "/dirty/ 3/7 › /test.txt "));
+ try std.testing.expectEqualStrings("dirty", p.registers.value('/', 0).?);
+ try std.testing.expectEqualStrings(" ", try gutterAt(p, frame.allocator(), 0));
+ // n: the word in place, and the line said.
+ typeKeys(p, "n");
+ try std.testing.expect(std.mem.startsWith(u8, try tagOf(p), "/dirty/ 4/7 › "));
+ try std.testing.expect(has(p.messages.saidBy(pane), "/dirty/ 4/7 · line 5"));
+ typeKeys(p, "nnnn");
+ try std.testing.expect(std.mem.startsWith(u8, try tagOf(p), "/dirty/ 1/7 ↻ › "));
+ // Esc: the tints go, the word stays, dimmed; Look on it lights them
+ // again, the place it was on selected.
+ p.update(.{ .key = .{ .cp = Key.escape } });
+ try std.testing.expect(!pane.places.started);
+ try std.testing.expect(std.mem.startsWith(u8, try tagOf(p), "/dirty/ 1/7 ↻ › "));
+ try std.testing.expect(unlit(p, pane) != null);
+ typeKeys(p, "j");
+ Trail.lookStep(p, 0, 0);
+ try std.testing.expect(pane.places.started and unlit(p, pane) == null);
+ try std.testing.expectEqual(@as(?usize, 0), pane.places.current);
+ const sel = pane.body.primaryRange(pane.file.?.content, 0);
+ try std.testing.expectEqual(@as(usize, 0), @min(sel.anchor, sel.head));
+ // Off a place: –/7.
+ typeKeys(p, "j");
+ try std.testing.expect(std.mem.startsWith(u8, try tagOf(p), "/dirty/ –/7"));
+ // One search word a pane: a new search takes its place.
+ typeKeys(p, "gg/clean");
+ p.update(.{ .key = .{ .cp = Key.enter } });
+ try std.testing.expect(std.mem.startsWith(u8, try tagOf(p), "/clean/ 1/3 › /test.txt "));
+ try std.testing.expectEqual(@as(u8, 1), pane.trail.n);
+}
+
+test "? searches back from the caret; no match is 0; a pattern that is no regex keeps the last places dimmed; Esc puts the body back; * makes the search word with no prompt; Alt-Enter keeps the places as the query pane's rows" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 200, .rows = 30 });
+ defer p.deinit();
+ const pane = try p.setTestFile(dirty);
+ pane.body.cur_row = 2;
+ pane.body.cur_col = 6;
+ const was = pane.body.primaryRange(pane.file.?.content, 0);
+ typeKeys(p, "?dirty");
+ try std.testing.expect(has(try tagOf(p), " ? dirty = Look ?dirty? 2/7 · 5 lines ⏎ land"));
+ typeKeys(p, "x");
+ try std.testing.expect(has(try tagOf(p), "= Look ?dirtyx? 0 ⏎ land"));
+ try std.testing.expectEqualDeep(was, pane.body.primaryRange(pane.file.?.content, 0));
+ p.update(.{ .key = .{ .cp = Key.backspace } });
+ typeKeys(p, "(");
+ try std.testing.expect(has(try tagOf(p), " bad regular expression · "));
+ try std.testing.expect(dims(p, pane) and pane.places.started);
+ try std.testing.expectEqualStrings("dirty", pane.places.pattern);
+ p.update(.{ .key = .{ .cp = Key.escape } });
+ try std.testing.expect(!pane.places.started);
+ try std.testing.expectEqualDeep(was, pane.body.primaryRange(pane.file.?.content, 0));
+ try std.testing.expectEqual(@as(u8, 0), pane.trail.n);
+ // `*` on `dirty` at the top: its places, its word, no prompt.
+ typeKeys(p, "gge*");
+ try std.testing.expectEqual(TagState.Kind.rest, p.view().tag_state.kind);
+ try std.testing.expect(std.mem.startsWith(u8, try tagOf(p), "/\\bdirty\\b/ 1/7 › "));
+ // Alt-Enter: the query pane, its line `/dirty`.
+ typeKeys(p, "/dirty");
+ p.update(.{ .key = .{ .cp = Key.enter, .alt = true } });
+ try std.testing.expectEqual(TagState.Kind.rest, p.view().tag_state.kind);
+ try std.testing.expect(p.panes[p.view().active].?.query != null);
+}
+
+test "sam prompts one after another make one recipe word, the Edit line it is; a motion ends it and the next starts the pane's one again; ! adds nothing; the scope fenced in the gutter, what K drops struck; Look puts its selections back, Exec runs it as Edit" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 200, .rows = 30 });
+ defer p.deinit();
+ var frame = std.heap.ArenaAllocator.init(std.testing.allocator);
+ defer frame.deinit();
+ while (p.nextEffect()) |_| {}
+ const pane = try p.setTestFile("self.a = 1;\nself.b = 2;\nother = 3;\n");
+ typeKeys(p, "%sother");
+ p.update(.{ .key = .{ .cp = Key.enter } });
+ try std.testing.expect(std.mem.startsWith(u8, try tagOf(p), "Edit x/other/ › /test.txt "));
+ // Look on it: the selection it made, again.
+ typeKeys(p, "gg");
+ Trail.lookStep(p, 0, 0);
+ const back = pane.body.primaryRange(pane.file.?.content, 0);
+ try std.testing.expectEqual(@as(usize, 24), @min(back.anchor, back.head));
+ try std.testing.expectEqual(@as(usize, 29), @max(back.anchor, back.head));
+ // A motion ends it: the next s is a recipe of its own, the pane's one.
+ typeKeys(p, "j%sself..");
+ for ([_]u16{ 0, 1, 2 }) |row| try std.testing.expectEqualStrings("┃", try gutterAt(p, frame.allocator(), row));
+ p.update(.{ .key = .{ .cp = Key.enter } });
+ try std.testing.expect(std.mem.startsWith(u8, try tagOf(p), "Edit x/self../ › /test.txt "));
+ try std.testing.expectEqual(@as(u8, 1), pane.trail.n);
+ // K right after: `self.b` would go, struck through.
+ typeKeys(p, "Ka");
+ p.sync();
+ const s = try p.render(frame.allocator());
+ const r = p.view().rects[0];
+ const cell = s.at(r.x + config.GUTTER + File.gutterWidth(pane), p.bodyTop(pane, r) + 1);
+ try std.testing.expect(cell.style.strikethrough and cell.style.dim);
+ try std.testing.expect(!s.at(r.x + config.GUTTER + File.gutterWidth(pane), p.bodyTop(pane, r)).style.strikethrough);
+ p.update(.{ .key = .{ .cp = Key.enter } });
+ typeKeys(p, "|");
+ p.update(.{ .key = .{ .cp = 't', .text = "tr a-z A-Z" } });
+ p.update(.{ .key = .{ .cp = Key.enter } });
+ try std.testing.expect(std.mem.startsWith(u8, try tagOf(p), "Edit x/self../ g/a/ |tr a-z A-Z › /test.txt "));
+ // `!` applies and adds nothing: an Edit line cannot say it.
+ typeKeys(p, "!");
+ p.update(.{ .key = .{ .cp = 'e', .text = "echo" } });
+ p.update(.{ .key = .{ .cp = Key.enter } });
+ try std.testing.expect(std.mem.startsWith(u8, try tagOf(p), "Edit x/self../ g/a/ |tr a-z A-Z › /test.txt "));
+ while (p.nextEffect()) |_| {}
+ if (p.pipe.wait) |*w| w.deinit();
+ p.pipe.wait = null;
+ // Exec on it: Edit runs it, its command off the loop.
+ typeKeys(p, "%");
+ Trail.execStep(p, 0, 0);
+ try std.testing.expect(p.pipe.edit_run != null);
+}
+
+/// The pipe request the last key made, its id.
+fn lastPipe(p: *Pardes) ?u32 {
+ var id: ?u32 = null;
+ while (p.nextEffect()) |effect| if (effect == .pipe) {
+ id = effect.pipe.id;
+ };
+ return id;
+}
+
+test "a pipe prompt runs a known filter live, a run a selection: the outputs ghost lines under the lines they replace, counted; one no filter waits for C-p; Enter over runs that failed is refused once, then applies the ones that worked; when every run failed nothing" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 200, .rows = 30 });
+ defer p.deinit();
+ var frame = std.heap.ArenaAllocator.init(std.testing.allocator);
+ defer frame.deinit();
+ while (p.nextEffect()) |_| {}
+ const pane = try p.setTestFile("b\na\nc\n");
+ typeKeys(p, "%s[ab]");
+ p.update(.{ .key = .{ .cp = Key.enter } });
+ typeKeys(p, "|");
+ p.update(.{ .key = .{ .cp = 't', .text = "tr a-z A-Z" } });
+ try std.testing.expect(has(try tagOf(p), " | tr a-z A-Z = Exec Edit |tr a-z A-Z ⋯ ⏎ replace"));
+ const first = lastPipe(p) orelse return error.MissingLiveRun;
+ const asked = p.pipe.pipeRequest(first).?;
+ try std.testing.expectEqual(@as(usize, 2), asked.inputs.len);
+ try std.testing.expect(has(asked.command, "tr a-z A-Z") and has(asked.command, "\\036"));
+ p.update(.{ .pipe_resp = .{ .id = first, .success = true, .outputs = &.{ "B\x1e\x1e0", "A\x1e\x1e0" } } });
+ try std.testing.expect(has(try tagOf(p), " 2 lines → 2 · exit 0 ⏎ replace"));
+ // The body: each output a ghost line under the line it replaces, the
+ // rows below pushed down; the text as it was.
+ p.sync();
+ const s = try p.render(frame.allocator());
+ const r = p.view().rects[0];
+ const x = r.x + config.GUTTER + File.gutterWidth(pane);
+ const y = p.bodyTop(pane, r);
+ for ([_][]const u8{ "b", "B", "a", "A", "c" }, 0..) |want, row| try std.testing.expectEqualStrings(want, s.at(x, y + @as(u16, @intCast(row))).grapheme());
+ try std.testing.expectEqual(pardes.Color{ .rgb = colors.Grounds.of(p.theme()).del.row }, s.at(x, y).style.bg);
+ try std.testing.expectEqual(pardes.Color{ .rgb = colors.Grounds.of(p.theme()).add.row }, s.at(x, y + 1).style.bg);
+ try std.testing.expectEqualStrings("b\na\nc\n", pane.file.?.content);
+ // Enter: what the live run made, applied.
+ p.update(.{ .key = .{ .cp = Key.enter } });
+ try std.testing.expectEqualStrings("B\nA\nc\n", pane.file.?.content);
+ try std.testing.expect(lastPipe(p) == null);
+ // No known filter: not run until C-p.
+ typeKeys(p, "|");
+ p.update(.{ .key = .{ .cp = 'r', .text = "rot13" } });
+ try std.testing.expect(has(try tagOf(p), " rot13 isn't a known filter · C-p runs it"));
+ try std.testing.expect(lastPipe(p) == null);
+ p.update(.{ .key = .{ .cp = 'p', .ctrl = true } });
+ const second = lastPipe(p) orelse return error.MissingLiveRun;
+ p.update(.{ .pipe_resp = .{ .id = second, .success = true, .outputs = &.{ "\x1eoops: no\x1e2", "X\x1e\x1e0" } } });
+ try std.testing.expect(has(try tagOf(p), " 2 runs · 1 ok · 1 exit 2 oops: no "));
+ // Enter refused once, said; again, the one that worked applied.
+ p.update(.{ .key = .{ .cp = Key.enter } });
+ try std.testing.expectEqual(TagState.Kind.prompt, p.view().tag_state.kind);
+ try std.testing.expect(has(try tagOf(p), "oops: no — ⏎ again applies the 1 that worked"));
+ p.update(.{ .key = .{ .cp = Key.enter } });
+ try std.testing.expectEqual(TagState.Kind.rest, p.view().tag_state.kind);
+ try std.testing.expectEqualStrings("B\nX\nc\n", pane.file.?.content);
+ // Every run failed: Enter applies nothing, and says so.
+ typeKeys(p, "|sort");
+ const third = lastPipe(p) orelse return error.MissingLiveRun;
+ p.update(.{ .pipe_resp = .{ .id = third, .success = true, .outputs = &.{ "\x1e\x1e1", "\x1e\x1e1" } } });
+ p.update(.{ .key = .{ .cp = Key.enter } });
+ try std.testing.expectEqual(TagState.Kind.prompt, p.view().tag_state.kind);
+ try std.testing.expect(has(p.messages.saidBy(pane), "every run failed"));
+ p.update(.{ .key = .{ .cp = Key.escape } });
+ try std.testing.expectEqualStrings("B\nX\nc\n", pane.file.?.content);
+ try std.testing.expect(p.pipe.preview == null);
+}
+
+test "a live run's framing says each run's output, stderr and status in a real shell" {
+ if (pardes.Term.ops == null) return error.SkipZigTest; // a shell
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 120, .rows = 30 });
+ defer p.deinit();
+ while (p.nextEffect()) |_| {}
+ _ = try p.setTestFile("one\ntwo\n");
+ typeKeys(p, "%s\\w+");
+ p.update(.{ .key = .{ .cp = Key.enter } });
+ typeKeys(p, "|");
+ p.update(.{ .key = .{ .cp = 'g', .text = "grep o" } });
+ p.update(.{ .key = .{ .cp = 'p', .ctrl = true } });
+ const id = lastPipe(p) orelse return error.MissingLiveRun;
+ const job = try @import("selection_pipe.zig").Job.copy(std.testing.allocator, p.pipe.pipeRequest(id).?);
+ defer job.deinit(std.testing.allocator);
+ var response = @import("selection_pipe.zig").runJob(std.testing.allocator, std.testing.io, job);
+ defer response.deinit(std.testing.allocator);
+ try std.testing.expect(response.success);
+ p.update(.{ .pipe_resp = .{ .id = id, .success = true, .outputs = response.outputs } });
+ const live_run = p.pipe.preview.?;
+ try std.testing.expectEqualSlices(u8, &.{ 0, 0 }, live_run.codes);
+ try std.testing.expectEqualStrings("one\n", live_run.outs[0]);
+ p.update(.{ .key = .{ .cp = Key.backspace } });
+ p.update(.{ .key = .{ .cp = 'x', .text = "x" } });
+ const again = lastPipe(p) orelse return error.MissingLiveRun;
+ const job2 = try @import("selection_pipe.zig").Job.copy(std.testing.allocator, p.pipe.pipeRequest(again).?);
+ defer job2.deinit(std.testing.allocator);
+ var response2 = @import("selection_pipe.zig").runJob(std.testing.allocator, std.testing.io, job2);
+ defer response2.deinit(std.testing.allocator);
+ p.update(.{ .pipe_resp = .{ .id = again, .success = true, .outputs = response2.outputs } });
+ // `grep x` finds nothing: exit 1 for both, an empty stderr.
+ try std.testing.expectEqualSlices(u8, &.{ 1, 1 }, p.pipe.preview.?.codes);
+}
diff --git a/core/Query.zig b/core/Query.zig
index 4fbd07e0..a090929a 100644
--- a/core/Query.zig
+++ b/core/Query.zig
@@ -2147,6 +2147,12 @@ pub fn paint(p: *Pardes, s: *Surface, pane: *Pane, r: pardes.Rect, body_h: u16)
// ---- tests ----
+/// `/` and `typed` in the tag's prompt, kept as the query pane (Alt-Enter).
+fn slash(p: *Pardes, typed: []const u8) void {
+ typeKeys(p, typed);
+ p.update(.{ .key = .{ .cp = Key.enter, .alt = true } });
+}
+
fn typeKeys(p: *Pardes, text: []const u8) void {
for (text) |c| p.update(.{ .key = .{ .cp = c, .text = &[_]u8{c} } });
}
@@ -2182,7 +2188,7 @@ test "a / query: keystroke by keystroke, the owner shows the set, rows from its
// cursor on line 3 (row 2)
pane.body.cur_row = 2;
pane.body.cur_col = 0;
- typeKeys(p, "/");
+ slash(p, "/");
const qid = queryPane(p).?;
const qp = p.panes[qid].?;
try std.testing.expectEqual(@as(?usize, 0), layout.ownerOf(p, qid));
@@ -2239,7 +2245,7 @@ test "a dump holding a query pane, live or frozen, restores it as it was" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 100, .rows = 40 });
defer p.deinit();
_ = try p.setTestFile("alpha one\nbeta\nalphabet\n");
- typeKeys(p, "/alpha");
+ slash(p, "/alpha");
for (0..2) |_| {
const qid = queryPane(p).?;
try pardes.dump.dumpState(p);
@@ -2258,7 +2264,7 @@ test "a / query: Enter lands and freezes, the register filled, n and N step sile
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 100, .rows = 40 });
defer p.deinit();
const pane = try p.setTestFile("alpha one\nbeta\nalphabet\ngamma alpha\nalpha two\ndelta\n");
- typeKeys(p, "/alpha");
+ slash(p, "/alpha");
const qid = queryPane(p).?;
const qp = p.panes[qid].?;
const q = qp.query.?;
@@ -2287,7 +2293,7 @@ test "a / query: Enter lands and freezes, the register filled, n and N step sile
typeKeys(p, "N");
try std.testing.expectEqual(@as(?usize, 3), pane.places.current);
// a later `/` reuses the pane: line 1 fresh, the rows the new query's
- typeKeys(p, "/");
+ slash(p, "/");
try std.testing.expectEqual(qid, queryPane(p).?);
try std.testing.expectEqual(qid, p.view().active);
try std.testing.expect(!q.frozen);
@@ -2337,6 +2343,8 @@ test "Find: names fuzzy per keystroke, the group born with its +Preview, nothing
try tmp.dir.writeFile(std.testing.io, .{ .sub_path = name, .data = "pub fn split() void {}\nconst x = 1;\n" });
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 120, .rows = 48 });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
_ = try testFileIn(p, &tmp, "x.txt", "x\n");
p.newScratchBelow(0);
const other = p.view().cols[0].panes[1];
@@ -2386,6 +2394,8 @@ test "Grep: lines of the files under the owner's directory, under their file; Al
try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "b.zig", .data = "const needle = 1;\nconst hay = 2;\nneedle needle\n" });
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 120, .rows = 48 });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
const a = try testFileIn(p, &tmp, "a.txt", "one needle\ntwo\n");
leader(p, "fg");
const qid = queryPane(p).?;
@@ -2429,14 +2439,17 @@ test "* seeds line 1 and keeps the keyboard; SPC b b picks a pane, SPC s s a dec
if (comptime !syntax.minimal_grammars) return error.SkipZigTest;
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 120, .rows = 48 });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
const pane = try p.setTestFile("const alpha = 1;\nfn beta() void {\n _ = alpha;\n}\nfn gamma() void {}\n");
p.gpa.free(pane.file.?.path);
pane.file.?.path = try p.gpa.dupe(u8, "/tmp/x.zig");
- // `*` on `const`: line 1 `/\bconst\b`, the keyboard still in the text
+ // `*` on `const`: its places and the pane's search word, no query
+ // pane, the keyboard still in the text (Prompt.zig)
typeKeys(p, "e*");
- const qid = queryPane(p).?;
+ try std.testing.expect(queryPane(p) == null);
try std.testing.expectEqual(@as(usize, 0), p.view().active);
- try std.testing.expect(std.mem.startsWith(u8, lineOne(p.panes[qid].?.file.?.content), "/"));
+ try std.testing.expect(pane.trail.n == 1 and pane.trail.steps[0] == .search);
try std.testing.expect(pane.places.started);
typeKeys(p, "n");
try std.testing.expectEqual(@as(?usize, 0), pane.places.current);
@@ -2446,7 +2459,6 @@ test "* seeds line 1 and keeps the keyboard; SPC b b picks a pane, SPC s s a dec
p.view().active = 0;
leader(p, "bb");
const bid = queryPane(p).?;
- try std.testing.expectEqual(bid, qid);
try std.testing.expectEqual(Source.panes, p.panes[bid].?.query.?.source);
try std.testing.expect(p.panes[bid].?.query.?.total >= 1);
// SPC s s: the declarations, fuzzy; Enter lands on the line
@@ -2494,7 +2506,7 @@ test "a language server's list: one answer lands with no pane, several open the
p.lspRequest(0, .diagnostics, "");
p.update(.{ .lsp_resp = .{ .id = p.lsp_ask.wait.?.id, .rows = "" } });
try std.testing.expectEqual(@as(usize, 1), npanes(p));
- try std.testing.expect(std.mem.indexOf(u8, pane.msg[0..pane.msg_len], "none") != null);
+ try std.testing.expect(std.mem.indexOf(u8, p.messages.saidBy(pane), "none") != null);
// Several: the list open, the keyboard in it in normal mode on the
// current row, which the text shows; line 1 as text.
pane.body.cur_row = 0;
@@ -2525,7 +2537,7 @@ test "B1 on a query pane's rows places the caret and selects, nothing else, the
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 100, .rows = 40 });
defer p.deinit();
const pane = try p.setTestFile("alpha one\nbeta\nalphabet\ngamma alpha\nalpha two\ndelta\n");
- typeKeys(p, "/alpha");
+ slash(p, "/alpha");
const qid = queryPane(p).?;
const qp = p.panes[qid].?;
const q = qp.query.?;
@@ -2584,6 +2596,8 @@ test "B1 on a query pane's rows places the caret and selects, nothing else, the
test "Enter on a frozen query pane's rows after its text was edited: no row to land on, the keyboard to its owner" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 100, .rows = 40 });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
_ = try p.setTestFile("alpha\n");
p.newScratchBelow(0);
p.view().active = 0;
@@ -2607,6 +2621,8 @@ test "a query row's place is its text: the match tinted after it, B3 on it opens
defer tmp.cleanup();
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 120, .rows = 48 });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
const a = try testFileIn(p, &tmp, "a.txt", "zero\none needle\ntwo\nthree needle here\n");
leader(p, "fg");
typeKeys(p, "needle");
@@ -2668,6 +2684,8 @@ test "the +Preview: the query's hits in its file are its places, the row's one c
try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "b.zig", .data = text });
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 120, .rows = 60 });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
_ = try testFileIn(p, &tmp, "a.txt", "x\n");
leader(p, "fg");
typeKeys(p, "needle");
@@ -2752,6 +2770,8 @@ test "a query row's address reaches every way a look arrives: an empty look writ
defer tmp.cleanup();
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 120, .rows = 48 });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
const a = try testFileIn(p, &tmp, "a.txt", "zero\none needle\ntwo\nthree needle here\n");
leader(p, "fg");
typeKeys(p, "needle");
diff --git a/core/Store.zig b/core/Store.zig
index ac9387cb..1328af38 100644
--- a/core/Store.zig
+++ b/core/Store.zig
@@ -290,6 +290,8 @@ test "store: a closed pane comes back where it was, its rows from the pane that
const dir = dir_buf[0..try tmp.dir.realPath(testing.io, &dir_buf)];
const p = try testWindow(dir);
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
_ = try p.setTestFile("alpha\nbeta\n");
p.newScratchBelow(0);
const sid = p.view().active;
diff --git a/core/Stream.zig b/core/Stream.zig
index 49329361..bcd4f4f8 100644
--- a/core/Stream.zig
+++ b/core/Stream.zig
@@ -1345,7 +1345,9 @@ test "Stream: a big text's declarations are parsed on a worker, never the loop,
p.stream.cancelParse();
shell.q.deinit();
}
+ // `/` asks in the tag; Alt-Enter keeps it as the query pane (Prompt.zig).
for ("/needle") |c| p.update(.{ .key = .{ .cp = c, .text = &[_]u8{c} } });
+ p.update(.{ .key = .{ .cp = pardes.Key.enter, .alt = true } });
const qid = for (p.panes, 0..) |slot, i| {
if (slot) |qp| if (qp.query != null) break i;
} else return error.NoQueryPane;
diff --git a/core/TagState.zig b/core/TagState.zig
index 5a30f182..ef5c1d53 100644
--- a/core/TagState.zig
+++ b/core/TagState.zig
@@ -24,12 +24,15 @@ const Root = bindings.Root;
const Field = @import("Field.zig");
const Band = @import("Band.zig");
const Names = @import("Names.zig");
+const Prompt = @import("Prompt.zig");
+const Ask = @import("lsp/Ask.zig");
/// The tag's states besides a root's level (which `kind` rest with a root
/// current is): `help`, a field over every leaf (SPEC §4.5); `describe`,
/// a sequence replayed in the tree (item 5); `pick`, a picker (Pick.zig,
-/// SPEC §5).
-pub const Kind = enum(u8) { rest, help, describe, pick };
+/// SPEC §5); `rename`, a rename's new name typed (lsp/Ask.zig, SPEC §3.5);
+/// `prompt`, a text prompt (Prompt.zig, SPEC §7).
+pub const Kind = enum(u8) { rest, help, describe, pick, rename, prompt };
pub const replica = .{ .len = .{ .{ "scope", "scope_n" }, .{ "hits", "nhits" } } };
@@ -59,6 +62,9 @@ ntotal: u16 = 0,
rows: Band.Cursor = .{},
/// The picker unrolled in the host's tag, by its serial (Pick.zig).
pick: u32 = 0,
+/// A text prompt's own (Prompt.zig): which, its history's place, what its
+/// field found.
+prompt: Prompt = .{},
/// The root the last key left current, whose delay `due_ns` counts.
root: ?Root = null,
/// When its level shows, on the session's clock: `asked` from its key
@@ -152,7 +158,11 @@ pub fn current(p: *const Pardes, v: *const View) ?Current {
if (v != p.view() or v.header != null) return null;
const pane = p.panes[v.active] orelse return null;
const t = if (pane.focus == .tag) &pane.tag else &pane.body;
- const prefix = t.normal.prefix orelse return null;
+ const prefix = t.normal.prefix orelse {
+ // `"a`: the register named, its verbs next (SPEC §9).
+ const r = t.normal.register;
+ return if (r > ' ' and r <= '~') .{ .root = .register, .path = bindings.keyName(@intCast(r)) } else null;
+ };
const root: Root = switch (prefix) {
.goto_prefix => .goto,
.view_prefix => if (t.normal.sticky) .view_sticky else .view,
@@ -188,7 +198,8 @@ pub fn hostOf(p: *const Pardes) ?usize {
fn textPrefix(p: *const Pardes, v: *const View) bool {
const pane = p.panes[v.active] orelse return false;
- return pane.body.normal.prefix != null or pane.tag.normal.prefix != null;
+ return pane.body.normal.prefix != null or pane.tag.normal.prefix != null or
+ pane.body.normal.register != 0 or pane.tag.normal.register != 0;
}
/// After a key (keys.handleKey): a root newly current starts its delay; one
@@ -219,6 +230,7 @@ pub fn toRest(p: *Pardes) void {
pane.tag.normal.clear();
}
const s = &v.tag_state;
+ if (s.kind == .prompt) Prompt.leave(p);
s.kind = .rest;
s.previewing = .empty;
s.root = null;
@@ -252,6 +264,46 @@ pub fn wake(p: *const Pardes) ?u64 {
return soonest;
}
+/// Each view's tag state as a dump gave it, held to what it indexes: Help's
+/// hits in the tree and the registry, its rows' cursor in them, the field's
+/// caret in its text, describe-key's found leaf or struck key in its keys.
+/// One that is not (a damaged dump: the fuzz's cut and flipped bytes) is
+/// at rest, its memory of leaves kept (dump.zig afterLoad).
+pub fn loaded(p: *Pardes) void {
+ for (&p.views) |*slot| if (slot.*) |*v| {
+ const s = &v.tag_state;
+ var held = s.field.caret <= s.field.len and s.nhits <= max_hits and s.rows.at < @max(1, s.nhits) and !(s.found and s.scope_n == 0) and !(s.missed and s.scope_root == null and s.scope_n == 0);
+ for (s.hits[0..@min(s.nhits, max_hits)]) |at| held = held and at < bindings.flat.len + p.kinds.nwords;
+ if (!held) s.* = .{ .used = s.used };
+ };
+}
+
+/// Asking (SPEC §3.2, §10.2): a question waiting on the pane, its tag at
+/// rest, in place of the tag's own text: what it asks, `▸`, each answer's
+/// key and word, and how to give one (`Esc later` while SPC e has given it
+/// the keyboard). The pane's state, not the view's keyboard: every view
+/// shows it; not while the tag has the keyboard, whose own text is edited
+/// then.
+fn asking(p: *Pardes, arena: std.mem.Allocator, pane: *Pane) !?Head {
+ if (pane.focus == .tag or pane.prompt == .name) return null;
+ const i = p.messages.waiting(pane) orelse return null;
+ const said = &p.messages.live[i];
+ var b: Builder = .{ .arena = arena };
+ try b.put(" ");
+ try b.put(said.words());
+ try b.put(" ");
+ try b.styled("▸", .key);
+ for (said.asks.answers()) |a| {
+ try b.put(" ");
+ try b.styled(&.{a.key}, .key);
+ try b.put(" ");
+ try b.put(a.word);
+ try b.put(" ");
+ }
+ try b.styled(if (p.view().answering == pane.serial) "· Esc later" else "· SPC e to answer", .dim);
+ return b.done();
+}
+
/// The last leaf run in the current level, as the line under it says it
/// (Messages' leader band): `k Hover: its summary (last used here)`, while
/// the level is shown rolled.
@@ -384,7 +436,7 @@ pub fn helpLeaf(p: *const Pardes, at: u16, buf: *[row_max]u8) Leaf {
}
/// How a span of the head is drawn (draw.zig paintPaneTag).
-pub const Style = enum { key, dim, under, strike };
+pub const Style = enum { key, dim, under, strike, err };
pub const Span = struct { lo: u32, hi: u32, style: Style };
/// The head: its text, the spans drawn apart, and the caret in it when the
/// head is typed in.
@@ -427,10 +479,10 @@ const Builder = struct {
};
/// The head of pane `pane`'s tag while it is out of rest in the live view,
-/// null at rest.
+/// or while a question waits on it at rest (`asking`); null at rest.
pub fn head(p: *Pardes, arena: std.mem.Allocator, pane: *Pane) !?Head {
- const id = hostOf(p) orelse return null;
- if (p.panes[id] != pane) return null;
+ const id = hostOf(p) orelse return asking(p, arena, pane);
+ if (p.panes[id] != pane) return asking(p, arena, pane);
const v = p.view();
const s = &v.tag_state;
var b: Builder = .{ .arena = arena };
@@ -478,6 +530,21 @@ pub fn head(p: *Pardes, arena: std.mem.Allocator, pane: *Pane) !?Head {
return b.done();
},
.pick => return @import("Pick.zig").head(p, arena, pane),
+ .prompt => return try Prompt.head(p, arena, pane),
+ // `Rename`, the name under the caret struck, the new one typed:
+ // ` Rename best → top▌ ⏎ rename · esc` (SPEC §3.5).
+ .rename => {
+ try b.put(" Rename ");
+ try b.styled(Ask.renamedWord(pane) orelse "", .strike);
+ try b.put(" → ");
+ var h = b.done();
+ h.caret = @intCast(b.text.items.len + s.field.caret);
+ try b.put(s.field.text());
+ try b.put(" ⏎ rename · esc");
+ h.text = b.text.items;
+ h.spans = b.spans.items;
+ return h;
+ },
}
const cur = current(p, v) orelse return null;
try b.put(" ");
@@ -496,26 +563,33 @@ pub fn head(p: *Pardes, arena: std.mem.Allocator, pane: *Pane) !?Head {
// The rolled level wraps to three rows at most (SPEC §3.6): what does
// not fit is `…`, and `↓` unrolls it whole. A terminal's to the rows its
// own text takes: its pty is its body, and a which-key that took a row
- // would resize the program under it at every SPC.
+ // would resize the program under it at every SPC. Every cell is
+ // counted: the prefix, each child with its separator and a group's
+ // `…`, the ` …` after a child that is not the last, a struck key, the
+ // hint (left out, a terminal's tag took a row more at some widths).
const hint = " ↓ unroll · ? help";
+ const more = " …";
const prefix = try tagline.prefixIn(p, arena, pane);
const tab = p.settings.tab;
const most: usize = if (pane.isTerminal()) @import("layout.zig").wantedTagRows(p, id) else 3;
- const room = most * tagline.tagWidth(p, id) -| panes.File.displayWidth(tab, prefix) -| panes.File.displayWidth(tab, hint) -| 2;
+ const struck: usize = if (s.miss != 0) 1 + panes.File.displayWidth(tab, bindings.keyName(s.miss)) else 0;
+ const room = most * tagline.tagWidth(p, id) -| panes.File.displayWidth(tab, prefix) -| panes.File.displayWidth(tab, hint) -| struck;
var children: [bindings.max_children]bindings.Child = undefined;
+ const level = bindings.level(p, cur.root, cur.path, &children);
const used = s.used[node.group];
- for (bindings.level(p, cur.root, cur.path, &children)) |c| {
- const width = panes.File.displayWidth(tab, b.text.items) + 2 + bindings.keyName(c.key).len + 1 + panes.File.displayWidth(tab, c.label);
- if (width > room) {
- try b.put(" …");
+ var width = panes.File.displayWidth(tab, b.text.items);
+ for (level, 0..) |c, i| {
+ width += @as(usize, if (i == 0) 1 else 2) + panes.File.displayWidth(tab, bindings.keyName(c.key)) + 1 + panes.File.displayWidth(tab, c.label) + @intFromBool(c.group);
+ if (width + @as(usize, if (i + 1 < level.len) panes.File.displayWidth(tab, more) else 0) > room) {
+ try b.put(more);
break;
}
- try b.put(if (b.text.items.len > 0 and std.mem.endsWith(u8, b.text.items, "▸")) " " else " ");
+ try b.put(if (i == 0) " " else " ");
const lo: u32 = @intCast(b.text.items.len);
try b.styled(bindings.keyName(c.key), .key);
try b.put(" ");
try b.put(c.label);
- if (c.group) try b.put("…");
+ if (c.group or c.more) try b.put("…");
const hi: u32 = @intCast(b.text.items.len);
if (bindings.dimmed(pane, c)) try b.spans.append(arena, .{ .lo = lo, .hi = hi, .style = .dim });
if (c.key == used) try b.spans.append(arena, .{ .lo = lo, .hi = hi, .style = .under });
@@ -729,7 +803,7 @@ test "SPC h k is describe-key: g d replays `g ▸ d Def` with its level and doc
// The level unrolled under the tag, the leaf on the cursor, its doc.
try std.testing.expect(pane.band_rows >= 4);
_ = try p.render(a);
- const layer = &p.surface.tag_layers[pardes.BAND_LAYER_BASE + p.view().active];
+ const layer = &p.surface.tag_layers[pardes.BAND_LAYER];
var text: std.ArrayList(u8) = .empty;
for (0..layer.rows) |row| for (layer.cells[row * layer.cols ..][0..layer.cols]) |cell| try text.appendSlice(a, cell.grapheme());
try std.testing.expect(std.mem.indexOf(u8, text.items, "▶ d Def") != null);
@@ -818,3 +892,149 @@ test "a terminal's rolled level takes no more tag rows than its own text: its pt
try std.testing.expectEqual(tag_rows, pane.tag_rows);
try std.testing.expectEqual(rows, pane.rows);
}
+
+test "a rolled level fits its rows at every width: its `…`, its groups' `…` and a struck key are counted" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 120, .rows = 40 });
+ defer p.deinit();
+ _ = try p.setTestFile("one\n");
+ var frame = std.heap.ArenaAllocator.init(std.testing.allocator);
+ defer frame.deinit();
+ const a = frame.allocator();
+ const pane = p.panes[p.view().active].?;
+ for ([_]pardes.Key{ .{ .cp = ' ' }, .{ .cp = 'w', .ctrl = true } }) |root| for ([_]bool{ false, true }) |struck| {
+ p.update(.{ .key = root });
+ p.advance(p.clock.now_ns);
+ p.clock.now_ns = p.view().tag_state.due_ns;
+ // `x` is a child of neither level: struck, the level stays.
+ if (struck) p.update(.{ .key = .{ .cp = 'x' } });
+ for (30..161) |cols| {
+ p.update(.{ .resize = .{ .cols = @intCast(cols), .rows = 40 } });
+ try std.testing.expect(hostOf(p) != null);
+ try std.testing.expect((try tagline.shownTag(p, a, pane)).rows() <= 3);
+ }
+ toRest(p);
+ p.update(.{ .resize = .{ .cols = 120, .rows = 40 } });
+ };
+}
+
+test "a terminal's rolled level keeps its tag rows at every width, C-w's as SPC's: its pty is never resized" {
+ if (pardes.Term.ops == null) return error.SkipZigTest; // a shell
+ const p = try Pardes.init(std.testing.allocator, .{ .file = "mise.toml", .cols = 100, .rows = 30 });
+ defer p.deinit();
+ _ = pardes.exec.spawnTty(p, 0);
+ const shell = p.view().active;
+ const pane = p.panes[shell].?;
+ pane.body.mode = .normal;
+ for ([_]pardes.Key{ .{ .cp = ' ' }, .{ .cp = 'w', .ctrl = true } }) |root| for (30..131) |cols| {
+ p.update(.{ .resize = .{ .cols = @intCast(cols), .rows = 30 } });
+ p.sync();
+ const rows, const tag_rows = .{ pane.rows, pane.tag_rows };
+ p.update(.{ .key = root });
+ // Its key cell alone, before the level shows: shorter than the
+ // tag's own text, the rows it had.
+ p.sync();
+ try std.testing.expect(hostOf(p) == shell);
+ try std.testing.expectEqual(tag_rows, pane.tag_rows);
+ try std.testing.expectEqual(rows, pane.rows);
+ p.advance(p.clock.now_ns);
+ p.clock.now_ns = p.view().tag_state.due_ns;
+ p.sync();
+ try std.testing.expectEqual(tag_rows, pane.tag_rows);
+ try std.testing.expectEqual(rows, pane.rows);
+ toRest(p);
+ };
+}
+
+test "a tag out of rest keeps its rows at rest at least: a root's key cell alone moves no body up" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 40, .rows = 30 });
+ defer p.deinit();
+ _ = try p.setTestFile("one\n");
+ const pane = p.panes[p.view().active].?;
+ p.sync();
+ const rows, const tag_rows = .{ pane.rows, pane.tag_rows };
+ try std.testing.expect(tag_rows > 1);
+ p.update(.{ .key = .{ .cp = ' ' } });
+ p.sync();
+ try std.testing.expect(hostOf(p) != null);
+ try std.testing.expectEqual(tag_rows, pane.tag_rows);
+ try std.testing.expectEqual(rows, pane.rows);
+ // With the keyboard in the tag (whose top row follows its caret) too:
+ // C-w's key cell, a line, in a tag of more rows.
+ toRest(p);
+ pane.focus = .tag;
+ p.update(.{ .key = .{ .cp = 'w', .ctrl = true } });
+ p.sync();
+ try std.testing.expect(hostOf(p) != null);
+ try std.testing.expectEqual(tag_rows, pane.tag_rows);
+ try std.testing.expectEqual(@as(u16, 0), pane.tag_top);
+}
+
+test "a dump's tag state that indexes past what it names is at rest when loaded, and its frame draws" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 120, .rows = 40 });
+ defer p.deinit();
+ _ = try p.setTestFile("one\n");
+ var frame = std.heap.ArenaAllocator.init(std.testing.allocator);
+ defer frame.deinit();
+ for (" ?hel") |c| p.update(.{ .key = .{ .cp = c, .text = &[_]u8{c} } });
+ const s = &p.view().tag_state;
+ try std.testing.expect(s.kind == .help and s.nhits > 0);
+ loaded(p);
+ try std.testing.expect(s.kind == .help);
+ // A hit past the tree and the registry's words, as a cut dump made one.
+ s.hits[0] = 65163;
+ s.used[0] = 'q';
+ loaded(p);
+ try std.testing.expect(s.kind == .rest and s.nhits == 0 and s.used[0] == 'q');
+ _ = try p.render(frame.allocator());
+ // A caret past the field's text, a cursor past the rows.
+ for (" ?hel") |c| p.update(.{ .key = .{ .cp = c, .text = &[_]u8{c} } });
+ s.field.caret = s.field.len + 1;
+ loaded(p);
+ try std.testing.expect(s.kind == .rest);
+ for (" ?hel") |c| p.update(.{ .key = .{ .cp = c, .text = &[_]u8{c} } });
+ s.rows.at = s.nhits;
+ loaded(p);
+ try std.testing.expect(s.kind == .rest);
+}
+
+test "a click that gives the keyboard to another pane ends a level as Esc does; one in the level's own tag keeps it" {
+ const config = @import("config.zig");
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 120, .rows = 40 });
+ defer p.deinit();
+ _ = try p.setTestFile("one\ntwo\n");
+ const top = p.view().active;
+ p.newScratchBelow(top);
+ const low = p.view().active;
+ try std.testing.expect(low != top);
+ const click = struct {
+ fn at(q: *Pardes, col: u16, row: u16) void {
+ q.update(.{ .mouse = .{ .button = .left, .kind = .press, .col = col, .row = row } });
+ q.update(.{ .mouse = .{ .button = .left, .kind = .release, .col = col, .row = row } });
+ }
+ }.at;
+ const rt = p.view().rects[top];
+ const rl = p.view().rects[low];
+ // SPC's level in the lower pane's tag; a click in its own tag keeps it.
+ p.update(.{ .key = .{ .cp = ' ' } });
+ try std.testing.expect(hostOf(p) == low);
+ click(p, rl.x + config.GUTTER + 2, rl.y);
+ try std.testing.expect(hostOf(p) == low and p.view().prefix == .leader);
+ // A click in the other pane's body: the keyboard goes there, the level
+ // ends, nothing out of rest.
+ click(p, rt.x + config.GUTTER + 1, rt.y + pardes.BOX_H);
+ try std.testing.expectEqual(top, p.view().active);
+ try std.testing.expect(hostOf(p) == null and p.view().prefix == .none and p.view().tag_state.root == null);
+ // A helix prefix's level (g, shown after its delay) the same, its text's
+ // prefix gone with it; Help, a typing state, the same.
+ p.update(.{ .key = .{ .cp = 'g' } });
+ p.advance(p.clock.now_ns);
+ p.clock.now_ns = p.view().tag_state.due_ns;
+ try std.testing.expect(hostOf(p) == top);
+ click(p, rl.x + config.GUTTER + 1, rl.y + pardes.BOX_H);
+ try std.testing.expectEqual(low, p.view().active);
+ try std.testing.expect(hostOf(p) == null and p.panes[top].?.body.normal.prefix == null);
+ for (" ?") |c| p.update(.{ .key = .{ .cp = c } });
+ try std.testing.expect(p.view().tag_state.kind == .help);
+ click(p, rt.x + config.GUTTER + 1, rt.y + pardes.BOX_H);
+ try std.testing.expect(p.view().tag_state.kind == .rest and hostOf(p) == null);
+}
diff --git a/core/Term.zig b/core/Term.zig
index f0329852..d4baf4e8 100644
--- a/core/Term.zig
+++ b/core/Term.zig
@@ -422,7 +422,7 @@ pub const calls = [_]struct { []const u8, []const u8, []const u8 }{
.{ "endOutputHere", "ninep/pty.zig:1", "WRITE: a 9P pty/run's step ends a command's output at the cursor: the session's step, replayed as such" },
.{ "replies", "Core.zig:1", "WRITE: a step drains the reply buffer (in the digest), counted when it held any (the feed's own unit, which filled it); only the session writes it to the pty (pty_write is off the tape)" },
// ---- reads by a step: in the digest ----
- .{ "grid", "Core.zig:2 ansi.zig:3 body_layer.zig:3 draw.zig:2 dump.zig:4 echo.zig:8 exec.zig:2 layout.zig:2 panes.zig:5 replica.zig:2", "READ: the size, the history's length, the cursor: in the digest (a view's place is its pane's; ansi.zig, body_layer.zig, draw.zig, echo.zig: a draw's)" },
+ .{ "grid", "Core.zig:2 ansi.zig:3 body_layer.zig:3 draw.zig:2 dump.zig:4 echo.zig:8 exec.zig:2 layout.zig:2 panes.zig:6 replica.zig:2", "READ: the size, the history's length, the cursor: in the digest (a view's place is its pane's; ansi.zig, body_layer.zig, draw.zig, echo.zig: a draw's)" },
.{ "modes", "Core.zig:5 draw.zig:1 dump.zig:2 echo.zig:3 exec.zig:3 mouse.zig:4 ninep/pty.zig:3 panes.zig:2 replica.zig:1", "READ: the program's modes (mouse, focus, bracketed paste, the alternate screen): in the digest (draw.zig, echo.zig: a draw's; panes.zig: a view scrolls no history on the alternate screen)" },
.{ "prompt", "Core.zig:1 builtins.zig:1 echo.zig:1 exec.zig:3 ninep/pty.zig:1 panes.zig:1", "READ: the OSC 133 cycle: in the digest (`marksOf`); Core.zig's and ninep/pty.zig's also taped (`.prompt`, each side's compared)" },
.{ "promptPrefix", "body_layer.zig:1 edit.zig:1 exec.zig:1", "READ: a row's prompt cells (`promptCut`): the active area's in the digest; a history row's text is not (below)" },
@@ -441,7 +441,7 @@ pub const calls = [_]struct { []const u8, []const u8, []const u8 }{
.{ "commandOutput", "ninep/pty.zig:1", "READ, NOT COVERED: a command's output rows (a 9P pty/run): taped as the session's answer" },
.{ "textRows", "edit.zig:2", "READ, NOT COVERED: every row's text, the history's among them (a selection, a Look over a shell)" },
.{ "viewport", "body_layer.zig:1 replica.zig:1", "READ: the rows' text a view's place (in the digest, with its pane) shows (body_layer.zig: a draw's; replica.zig: a test's)" },
- .{ "editRows", "ansi.zig:1", "READ: rows' text for a draw" },
+ .{ "editRows", "ansi.zig:1 panes.zig:1", "READ: rows' text for a draw; a command's last rows read for the places its report names when it fails (panes.zig commandDone): in the digest as the emulator's rows are" },
// ---- local ----
.{ "due", "Core.zig:1", "LOCAL: its next wake (a blink, an animation): the loop's, never a step's state" },
.{ "cellPixels", "ansi.zig:1 panes.zig:2", "LOCAL: a frontend's draw sets its view's cell size (ansi.zig); a step sets the view's (in the digest) before each feed (panes.zig), so a reply to CSI 16 t is the step's" },
@@ -559,10 +559,10 @@ test "a core without a terminal: Term refuses in words, and no line is typed at
try std.testing.expectError(error.NoTerminal, p.newShell(p.freeSlot().?, ""));
try std.testing.expect(p.executeBuiltinLine(0, "Term"));
const pane = p.panes[0].?;
- try std.testing.expectEqualStrings("Term: " ++ none, pane.msg[0..pane.msg_len]);
+ try std.testing.expectEqualStrings("Term: " ++ none, p.messages.saidBy(pane));
// A line no shell can take runs in a command pane, a terminal: refused.
try std.testing.expectEqual(null, pardes.exec.execute(p, 0, "make"));
- try std.testing.expectEqualStrings("exec: " ++ none, pane.msg[0..pane.msg_len]);
+ try std.testing.expectEqualStrings("exec: " ++ none, p.messages.saidBy(pane));
for (p.panes, 0..) |slot, id| if (slot) |_| try std.testing.expect(!pardes.exec.takesCommandLine(p, id));
}
diff --git a/core/Text.zig b/core/Text.zig
index 37feb081..3cf65b74 100644
--- a/core/Text.zig
+++ b/core/Text.zig
@@ -315,11 +315,18 @@ pub fn setRanges(t: *Text, tab: u16, text: []const u8, in: []const modal.Selecti
if (n > 1 and !t.reserveSels()) return; // no room: the primary alone
t.sticky_col = st[pri];
var w: usize = 0;
+ // The ranges are in the text's order now: each end's row counted on
+ // from the last one's, one pass to the last range, where a count from
+ // the top for each was a pass a range (an `s` over a big text's 1024
+ // ranges, 445 million instructions a key).
+ var walked: Walked = .{};
for (r[0..n], 0..) |x, idx| {
if (idx == pri) continue;
const c = rangeCells(text, x);
- const cc = modal.positionAt(text, c.cur);
- const ac = modal.positionAt(text, c.anc);
+ const first = walked.at(text, @min(c.cur, c.anc));
+ const last = walked.at(text, @max(c.cur, c.anc));
+ const cc = if (c.cur <= c.anc) first else last;
+ const ac = if (c.cur <= c.anc) last else first;
t.sels[w] = .{
.row = @as(i32, @intCast(cc.row)),
.col = @intCast(cc.col),
@@ -332,6 +339,24 @@ pub fn setRanges(t: *Text, tab: u16, text: []const u8, in: []const modal.Selecti
t.nsel = @intCast(w);
}
+/// Offsets' positions in a text, asked in order: the rows counted on from
+/// the last asked (modal.positionAt's answer); one asked before it, from
+/// the top.
+const Walked = struct {
+ off: usize = 0,
+ row: usize = 0,
+
+ fn at(w: *Walked, text: []const u8, off: usize) modal.Cursor {
+ const bounded = @min(off, text.len);
+ if (bounded < w.off) return modal.positionAt(text, bounded);
+ w.row += std.mem.count(u8, text[w.off..bounded], "\n");
+ w.off = bounded;
+ const s = if (std.mem.lastIndexOfScalar(u8, text[0..bounded], '\n')) |nl| nl + 1 else 0;
+ const e = std.mem.indexOfScalarPos(u8, text, s, '\n') orelse text.len;
+ return .{ .row = w.row, .col = modal.graphemeStart(text[s..e], @min(bounded - s, e - s)) };
+ }
+};
+
/// helix `scroll` without cursor sync (Ctrl-f/b, PgUp/PgDn, zj/zk): shift
/// the view, then snap a fallen-out cursor to the near scrolloff edge, col 0
pub fn scrollViewMove(t: *Text, tab: u16, text: []const u8, range: modal.Selection, delta: i32) void {
@@ -698,3 +723,29 @@ pub fn step(t: *Text, gpa: std.mem.Allocator, current: ?EditBuffer, back: bool)
t.vsel = back_to.vsel;
return back_to;
}
+
+test "setRanges puts each range's ends where positionAt says, counting rows on from the last" {
+ const pardes = @import("root.zig");
+ const p = try pardes.Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 80, .rows = 24 });
+ defer p.deinit();
+ const text = "ab\ncd ef\n\ngh ij kl\nmn\n";
+ const t = &(try p.setTestFile(text)).body;
+ const in = [_]modal.Selection{
+ .{ .anchor = 3, .head = 5 }, // cd
+ .{ .anchor = 8, .head = 6 }, // ef, backwards
+ .{ .anchor = 11, .head = 13 }, // gh
+ .{ .anchor = 14, .head = 16 }, // ij
+ .{ .anchor = 20, .head = 22 }, // mn
+ };
+ t.setRanges(4, text, &in, &.{}, 0, true);
+ try std.testing.expectEqual(@as(u16, 4), t.nsel);
+ for (in[1..], t.sels[0..4]) |r, s| {
+ const c = rangeCells(text, r);
+ const cc = modal.positionAt(text, c.cur);
+ const ac = modal.positionAt(text, c.anc);
+ try std.testing.expectEqual(@as(i32, @intCast(cc.row)), s.row);
+ try std.testing.expectEqual(@as(i32, @intCast(cc.col)), s.col);
+ try std.testing.expectEqual(@as(i32, @intCast(ac.row)), s.arow);
+ try std.testing.expectEqual(@as(i32, @intCast(ac.col)), s.acol);
+ }
+}
diff --git a/core/Trail.zig b/core/Trail.zig
index b5dff554..9223d1d3 100644
--- a/core/Trail.zig
+++ b/core/Trail.zig
@@ -18,6 +18,7 @@ const look = @import("look.zig");
const Pardes = pardes.Pardes;
const Pane = panes.Pane;
const Spot = look.Spot;
+const TagState = @import("TagState.zig");
const Trail = @This();
@@ -38,8 +39,10 @@ cur: u8 = 0,
/// Kept, or edited since it was shown: it no longer walks (§6.5).
held: bool = false,
+/// `cur` is at most `n`: a held pane's (keep, a search's or a recipe's
+/// word alone) has no current place, past its steps.
pub fn lastCur(t: *const Trail) usize {
- return t.n -| 1;
+ return t.n;
}
/// One step of a walk, as its word says it (§2 "trail word").
@@ -196,6 +199,7 @@ fn show(p: *Pardes, id: usize, path: []const u8, at: Spot) !usize {
if (pane.file) |f| if (std.mem.eql(u8, f.path, path)) {
look.clearNavigationSelection(p, pane);
look.focusPaneLine(p, id, at, .center);
+ lift(p, id);
return id;
};
const free = p.freeSlot() orelse return error.NoPaneSlots;
@@ -212,7 +216,7 @@ fn show(p: *Pardes, id: usize, path: []const u8, at: Spot) !usize {
try panes.deinitPane(p, pane);
layout.replacePane(p, id, free);
p.panes[id] = null;
- layout.compute(p);
+ lift(p, free);
look.focusPaneLine(p, free, at, .keep);
// Its line half the body's rows down, as a look's new pane has it.
const rows = @max(1, p.view().rects[free].h -| pardes.BOX_H);
@@ -220,6 +224,42 @@ fn show(p: *Pardes, id: usize, path: []const u8, at: Spot) !usize {
return free;
}
+/// Pane `id`'s tag after a step may take more rows than it had (its walk's
+/// words, a longer name): it is given them from its column, as a step that
+/// wraps tags gives them (layout.restoreMinimaFrom), the others keeping
+/// their own minimum.
+fn lift(p: *Pardes, id: usize) void {
+ const now = p.view().rects;
+ var floor = layout.minima(p);
+ floor[id] = 0;
+ layout.restoreMinimaFrom(p, &now, &floor);
+}
+
+/// `s`, a search's or a recipe's word, the pane's one of its kind (§7.3,
+/// §7.5): the one it had goes, and it is the newest back step.
+pub fn setWord(t: *Trail, s: Step) void {
+ var w: u8 = 0;
+ for (t.steps[0..t.n], 0..) |old, i| {
+ if (std.meta.activeTag(old) == std.meta.activeTag(s)) {
+ if (i < t.cur) t.cur -= 1;
+ continue;
+ }
+ t.steps[w] = old;
+ w += 1;
+ }
+ t.n = w;
+ if (t.n == max_steps) {
+ const first: usize = @intFromBool(t.steps[0] == .owner);
+ std.mem.copyForwards(Step, t.steps[first .. max_steps - 1], t.steps[first + 1 ..]);
+ t.n -= 1;
+ t.cur -|= 1;
+ }
+ std.mem.copyBackwards(Step, t.steps[t.cur + 1 .. t.n + 1], t.steps[t.cur..t.n]);
+ t.steps[t.cur] = s;
+ t.n += 1;
+ t.cur += 1;
+}
+
/// Pane `id` held (§6.5): Keep, or an edit. It no longer walks, so the
/// walk leaves its trail (places, lists, its owner, forward steps); words
/// about its own text (a search, a recipe) stay. The next jump from its
@@ -275,11 +315,11 @@ pub const Part = enum { back, forward };
/// Step `i`'s word: `‹@p3`, `rank.zig:14`, a list's, search's or recipe's
/// own text; `·` when it is folded.
-fn wordOf(t: *const Trail, i: usize, buf: *[max_text + 16]u8) []const u8 {
- const s = t.steps[i];
- if (s != .owner and i < t.cur and t.cur - i > shown_steps) return "·";
- // The step's own bytes, not a copy's (a copy is gone at the return).
- return switch (t.steps[i]) {
+fn wordOf(t: *const Trail, i: usize, whole: usize, buf: *[max_text + 16]u8) []const u8 {
+ const s = &t.steps[i];
+ if (s.* != .owner and i < t.cur and t.cur - i > whole) return "·";
+ // The step itself, not a copy: a word's text is the step's own bytes.
+ return switch (s.*) {
.owner => |serial| std.fmt.bufPrint(buf, "‹" ++ config.pane_addr ++ "{d}", .{serial}) catch unreachable, // a u32 fits
.place => |at| std.fmt.bufPrint(buf, "{s}:{d}", .{ std.Io.Dir.path.basename(at.path.slice()), at.line }) catch unreachable, // a basename and a u32 fit
.list, .search, .recipe => |*w| w.text.slice(),
@@ -297,34 +337,52 @@ fn range(t: *const Trail, part: Part) [2]usize {
}
/// The back steps' words, each with the separator after it (before the
-/// path), or the forward steps', each with one before it (after the path).
-pub fn write(t: *const Trail, part: Part, w: *std.Io.Writer) std.Io.Writer.Error!void {
+/// path), or the forward steps', each with one before it (after the path):
+/// the newest `whole` back steps whole, older ones `·` (`folded`).
+pub fn write(t: *const Trail, part: Part, whole: usize, w: *std.Io.Writer) std.Io.Writer.Error!void {
var buf: [max_text + 16]u8 = undefined;
const r = range(t, part);
for (r[0]..r[1]) |i| switch (part) {
- .back => try w.print("{s}" ++ sep, .{wordOf(t, i, &buf)}),
- .forward => try w.print(sep ++ "{s}", .{wordOf(t, i, &buf)}),
+ .back => try w.print("{s}" ++ sep, .{wordOf(t, i, whole, &buf)}),
+ .forward => try w.print(sep ++ "{s}", .{wordOf(t, i, whole, &buf)}),
};
}
/// The bytes `write` writes for `part`.
-pub fn bytes(t: *const Trail, part: Part) usize {
+pub fn bytes(t: *const Trail, part: Part, whole: usize) usize {
var buf: [max_text + 16]u8 = undefined;
var n: usize = 0;
const r = range(t, part);
- for (r[0]..r[1]) |i| n += wordOf(t, i, &buf).len + sep.len;
+ for (r[0]..r[1]) |i| n += wordOf(t, i, whole, &buf).len + sep.len;
return n;
}
+/// The back steps pane `pane`'s tag writes whole: `shown_steps` at rest,
+/// the newest alone while its tag is out of rest (SPEC §3.4.3), so a
+/// state's head and the band's spines keep their room.
+pub fn folded(p: *const Pardes, pane: *const Pane) usize {
+ const host = TagState.hostOf(p) orelse return shown_steps;
+ return if (p.panes[host] == pane) 1 else shown_steps;
+}
+
+/// Where back step `i`'s word is in what `write` writes for the back
+/// steps, the newest `whole` whole.
+pub fn spanOf(t: *const Trail, i: usize, whole: usize) [2]usize {
+ var buf: [max_text + 16]u8 = undefined;
+ var x: usize = 0;
+ for (0..i) |j| x += wordOf(t, j, whole, &buf).len + sep.len;
+ return .{ x, x + wordOf(t, i, whole, &buf).len };
+}
+
/// The step whose word in `part` is at byte `off` of what `write` wrote
/// for it, null on a separator or past them.
-pub fn stepAt(t: *const Trail, part: Part, off: usize) ?u8 {
+pub fn stepAt(t: *const Trail, part: Part, whole: usize, off: usize) ?u8 {
var buf: [max_text + 16]u8 = undefined;
var x: usize = 0;
const r = range(t, part);
for (r[0]..r[1]) |i| {
if (part == .forward) x += sep.len;
- const n = wordOf(t, i, &buf).len;
+ const n = wordOf(t, i, whole, &buf).len;
if (off >= x and off < x + n) return @intCast(i);
x += n;
if (part == .back) x += sep.len;
@@ -334,8 +392,8 @@ pub fn stepAt(t: *const Trail, part: Part, off: usize) ?u8 {
/// Look on step `i` of pane `id`'s trail (§6.3): a place is gone back or
/// forward to, the owner focused, a list unrolled again as it was
-/// (Pick.reopen); a search or a recipe is the prompts' to take (not yet:
-/// said).
+/// (Pick.reopen), a search lit again, a recipe's selections put back
+/// (Prompt.zig).
pub fn lookStep(p: *Pardes, id: usize, i: u8) void {
const pane = p.panes[id] orelse return;
switch (pane.trail.steps[i]) {
@@ -344,18 +402,20 @@ pub fn lookStep(p: *Pardes, id: usize, i: u8) void {
p.view().active = owner;
} else p.reportFailure(id, "walk: its owner is closed"),
.list => |w| pardes.Pick.reopen(p, id, w.index),
- .search, .recipe => p.setMessage(.at(id), "walk: a search or a recipe is not walked yet"),
+ .search => pardes.Prompt.lookWord(p, id),
+ .recipe => pardes.Prompt.lookRecipe(p, id),
}
}
/// Exec on step `i` (§6.3): a place and the owner as Look; a list runs its
-/// source again, a search searches again, a recipe replays (not yet).
+/// source again, a search searches again, a recipe replays.
pub fn execStep(p: *Pardes, id: usize, i: u8) void {
const pane = p.panes[id] orelse return;
switch (pane.trail.steps[i]) {
.place, .owner => lookStep(p, id, i),
.list => |w| pardes.Pick.rerun(p, id, w.index),
- .search, .recipe => p.setMessage(.at(id), "walk: a search or a recipe is not run again yet"),
+ .search => pardes.Prompt.execWord(p, id),
+ .recipe => pardes.Prompt.execRecipe(p, id),
}
}
@@ -623,6 +683,51 @@ test "the session of pick-ui §6.7: four jumps across three files, back by a cli
try std.testing.expectEqual(owner, p.panes[fresh].?.trail.steps[0].owner);
}
+test "the walk drawn with a picker's list and the notice row (walk UI G 2e, SPEC §3.7, §6.7): a list handed to a held pane lands in its reader, its word in the reader's trail before the place, the reader's tag in the reading tint with Keep, the held pane's not, n walking the list, the notice row at the foot saying where the caret is" {
+ var f: Fixture = .{ .p = undefined, .tmp = undefined };
+ try f.init(40);
+ defer f.deinit();
+ const p = f.p;
+ p.messages.live_len = 0;
+ const owner = p.panes[f.held].?.serial;
+ var buf: [4096 + 128]u8 = undefined;
+ var want: [4096 + 128]u8 = undefined;
+ // g d from the held pane: its reader, made below it.
+ f.look(f.held, "rank.zig", 12);
+ const r = p.view().active;
+ // A list asked from the held pane (SPC e's places, a server's answer):
+ // its Enter lands in the reader, nothing made.
+ const rows = try std.fmt.bufPrint(&buf, "{s}/place.zig:8:1 of\n{s}/place.zig:40:1 Span\n", .{ f.dir, f.dir });
+ pardes.Pick.open(p, f.held, .list, "Refs", "", rows);
+ try std.testing.expectEqual(p.panes[r].?.serial, p.view().tag_state.host);
+ pardes.Pick.landHere(p);
+ p.sync();
+ // The reader stepped (to another file: a pane of its own, its owner's
+ // word kept), no pane more.
+ var n: usize = 0;
+ for (p.panes) |slot| n += @intFromBool(slot != null);
+ try std.testing.expectEqual(@as(usize, 3), n);
+ const rd = p.view().active;
+ try std.testing.expect(rd != f.held and p.panes[r] == null);
+ try std.testing.expect(std.mem.startsWith(u8, try tagOf(p, p.panes[rd].?), try std.fmt.bufPrint(&want, "‹@p{d} › rank.zig:12 › Refs 1/2 › {s}/place.zig Keep ", .{ owner, f.dir })));
+ var arena: std.heap.ArenaAllocator = .init(std.testing.allocator);
+ defer arena.deinit();
+ // The reader's tag in the reading tint, the held one's not; the notice
+ // row, nothing said, where the reader's caret is.
+ try std.testing.expectEqual(pardes.Color{ .rgb = p.chromeTheme().tag_reading_bg }, try tagGroundOf(p, &arena, rd));
+ try std.testing.expect(!std.meta.eql(pardes.Color{ .rgb = p.chromeTheme().tag_reading_bg }, try tagGroundOf(p, &arena, f.held)));
+ const s = try p.render(arena.allocator());
+ const foot = s.region(.notice_row, pardes.Region.none).?.rect;
+ var row: std.ArrayList(u8) = .empty;
+ for (0..s.cols) |x| try row.appendSlice(arena.allocator(), s.at(@intCast(x), foot.y).grapheme());
+ try std.testing.expect(std.mem.indexOf(u8, row.items, try std.fmt.bufPrint(&want, "{s}/place.zig:8", .{f.dir})) != null);
+ // n: the list's next place, in place of the current step.
+ typeKeys(p, "n");
+ p.sync();
+ try std.testing.expectEqual(@as(i32, 39), p.panes[rd].?.body.cur_row);
+ try std.testing.expect(std.mem.indexOf(u8, try tagOf(p, p.panes[rd].?), "› Refs 2/2 ›") != null);
+}
+
test "a trail keeps its newest three back steps whole, older ones fold to ·, and a click on a · goes back to its step" {
var f: Fixture = .{ .p = undefined, .tmp = undefined };
try f.init(60);
@@ -722,3 +827,34 @@ test "Jumps new-pane jumps as before the walk: a new pane for a file no pane sho
};
try std.testing.expectEqual(open + 2, now);
}
+
+test "Enter on a word of the walk, the keyboard in the tag, goes back to its step as a click does; out of rest the walk folds to its newest word" {
+ var f: Fixture = .{ .p = undefined, .tmp = undefined };
+ try f.init(60);
+ defer f.deinit();
+ const p = f.p;
+ const owner = p.panes[f.held].?.serial;
+ for ([_]usize{ 10, 20, 30 }) |line| f.look(f.held, "rank.zig", line);
+ const r = p.view().active;
+ const pane = p.panes[r].?;
+ var buf: [4096 + 128]u8 = undefined;
+ var at: [64]u8 = undefined;
+ const rest = try std.fmt.bufPrint(&buf, "‹@p{d} › rank.zig:10 › rank.zig:20 › {s}/rank.zig Keep", .{ owner, f.dir });
+ try std.testing.expect(std.mem.startsWith(u8, try tagOf(p, pane), rest));
+ // SPC: out of rest, the older steps are `·`, the owner and the newest
+ // whole; back at rest, as they were.
+ p.update(.{ .key = .{ .cp = ' ' } });
+ var folded_buf: [4096 + 128]u8 = undefined;
+ try std.testing.expect(std.mem.startsWith(u8, try tagOf(p, pane), try std.fmt.bufPrint(&folded_buf, "‹@p{d} › · › rank.zig:20 › {s}/rank.zig", .{ owner, f.dir })));
+ p.update(.{ .key = .{ .cp = pardes.Key.escape } });
+ try std.testing.expect(std.mem.startsWith(u8, try tagOf(p, pane), rest));
+ // The keyboard in the tag, its cursor on `rank.zig:10`: Enter goes back
+ // to that step, the keyboard in the body again.
+ pane.focus = .tag;
+ pane.tag.cur_row = 0;
+ pane.tag.cur_col = @intCast(std.mem.indexOf(u8, rest, "rank.zig:10").? + 2);
+ p.update(.{ .key = .{ .cp = pardes.Key.enter } });
+ p.sync();
+ try std.testing.expectEqualStrings("rank.zig:10", f.at(&at));
+ try std.testing.expect(pane.focus == .body);
+}
diff --git a/core/bindings.zig b/core/bindings.zig
index b2d84a7c..2df51945 100644
--- a/core/bindings.zig
+++ b/core/bindings.zig
@@ -15,6 +15,8 @@ const Pardes = pardes.Pardes;
const Pane = pardes.Pane;
const Key = pardes.Key;
const Role = modal.Normal.Role;
+const edit = @import("edit.zig");
+const File = @import("File.zig");
/// The keys a sequence starts with. `register` (`"`) is drawn the same way
/// but its rows are the registers' contents, not a tree.
@@ -87,8 +89,9 @@ pub const groups = groups: {
};
break :groups paths;
};
-/// SPC's groups, then one for each other root.
-pub const ngroups = groups.len + std.enums.values(Root).len - 1;
+/// SPC's groups, then one for each other root, then the verbs a register
+/// takes (`"a ▸`).
+pub const ngroups = groups.len + std.enums.values(Root).len;
fn rootGroup(comptime r: Root) u8 {
return @intCast(groups.len + @intFromEnum(r) - 1);
@@ -233,6 +236,15 @@ const view_sticky_tree: Node = .{ .key = config.view_prefix_sticky, .label = "vi
const prev_tree: Node = .{ .key = config.prev_prefix, .label = "previous", .children = roleLevel(.goto_paragraph, .goto_xml_element, &.{}), .group = rootGroup(.prev) };
const next_tree: Node = .{ .key = config.next_prefix, .label = "next", .children = roleLevel(.goto_paragraph, .goto_xml_element, &.{}), .group = rootGroup(.next) };
const register_tree: Node = .{ .key = config.register_prefix, .label = "registers", .group = rootGroup(.register) };
+/// What the register `"` named does next (SPEC §9: `"a ▸ p after P before
+/// y into R replace`): normal mode's paste, yank and replace, which read
+/// the register the parser holds.
+const register_verbs: Node = .{ .key = 0, .label = "register", .group = ngroups - 1, .children = sorted(&.{
+ .{ .key = roleKey(.paste_after).?, .label = "after", .leaf = .{ .role = .paste_after } },
+ .{ .key = roleKey(.paste_before).?, .label = "before", .leaf = .{ .role = .paste_before } },
+ .{ .key = roleKey(.yank).?, .label = "into", .leaf = .{ .role = .yank } },
+ .{ .key = roleKey(.replace_with_yank).?, .label = "replace", .leaf = .{ .role = .replace_with_yank } },
+}) };
/// pardes's window mode (layout.windowKey): its moves, Collapse and Del;
/// a letter picks the pane its box shows.
const window_tree: Node = .{ .key = 'w', .label = "window", .group = rootGroup(.window), .children = window: {
@@ -248,7 +260,13 @@ const window_tree: Node = .{ .key = 'w', .label = "window", .group = rootGroup(.
/// The node `path` reaches under `root`, or null.
pub fn nodeAt(root: Root, path: []const u8) ?*const Node {
var n = info.get(root).node;
- for (path) |k| n = for (n.children) |*c| {
+ var keys = path;
+ // A register's name is any key: under each, its verbs.
+ if (root == .register and path.len > 0) {
+ n = &register_verbs;
+ keys = path[1..];
+ }
+ for (keys) |k| n = for (n.children) |*c| {
if (c.key == k) break c;
} else return null;
return n;
@@ -263,6 +281,8 @@ pub const Child = struct {
word: ?*const pardes.Kind.Word = null,
group: bool = false,
lsp: bool = false,
+ /// Its label is cut (a register's first line): `…` after it.
+ more: bool = false,
};
/// The most children a level shows: SPC's top has 17, and an addon's
/// words (Kind.Registry's 64) may each start a key of their own.
@@ -273,6 +293,7 @@ pub const max_children = 96;
/// addons' leader words joined in (SPC alone). Bounded by the level and the
/// registry's 64 words.
pub fn level(p: *const Pardes, root: Root, path: []const u8, out: *[max_children]Child) []Child {
+ if (root == .register and path.len == 0) return registerLevel(p, out);
var n: usize = 0;
if (nodeAt(root, path)) |node| for (node.children) |*c| {
if (c.leaf) |leaf| if (leaf == .builtin and !builtins.registry.here(p, leaf.builtin)) continue;
@@ -300,6 +321,87 @@ pub fn level(p: *const Pardes, root: Root, path: []const u8, out: *[max_children
return shown;
}
+/// The registers `"` shows (SPEC §9), in its order, and what each is: the
+/// default first, the ones a name was given (`"ay`) after it, by name,
+/// then these, the last four computed from the pane with the keyboard.
+pub const register_names = [_]struct { key: u8, name: []const u8 }{
+ .{ .key = '"', .name = "yank" },
+ .{ .key = '/', .name = "last search" },
+ .{ .key = ':', .name = "last command" },
+ .{ .key = '|', .name = "last pipe" },
+ .{ .key = '+', .name = "system clipboard" },
+ .{ .key = '@', .name = "last macro" },
+ .{ .key = '%', .name = "this file's name" },
+ .{ .key = '.', .name = "the selections" },
+ .{ .key = '#', .name = "selection numbers" },
+ .{ .key = '_', .name = "black hole" },
+};
+
+/// The display columns of a register's first line which-key shows; the
+/// rest is `…`.
+pub const register_cut = 24;
+
+/// `"`'s level: a child a register, its label the first line of its value
+/// (`—` when empty), cut. Read when the level is (a key, a frame), never
+/// kept: the first `register_cut` columns of each, the named ones bounded
+/// by the level's room.
+fn registerLevel(p: *const Pardes, out: *[max_children]Child) []Child {
+ var n: usize = 1;
+ for (p.registers.list.items) |*reg| {
+ if (reg.name <= ' ' or reg.name > '~' or n == out.len - (register_names.len - 1)) continue;
+ const k: u8 = @intCast(reg.name);
+ for (register_names) |r| {
+ if (r.key == k) break;
+ } else {
+ var j = n;
+ while (j > 1 and out[j - 1].key > k) : (j -= 1) out[j] = out[j - 1];
+ out[j] = .{ .key = k, .label = "" };
+ n += 1;
+ }
+ }
+ out[0] = .{ .key = '"', .label = "" };
+ for (register_names[1..]) |r| {
+ out[n] = .{ .key = r.key, .label = "" };
+ n += 1;
+ }
+ for (out[0..n]) |*c| {
+ const value = registerValue(p, c.key);
+ const bound = if (value.len > 4 * register_cut) modal.graphemeStart(value, 4 * register_cut) else value.len;
+ const line = value[0 .. std.mem.indexOfScalar(u8, value[0..bound], '\n') orelse bound];
+ const cut = File.byteAtDisplay(p.settings.tab, line, register_cut);
+ c.label = if (value.len == 0) "—" else line[0..cut];
+ c.more = cut < value.len;
+ }
+ return out[0..n];
+}
+
+/// Register `key`'s value as a paste of the pane with the keyboard reads
+/// its first range's (edit.registerValue): a stored one's first value; `%`
+/// the file's name, `.` the primary selection's text, `#` its number, `_`
+/// nothing. Borrowed from the register or the pane, for the frame.
+pub fn registerValue(p: *const Pardes, key: u8) []const u8 {
+ const pane = p.panes[p.view().active] orelse return "";
+ switch (key) {
+ '_' => return "",
+ '#' => return "1",
+ '%' => return if (pane.file) |*f| f.path else "",
+ '.' => {
+ const f = if (pane.file) |*f| f else return "";
+ const t = &pane.body;
+ const b = edit.cellBounds(.{ .row = t.cur_row, .col = t.cur_col, .arow = if (t.vsel.active) t.vsel.row else t.cur_row, .acol = if (t.vsel.active) t.vsel.col else t.cur_col });
+ const first = File.sourceLine(pane, b.lo_row);
+ const last = File.sourceLine(pane, b.hi_row);
+ if (f.content.len == 0) return "";
+ const lo = @min(f.content.len, first.ptr - f.content.ptr + @as(usize, @intCast(@max(0, b.lo_col))));
+ const hi = @min(f.content.len, last.ptr - f.content.ptr + @as(usize, @intCast(@max(0, b.hi_col))));
+ return f.content[lo..modal.nextGrapheme(f.content, @max(lo, hi))];
+ },
+ else => for (p.registers.list.items) |*reg| {
+ if (reg.name == key) return if (reg.values.len == 0) "" else reg.values[0];
+ } else return "",
+ }
+}
+
/// A key as a cell shows it: `SPC` for the space.
pub fn keyName(key: u8) []const u8 {
return if (key == ' ') "SPC" else @as(*const [1]u8, &printable[key - 0x20]);
@@ -450,3 +552,67 @@ test "Help's rows: every leaf of every root, spelled as its chord, its word and
try std.testing.expectEqual(@as(usize, 4), found);
for (flat) |f| try std.testing.expectEqual(f.row.len, f.lower.len);
}
+
+test "\" shows the registers rolled, each its first line; Down unrolls them beside the cursor's value; a register's key goes down to its verbs, Backspace back up, p pastes it" {
+ const tagline = @import("tagline.zig");
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 160, .rows = 40 });
+ defer p.deinit();
+ const pane = try p.setTestFile("one\ntwo\n");
+ try p.registers.put(p.gpa, 'a', "const best = rank(q, name) orelse continue;\nreturn best;", 0, 1, true);
+ try p.registers.put(p.gpa, '"', "self.dirty = true;", 0, 1, true);
+ var frame = std.heap.ArenaAllocator.init(std.testing.allocator);
+ defer frame.deinit();
+ const a = frame.allocator();
+ p.clock.now_ns = 5 * std.time.ns_per_s;
+ p.clock.stepped_ns = p.clock.now_ns;
+ p.sync();
+ // Its key cell at once, the level 300 ms on.
+ p.update(.{ .key = .{ .cp = '"' } });
+ try std.testing.expect(std.mem.endsWith(u8, try tagline.tagText(p, a, pane), " \" …"));
+ p.advance(p.clock.now_ns);
+ try std.testing.expectEqual(p.clock.now_ns + 300 * std.time.ns_per_ms, p.view().tag_state.due_ns);
+ p.clock.now_ns = p.view().tag_state.due_ns;
+ const rolled = try tagline.tagText(p, a, pane);
+ try std.testing.expect(std.mem.indexOf(u8, rolled, " \" ▸ \" self.dirty = true; a const best = rank(q, nam… / —") != null);
+ try std.testing.expect(std.mem.indexOf(u8, rolled, "% /test.txt . o # 1 _ —") != null);
+ // Down unrolls: a row each, the cursor on the default, its value
+ // beside them.
+ p.update(.{ .key = .{ .cp = Key.down } });
+ try std.testing.expect(p.view().tag_state.unrolled);
+ try std.testing.expect(pane.band_rows >= 4);
+ _ = try p.render(a);
+ const layer = &p.surface.tag_layers[pardes.BAND_LAYER];
+ var band: std.ArrayList(u8) = .empty;
+ for (0..layer.rows) |row| for (layer.cells[row * layer.cols ..][0..layer.cols]) |cell| try band.appendSlice(a, cell.grapheme());
+ try std.testing.expect(std.mem.indexOf(u8, band.items, "▶ \" yank self.dirty = true;") != null);
+ try std.testing.expect(std.mem.indexOf(u8, band.items, "\"\" · yank") != null);
+ // The next row's value in full, every line of it.
+ p.update(.{ .key = .{ .cp = Key.down } });
+ _ = frame.reset(.retain_capacity);
+ _ = try p.render(a);
+ band = .empty;
+ for (0..layer.rows) |row| for (layer.cells[row * layer.cols ..][0..layer.cols]) |cell| try band.appendSlice(a, cell.grapheme());
+ try std.testing.expect(std.mem.indexOf(u8, band.items, "const best = rank(q, name) orelse continue;") != null);
+ try std.testing.expect(std.mem.indexOf(u8, band.items, "return best;") != null);
+ // Enter chooses it: its verbs, rolled.
+ p.update(.{ .key = .{ .cp = Key.enter } });
+ try std.testing.expect(std.mem.indexOf(u8, try tagline.tagText(p, a, pane), " \" a ▸ p after P before R replace y into") != null);
+ try std.testing.expect(!p.view().tag_state.unrolled);
+ // Backspace: the registers again; a register's own key goes down too.
+ p.update(.{ .key = .{ .cp = Key.backspace } });
+ try std.testing.expect(std.mem.indexOf(u8, try tagline.tagText(p, a, pane), " \" ▸ \" self.dirty") != null);
+ p.update(.{ .key = .{ .cp = 'a' } });
+ try std.testing.expect(std.mem.indexOf(u8, try tagline.tagText(p, a, pane), " \" a ▸ p after") != null);
+ // p pastes it after the selection, and the tag is at rest.
+ p.update(.{ .key = .{ .cp = 'p' } });
+ try std.testing.expect(std.mem.indexOf(u8, pane.file.?.content, "const best = rank(q, name) orelse continue;") != null);
+ try std.testing.expect(p.view().tag_state.root == null);
+ try std.testing.expect(@import("TagState.zig").hostOf(p) == null);
+ // Esc from the registers: rest, the keyboard where it was.
+ const id = p.view().active;
+ p.update(.{ .key = .{ .cp = '"' } });
+ p.update(.{ .key = .{ .cp = Key.escape } });
+ try std.testing.expect(p.view().tag_state.root == null);
+ try std.testing.expectEqual(id, p.view().active);
+ try std.testing.expectEqual(@as(u21, 0), pane.body.normal.register);
+}
diff --git a/core/body_layer.zig b/core/body_layer.zig
index 9c4a4c73..a182f218 100644
--- a/core/body_layer.zig
+++ b/core/body_layer.zig
@@ -25,6 +25,9 @@ const tagline = @import("tagline.zig");
const Text = panes.Text;
const Layer = @import("Layer.zig");
+const TagState = @import("TagState.zig");
+const bindings = @import("bindings.zig");
+const File = panes.File;
// ---- drawing a pane body into the surface ----
@@ -347,6 +350,7 @@ pub fn renderBody(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane
panes.Tables.paint(p, s, pane, r, tx, tw, body_h);
drawWrapMarkers(p, s, pane, r, tx, tw, body_h, pane_bg);
pane.places.paint(p, s, pane, r, body_h);
+ pardes.Prompt.paintGutter(p, s, pane, r, body_h);
panes.Query.paint(p, s, pane, r, body_h);
} else if (pane.isTerminal()) {
ansi.recolor(p, s, pane, r, tx, tw, body_h, body);
@@ -379,7 +383,10 @@ pub fn renderBody(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane
if (b == pardes.sel_slot and @min(sl.r0, sl.r1) < pane.tag_rows) continue;
paintPointerSelection(p, s, pane, r, sl, pane.tag_rows, sel_btn[b], buttonInks(th)[b]);
}
- const preview = normal.selRegexArmed(pane) != null;
+ // A selecting prompt's live result (Prompt.zig), dimmed while its
+ // field is no regex.
+ const selecting = pardes.Prompt.selecting(p, pane);
+ const preview = normal.selRegexArmed(pane) != null or selecting != null;
const show_prim = (pane.body.mode == .normal and pane.body.vsel.active) or preview or
(modal_hover and pane.body.vsel.active);
const show_extra = pane.body.mode != .tty and pane.body.nsel > 0;
@@ -397,7 +404,7 @@ pub fn renderBody(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane
} else pane.body.sels[si];
const bnd = edit.cellBounds(sr);
const hover_only = primary and modal_hover and pane.body.mode != .normal and !preview;
- const bg = if (hover_only)
+ const bg = if (hover_only or (selecting != null and selecting.?.dim))
colors.mix(page_rgb, colors.mix(page_rgb, th.sel_bg))
else if (primary)
th.sel_bg
@@ -468,6 +475,15 @@ pub fn renderBody(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane
}
}
+ // What the body would do, drawn and never written (ruling R3): a motion
+ // root's targets in the gutter first, so the ghost rows below push them
+ // with their lines; then a message's words and detail (Messages), a
+ // hover's lines (SPEC §3.5), a rename's preview.
+ if (pane.file != null) paintTargets(p, s, arena, pane, r, tx, tw, body_y, body_h);
+ if (pane.file != null and p.messages.live_len > 0) messageGhosts(p, s, pane, tx, tw, body_y, body_h);
+ if (p.lsp_ask.hover != null) hoverGhosts(p, s, pane, tx, tw, body_y, body_h);
+ if (p.view().tag_state.kind == .rename) renameGhosts(p, s, pane, tx, tw, body_y, body_h);
+
// `gw`'s labels, two letters over the start of each word
if (pane.jump.items.len > 0) labels: {
const flat = edit.flatSurface(p.editor(), &pane.body) catch break :labels;
@@ -538,6 +554,9 @@ pub fn renderBody(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane
// A replica's predicted echo, over what its authority's screen shows.
if (p.echo) |e| if (pane.isTerminal()) e.paint(p, s, pane, id, tx, tw, body_y, body_h, active);
+ // A pipe prompt's live run, as ghost lines over what is painted
+ // (Prompt.zig).
+ if (pane.file != null) try pardes.Prompt.ghosts(p, s, arena, pane, r, body_h);
if (rail) |bar| if (bar.rect.h > 0) {
// The rail covers the notice bands too: nothing else paints those
// two gutter columns, so a gap there keeps the frame-wide border
@@ -548,6 +567,378 @@ pub fn renderBody(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane
};
}
+/// A message at the lines it names, drawn and never written (SPEC §10.2,
+/// ruling R3): after the end of each such line shown, the message's glyph
+/// and its words there; under the caret's line, when the keyboard is in
+/// this body, the lines that explain it where the step put them
+/// (Pane.ghost_at, ghost_rows: Messages.detailUnder), pushing the rows
+/// below down (the rows past the body's foot are not shown meanwhile).
+/// Bounded by the rows shown and the live messages' places
+/// (Messages.max_live, Said.max_places).
+fn messageGhosts(p: *Pardes, s: *Surface, pane: *Pane, tx: u16, tw: u16, body_y: u16, body_h: u16) void {
+ const Messages = pardes.Messages;
+ const f = pane.file.?;
+ const chrome = p.chromeTheme();
+ const th = p.theme();
+ const pane_bg: Color = if (th.bg) |c| .{ .rgb = c } else .default;
+ const Hit = struct { line: usize, said: *const Messages.Said, place: *const Messages.Place };
+ var hits: [Messages.max_live * Messages.Said.max_places]Hit = undefined;
+ var n: usize = 0;
+ for (p.messages.live[0..p.messages.live_len]) |*said| for (said.places[0..said.places_len]) |*place| {
+ if (place.line == 0 or !std.mem.eql(u8, place.path.slice(), f.path)) continue;
+ hits[n] = .{ .line = place.line - 1, .said = said, .place = place };
+ n += 1;
+ };
+ if (n == 0) return;
+ var detail: ?*const Messages.Said = null;
+ var row: u16 = 0;
+ while (row < body_h) : (row += 1) {
+ const w = pane.wrapAt(p.settings.tab, row);
+ if (w.line < 0) continue;
+ const line: usize = @intCast(w.line);
+ // A line's words go after its last row.
+ if (row + 1 < body_h and pane.wrapAt(p.settings.tab, row + 1).line == w.line) continue;
+ const hit = for (hits[0..n]) |h| {
+ if (h.line == line) break h;
+ } else continue;
+ const cells = s.cells[@as(usize, body_y + row) * s.cols + tx ..][0..tw];
+ var end: usize = tw;
+ while (end > 0 and std.mem.eql(u8, cells[end - 1].grapheme(), " ")) end -= 1;
+ const at = end + 2;
+ if (at < tw) {
+ var buf: [160]u8 = undefined;
+ const words = std.fmt.bufPrint(&buf, "{s} {s}", .{ hit.said.kind.glyph(), hit.place.text.slice() }) catch &buf;
+ _ = s.print(tx + @as(u16, @intCast(at)), body_y + row, @intCast(tw - at), words, .{ .fg = .{ .rgb = Messages.ink(chrome, hit.said.kind) }, .bg = pane_bg });
+ }
+ if (pane.ghost_rows > 0 and row == pane.ghost_at) detail = hit.said;
+ }
+ const said = detail orelse return;
+ const under_row = pane.ghost_at;
+ // The rows below the caret's line move down by the detail's rows.
+ const k: u16 = @min(pane.ghost_rows, body_h -| (under_row + 1));
+ if (k == 0) return;
+ var dst: u16 = body_h - 1;
+ while (dst >= under_row + 1 + k) : (dst -= 1) {
+ const to = @as(usize, body_y + dst) * s.cols + tx;
+ const from = @as(usize, body_y + dst - k) * s.cols + tx;
+ @memcpy(s.cells[to..][0..tw], s.cells[from..][0..tw]);
+ }
+ const gutter: u16 = panes.File.gutterWidth(pane);
+ for (said.detail[0..k], 0..) |*text, i| {
+ const y = body_y + under_row + 1 + @as(u16, @intCast(i));
+ s.fill(tx, y, tw, 1, .{ .bg = pane_bg });
+ if (gutter + 2 < tw) _ = s.print(tx + gutter + 2, y, tw - gutter - 2, text.slice(), .{ .fg = .{ .rgb = Messages.ink(chrome, said.kind) }, .bg = pane_bg });
+ }
+}
+
+/// The word drawn at body row `row`, text column `col` of pane `id` in the
+/// frame drawn last (its body layer when it has one, else the grid): a
+/// message's detail is text no buffer holds, read as it is shown.
+pub fn wordAt(p: *Pardes, arena: std.mem.Allocator, id: usize, row: usize, col: usize) !?[]const u8 {
+ const layer = &p.surface.body_layers[id];
+ const body = (p.surface.region(.body, id) orelse return null).rect;
+ var text: std.ArrayList(u8) = .empty;
+ if (layer.rows > 0) {
+ if (row >= layer.rows) return null;
+ for (layer.cells[row * layer.cols ..][0..layer.cols]) |cell| try text.appendSlice(arena, cell.grapheme());
+ } else {
+ if (row >= body.h) return null;
+ for (0..body.w) |x| try text.appendSlice(arena, p.surface.at(body.x + @as(u16, @intCast(x)), body.y + @as(u16, @intCast(row))).grapheme());
+ }
+ const b = pardes.tagline.wordBoundsAtCol(text.items, panes.File.rawAtDisplay(p.settings.tab, text.items, col)) orelse return null;
+ if (b.lo == b.hi) return null;
+ return text.items[b.lo..b.hi];
+}
+
+/// Painted targets (SPEC §4.4), while a motion root's level shows in this
+/// body's tag: each of its keys at the line it would go to, in the gutter
+/// (`g e t b .` for `g`; for `]` the next and for `[` the previous
+/// function, paragraph, test, comment, change and diagnostic: `f p T c g
+/// d`, the spec's, each tree object a query of the rows shown); browsing `m a` or `m i` unrolled, the brackets'
+/// region around the caret tinted. Only the rows shown are looked at: a
+/// target off them is not painted (the tag's arrows, SPEC §15, are not
+/// built). At rest it costs one test of the view's tag state.
+fn paintTargets(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, r: Rect, tx: u16, tw: u16, body_y: u16, body_h: u16) void {
+ const host = TagState.hostOf(p) orelse return;
+ if (p.panes[host] != pane) return;
+ const v = p.view();
+ const cur = TagState.current(p, v) orelse return;
+ if (!TagState.shown(p, v)) return;
+ const f = &pane.file.?;
+ if (f.line_starts.len == 0) return;
+ const tab = p.settings.tab;
+ const held = pane.context_rows;
+ if (body_h <= held) return;
+ // The lines the rows show, past the context rows held at the top.
+ const lo: usize = @intCast(@max(0, pane.wrapAt(tab, held).line));
+ var hi = lo;
+ for (held..body_h) |row| {
+ const line = pane.wrapAt(tab, @intCast(row)).line;
+ if (line >= 0 and line < f.line_starts.len) hi = @max(hi, @as(usize, @intCast(line)));
+ }
+ var children: [bindings.max_children]bindings.Child = undefined;
+ const level = bindings.level(p, cur.root, cur.path, &children);
+ if (cur.root == .match) {
+ const st = &v.tag_state;
+ if (!st.unrolled) return;
+ const on = for (level) |c| {
+ if (c.key == st.hi) break c;
+ } else return;
+ const leaf = (on.node orelse return).leaf orelse return;
+ if (leaf != .role or (leaf.role != .match_inside and leaf.role != .match_around)) return;
+ const role = leaf.role;
+ const caret = lineStart(f, @intCast(@max(0, pane.body.cur_row))) + @as(usize, @intCast(@max(0, pane.body.cur_col)));
+ const span = enclosing(f.content, @min(caret, f.content.len), lineStart(f, lo), lineStart(f, hi + 1)) orelse return;
+ const from = if (role == .match_inside) span[0] + 1 else span[0];
+ const to = if (role == .match_inside) span[1] else span[1] + 1;
+ const first = lineOf(f, from);
+ const last = lineOf(f, to -| 1);
+ const rows = arena.alloc(Pane.PointerRow, last - first + 1) catch return;
+ for (rows, first..) |*row, line| row.* = .{
+ .row = @intCast(line),
+ .lo = if (line == first) from - lineStart(f, line) else 0,
+ .hi = if (line == last) to - lineStart(f, line) else File.sourceLine(pane, @intCast(line)).len,
+ .to_edge = line != last,
+ };
+ const th = p.theme();
+ const page = th.bg orelse th.tag_bg;
+ paintSourceSelection(p, s, pane, r, rows, colors.mix(page, colors.mix(page, th.sel_bg)), null);
+ return;
+ }
+ if (cur.root != .goto and cur.root != .next and cur.root != .prev) return;
+ const th = p.theme();
+ const style: CellStyle = .{ .fg = .{ .rgb = p.chromeTheme().box }, .bg = if (th.bg) |c| .{ .rgb = c } else .default, .bold = true };
+ // The rows painted so far: a second key on a row goes after the first.
+ var painted: [bindings.max_children]u16 = undefined;
+ var n: usize = 0;
+ for (level) |c| {
+ const leaf = (c.node orelse continue).leaf orelse continue;
+ if (leaf != .role) continue;
+ const line = targetLine(p, pane, f, leaf.role, cur.root != .prev, lo, hi) orelse continue;
+ if (line < lo or line > hi) continue;
+ var row: u16 = held;
+ while (row < body_h) : (row += 1) {
+ const w = pane.wrapAt(tab, row);
+ if (w.line == line and w.at == 0) break;
+ } else continue;
+ const x: u16 = @intCast(std.mem.count(u16, painted[0..n], &.{row}));
+ if (x >= tw) continue;
+ s.set(tx + x, body_y + row, bindings.keyName(c.key), style);
+ painted[n] = row;
+ n += 1;
+ }
+}
+
+/// A hover's answer as ghost lines under the line it was asked at (SPEC
+/// §3.5, R3): the rows below move down by its lines (those past the body's
+/// foot not shown meanwhile), the buffer untouched. Bounded by the rows
+/// shown and the hover's `Ask.hover_max` bytes.
+fn hoverGhosts(p: *Pardes, s: *Surface, pane: *Pane, tx: u16, tw: u16, body_y: u16, body_h: u16) void {
+ const h = &p.lsp_ask.hover.?;
+ if (h.serial != pane.serial) return;
+ const f = if (pane.file) |*file| file else return;
+ if (f.revision != h.revision) return;
+ const tab = p.settings.tab;
+ // The last row the line is shown on.
+ var under: ?u16 = null;
+ var row: u16 = pane.context_rows;
+ while (row < body_h) : (row += 1) {
+ if (pane.wrapAt(tab, row).line == h.row) under = row else if (under != null) break;
+ }
+ const at = under orelse return;
+ const text = std.mem.trimEnd(u8, h.text.slice(), "\n");
+ const k: u16 = @intCast(@min(std.mem.count(u8, text, "\n") + 1, body_h - at - 1));
+ if (k == 0) return;
+ var dst: u16 = body_h - 1;
+ while (dst >= at + 1 + k) : (dst -= 1) {
+ const to = @as(usize, body_y + dst) * s.cols + tx;
+ const from = @as(usize, body_y + dst - k) * s.cols + tx;
+ @memcpy(s.cells[to..][0..tw], s.cells[from..][0..tw]);
+ }
+ const th = p.theme();
+ const style: CellStyle = .{ .fg = .{ .rgb = th.tag_fg }, .bg = .{ .rgb = th.tag_bg } };
+ const gutter: u16 = File.gutterWidth(pane);
+ var lines = std.mem.splitScalar(u8, text, '\n');
+ for (0..k) |i| {
+ const y = body_y + at + 1 + @as(u16, @intCast(i));
+ s.fill(tx, y, tw, 1, .{ .bg = .{ .rgb = th.tag_bg } });
+ if (gutter + 2 < tw) _ = s.print(tx + gutter + 2, y, tw - gutter - 2, lines.next() orelse "", style);
+ }
+}
+
+/// A Rename typed in this body's tag, shown in its rows (SPEC §3.5, R3):
+/// each whole-word place of the name under the caret in the rows shown
+/// struck, the name typed after it, the rest of its row pushed right.
+/// Never written; bounded by the rows shown.
+fn renameGhosts(p: *Pardes, s: *Surface, pane: *Pane, tx: u16, tw: u16, body_y: u16, body_h: u16) void {
+ const host = TagState.hostOf(p) orelse return;
+ if (p.panes[host] != pane or pane.file == null) return;
+ const old = @import("lsp/Ask.zig").renamedWord(pane) orelse return;
+ const new = p.view().tag_state.field.text();
+ const tab = p.settings.tab;
+ const chrome = p.chromeTheme();
+ const th = p.theme();
+ const added: CellStyle = .{ .fg = .{ .rgb = chrome.diagnostic_hint }, .bg = if (th.bg) |c| .{ .rgb = c } else .default, .bold = true };
+ const wide: u16 = @intCast(@min(File.displayWidth(tab, new), tw));
+ const gutter: i32 = File.gutterWidth(pane);
+ var row: u16 = pane.context_rows;
+ while (row < body_h) : (row += 1) {
+ const w = pane.wrapAt(tab, row);
+ if (w.line < 0) continue;
+ const line = File.sourceLine(pane, w.line);
+ const from: usize = @min(line.len, @as(usize, @intCast(@max(0, w.at))));
+ const next = pane.wrapAt(tab, row + 1);
+ const to: usize = if (next.line == w.line) @min(line.len, @as(usize, @intCast(@max(0, next.at)))) else line.len;
+ // Right to left, so a push leaves the places before it where they are.
+ var end = to;
+ while (std.mem.lastIndexOf(u8, line[from..end], old)) |k| {
+ const at = from + k;
+ end = at;
+ const before = at > 0 and (std.ascii.isAlphanumeric(line[at - 1]) or line[at - 1] == '_');
+ const after = at + old.len < line.len and (std.ascii.isAlphanumeric(line[at + old.len]) or line[at + old.len] == '_');
+ if (before or after) continue;
+ const c0 = gutter + w.pad + File.displayOffset(tab, pane, w.line, w.at, @intCast(at));
+ const c1 = gutter + w.pad + File.displayOffset(tab, pane, w.line, w.at, @intCast(at + old.len));
+ if (c0 < gutter or c1 > tw) continue;
+ const y = body_y + row;
+ var c: u16 = @intCast(c0);
+ while (c < c1) : (c += 1) {
+ const cell = s.at(tx + c, y);
+ cell.style.strikethrough = true;
+ cell.style.fg = .{ .rgb = chrome.diagnostic_error };
+ }
+ const x: u16 = @intCast(c1);
+ if (x + wide < tw) {
+ const cells = s.cells[@as(usize, y) * s.cols + tx ..][0..tw];
+ std.mem.copyBackwards(Cell, cells[x + wide ..], cells[x .. tw - wide]);
+ }
+ _ = s.print(tx + x, y, tw - x, new, added);
+ }
+ }
+}
+
+/// The line a motion role would go to from the caret of `pane`, looked for
+/// in lines `lo` to `hi` (the rows shown) alone; null for none there, or a
+/// role that is no line's.
+fn targetLine(p: *Pardes, pane: *Pane, f: *panes.File.State, role: modal.Normal.Role, forward: bool, lo: usize, hi: usize) ?usize {
+ const tab = p.settings.tab;
+ const caret: usize = @intCast(@max(0, pane.body.cur_row));
+ const nlines = f.line_starts.len;
+ switch (role) {
+ .goto_file_start => return 0,
+ .goto_last_line => return if (nlines > 1 and f.line_starts[nlines - 1] == f.content.len) nlines - 2 else nlines - 1,
+ .goto_last_modification => return if (pane.body.last_edit) |at| @intCast(@max(0, at.row)) else null,
+ // helix's goto_window, as normal.gotoWindow counts its rows.
+ .goto_view_top, .goto_view_bottom => {
+ const shown: i32 = File.shownRows(tab, pane);
+ const held: i32 = pane.context_rows;
+ var last: i32 = shown - 1;
+ while (last > 0 and pane.wrapAt(tab, held + last).line >= @as(i32, @intCast(nlines))) last -= 1;
+ const margin: i32 = @min(config.scroll_off, @divTrunc(shown - 1, 2));
+ const vr = std.math.clamp(@min(@max(if (role == .goto_view_top) margin else last - margin, margin), last - margin), 0, last);
+ const line = pane.wrapAt(tab, held + vr).line;
+ return if (line < 0) null else @intCast(line);
+ },
+ // helix's paragraph: past the lines with text, then past the blank
+ // ones (modal.moveParagraph).
+ .goto_paragraph => {
+ var l = caret;
+ if (forward) {
+ while (l <= hi and !blank(pane, l)) l += 1;
+ while (l <= hi and blank(pane, l)) l += 1;
+ return if (l <= hi and l != caret) l else null;
+ }
+ while (l > lo and blank(pane, l - 1)) l -= 1;
+ while (l > lo and !blank(pane, l - 1)) l -= 1;
+ return if (l == caret or (l == lo and lo > 0)) null else l;
+ },
+ .goto_change => return @import("jj.zig").nextChange(p, pane, caret, forward, hi - lo + 1),
+ // Once a Diagnostics list fed them, the pane's places (normal.zig's
+ // `]d`): the first after the caret's line, or the last before it.
+ .goto_diagnostic => {
+ const set = &pane.places;
+ const fed = set.started and set.provenance == .list and if (p.paneBySerial(set.from)) |qid|
+ (if (p.panes[qid].?.query) |q| q.source == .diagnostics else false)
+ else
+ false;
+ if (!fed) return null;
+ const hits = set.hits.items;
+ const edge = if (forward) lineStart(f, caret + 1) else lineStart(f, caret);
+ var a: usize = 0;
+ var b: usize = hits.len;
+ while (a < b) {
+ const m = (a + b) / 2;
+ if (hits[m].start < edge) a = m + 1 else b = m;
+ }
+ if (forward) return if (a < hits.len) lineOf(f, hits[a].start) else null;
+ return if (a > 0) lineOf(f, hits[a - 1].start) else null;
+ },
+ inline .goto_function, .goto_comment, .goto_test => |r| {
+ // The tree as the motion reads it, made once a revision; with
+ // the Changes layer's lines in the buffer its offsets are not the
+ // buffer's: not painted then.
+ if (f.layer.lines.len > 0) return null;
+ const tree = normal.fileTree(p, f) orelse return null;
+ const object = @field(modal.Normal.Object, @tagName(r)["goto_".len..]);
+ const at = lineStart(f, caret) + @as(usize, @intCast(@max(0, pane.body.cur_col)));
+ const span = @import("syntax.zig").objectNext(f.path, tree, f.content, object, forward, @min(at, f.content.len), .{ lineStart(f, lo), lineStart(f, hi + 1) }) orelse return null;
+ return lineOf(f, span.from);
+ },
+ else => return null,
+ }
+}
+
+fn blank(pane: *const Pane, line: usize) bool {
+ return std.mem.trim(u8, File.sourceLine(pane, @intCast(line)), " \t\r").len == 0;
+}
+
+/// Where line `line` starts in a file's buffer; past its last, its end.
+fn lineStart(f: *const panes.File.State, line: usize) usize {
+ return if (line < f.line_starts.len) f.line_starts[line] else f.content.len;
+}
+
+/// The line holding byte `off` of a file's buffer.
+fn lineOf(f: *const panes.File.State, off: usize) usize {
+ var a: usize = 0;
+ var b = f.line_starts.len;
+ while (a + 1 < b) {
+ const m = (a + b) / 2;
+ if (f.line_starts[m] <= off) a = m else b = m;
+ }
+ return a;
+}
+
+/// The innermost bracket pair around byte `at` of `text`, both in bytes
+/// `lo` to `hi` (the rows shown): its opening and its closing byte.
+fn enclosing(text: []const u8, at: usize, lo: usize, hi: usize) ?[2]usize {
+ var depth: usize = 0;
+ var i = at;
+ const open = while (i > lo) {
+ i -= 1;
+ switch (text[i]) {
+ ')', ']', '}' => depth += 1,
+ '(', '[', '{' => if (depth == 0) break i else {
+ depth -= 1;
+ },
+ else => {},
+ }
+ } else return null;
+ const close: u8 = switch (text[open]) {
+ '(' => ')',
+ '[' => ']',
+ else => '}',
+ };
+ depth = 0;
+ i = at;
+ while (i < @min(hi, text.len)) : (i += 1) {
+ if (text[i] == text[open]) depth += 1 else if (text[i] == close) {
+ if (depth == 0) return .{ open, i };
+ depth -= 1;
+ }
+ }
+ return null;
+}
+
pub fn bodyText(tab: u16, arena: std.mem.Allocator, pane: *Pane) ![]const u8 {
if (pane.addon != null) {
const buf = try arena.alloc(u8, pane.rows -| 1);
@@ -656,3 +1047,167 @@ fn fillBody(dst: ?[]u8, pane: *Pane, viewport: []const []const u8) usize {
}
return written;
}
+
+/// Grid row `y` of `s` from column `x`, as text.
+fn rowText(s: *const Surface, x: u16, y: u16, buf: []u8) []const u8 {
+ var n: usize = 0;
+ for (x..s.cols) |col| {
+ const g = s.cells[@as(usize, y) * s.cols + col].grapheme();
+ if (n + g.len > buf.len) break;
+ @memcpy(buf[n..][0..g.len], g);
+ n += g.len;
+ }
+ return buf[0..n];
+}
+
+test "a build error is said where its cause is: the mark on its file's tag, its words after its line, its detail under the caret's line pushing the rows below down, the walk on the notice row" {
+ const p = try Pardes.init(std.testing.allocator, .{ .cols = 80, .rows = 20 });
+ defer p.deinit();
+ const pane = try p.setTestFile("one\ntwo\nthree\nfour\nfive\nsix\n");
+ const id = p.view().active;
+ const err = pardes.Messages.keep(p, .@"error", 0, "@p9 zig build", "exit 1");
+ err.places[0] = .{ .line = 3, .col = 1 };
+ err.places[0].path.set("/test.txt");
+ err.places[0].text.set("expected 2 argument(s), found 3");
+ err.places_len = 1;
+ err.detail[0] = .{};
+ err.detail[0].set("const x = f(1, 2, 3);");
+ err.detail[1] = .{};
+ err.detail[1].set(" ^");
+ err.detail_len = 2;
+ var frame = std.heap.ArenaAllocator.init(std.testing.allocator);
+ defer frame.deinit();
+ pane.focus = .body;
+ pane.body.cur_row = 0;
+ p.sync();
+ var s = try p.render(frame.allocator());
+ const body = s.region(.body, id).?.rect;
+ // The mark, in the box's second cell; the tag's text as it was.
+ const r = p.view().rects[id];
+ try std.testing.expectEqualStrings("\u{2717}", s.at(r.x + config.GUTTER - 1, p.tagTop(pane, r)).grapheme());
+ try std.testing.expect(std.mem.startsWith(u8, try tagline.tagPrefix(p, pane), "/test.txt"));
+ var buf: [512]u8 = undefined;
+ // Its words after line 3's end; nothing inserted while the caret is
+ // elsewhere.
+ try std.testing.expect(std.mem.indexOf(u8, rowText(s, body.x, body.y + 2, &buf), "three \u{2717} expected 2 argument(s), found 3") != null);
+ try std.testing.expect(std.mem.indexOf(u8, rowText(s, body.x, body.y + 3, &buf), "four") != null);
+ // The caret on line 3: its detail under it, the rows below two rows down.
+ pane.body.cur_row = 2;
+ _ = frame.reset(.retain_capacity);
+ s = try p.render(frame.allocator());
+ try std.testing.expect(std.mem.indexOf(u8, rowText(s, body.x, body.y + 3, &buf), "const x = f(1, 2, 3);") != null);
+ try std.testing.expect(std.mem.indexOf(u8, rowText(s, body.x, body.y + 5, &buf), "four") != null);
+ // ...never written: the file is as it was.
+ try std.testing.expectEqualStrings("one\ntwo\nthree\nfour\nfive\nsix\n", pane.file.?.content);
+ // The notice row offers the walk.
+ const foot = s.region(.notice_row, pardes.Region.none).?;
+ try std.testing.expect(std.mem.endsWith(u8, std.mem.trimEnd(u8, rowText(s, 0, foot.rect.y, &buf), " "), "SPC e walk"));
+}
+
+test "a click under a message's detail lands on the row drawn there, a click on the detail on the line it explains, and B2 on a word of the detail runs it" {
+ const p = try Pardes.init(std.testing.allocator, .{ .cols = 80, .rows = 20 });
+ defer p.deinit();
+ const pane = try p.setTestFile("one\ntwo\nthree\nfour\nfive\nsix\n");
+ const id = p.view().active;
+ const err = pardes.Messages.keep(p, .@"error", 0, "@p9 zig build", "exit 1");
+ err.places[0] = .{ .line = 3, .col = 1 };
+ err.places[0].path.set("/test.txt");
+ err.places[0].text.set("bad");
+ err.places_len = 1;
+ err.detail[0] = .{};
+ err.detail[0].set("try Wrap here");
+ err.detail[1] = .{};
+ err.detail[1].set(" ^");
+ err.detail_len = 2;
+ pane.focus = .body;
+ pane.body.cur_row = 2;
+ p.sync();
+ var frame = std.heap.ArenaAllocator.init(std.testing.allocator);
+ defer frame.deinit();
+ var s = try p.render(frame.allocator());
+ const body = s.region(.body, id).?.rect;
+ var buf: [512]u8 = undefined;
+ // Line 5 drawn two rows lower than its place in the row map, under the
+ // detail: a click on it lands on it.
+ const five = std.mem.indexOf(u8, rowText(s, body.x, body.y + 6, &buf), "five").?;
+ const x = body.x + @as(u16, @intCast(five)) + 1;
+ p.update(.{ .mouse = .{ .button = .left, .kind = .press, .col = x, .row = body.y + 6 } });
+ p.update(.{ .mouse = .{ .button = .left, .kind = .release, .col = x, .row = body.y + 6 } });
+ try std.testing.expectEqual(@as(i32, 4), pane.body.cur_row);
+ // On line 3 again, its detail drawn: a click on the detail is on the
+ // line it explains, and the detail stays.
+ pane.body.cur_row = 2;
+ _ = frame.reset(.retain_capacity);
+ s = try p.render(frame.allocator());
+ const wrap_at = std.mem.indexOf(u8, rowText(s, body.x, body.y + 3, &buf), "Wrap").?;
+ const wx = body.x + @as(u16, @intCast(wrap_at)) + 1;
+ p.update(.{ .mouse = .{ .button = .left, .kind = .press, .col = wx, .row = body.y + 4 } });
+ p.update(.{ .mouse = .{ .button = .left, .kind = .release, .col = wx, .row = body.y + 4 } });
+ try std.testing.expectEqual(@as(i32, 2), pane.body.cur_row);
+ // B2 on a word of it: the word runs, as a typed one would.
+ _ = frame.reset(.retain_capacity);
+ s = try p.render(frame.allocator());
+ const wrapped = p.settings.wrap;
+ p.update(.{ .mouse = .{ .button = .middle, .kind = .press, .col = wx, .row = body.y + 3 } });
+ p.update(.{ .mouse = .{ .button = .middle, .kind = .release, .col = wx, .row = body.y + 3 } });
+ while (p.nextEffect()) |_| {}
+ try std.testing.expect(p.settings.wrap != wrapped);
+ try std.testing.expectEqualStrings("one\ntwo\nthree\nfour\nfive\nsix\n", pane.file.?.content);
+}
+
+test "a motion root's level paints its targets in the gutter: `]` the next paragraph's p, `g` g and e; `m` browsed on `i` tints the braces' inside; nothing at rest" {
+ const Key = pardes.Key;
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 80, .rows = 20 });
+ defer p.deinit();
+ const pane = try p.setTestFile("fn a() {\n one;\n}\n\nfn b() {\n two;\n}\n");
+ const id = p.view().active;
+ var frame = std.heap.ArenaAllocator.init(std.testing.allocator);
+ defer frame.deinit();
+ const a = frame.allocator();
+ p.clock.now_ns = 5 * std.time.ns_per_s;
+ p.clock.stepped_ns = p.clock.now_ns;
+ pane.focus = .body;
+ pane.body.cur_row = 1;
+ pane.body.cur_col = 4;
+ p.sync();
+ var s = try p.render(a);
+ const body = s.region(.body, id).?.rect;
+ const gutter = body.x;
+ const at_rest = [_][]const u8{ s.at(gutter, body.y).grapheme(), s.at(gutter, body.y + 4).grapheme(), s.at(gutter, body.y + 6).grapheme() };
+ for (at_rest) |g| try std.testing.expect(!std.mem.eql(u8, g, "p") and !std.mem.eql(u8, g, "g") and !std.mem.eql(u8, g, "e"));
+ const plain_bg = s.at(gutter + panes.File.gutterWidth(pane) + 4, body.y + 1).style.bg;
+ // `]`: nothing until its level shows; then `p` on the next paragraph.
+ p.update(.{ .key = .{ .cp = ']' } });
+ p.advance(p.clock.now_ns);
+ _ = frame.reset(.retain_capacity);
+ s = try p.render(a);
+ try std.testing.expect(!std.mem.eql(u8, s.at(gutter, body.y + 4).grapheme(), "p"));
+ p.clock.now_ns = p.view().tag_state.due_ns;
+ _ = frame.reset(.retain_capacity);
+ s = try p.render(a);
+ try std.testing.expectEqualStrings("p", s.at(gutter, body.y + 4).grapheme());
+ p.update(.{ .key = .{ .cp = Key.escape } });
+ // `g`: its first and last lines.
+ p.update(.{ .key = .{ .cp = 'g' } });
+ p.advance(p.clock.now_ns);
+ p.clock.now_ns = p.view().tag_state.due_ns;
+ _ = frame.reset(.retain_capacity);
+ s = try p.render(a);
+ try std.testing.expectEqualStrings("g", s.at(gutter, body.y).grapheme());
+ try std.testing.expectEqualStrings("e", s.at(gutter, body.y + 6).grapheme());
+ p.update(.{ .key = .{ .cp = Key.escape } });
+ // `m` unrolled, its cursor on `i`: the inside of the braces around the
+ // caret tinted.
+ p.update(.{ .key = .{ .cp = 'm' } });
+ p.update(.{ .key = .{ .cp = Key.down } });
+ p.view().tag_state.hi = bindings.nodeAt(.match, "i").?.key;
+ _ = frame.reset(.retain_capacity);
+ s = try p.render(a);
+ const lit = s.at(gutter + panes.File.gutterWidth(pane) + 4, body.y + 1).style.bg;
+ try std.testing.expect(!std.meta.eql(plain_bg, lit));
+ // At rest again: the gutter as it was.
+ p.update(.{ .key = .{ .cp = Key.escape } });
+ _ = frame.reset(.retain_capacity);
+ s = try p.render(a);
+ try std.testing.expectEqualStrings(at_rest[1], s.at(gutter, body.y + 4).grapheme());
+}
diff --git a/core/builtins.zig b/core/builtins.zig
index c7e821dd..32af63f7 100644
--- a/core/builtins.zig
+++ b/core/builtins.zig
@@ -797,6 +797,9 @@ pub const Themes = struct {
pub const scope: Scope = .session;
pub const output: OutputTraits = .{ .name = config.themes_buffer, .steps = true, .commands = true };
pub fn run(c: Ctx) void {
+ // From the keyboard, where the walk is on: a picker in the tag, the
+ // window wearing its row (Pick.zig, SPEC §5.1).
+ if (pardes.Pick.asked(c.p)) return pardes.Pick.open(c.p, c.id, .themes, "", "", "");
panes.Output.openThemes(c.p, c.id) catch |err| c.p.reportError(.at(c.id), "themes", err);
}
};
@@ -1248,7 +1251,7 @@ pub const Del = struct {
var rec: [32]u8 = undefined;
pardes.ctlfs.events.notePath(c.p, "ask", std.fmt.bufPrint(&rec, "{d} del k j", .{c.pane.serial}) catch unreachable); // a u32 fits 32
// The question says Del already.
- if (c.pane.msg_announcement) c.pane.msg_len = 0;
+ _ = c.p.messages.retire(&.{.echo});
return;
}
c.p.removePane(c.id, to) catch |err| return c.p.reportError(.at(c.id), "close", err);
@@ -1722,12 +1725,32 @@ pub const LocationsConfig = struct {
}
};
-/// Show the messages said so far in a +Messages.
+/// Act on the message the notice row leads with.
+///
+/// An error that names places lands them as a list in the pane's walk, n
+/// and N walking them (where jumps do not walk, a +Search the Look walk
+/// steps through); a question takes the keyboard in its pane's tag (its
+/// answer's key answers it, Esc leaves it waiting); anything else opens the
+/// history.
+pub const Message = struct {
+ pub const quiet = true;
+ pub const scope: Scope = .session;
+ pub fn run(c: Ctx) void {
+ pardes.Messages.act(c.p, c.id);
+ }
+};
+
+/// Show the messages said so far, the newest first, an error's places
+/// under it.
+///
+/// Where jumps walk, a list in the pane's tag: Enter Looks a row (a
+/// message's cause, a place), C-q keeps it as a +Messages; else the
+/// +Messages.
pub const Messages = struct {
pub const scope: Scope = .session;
pub const output: OutputTraits = .{ .name = config.messages_buffer };
pub fn run(c: Ctx) void {
- panes.Output.openMessages(c.p, c.id) catch |err| c.p.reportError(.at(c.id), "messages", err);
+ pardes.Messages.history(c.p, c.id);
}
};
@@ -2272,6 +2295,9 @@ pub const Rename = struct {
pub fn run(c: Ctx) void {
const a = std.mem.trim(u8, c.arg orelse "", " \t\r\n");
if (a.len > 0) return c.p.lspRequest(c.id, .rename, a);
+ // From the keyboard, where the walk is on: typed in the pane's own
+ // tag, its edits drawn in its body as they are typed (SPEC §3.5).
+ if (pardes.Pick.asked(c.p) and c.pane.file != null) return @import("lsp/Ask.zig").openRename(c.p, c.id);
panes.startPrompt(c.p, c.pane, &c.pane.body, .{ .search = config.rename_marker });
}
};
@@ -2406,7 +2432,7 @@ test "Exit over a ctl write or a click names every pane it asks about, a second
try std.testing.expect(std.mem.endsWith(u8, unsavedList(p), "\nExit again to discard\n"));
var noticed = false;
for (p.panes) |slot| if (slot) |pane| {
- noticed = noticed or std.mem.eql(u8, pane.msg[0..pane.msg_len], "2 unsaved panes \u{2014} Exit again to discard");
+ noticed = noticed or std.mem.eql(u8, p.messages.saidBy(pane), "2 unsaved panes \u{2014} Exit again to discard");
};
try std.testing.expect(noticed);
// Edited since: only that one is named again (acme's rule).
@@ -2506,7 +2532,7 @@ test "Kill stops the commands pardes typed, bare all and by name those that matc
p.host = .{ .vtable = &killed.vtable };
// Nothing running: nothing to stop, and never the shell; said.
try std.testing.expectEqual(@as(usize, 0), killed.count(p, "Kill"));
- try std.testing.expectEqualStrings("Kill: nothing running", p.panes[term].?.msg[0..p.panes[term].?.msg_len]);
+ try std.testing.expectEqualStrings("Kill: nothing running", p.messages.saidBy(p.panes[term].?));
_ = exec.execute(p, term, "make -j8");
while (p.nextEffect()) |_| {}
// Typed but not started yet (no C mark): not running.
diff --git a/core/colors.zig b/core/colors.zig
index 84595a30..2a97ac69 100644
--- a/core/colors.zig
+++ b/core/colors.zig
@@ -832,6 +832,21 @@ pub fn themeIndex(name: []const u8) ?usize {
return null;
}
+/// The window wearing theme `index` (SPEC §5.1, a theme's preview), or
+/// its own again (null): nothing loaded, the session's theme and a theme
+/// file as they were; its chrome worked out once a theme, never a frame.
+/// The themes picker's (Pick.zig), and `:theme `'s argument rows'.
+pub fn previewTheme(p: *Pardes, index: ?usize) void {
+ const i = index orelse {
+ p.theme_preview = null;
+ return;
+ };
+ if (i >= themes.len) return;
+ if (p.theme_preview) |had| if (had == i) return;
+ p.theme_preview = @intCast(i);
+ p.preview_chrome = ChromeTheme.fromTheme(&themes[i]);
+}
+
pub fn setThemeIndex(p: *Pardes, index: usize) void {
if (index >= themes.len or
(p.custom_theme == null and p.theme_file_path.get().len == 0 and
@@ -960,7 +975,7 @@ test "a theme file that cannot be read is named in the failure" {
requestThemeFile(p, 0, "/nowhere/mine.zon");
failThemeFile(p, p.theme_file_generation, error.FileNotFound);
const pane = p.panes[0].?;
- try std.testing.expect(std.mem.indexOf(u8, pane.msg[0..pane.msg_len], "theme file /nowhere/mine.zon: ") != null);
+ try std.testing.expect(std.mem.indexOf(u8, p.messages.saidBy(pane), "theme file /nowhere/mine.zon: ") != null);
}
test "a theme file nested 10, 1 000 and 100 000 deep is refused in words, never a stack overflow" {
@@ -976,11 +991,11 @@ test "a theme file nested 10, 1 000 and 100 000 deep is refused in words, never
try source.appendSlice(gpa, "1");
for (0..depth) |_| try source.append(gpa, '}');
try source.appendSlice(gpa, " }\n");
- p.panes[0].?.msg_len = 0;
+ p.messages.live_len = 0;
// Up to 2026-11-23 std's parser took it: 5 000 deep overflowed the
// stack (a Debug build's 16 MiB).
try std.testing.expect(!loadThemeFile(p, p.theme_file_generation, source.items));
- const said = p.panes[0].?.msg[0..p.panes[0].?.msg_len];
+ const said = p.messages.saidBy(p.panes[0].?);
std.testing.expect(std.mem.indexOf(u8, said, "theme file /tmp/pardes-config/themes/deep.zon: ") != null) catch |err| {
std.debug.print("{d} deep: said {s}\n", .{ depth, said });
return err;
@@ -1021,7 +1036,7 @@ test "ThemeFile parses ZON atomically and Theme returns to the compiled ring" {
// A half-written save is rejected without disturbing the last good value.
try std.testing.expect(!loadThemeFile(p, request_effect.generation, ".{ .name = "));
// Said with its line, in words: never a bare `parse zon`.
- const said = p.panes[0].?.msg[0..p.panes[0].?.msg_len];
+ const said = p.messages.saidBy(p.panes[0].?);
try std.testing.expect(std.mem.indexOf(u8, said, ": line 1: ") != null and std.mem.indexOf(u8, said, "parse zon") == null);
try std.testing.expectEqualStrings("mine", p.theme().name);
try std.testing.expectEqual(@as(?[3]u8, .{ 1, 2, 3 }), p.theme().bg);
diff --git a/core/config.zig b/core/config.zig
index f9f906a9..d916b677 100644
--- a/core/config.zig
+++ b/core/config.zig
@@ -116,6 +116,7 @@ pub const leader_path = paths: {
.Build = "hb",
.Messages = "hm",
.Keys = "hk",
+ .Message = "e",
.Newcol = "cn",
.Delcol = "cd",
.Joincol = "cj",
@@ -268,6 +269,7 @@ pub const tag_tty = "$";
pub const command_line: []const Chord = &.{.{ .cp = ':' }};
pub const search: []const Chord = &.{.{ .cp = '/' }};
+pub const search_back: []const Chord = &.{.{ .cp = '?' }};
pub const search_next: []const Chord = &.{.{ .cp = 'n' }};
pub const search_prev: []const Chord = &.{.{ .cp = 'N' }};
/// Typing on a query pane's line 1 (Query.zig): the next and the previous
@@ -637,8 +639,9 @@ pub const Settings = struct {
/// A jump of the cursor leaves a short trail that fades: a setting
/// alone, each frontend draws it (jump_trail.zig).
jump_trail: bool = false,
- /// How long a message stays after the key or click that dismisses it.
- message_linger_ms: u16 = 800,
+ /// How long an echo or a notice stays bright before it dims (a warning
+ /// twice as long): Messages.Said.faded.
+ message_linger_ms: u16 = 4000,
/// Where Dump writes and a relative Restore looks; empty is the default
/// ($XDG_DATA_HOME/pardes, else ~/.local/share/pardes).
dump_dir: Text(limits.host_path_cap) = .{},
@@ -673,10 +676,10 @@ pub const Settings = struct {
callstack_depth: u8 = @import("lsp/lsp.zig").callstack_default_depth,
/// A jump (a Look at a place, a definition, an error's place) steps
- /// the pane it is made from, or its reader, as a walk (Trail.zig); or
- /// opens a pane for each file, as before the walk, until the walk's
- /// pickers and prompts are in (pick-ui SPEC §14.3).
- jumps: Jumps = .@"new-pane",
+ /// the pane it is made from, or its reader, as a walk (Trail.zig, the
+ /// spec's default); `new-pane` opens a pane for each file, as before
+ /// the walk (pick-ui SPEC §6.6's opt-out).
+ jumps: Jumps = .walk,
/// A setting that is one of a few words, each an enum field of Settings.
pub const Choice = enum { pet, jumps };
@@ -810,7 +813,7 @@ pub const Settings = struct {
.{ .word = "InactiveDim", .action = .inactive_dim, .doc = "Fade the unfocused panes' text by a percentage, 0 through 100, 0 off." },
.{ .word = "Pet", .action = .{ .choice = .pet }, .doc = "The window's companion in the workspace tag's blank space: off, cat or frog." },
.{ .word = "Jumps", .action = .{ .choice = .jumps }, .doc = "A jump steps its pane or that pane's reader (walk), or opens a pane for each file (new-pane)." },
- .{ .word = "MessageLinger", .action = .message_linger, .doc = "How long, in milliseconds, a message stays after what dismisses it." },
+ .{ .word = "MessageLinger", .action = .message_linger, .doc = "How long, in milliseconds, an echo or a notice stays bright before it dims; a warning twice as long." },
.{ .word = "DumpDir", .action = .dump_dir, .doc = "The directory of the state file, where Dump writes and Recent is kept. A relative Restore name is looked for there too; bare, the default." },
.{ .word = "Theme", .action = .theme, .doc = "Switch to the theme named: `Theme atelier`. Themes lists them, NextColor steps through them." },
.{ .word = "Shell", .action = .shell, .doc = "The shell new terminals run: `Shell /bin/zsh`; bare, $SHELL if it is executable, else /bin/sh." },
diff --git a/core/draw.zig b/core/draw.zig
index 5282b1c9..dbbb6148 100644
--- a/core/draw.zig
+++ b/core/draw.zig
@@ -95,7 +95,7 @@ pub fn place(p: *Pardes, s: *Surface) void {
for (&p.panes, 0..) |*slot, id| {
const pane = slot.* orelse continue;
paneFacts(p, &p.facts, id, pane);
- Messages.collectNotices(p, pane, v.rects[id], id);
+ Messages.collectNotices(p, pane, v.rects[id]);
const r = v.rects[id];
if (r.w <= config.GUTTER or r.h == 0) continue;
const owner: u8 = @intCast(id);
@@ -161,10 +161,12 @@ pub fn place(p: *Pardes, s: *Surface) void {
const active_col = if (layout.findPane(p, v.active)) |found| found.col else null;
for (0..p.view().ncol) |c| {
if (v.col_w[c] == 0) continue;
- s.addRegion(.{ .kind = .column, .owner = @intCast(c), .serial = v.cols[c].serial, .active = active_col == c, .rect = .{ .x = v.col_x[c], .y = p.topBarHeight(), .w = v.col_w[c], .h = s.rows -| p.topBarHeight() } });
+ s.addRegion(.{ .kind = .column, .owner = @intCast(c), .serial = v.cols[c].serial, .active = active_col == c, .rect = .{ .x = v.col_x[c], .y = p.topBarHeight(), .w = v.col_w[c], .h = s.rows -| (p.topBarHeight() + layout.noticeRowHeight(p)) } });
}
if (p.settings.workspace_tag)
s.addRegion(.{ .kind = .workspace_tag, .rect = .{ .x = 0, .y = 0, .w = s.cols, .h = p.topBarHeight() } });
+ const foot = layout.noticeRowHeight(p);
+ if (foot > 0) s.addRegion(.{ .kind = .notice_row, .rect = .{ .x = 0, .y = s.rows - foot, .w = s.cols, .h = foot } });
}
/// A pane's grip in the grid: `box` focused, else halfway between its ring
@@ -228,12 +230,9 @@ fn joinNotice(p: *Pardes, s: *Surface, arena: std.mem.Allocator, region: Region)
const kind = pane.notices.kinds[i];
const r = v.rects[id];
const chip = region.rect.w;
- var leader_buf: [Messages.leader_room]u8 = undefined;
- const text = Messages.noticeText(p, pane, i, &leader_buf);
+ const text = Messages.noticeText(pane, i);
const bg = chrome.tag_bg;
- // Where an exec was sent to a REPL reads in the tag's name tint, set
- // apart from what the editor says.
- const fg = if (kind == .message and pane.msg_sent) chrome.tag_name_fg else chrome.tag_fg;
+ const fg = chrome.tag_fg;
// Nothing to say, or too narrow for a layer: a blank chip on the grid.
if (text.len == 0 or r.w <= TAG_TEXT_INSET) {
s.fill(region.rect.x, region.rect.y, chip, 1, .{ .bg = .{ .rgb = bg }, .font_role = .tagline });
@@ -349,7 +348,7 @@ pub fn render(p: *Pardes, arena: std.mem.Allocator) !*Surface {
// Separators have their own role; a scrollbar need not frame the page.
const whole = s.regions[0].rect;
s.fill(whole.x, whole.y, whole.w, whole.h, .{ .bg = .{ .rgb = chrome.border } });
- for (0..p.view().ncol) |c| if (v.cols[c].n == 0) s.fill(v.col_x[c], p.topBarHeight() + layout.columnBarHeight(p), v.col_w[c], s.rows -| (p.topBarHeight() + layout.columnBarHeight(p)), .{ .bg = .{ .rgb = chrome.empty_col } });
+ for (0..p.view().ncol) |c| if (v.cols[c].n == 0) s.fill(v.col_x[c], p.topBarHeight() + layout.columnBarHeight(p), v.col_w[c], s.rows -| (p.topBarHeight() + layout.columnBarHeight(p) + layout.noticeRowHeight(p)), .{ .bg = .{ .rgb = chrome.empty_col } });
for (&p.panes, 0..) |*slot, id| {
const pane = slot.* orelse continue;
@@ -374,6 +373,7 @@ pub fn render(p: *Pardes, arena: std.mem.Allocator) !*Surface {
};
try paintHeaders(p, s);
+ try paintNoticeRow(p, s);
// debug overlay: a small stats box drawn last, top-right ("Debug")
if (p.settings.debug) if (p.panes[v.active]) |at| {
@@ -482,6 +482,12 @@ fn renderPane(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, r:
s.fill(r.x, tag_y, config.GUTTER, @min(1, pane.tag_rows), box_style);
if (dirty and pane.tag_rows > 0 and config.GUTTER > 1)
s.set(r.x + config.GUTTER - 1, tag_y, "*", .{ .fg = .{ .rgb = inkOn(boxDirty(p)) }, .bg = .{ .rgb = boxDirty(p) }, .bold = true, .font_role = .tagline });
+ // The mark (pick-ui SPEC §2): the status of the most important live
+ // message about the pane, in the box's second cell, on the dirty ground
+ // when there is unsaved text: a cell of the box's, never the tag's
+ // text, so it moves nothing.
+ if (pane.tag_rows > 0 and config.GUTTER > 1) if (p.messages.markOf(pane)) |kind|
+ s.set(r.x + config.GUTTER - 1, tag_y, kind.glyph(), .{ .fg = .{ .rgb = Messages.ink(chrome, kind) }, .bg = .{ .rgb = if (dirty) boxDirty(p) else box_bg }, .bold = true, .font_role = .tagline });
s.fill(r.x, tag_y + 1, config.GUTTER, pane.tag_rows -| 1, .{
.bg = .{ .rgb = band },
.font_role = .tagline,
@@ -569,6 +575,19 @@ fn paintHeaders(p: *Pardes, s: *Surface) !void {
viewport.x += inset;
viewport.w -= inset;
try renderHeaderLayer(p, layer, .workspace, 0, viewport, tagline.topbar(p), top, chrome.tagline_bg, chrome.tagline_fg);
+ // A server's progress (a message of no pane) at its first row's
+ // right end, where the row has room for it.
+ if (layer.rows > 0 and top == 0) for (p.messages.live[0..p.messages.live_len]) |*said| {
+ if (said.kind != .progress or said.pane != 0) continue;
+ var buf: [Messages.LoggedMessage.cap + 8]u8 = undefined;
+ const text = std.fmt.bufPrint(&buf, "{s} {s}", .{ Messages.Kind.progress.glyph(), said.words() }) catch break;
+ const width = panes.File.displayWidth(p.settings.tab, text);
+ const used = panes.File.displayWidth(p.settings.tab, modal.lineSlice(tagline.topbar(p), 0));
+ const room = layout.tagCapacity(p, viewport.w);
+ var row: Surface = .{ .cols = layer.cols, .rows = 1, .cells = layer.cells[0..layer.cols], .tab = p.settings.tab };
+ if (used + 2 + width < room) _ = row.print(@intCast(room - 1 - width), 0, @intCast(width), text, .{ .fg = .{ .rgb = Messages.ink(chrome, .progress) }, .bg = .{ .rgb = chrome.tagline_bg }, .font_role = .tagline });
+ break;
+ };
joinHeaderRows(s, layer, chrome.tagline_fg);
}
const column_rows = layout.columnBarHeight(p);
@@ -597,6 +616,43 @@ fn paintHeaders(p: *Pardes, s: *Surface) !void {
};
}
+/// The notice row (Messages.noticeRow), the live messages' index at the
+/// window's foot: a header layer at the tagline's pitch in the workspace
+/// tag's colours, the glyph in its kind's, a message gone dim and the
+/// counts at the right end dimmed.
+fn paintNoticeRow(p: *Pardes, s: *Surface) !void {
+ const region = s.region(.notice_row, Region.none) orelse return;
+ const chrome = p.chromeTheme();
+ var viewport = region.rect;
+ const inset = @min(TAG_TEXT_INSET, viewport.w);
+ s.fill(viewport.x, viewport.y, inset, viewport.h, .{ .bg = .{ .rgb = chrome.tagline_bg }, .font_role = .tagline });
+ viewport.x += inset;
+ viewport.w -= inset;
+ var buf: [Messages.notice_row_cap]u8 = undefined;
+ const row = Messages.noticeRow(p, layout.tagCapacity(p, viewport.w) -| 1, &buf);
+ const layer = &s.tag_layers[pardes.NOTICE_ROW_LAYER];
+ try renderHeaderLayer(p, layer, .notice_row, 0, viewport, row.text, 0, chrome.tagline_bg, chrome.tagline_fg);
+ if (layer.rows == 0) return;
+ const dim: Color = .{ .rgb = colors.mix(chrome.tagline_fg, chrome.tagline_bg) };
+ const ink: Color = .{ .rgb = chrome.tagline_fg };
+ const cells = layer.cells[0..layer.cols];
+ const tab = p.settings.tab;
+ const left = @min(cells.len, panes.File.displayWidth(tab, row.text[0..row.left]));
+ const right = @min(cells.len, panes.File.displayWidth(tab, row.text[0..row.right]));
+ if (row.lead) |lead| {
+ if (lead.kind == .@"error" or lead.kind == .warn) if (cells.len > 0 and std.meta.eql(cells[0].style.fg, ink)) {
+ cells[0].style.fg = .{ .rgb = if (lead.kind == .@"error") chrome.diagnostic_error else chrome.diagnostic_warning };
+ };
+ if (lead.faded(p.clock.now_ns, p.settings.message_linger_ms)) for (cells[0..left]) |*cell| {
+ if (std.meta.eql(cell.style.fg, ink)) cell.style.fg = dim;
+ };
+ }
+ for (cells[right..]) |*cell| if (std.meta.eql(cell.style.fg, ink)) {
+ cell.style.fg = dim;
+ };
+ joinHeaderRows(s, layer, chrome.tagline_fg);
+}
+
/// Copy a header's layer into the grid under it, row by row, and its caret.
fn joinHeaderRows(s: *Surface, layer: *const pardes.Layer, fg: [3]u8) void {
const v = layer.viewport;
@@ -631,7 +687,7 @@ fn joinCells(s: *Surface, x: u16, y: u16, cells: []const Cell, from: usize, w: u
if (!cells[from].default and cells[from].len == 0) blank(&row[x], ink);
}
-fn tagTintRange(pane: *const Pane, tag: []const u8, prefix_len: usize) ?struct { lo: usize, hi: usize } {
+fn tagTintRange(p: *const Pardes, pane: *const Pane, tag: []const u8, prefix_len: usize) ?struct { lo: usize, hi: usize } {
if (pane.isTerminal()) {
// `tag` is the first row; a prefix longer than it ran to a second.
var words = std.mem.tokenizeAny(u8, tag[@min(prefix_len, tag.len)..], " \t\r\n");
@@ -642,7 +698,7 @@ fn tagTintRange(pane: *const Pane, tag: []const u8, prefix_len: usize) ?struct {
}
return null;
}
- var start: usize = tagline.nameAt(pane);
+ var start: usize = tagline.nameAt(p, pane);
const name = if (pane.file) |file|
if (pane.prompt == .name) pane.input.own orelse file.path else file.path
else if (pane.addon) |k| blk: {
@@ -689,7 +745,7 @@ fn renderHeaderLayer(p: *Pardes, layer: *pardes.Layer, kind: TagKind, id: u16, v
const editing: ?*Text = if (v.header != null and switch (kind) {
.workspace => p.headerColumn() == null,
.column => p.headerColumn() == id,
- .pane, .notice, .body, .band => false,
+ .pane, .notice, .body, .band, .notice_row => false,
}) tagline.focusedHeader(p) else null;
const scroll = if (editing != null) v.header_scroll else 0;
for (0..viewport.h) |index| {
@@ -741,7 +797,7 @@ fn renderHeaderLayer(p: *Pardes, layer: *pardes.Layer, kind: TagKind, id: u16, v
const mine = switch (kind) {
.workspace => column == null,
.column => column == id,
- .pane, .notice, .body, .band => false,
+ .pane, .notice, .body, .band, .notice_row => false,
};
const swept = sweep.span(text.len);
const start = modal.lineStartOffset(text, index + top);
@@ -822,7 +878,7 @@ fn joinPaneTag(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, r
/// grid: the spines and steps in the tag's tint, the keys in the key ink,
/// the cursor's row tinted as a selection.
fn joinBand(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, r: Rect, id: usize, active: bool) !void {
- const layer = &s.tag_layers[pardes.BAND_LAYER_BASE + id];
+ const layer = &s.tag_layers[pardes.BAND_LAYER];
if (r.w <= TAG_TEXT_INSET) return;
const band = (try pardes.Band.of(p, arena, pane, id)) orelse return;
const th = p.theme();
@@ -955,7 +1011,7 @@ fn paintPaneTag(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane,
else if (pane.prompt == .name) caret: {
// A drafted name is the prefix: its caret is on row 0 of the tag,
// the rows it wrapped onto included.
- const at = modal.positionAt(shown.text, shown.fromReal(tagline.nameAt(pane) + @as(usize, @intCast(@max(0, pane.input.cur_col)))));
+ const at = modal.positionAt(shown.text, shown.fromReal(tagline.nameAt(p, pane) + @as(usize, @intCast(@max(0, pane.input.cur_col)))));
if (at.row < top or at.row >= top + rows) break :caret null;
break :caret .{ .row = at.row - top, .at = @min(lines[at.row - top].len, at.col) };
} else if (pane.focus == .tag and pane.prompt == .none and head == null) caret: {
@@ -972,14 +1028,27 @@ fn paintPaneTag(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane,
const start = @min(line.len, panes.File.rawAtDisplay(p.settings.tab, line, pane.tag_scroll));
_ = s.print(tx, tag_y + @as(u16, @intCast(row)), tw, line[start..], tag_style);
}
+ // The pane's progress at its first row's right end, where the row has
+ // room for it (SPEC §10.2).
+ if (top == 0 and rows > 0) for (p.messages.live[0..p.messages.live_len]) |*said| {
+ if (said.kind != .progress or said.pane != pane.serial) continue;
+ var buf: [Messages.LoggedMessage.cap + 8]u8 = undefined;
+ const text = std.fmt.bufPrint(&buf, "{s} {s}", .{ Messages.Kind.progress.glyph(), said.words() }) catch break;
+ const width = panes.File.displayWidth(p.settings.tab, text);
+ const used = panes.File.displayWidth(p.settings.tab, lines[0]);
+ if (used + 2 + width <= tw) _ = s.print(tx + @as(u16, @intCast(tw - width)), tag_y, @intCast(width), text, .{ .fg = .{ .rgb = Messages.ink(chrome, .progress) }, .bg = .{ .rgb = tag_bg }, .font_role = .tagline });
+ break;
+ };
// The name's tint, in the tag's first line, over whichever rows it
// wrapped onto.
const first_line = whole[0 .. std.mem.indexOfScalar(u8, whole, '\n') orelse whole.len];
- if (tagTintRange(pane, first_line, prefix_len)) |name| if (name.lo < name.hi)
+ if (tagTintRange(p, pane, first_line, prefix_len)) |name| if (name.lo < name.hi)
inkTag(p, s, shown, lines[0..rows], top, tx, tag_y, tw, name.lo, @min(name.hi, first_line.len), if (active) chrome.tag_active_name_fg else chrome.tag_name_fg);
// A walk's forward steps, after the name, dimmed (Trail.zig).
- const ahead = tagline.forwardSpan(pane);
+ const ahead = tagline.forwardSpan(p, pane);
if (ahead[0] < ahead[1]) inkTag(p, s, shown, lines[0..rows], top, tx, tag_y, tw, ahead[0], @min(ahead[1], first_line.len), chrome.lineno);
+ // A search word its places no longer light, dimmed (Prompt.zig).
+ if (pardes.Prompt.unlit(p, pane)) |span| inkTag(p, s, shown, lines[0..rows], top, tx, tag_y, tw, span[0], @min(span[1], first_line.len), chrome.lineno);
// The head's keys in the key ink, its dimmed, underlined and struck
// words (TagState.Span), over whichever rows they wrapped onto.
if (head) |h| for (h.spans) |span| {
@@ -1003,6 +1072,7 @@ fn paintPaneTag(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane,
.dim => style.dim = true,
.under => style.ul = .single,
.strike => style.strikethrough = true,
+ .err => style.fg = .{ .rgb = chrome.diagnostic_error },
}
}
}
@@ -1281,8 +1351,8 @@ test "place puts every part where the painters and layers put it, in every layou
}
}
-test "the word under the pointer on a notice is lit in its layer and in the grid's copy" {
- const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 41, .rows = 12 });
+test "the word under the pointer on the notice row is lit in its layer and in the grid's copy" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 61, .rows = 12 });
defer p.deinit();
_ = try p.setTestFile("text\n");
var arena: std.heap.ArenaAllocator = .init(std.testing.allocator);
@@ -1290,36 +1360,35 @@ test "the word under the pointer on a notice is lit in its layer and in the grid
try std.testing.expect(p.executeBuiltinLine(p.view().active, "Msg Look here"));
p.sync();
var s = try p.render(arena.allocator());
- const notice = for (s.regionList()) |region| {
- if (region.kind == .notice) break region;
- } else return error.TestExpectedNotice;
- const row = s.cells[@as(usize, notice.rect.y) * s.cols ..][0..s.cols];
- // "here", the chip's last word, before its blank edge.
- const here = notice.rect.x + notice.rect.w - 5;
+ const foot = s.region(.notice_row, Region.none) orelse return error.TestExpectedNoticeRow;
+ try std.testing.expectEqual(s.rows - 1, foot.rect.y);
+ const row = s.cells[@as(usize, foot.rect.y) * s.cols ..][0..s.cols];
+ // "here": the message's last word, `· /test.txt Look here`, 17
+ // columns in.
+ const here: u16 = TAG_TEXT_INSET + 17;
try std.testing.expectEqualStrings("h", row[here].grapheme());
p.view().pointer_inside = true;
p.view().hover_col = here + 1;
- p.view().hover_row = notice.rect.y;
+ p.view().hover_row = foot.rect.y;
_ = arena.reset(.retain_capacity);
s = try p.render(arena.allocator());
- const lit = s.cells[@as(usize, notice.rect.y) * s.cols ..][0..s.cols];
- const sel: Color = .{ .rgb = p.theme().sel_bg };
+ const lit = s.cells[@as(usize, foot.rect.y) * s.cols ..][0..s.cols];
+ const sel: Color = .{ .rgb = p.theme().tag_sel_bg orelse p.theme().sel_bg };
for (lit[here..][0..4]) |cell| try std.testing.expectEqual(sel, cell.style.bg);
try std.testing.expect(!std.meta.eql(sel, lit[here - 2].style.bg));
- const layer = for (s.tagLayers()) |*layer| {
- if (layer.rows != 0 and layer.kind == .notice) break layer;
- } else return error.TestExpectedNotice;
+ const layer = &s.tag_layers[pardes.NOTICE_ROW_LAYER];
+ try std.testing.expectEqual(TagKind.notice_row, layer.kind);
const lit_in_layer = for (layer.cells) |cell| {
if (std.meta.eql(sel, cell.style.bg)) break true;
} else false;
try std.testing.expect(lit_in_layer);
}
-test "a notice wider than its band, as a shader's compile error is, draws its end and nothing past it" {
+test "a message wider than the notice row, as a shader's compile error is, gives way to the row's right end and draws nothing past the row" {
const p = try Pardes.init(std.testing.allocator, .{ .cols = 80, .rows = 20 });
defer p.deinit();
- // A gui-shaped core: its tagline is narrower than the body, so a notice's
- // band holds more columns than its chip has cells.
+ // A gui-shaped core: its tagline is narrower than the body, so the
+ // row's layer holds more columns than the grid has cells.
p.update(.{ .resize = .{ .cols = 80, .rows = 20, .row_metrics = .{ .body_w = 10, .body_h = 20, .tagline_w = 6, .tagline_h = 12 } } });
_ = try p.setTestFile("text\n");
var arena: std.heap.ArenaAllocator = .init(std.testing.allocator);
@@ -1332,13 +1401,12 @@ test "a notice wider than its band, as a shader's compile error is, draws its en
for (0..30) |_| p.update(.tick);
_ = arena.reset(.retain_capacity);
const s = try p.render(arena.allocator());
- const notice = for (s.regionList()) |region| {
- if (region.kind == .notice) break region;
- } else return error.TestExpectedNotice;
- // Text up to the chip's blank last cell, and no padding ink.
- const row = s.cells[@as(usize, notice.rect.y) * s.cols ..][notice.rect.x..][0..notice.rect.w];
- try std.testing.expectEqualStrings(" ", row[row.len - 1].grapheme());
- try std.testing.expect(!std.mem.eql(u8, " ", row[row.len - 2].grapheme()));
+ const layer = &s.tag_layers[pardes.NOTICE_ROW_LAYER];
+ try std.testing.expectEqual(layout.tagCapacity(p, s.cols - TAG_TEXT_INSET), layer.cols);
+ // The counts at the row's end, whole, a blank cell short of it.
+ const cells = layer.cells[0..layer.cols];
+ try std.testing.expectEqualStrings(" ", cells[cells.len - 1].grapheme());
+ try std.testing.expectEqualStrings("m", cells[cells.len - 2].grapheme());
}
}
@@ -1621,7 +1689,7 @@ fn apart(a: *const Pardes, b: *const Pardes) bool {
var pdb: [pane_names.len]u64 = undefined;
_ = pardes.walk.fieldDigests(Pane, x, &pda);
_ = pardes.walk.fieldDigests(Pane, y, &pdb);
- for (pane_names, pda, pdb) |name, u, v| if (u != v and !std.mem.eql(u8, name, "msg_said_ms") and !std.mem.eql(u8, name, "cwd")) {
+ for (pane_names, pda, pdb) |name, u, v| if (u != v and !std.mem.eql(u8, name, "cwd")) {
if (std.mem.eql(u8, name, "file")) if (x.file) |*fx| if (y.file) |*fy| {
const file_names = comptime pardes.walk.fieldNames(panes.File.State);
var fda: [file_names.len]u64 = undefined;
@@ -1640,3 +1708,38 @@ fn apart(a: *const Pardes, b: *const Pardes) bool {
}
return any;
}
+
+test "progress is said at the right end of its tag: a pane's at its tag's, a server's at the workspace tag's, and it goes when it ends" {
+ const p = try Pardes.init(std.testing.allocator, .{ .cols = 160, .rows = 20 });
+ defer p.deinit();
+ const pane = try p.setTestFile("text\n");
+ const id = p.view().active;
+ var frame = std.heap.ArenaAllocator.init(std.testing.allocator);
+ defer frame.deinit();
+ var buf: [512]u8 = undefined;
+ const Row = struct {
+ fn of(s: *const Surface, y: u16, out: []u8) []const u8 {
+ var n: usize = 0;
+ for (0..s.cols) |x| {
+ const g = s.cells[@as(usize, y) * s.cols + x].grapheme();
+ @memcpy(out[n..][0..g.len], g);
+ n += g.len;
+ }
+ return std.mem.trimEnd(u8, out[0..n], " ");
+ }
+ };
+ p.setStatus(.at(id), "Changes: jj\u{2026}");
+ p.setStatus(.at(pardes.MAX_PANES), "--:--:-- lsp zls: indexing 3/10");
+ p.sync();
+ var s = try p.render(frame.allocator());
+ const tag_y = p.tagTop(pane, p.view().rects[id]);
+ try std.testing.expect(std.mem.endsWith(u8, Row.of(s, tag_y, &buf), "\u{22ef} Changes: jj\u{2026}"));
+ try std.testing.expect(std.mem.endsWith(u8, Row.of(s, 0, &buf), "\u{22ef} lsp zls: indexing 3/10"));
+ // Its mark meanwhile, and neither is the notice row's.
+ try std.testing.expectEqualStrings("\u{22ef}", s.at(p.view().rects[id].x + config.GUTTER - 1, tag_y).grapheme());
+ try std.testing.expect(p.messages.headline() == null);
+ p.setStatus(.at(id), "");
+ _ = frame.reset(.retain_capacity);
+ s = try p.render(frame.allocator());
+ try std.testing.expect(std.mem.indexOf(u8, Row.of(s, tag_y, &buf), "\u{22ef}") == null);
+}
diff --git a/core/dump.zig b/core/dump.zig
index 06a3eae5..8e44d82d 100644
--- a/core/dump.zig
+++ b/core/dump.zig
@@ -148,6 +148,7 @@ fn afterLoad(p: *Pardes) void {
f.context.reload(p.tree_sitter_gpa, f.path, text, f.revision);
};
@import("jj.zig").loaded(p);
+ pardes.TagState.loaded(p);
}
/// A file kept slim in a dump (`dumpExit`, a closed pane's past its bound,
diff --git a/core/edit.zig b/core/edit.zig
index 8ed7752e..e68f8d38 100644
--- a/core/edit.zig
+++ b/core/edit.zig
@@ -124,6 +124,11 @@ pub fn applyPaste(p: *Pardes, whole: []const u8) Error!void {
var said: pardes.Kind.Buf(96) = .{};
p.setMessage(.at(v.active), said.print("paste cut at its limit, {d} KiB: the rest left out", .{limit / 1024}));
}
+ // A text prompt in a tag takes it into its field (Prompt.zig).
+ if (v.tag_state.kind == .prompt) {
+ v.clip_pending = null;
+ return pardes.Prompt.paste(p, bytes);
+ }
// A prompt answering for a header takes the paste, as it takes keys.
const asking = if (p.panes[v.active]) |active| active.prompt != .none else false;
if (!asking) if (tagline.focusedHeader(p)) |t| {
@@ -146,7 +151,9 @@ pub fn applyPaste(p: *Pardes, whole: []const u8) Error!void {
n += 1;
};
if (n > 0) try insertKey(p.editor(), &pane.input, .{ .cp = line[0], .text = line[0..n] });
- if (normal.selRegexArmed(pane)) |a| if (panes.promptTarget(p, pane)) |t| normal.applySelRegex(p, pane, t, a.pat, a.mode);
+ if (normal.selRegexArmed(pane)) |a| if (panes.promptTarget(p, pane)) |t| {
+ _ = normal.applySelRegex(p, pane, t, a.pat, a.mode);
+ };
return;
}
if (pane.focus == .tag) return pasteInto(p, &pane.tag, bytes);
@@ -2133,6 +2140,9 @@ fn stepOwn(e: Editor, t: *Text, back: bool) error{OutOfMemory}!void {
const PointerTextSelection = struct {
sel: Pane.Sel,
on_tag: bool,
+ /// On a row of a message's detail (Pane.textRow): that body row as
+ /// drawn; the selection is on the line it explains.
+ ghost: ?u16 = null,
};
pub fn pointerTextSelection(p: *const Pardes, id: usize, col: u16, row: u16, body_hit: ?Mouse.BodyHit, tag_hit: ?TagHit) ?PointerTextSelection {
@@ -2151,16 +2161,21 @@ pub fn pointerTextSelection(p: *const Pardes, id: usize, col: u16, row: u16, bod
if (!on_tag) if (body_hit) |supplied| {
const mapped_hit = mouse.bodyHitForPane(p, id, supplied, false) orelse return null;
const c = @as(i32, mapped_hit.col) - config.GUTTER;
- const v = @as(i32, mapped_hit.row) + pane.tag_rows;
- return .{ .sel = .{ .state = .dragging, .c0 = c, .c1 = c, .r0 = v, .r1 = v }, .on_tag = false };
+ const drawn: i32 = mapped_hit.row;
+ const v = pane.textRow(drawn) + pane.tag_rows;
+ const ghost = pane.ghost_rows > 0 and drawn > pane.ghost_at and drawn <= pane.ghost_at + pane.ghost_rows;
+ return .{ .sel = .{ .state = .dragging, .c0 = c, .c1 = c, .r0 = v, .r1 = v }, .on_tag = false, .ghost = if (ghost) mapped_hit.row else null };
};
const tag_col = if (on_tag) Layer.columnAt(p, .pane, id, tag_hit, false, row - tag_y) else null;
const c: i32 = (if (tag_col) |value| @as(i32, value) else @as(i32, col) - @as(i32, r.x + (if (on_tag) TAG_TEXT_INSET else config.GUTTER))) +
(if (on_tag) @as(i32, pane.tag_scroll) else 0);
- const v: i32 = if (on_tag) @as(i32, row) - @as(i32, tag_y) else @as(i32, row) - @as(i32, body_y) + @as(i32, pane.tag_rows);
+ const drawn: i32 = @as(i32, row) - @as(i32, body_y);
+ const v: i32 = if (on_tag) @as(i32, row) - @as(i32, tag_y) else pane.textRow(drawn) + @as(i32, pane.tag_rows);
+ const ghost = !on_tag and pane.ghost_rows > 0 and drawn > pane.ghost_at and drawn <= pane.ghost_at + pane.ghost_rows;
return .{
.sel = .{ .state = .dragging, .c0 = c, .c1 = c, .r0 = v, .r1 = v },
.on_tag = on_tag,
+ .ghost = if (ghost) @intCast(drawn) else null,
};
}
@@ -2313,7 +2328,7 @@ test "insert on a terminal's text says it edits a copy the program's next drawin
pane.body.mode = .normal;
p.update(.{ .key = .{ .cp = 'i' } });
p.update(.{ .key = .{ .cp = 'x', .text = "x" } });
- try std.testing.expect(std.mem.indexOf(u8, pane.msg[0..pane.msg_len], "a copy of the terminal's text") != null);
+ try std.testing.expect(std.mem.indexOf(u8, p.messages.saidBy(pane), "a copy of the terminal's text") != null);
}
test "insert and normal modes edit complete Unicode graphemes" {
@@ -2526,7 +2541,7 @@ test "a paste past the limit is cut at it, and says so" {
try applyPaste(p, big);
try std.testing.expect(pane.file.?.content.len <= limit);
try std.testing.expect(pane.file.?.content.len > 0);
- try std.testing.expect(std.mem.indexOf(u8, pane.msg[0..pane.msg_len], "paste cut") != null);
+ try std.testing.expect(std.mem.indexOf(u8, p.messages.saidBy(pane), "paste cut") != null);
}
test "typing and backspace through the line index keep the text and the index as a rebuild has them" {
diff --git a/core/edit_cmd.zig b/core/edit_cmd.zig
index aec97c63..8fbde726 100644
--- a/core/edit_cmd.zig
+++ b/core/edit_cmd.zig
@@ -300,7 +300,7 @@ fn answerHold(p: *Pardes, at: usize, failed: bool) void {
if (!failed) return;
const words = if (p.fs.said_at == p.fs.failures and p.fs.said_len > 0)
p.fs.said[0..p.fs.said_len]
- else if (p.panes[at]) |pane| pane.msg[0..pane.msg_len] else "Edit: failed";
+ else if (p.panes[at]) |pane| p.messages.saidBy(pane) else "Edit: failed";
const kept = @import("Messages.zig").clip(words, h.said.len);
@memcpy(h.said[0..kept.len], kept);
h.said_len = @intCast(kept.len);
@@ -625,6 +625,8 @@ test "X over open files, w, e, r, f, B and D on panes and the disk" {
const dir = dir_buf[0..try tmp.dir.realPath(testing.io, &dir_buf)];
const p = try th.withFile(gpa, "scratch\n");
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
var path: [4200]u8 = undefined;
look.lookAt(p, 0, try std.fmt.bufPrint(&path, "{s}/a.c", .{dir}));
const a = p.view().active;
@@ -697,6 +699,8 @@ test "an Edit's w to a file changed on disk is refused once, as Save is, and the
const dir = dir_buf[0..try tmp.dir.realPath(testing.io, &dir_buf)];
const p = try th.withFile(testing.allocator, "scratch\n");
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
var path: [4200]u8 = undefined;
look.lookAt(p, 0, try std.fmt.bufPrint(&path, "{s}/a.txt", .{dir}));
const a = p.view().active;
@@ -731,6 +735,8 @@ test "an Edit with no command runs beside one whose commands run, unless it touc
const dir = dir_buf[0..try tmp.dir.realPath(testing.io, &dir_buf)];
const p = try th.withFile(testing.allocator, "b\na\n");
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
var path: [4200]u8 = undefined;
look.lookAt(p, 0, try std.fmt.bufPrint(&path, "{s}/other.txt", .{dir}));
const other = p.view().active;
diff --git a/core/exec.zig b/core/exec.zig
index ad1cefea..5a5ff725 100644
--- a/core/exec.zig
+++ b/core/exec.zig
@@ -617,8 +617,7 @@ pub fn sendToRepl(p: *Pardes, from: usize, to: usize, text: []const u8) void {
p.setMessage(.at(from), warn.print("Repl: {s} takes no bracketed paste; a blank line in a block ends it", .{id}));
}
var said: pardes.Kind.Buf(64) = .{};
- p.setMessage(.at(from), said.print("\u{2192} {s}", .{id}));
- src.msg_sent = true;
+ _ = pardes.Messages.say(p, .echo, from, said.print("\u{2192} {s}", .{id}));
var rec: [96]u8 = undefined;
pardes.ctlfs.events.notePath(p, "send", std.fmt.bufPrint(&rec, "{d} {d} {s}", .{ src.serial, dst.serial, id }) catch return);
}
@@ -634,6 +633,8 @@ const max_exec_depth = 8;
/// child is `$SHELL -c` the line, which shows its output and `exit N` when
/// done, and which Kill signals. Answers the pane it went to.
pub fn execute(p: *Pardes, id: usize, txt: []const u8) ?usize {
+ // A question's answer word, on the pane it waits on (B2 on `Reload`).
+ if (pardes.Messages.answerWord(p, id, txt)) return null;
return executeFrom(p, id, txt, false);
}
@@ -761,6 +762,11 @@ pub fn runCommand(p: *Pardes, from: usize, line: []const u8) ?usize {
pane.command_done = false;
pane.command_status = null;
pane.command_pty = true;
+ // Its last run's errors go with it (SPEC §11).
+ var i: usize = 0;
+ while (i < p.messages.live_len) {
+ if (p.messages.live[i].pane == pane.serial and p.messages.live[i].kind == .@"error") p.messages.remove(i) else i += 1;
+ }
pane.body.mode = .tty;
// What the last program left the emulator in goes first: the
// alternate screen left (only if it is there: leaving restores a
@@ -976,15 +982,14 @@ pub fn runBuiltinFrom(p: *Pardes, b: Builtin, id: usize, txt: []const u8, arg: ?
// No pane at all (the window Delcol emptied): a word runs all the same,
// with a stand-in that is no pane (New, Newcol, Exit are what make sense).
const pane = p.panes[id] orelse (if (builtins.registry.scope(b) == .session or panes.anyPane(p) == null) panes.standIn(p) orelse return else return);
- // A builtin says its own name before it runs, so a tagline click is
- // legible even when what it did is invisible. Whatever the builtin
- // then says for itself replaces the announcement. It is the message
- // row's only, never /log's: a msg record is something said.
+ // A builtin says its own name before it runs, an echo, so a tagline
+ // click is legible even when what it did is invisible. Whatever the
+ // builtin then says for itself retires it. It is the message row's
+ // only, never /log's: a msg record is something said.
if (p.announce and p.settings.verbose and builtins.registry.announces(b)) {
p.fs.unlogged = true;
- p.setMessage(.at(id), @tagName(b));
+ _ = pardes.Messages.say(p, .echo, id, @tagName(b));
p.fs.unlogged = false;
- pane.msg_announcement = true;
}
// A word for one kind of pane, on another: refused with why, not a
// silent nothing (Palette on a file, Filter on a PDF).
diff --git a/core/fuzz.zig b/core/fuzz.zig
index dc3e8e07..7f4526a7 100644
--- a/core/fuzz.zig
+++ b/core/fuzz.zig
@@ -779,6 +779,10 @@ test "a dump and an image cut, flipped and grown: refused or loaded, never a pan
defer p.deinit();
// A reader's walk in it: a union, a fixed array held to its length.
p.panes[0].?.trail = pardes.Trail.reader(7, "/x/rank.zig", .{ .line = 3, .col = 2 });
+ // A view's tag out of rest in it (View.tag_state): SPC t w remembered
+ // (a group's last leaf), then Help typed into (a scope, a field, hits).
+ for (" tw ?hel") |c| p.update(.{ .key = .{ .cp = c, .text = &[_]u8{c} } });
+ try testing.expect(p.view().tag_state.kind == .help and p.view().tag_state.nhits > 0);
// The byte dump a join streams, and the image a Dump keeps.
const bytes = try pardes.dump.byteDump(p);
defer gpa.free(bytes);
diff --git a/core/jj.zig b/core/jj.zig
index c1d07662..dea0236f 100644
--- a/core/jj.zig
+++ b/core/jj.zig
@@ -2030,14 +2030,15 @@ fn ownerOf(ch: *const Changes, f: *const File.State, row: usize) PinIndex {
/// The line `]g` (`forward`) or `[g` goes to from buffer line `from` of
/// the pane: the next or the previous change's first line (the first of a
/// run of lines one pin wrote or took away: a ghost line is a line); null
-/// with none shown, or none that way.
-pub fn nextChange(p: *Pardes, pane: *const Pane, from: usize, forward: bool) ?usize {
+/// with none shown, or none that way, or none in the `most` lines looked
+/// at (a body's painted targets look at the rows shown alone).
+pub fn nextChange(p: *Pardes, pane: *const Pane, from: usize, forward: bool, most: usize) ?usize {
if (pane.layers.lanes == 0) return null;
const f = if (pane.file) |*file| file else return null;
const ch = answered(p, f.layer.owner) orelse return null;
const n = File.lineCount(f.content);
var row = from;
- while (true) {
+ for (0..most) |_| {
if (forward) {
row += 1;
if (row >= n) return null;
@@ -2048,6 +2049,7 @@ pub fn nextChange(p: *Pardes, pane: *const Pane, from: usize, forward: bool) ?us
const owner = ownerOf(ch, f, row);
if (owner != .none and (row == 0 or ownerOf(ch, f, row - 1) != owner)) return row;
}
+ return null;
}
/// A Look (B3) at column `col` of body row `vr` of pane `id` on the id of
@@ -2534,7 +2536,7 @@ const Repo = struct {
fn told(p: *Pardes, id: usize) []const u8 {
const pane = p.panes[id].?;
- return pane.msg[0..pane.msg_len];
+ return p.messages.saidBy(pane);
}
test "At shows a file at a revision beside it, read-only, coloured as its file; a Look at path@rev:line goes to it; At in it turns it in place; jj's refusals are said" {
@@ -2543,6 +2545,8 @@ test "At shows a file at a revision beside it, read-only, coloured as its file;
defer repo.deinit(gpa);
const p = try Pardes.init(gpa, .{ .tty_only = true, .cols = 100, .rows = 40 });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
var line: [4200]u8 = undefined;
p.update(.{ .command = try std.fmt.bufPrint(&line, "Look {s}", .{repo.file}) });
const file = p.view().active;
@@ -2964,6 +2968,8 @@ test "Changes draws what the text has not where it stood, as ghost rows: a line
for ([_]bool{ false, true }) |windowed| {
const p = try Pardes.init(gpa, .{ .tty_only = true, .cols = 60, .rows = 24, .windowed = windowed });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
var line: [4200]u8 = undefined;
p.update(.{ .command = try std.fmt.bufPrint(&line, "Look {s}", .{repo.file}) });
const id = p.view().active;
@@ -3250,6 +3256,8 @@ test "a description is whole, its title and its author never cut: in a pane narr
for ([_]bool{ false, true }) |windowed| {
const p = try Pardes.init(gpa, .{ .tty_only = true, .cols = 50, .rows = 20, .windowed = windowed });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
var line: [4200]u8 = undefined;
p.update(.{ .command = try std.fmt.bufPrint(&line, "Look {s}", .{repo.file}) });
const id = p.view().active;
@@ -3487,6 +3495,8 @@ test "at one place a change's ghost rows come before its description: a line it
defer repo.deinit(gpa);
const p = try Pardes.init(gpa, .{ .tty_only = true, .cols = 60, .rows = 24, .windowed = false });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
var line: [4200]u8 = undefined;
p.update(.{ .command = try std.fmt.bufPrint(&line, "Look {s}", .{repo.file}) });
const pane = p.panes[p.view().active].?;
@@ -3513,6 +3523,8 @@ test "a change the revset does not pin, between two it does, moves the older one
defer repo.deinit(gpa);
const p = try Pardes.init(gpa, .{ .tty_only = true, .cols = 60, .rows = 24, .windowed = false });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
var line: [4200]u8 = undefined;
p.update(.{ .command = try std.fmt.bufPrint(&line, "Look {s}", .{repo.file}) });
const pane = p.panes[p.view().active].?;
@@ -3605,6 +3617,8 @@ test "the layer's lines are the pane's text, read-only: j and k go onto them, a
// query however long the test's directory makes the tags.
const p = try Pardes.init(gpa, .{ .tty_only = true, .cols = 60, .rows = 44, .windowed = windowed });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
var arena: std.heap.ArenaAllocator = .init(gpa);
defer arena.deinit();
const pane = try Lines.open(p, repo.file);
@@ -3656,8 +3670,7 @@ test "the layer's lines are the pane's text, read-only: j and k go onto them, a
// the path there opens it (no selection held: B2 in one runs it).
// (The refusals' words, stacked in the notice band over the body's
// first rows, gone.)
- pane.msg_len = 0;
- pane.msg_older_len = 0;
+ p.messages.live_len = 0;
p.view().active = id;
Lines.at(pane, 0, 0);
p.sync();
@@ -4405,6 +4418,8 @@ test "Compare pins the whole difference between each two points as one change: t
for ([_]bool{ false, true }) |windowed| {
const p = try Pardes.init(gpa, .{ .tty_only = true, .cols = 70, .rows = 24, .windowed = windowed });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
var line: [4200]u8 = undefined;
p.update(.{ .command = try std.fmt.bufPrint(&line, "Look {s}", .{repo.file}) });
const id = p.view().active;
diff --git a/core/keys.zig b/core/keys.zig
index 04a3cc35..e9be2461 100644
--- a/core/keys.zig
+++ b/core/keys.zig
@@ -20,6 +20,7 @@ const Pipe = @import("Pipe.zig");
const Registers = @import("Registers.zig");
const bindings = @import("bindings.zig");
const TagState = @import("TagState.zig");
+const Prompt = @import("Prompt.zig");
const Pardes = pardes.Pardes;
const Pane = panes.Pane;
const Text = panes.Text;
@@ -211,8 +212,32 @@ pub fn handleKey(p: *Pardes, key: Key) void {
}
return;
}
+ // A background question SPC e gave the keyboard: one of its answers'
+ // keys answers it (Diff leaves it asking), Esc leaves it waiting, and
+ // nothing else gets past it (pick-ui SPEC §10.4).
+ if (p.view().answering != 0) answering: {
+ const v = p.view();
+ const at = p.paneBySerial(v.answering) orelse break :answering;
+ const i = p.messages.waiting(p.panes[at].?) orelse break :answering;
+ if (key.cp == Key.escape and !key.ctrl and !key.alt) {
+ v.answering = 0;
+ p.needs_frame = true;
+ return;
+ }
+ if (key.ctrl or key.alt or key.cp > 0x7f) return;
+ if (pardes.Messages.answer(p, i, @intCast(key.cp)) and key.cp != 'd') v.answering = 0;
+ return;
+ }
+ p.view().answering = 0;
// A tag in a typing state takes every key (TagState: Help, describe-key).
if (p.view().tag_state.kind != .rest) return tagStateKey(p, key);
+ Prompt.keyAtRest(p, key);
+ // Esc takes a hover's ghost lines away (SPEC §3.5) before anything else
+ // it does.
+ if (p.lsp_ask.hover != null and hit(key, config.escape)) {
+ p.lsp_ask.hover = null;
+ return;
+ }
if (p.view().window_pick != null) return layout.windowKey(p, key);
const pane = p.panes[p.view().active] orelse return;
layout.noteTyped(p);
@@ -360,8 +385,9 @@ pub fn handleKey(p: *Pardes, key: Key) void {
.save => if (submit) exec.submitSave(p, p.view().active),
.search => if (submit)
look.submitSearch(p, p.view().active)
- else if (normal.selRegexArmed(pane)) |_| if (target) |answered|
- normal.applySelRegex(p, pane, answered, "", .select),
+ else if (normal.selRegexArmed(pane)) |_| if (target) |answered| {
+ _ = normal.applySelRegex(p, pane, answered, "", .select);
+ },
.none, .del_side, .repl_choice, .name => unreachable,
}
pane.closePrompt();
@@ -372,11 +398,13 @@ pub fn handleKey(p: *Pardes, key: Key) void {
return;
}
edit.handleInsert(p.editor(), &pane.input, key);
- if (normal.selRegexArmed(pane)) |a| if (panes.promptTarget(p, pane)) |answered| normal.applySelRegex(p, pane, answered, a.pat, a.mode);
+ if (normal.selRegexArmed(pane)) |a| if (panes.promptTarget(p, pane)) |answered| {
+ _ = normal.applySelRegex(p, pane, answered, a.pat, a.mode);
+ };
return;
}
if (header == null) if (TagState.current(p, p.view())) |cur| if (cur.root != .leader and cur.root != .window) {
- if (prefixKey(p, t, cur.root, key)) return;
+ if (prefixKey(p, t, cur, key)) return;
};
if (t == &pane.body and pane.jump.items.len > 0) return normal.jumpKey(p, pane, t, key);
// A query pane's line 1 answers Enter, Esc and the stepping keys
@@ -401,6 +429,13 @@ pub fn handleKey(p: *Pardes, key: Key) void {
break :word .{ b.lo, b.hi };
};
const txt = shown[span[0]..span[1]];
+ // On a word of the pane's walk, the step's Look or Exec, as a
+ // click there (SPEC §6.3).
+ if (header == null and t.what == .tag) if (tagline.trailAt(p, pane, modal.selectionCursor(shown, range))) |step| {
+ pane.focus = .body;
+ if (cmd == config.look_cmd) pardes.Trail.lookStep(p, p.view().active, step) else pardes.Trail.execStep(p, p.view().active, step);
+ return;
+ };
// A column tag's command acts on that column, empty or not.
p.exec_column = if (header != null) p.headerColumn() else null;
defer p.exec_column = null;
@@ -549,9 +584,10 @@ fn leaderTake(p: *Pardes, c: u8) void {
fn tagStateKey(p: *Pardes, key: Key) void {
const v = p.view();
const s = &v.tag_state;
+ if (s.kind == .prompt) return Prompt.key(p, key);
if (TagState.hostOf(p) == null or hit(key, config.escape)) return TagState.toRest(p);
switch (s.kind) {
- .rest => unreachable,
+ .rest, .prompt => unreachable,
.describe => {
const plain = !key.ctrl and !key.alt;
if (plain and key.cp == Key.enter and s.found) {
@@ -576,6 +612,7 @@ fn tagStateKey(p: *Pardes, key: Key) void {
TagState.describeKey(p, key);
},
.pick => return @import("Pick.zig").key(p, key),
+ .rename => return @import("lsp/Ask.zig").renameKey(p, key),
.help => {
const plain = !key.ctrl and !key.alt;
if (plain and key.cp == Key.enter) {
@@ -679,15 +716,27 @@ fn levelKey(p: *Pardes, root: bindings.Root, path: []const u8, key: Key) LevelSt
/// A key while a helix prefix waits in text `t` (g m z Z [ ]): which-key's
/// own, else the prefix's, the leaf it runs remembered. True when taken here.
-fn prefixKey(p: *Pardes, t: *Text, root: bindings.Root, key: Key) bool {
+fn prefixKey(p: *Pardes, t: *Text, cur: TagState.Current, key: Key) bool {
+ const root = cur.root;
if (root != .register and key.cp == config.leader_help and !key.ctrl and !key.alt) {
TagState.openHelp(p, root, "");
return true;
}
- switch (levelKey(p, root, "", key)) {
+ // `"` and a register's verbs: Esc goes to rest (normal mode's would
+ // name the register, or leave the pane).
+ if (root == .register and hit(key, config.escape)) {
+ t.normal.clear();
+ return true;
+ }
+ switch (levelKey(p, root, cur.path, key)) {
.taken => return true,
.up => {
t.normal = .{};
+ // A register's verbs go back up to the registers (SPEC §9).
+ if (root == .register and cur.path.len > 0) {
+ t.normal.prefix = .register_prefix;
+ p.view().tag_state.hi = 0;
+ }
return true;
},
.take => |c| {
@@ -697,7 +746,15 @@ fn prefixKey(p: *Pardes, t: *Text, root: bindings.Root, key: Key) bool {
.pass => {
if (!key.ctrl and !key.alt and key.cp >= 0x20 and key.cp < 0x7f) {
const k: u8 = @intCast(key.cp);
- if (bindings.nodeAt(root, &.{k}) != null) TagState.ran(p.view(), root, "", k);
+ var buf: [2]u8 = .{ 0, k };
+ if (cur.path.len > 0) buf[0] = cur.path[0];
+ const here = if (cur.path.len > 0) buf[0..2] else buf[1..2];
+ if (bindings.nodeAt(root, here) != null) TagState.ran(p.view(), root, cur.path, k);
+ // A register named: its verbs, rolled, the cursor afresh.
+ if (root == .register) {
+ p.view().tag_state.hi = 0;
+ p.view().tag_state.unrolled = false;
+ }
}
return false;
},
@@ -803,7 +860,7 @@ test "Del from a key asks which neighbour takes the rows; nothing else asks" {
// A word that is not a side closes nothing.
try std.testing.expect(p.executeBuiltinLine(again, "Del x"));
- try std.testing.expectEqualStrings("Del: takes k, j or nothing", p.panes[again].?.msg[0..p.panes[again].?.msg_len]);
+ try std.testing.expectEqualStrings("Del: takes k, j or nothing", p.messages.saidBy(p.panes[again].?));
try std.testing.expect(p.panes[again] != null);
// DelAbove is Del k, and a line that is not a key never asks.
try std.testing.expect(p.executeBuiltinLine(again, "DelAbove"));
diff --git a/core/layout.zig b/core/layout.zig
index c2f0f96c..c0d21d6d 100644
--- a/core/layout.zig
+++ b/core/layout.zig
@@ -613,7 +613,7 @@ pub fn minRows(p: *Pardes, id: usize) u16 {
pub fn minimaFit(p: *Pardes) bool {
const v = p.view();
compute(p);
- const avail = v.screen_h -| (p.topBarHeight() + columnBarHeight(p));
+ const avail = v.screen_h -| (p.topBarHeight() + columnBarHeight(p) + noticeRowHeight(p));
for (0..p.view().ncol) |c| {
if (v.cols[c].n < 2) continue;
var need: u32 = 0;
@@ -647,7 +647,7 @@ pub fn shareColumn(p: *Pardes, c: usize) bool {
compute(p);
const n = v.cols[c].n;
if (n == 0) return false;
- const avail = v.screen_h -| (p.topBarHeight() + columnBarHeight(p));
+ const avail = v.screen_h -| (p.topBarHeight() + columnBarHeight(p) + noticeRowHeight(p));
var mins: [MAX_PANES]u16 = undefined;
var need: u32 = 0;
for (v.cols[c].panes[0..n], 0..) |k, i| {
@@ -1372,7 +1372,8 @@ pub fn expandedNeighbor(p: *const Pardes, col: usize, index: usize, side: enum {
fn computeCollapsedColumn(p: *Pardes, c: usize, x: u16, width: u16, folded: usize) void {
const v = p.view();
var y: u16 = p.topBarHeight() + columnBarHeight(p);
- const available = v.screen_h -| y;
+ const bottom = v.screen_h -| noticeRowHeight(p);
+ const available = bottom -| y;
var expanded_left: usize = 0;
var weight: f32 = 0;
for (v.cols[c].panes[0..p.view().cols[c].n]) |id| if (p.panes[id]) |pane| {
@@ -1386,7 +1387,7 @@ fn computeCollapsedColumn(p: *Pardes, c: usize, x: u16, width: u16, folded: usiz
var folded_left = folded;
for (v.cols[c].panes[0..p.view().cols[c].n]) |id| {
const pane = p.panes[id] orelse continue;
- const room = v.screen_h -| y;
+ const room = bottom -| y;
const height: u16 = if (pane.collapsed) blk: {
folded_left -= 1;
break :blk @min(room, BOX_H);
@@ -1440,7 +1441,8 @@ pub fn compute(p: *Pardes) void {
var y: u16 = p.topBarHeight() + columnBarHeight(p);
const top = y;
- const avail_h = v.screen_h -| y;
+ const bottom = v.screen_h -| noticeRowHeight(p);
+ const avail_h = bottom -| y;
var hs: [MAX_PANES]u16 = undefined;
const n = v.cols[c].n;
for (0..n) |k| {
@@ -1451,7 +1453,7 @@ pub fn compute(p: *Pardes) void {
};
const lastk = k + 1 == n;
const fh = @as(f32, @floatFromInt(avail_h)) * pane.vweight / vsum;
- const room = v.screen_h -| y;
+ const room = bottom -| y;
hs[k] = if (lastk) room else @min(room, @max(1, @as(u16, @intFromFloat(@round(fh)))));
y +|= hs[k];
}
@@ -1515,6 +1517,14 @@ pub fn topBarHeight(p: *const Pardes) u16 {
return TOPBAR_H;
}
+/// The notice row's height: one row at the window's foot (pick-ui SPEC
+/// §10.3), the index of the live messages, under every column; none on a
+/// screen too short for it, as the column tags have none.
+pub fn noticeRowHeight(p: *const Pardes) u16 {
+ if (p.view().screen_h < 3) return 0;
+ return 1;
+}
+
/// The column tags' height: one row, as acme's (cols.c:244, colresize,
/// gives a column tag one font height); a newline in one is a space
/// (tagline.flattenHeaders).
@@ -1712,14 +1722,14 @@ test "collapse transfers height upward and restores the original layout" {
toggleCollapse(p, 1);
try std.testing.expectEqual(@as(u16, 1), p.view().rects[1].h);
try std.testing.expectEqual(@as(f32, @floatFromInt(original[1].h)), p.panes[1].?.vweight);
- try std.testing.expectEqual(p.view().screen_h, p.view().rects[2].y + p.view().rects[2].h);
+ try std.testing.expectEqual(p.view().screen_h - noticeRowHeight(p), p.view().rects[2].y + p.view().rects[2].h);
try std.testing.expect(p.view().rects[0].h > original[0].h);
try std.testing.expectEqualDeep(original[2], p.view().rects[2]);
toggleCollapse(p, 1);
try std.testing.expectEqualDeep(original, p.view().rects);
toggleCollapse(p, 2);
try std.testing.expectEqual(@as(u16, 1), p.view().rects[2].h);
- try std.testing.expectEqual(p.view().screen_h, p.view().rects[2].y + p.view().rects[2].h);
+ try std.testing.expectEqual(p.view().screen_h - noticeRowHeight(p), p.view().rects[2].y + p.view().rects[2].h);
}
test "collapse changes only one neighbor at the top middle and bottom" {
@@ -1837,7 +1847,7 @@ test "collapse single and all panes leave unused column space" {
try std.testing.expectEqual(p.view().rects[0].y + 1, p.view().rects[1].y);
try std.testing.expect(p.view().rects[1].y + 1 < p.view().screen_h);
toggleCollapse(p, 0);
- try std.testing.expectEqual(p.view().screen_h - 1, p.view().rects[1].y);
+ try std.testing.expectEqual(p.view().screen_h - noticeRowHeight(p) - 1, p.view().rects[1].y);
}
test "collapse survives tiny resizes" {
@@ -1898,7 +1908,7 @@ test "collapse dump restores folded state and retained expansion weight" {
try std.testing.expectEqual(@as(f32, @floatFromInt(original_height)), restored.panes[0].?.vweight);
try std.testing.expectEqual(@as(u16, 1), restored.view().rects[0].h);
toggleCollapse(restored, 0);
- try std.testing.expectEqual(restored.view().screen_h - restored.view().rects[0].y, restored.view().rects[0].h);
+ try std.testing.expectEqual(restored.view().screen_h - noticeRowHeight(restored) - restored.view().rects[0].y, restored.view().rects[0].h);
}
test "column reorder moves only crossed state and preserves weights" {
@@ -2217,6 +2227,8 @@ test "a new pane goes below the rows a pane's text takes, a wrapped line's each
const dir = buf[0..try tmp.dir.realPath(io, &buf)];
const p = try Pardes.init(gpa, .{ .tty_only = true, .cols = 60, .rows = 40 });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
p.settings.wrap = true;
// Two lines of 400 bytes: seven rows each at this width.
const long = &@as([400]u8, @splat('a'));
diff --git a/core/lib_editor.zig b/core/lib_editor.zig
index 3e4a1f15..e5c160ed 100644
--- a/core/lib_editor.zig
+++ b/core/lib_editor.zig
@@ -370,7 +370,7 @@ pub fn Editor(comptime cap: Capacity) type {
}
var snap: [max_selections]Selection = undefined;
const got = t.ranges(t.own.?, 0, &snap);
- normal.selectByRegex(live.context(a), t, snap[0..got.n], got.pri, t.vsel.active and t.vsel.explicit, pattern, how);
+ _ = normal.selectByRegex(live.context(a), t, snap[0..got.n], got.pri, t.vsel.active and t.vsel.explicit, pattern, how);
return ed.keep(a, live, .done);
}
diff --git a/core/look.zig b/core/look.zig
index cc3e750f..21043250 100644
--- a/core/look.zig
+++ b/core/look.zig
@@ -390,7 +390,8 @@ pub fn submitSearch(p: *Pardes, id: usize) void {
p.registers.put(p.gpa, '/', a.pat, 0, 1, true) catch |err| return p.reportError(.at(id), "search", err);
p.registers.last_search = '/';
}
- return if (panes.promptTarget(p, pane)) |t| normal.applySelRegex(p, pane, t, a.pat, a.mode);
+ if (panes.promptTarget(p, pane)) |t| _ = normal.applySelRegex(p, pane, t, a.pat, a.mode);
+ return;
}
const armed = pane.promptText() orelse return;
const slash = std.mem.indexOfScalar(u8, armed, '/') orelse return;
@@ -1537,7 +1538,6 @@ fn walk(p: *Pardes, from: usize, path: []const u8, at: Spot) Landed {
}
const into = if (reads) from else Trail.readerOf(p, src) orelse {
const free = openNew(p, from, path, at, .reader) orelse return .none;
- p.panes[free].?.trail = Trail.reader(src.serial, path, at);
return .{ .opened = free };
};
_ = Trail.step(p, into, path, at) catch |err| {
@@ -1565,6 +1565,9 @@ fn openNew(p: *Pardes, from: usize, path: []const u8, at: Spot, kind: layout.New
return null;
};
nt.body.cur_col = columnOn(nt, nt.body.cur_row, at.col);
+ // A reader's walk (its owner's word, its place) is in its tag before
+ // it is placed: the rows it is given are for the tag it shows.
+ if (kind == .reader) nt.trail = Trail.reader(p.panes[from].?.serial, path, at);
const failures = p.fs.failures;
layout.placeNew(p, from, from, free, kind);
// Refused a place: that is the look's one failure, not a miss of its
@@ -2020,6 +2023,8 @@ test "a Look that opens a file in a pane of its own puts its line half the body'
const dir = buf[0..try tmp.dir.realPath(io, &buf)];
const p = try Pardes.init(gpa, .{ .tty_only = true, .cols = 60, .rows = 40 });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
p.settings.wrap = true;
_ = try p.setTestFile("x\n");
var line: [4200]u8 = undefined;
@@ -2213,6 +2218,8 @@ test "Look copies its operand before releasing pointer selection storage" {
test "a Look whose column is past its line's end lands at the end, however big; a line past the file's is a miss" {
const p = try Pardes.init(std.testing.allocator, .{ .cols = 60, .rows = 12 });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
const pane = try p.setTestFile("alpha\n\tbeta\n");
// Up to 2026-11-23 a column past i32 panicked the session (`@intCast`
// in focusPaneLine): any text a B3 or Look takes, a server's row.
@@ -2305,6 +2312,8 @@ test "Look on each kind of diff line opens the new file at the line it names" {
defer fx.tmp.cleanup();
const p = try Pardes.init(std.testing.allocator, .{ .cols = 100, .rows = 30 });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
const pane = try fx.open(p, diff_text);
DiffFixture.click(p, pane, 4); // @@: the hunk's first new line
@@ -2357,6 +2366,8 @@ test "Look on plain diff -u output: names as written, timestamps cut, next to th
defer fx.tmp.cleanup();
const p = try Pardes.init(std.testing.allocator, .{ .cols = 100, .rows = 30 });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
const pane = try fx.open(p, diff_text);
DiffFixture.click(p, pane, 4);
try expectAt(p, "/new/x.zig", 2);
@@ -2384,6 +2395,8 @@ test "Look on a diff: headers and a hunk line's prefix are the whole line, hover
defer fx.tmp.cleanup();
const p = try Pardes.init(std.testing.allocator, .{ .cols = 100, .rows = 30 });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
const pane = try fx.open(p, diff_text);
pane.tag_expanded = false;
// `word`: what the pointer there expands to when it is not the whole
@@ -2542,6 +2555,8 @@ test "every entry point to Look takes one expansion: a diff line and a file:12:5
for (cases) |case| {
const p = try Pardes.init(std.testing.allocator, .{ .cols = 100, .rows = 30 });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
const pane = try fx.open(p, case.text);
p.gpa.free(pane.file.?.path);
pane.file.?.path = try std.Io.Dir.path.join(p.gpa, &.{ fx.dir, case.name });
@@ -2686,6 +2701,8 @@ test "Incl's directories find a name found nowhere else, <name> too; bare Incl l
const root = dir_buf[0..try tmp.dir.realPath(std.testing.io, &dir_buf)];
const p = try Pardes.init(std.testing.allocator, .{ .cols = 100, .rows = 30 });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
// C's two by default.
try std.testing.expectEqualStrings("/usr/include", p.incl.items[0]);
const pane = try p.setTestFile("#include <pardes_incl_probe.h>\n");
@@ -2702,7 +2719,7 @@ test "Incl's directories find a name found nowhere else, <name> too; bare Incl l
}
// Bare, it lists them.
try std.testing.expect(p.executeBuiltinLine(0, "Incl"));
- try std.testing.expect(std.mem.indexOf(u8, pane.msg[0..pane.msg_len], "/inc") != null);
+ try std.testing.expect(std.mem.indexOf(u8, p.messages.saidBy(pane), "/inc") != null);
// A dump keeps them.
try pardes.dump.dumpState(p);
const restored = try pardes.dump.restore(p, p.dump_out.?, "/tmp/pardes.dump.zon");
@@ -2787,6 +2804,8 @@ test "Look on a diff under each git prefix opens the repository's file, and a re
defer fx.tmp.cleanup();
const p = try Pardes.init(std.testing.allocator, .{ .cols = 100, .rows = 30 });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
const pane = try fx.open(p, c.text);
DiffFixture.click(p, pane, 6); // `two`, a context line: new line 2
try std.testing.expect(!p.look_missed);
@@ -2820,6 +2839,8 @@ test "Look on a diff line is the look of the address it names, selected by hand:
for (0..2) |way| {
const p = try Pardes.init(std.testing.allocator, .{ .cols = 100, .rows = 30 });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
const pane = try cache.open(p, patch);
// The checkout's file, opened by a look from the diff pane.
lookAt(p, 0, cargo);
@@ -2840,7 +2861,7 @@ test "Look on a diff line is the look of the address it names, selected by hand:
.active_path = try std.testing.allocator.dupe(u8, if (shown.file) |f| f.path else ""),
.row = shown.body.cur_row,
.missed = p.look_missed,
- .msg = try std.testing.allocator.dupe(u8, pane.msg[0..pane.msg_len]),
+ .msg = try std.testing.allocator.dupe(u8, p.messages.saidBy(pane)),
.panes = n,
};
}
@@ -2868,6 +2889,8 @@ test "Plumb: a look sends what it looks at, the rules written first: a rule's wo
const pic = try std.fmt.bufPrint(&pic_buf, "{s}/pic.svg", .{root});
const p = try Pardes.init(std.testing.allocator, .{ .cols = 100, .rows = 30 });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
const pane = try p.setTestFile("see https://ziglang.org here\n");
// The defaults: a URL to the web port, the host's opener; the hover
// asks resolve, as before.
@@ -2886,7 +2909,7 @@ test "Plumb: a look sends what it looks at, the rules written first: a rule's wo
lookAt(p, 0, pic);
try std.testing.expectEqual(@as(usize, 0), p.view().active);
var said_buf: [4300]u8 = undefined;
- try std.testing.expectEqualStrings(try std.fmt.bufPrint(&said_buf, "svg {s}", .{pic}), pane.msg[0..pane.msg_len]);
+ try std.testing.expectEqualStrings(try std.fmt.bufPrint(&said_buf, "svg {s}", .{pic}), p.messages.saidBy(pane));
// A name open in a pane is focused, never sent.
p.look_text = true;
lookAt(p, 0, pic);
@@ -2897,7 +2920,7 @@ test "Plumb: a look sends what it looks at, the rules written first: a rule's wo
p.setMessage(.at(0), "before");
lookAt(p, 0, pic);
try std.testing.expectEqual(opened, p.view().active);
- try std.testing.expectEqualStrings("before", pane.msg[0..pane.msg_len]);
+ try std.testing.expectEqualStrings("before", p.messages.saidBy(pane));
// With no web rule, a URL is a word Look searches for.
p.view().active = 0;
try std.testing.expect(Plumb.apply(p, false, "plumb/rules", "type is text\narg isfile $data\nplumb to edit\n") == null);
diff --git a/core/lsp/Ask.zig b/core/lsp/Ask.zig
index 976821d5..312743d0 100644
--- a/core/lsp/Ask.zig
+++ b/core/lsp/Ask.zig
@@ -18,6 +18,7 @@ const memory = @import("../memory.zig");
const Pardes = pardes.Pardes;
const Pane = panes.Pane;
const Effect = pardes.Effect;
+const TagState = @import("../TagState.zig");
const Ask = @This();
@@ -38,6 +39,12 @@ wait: ?struct {
row: i32 = 0,
col: i32 = 0,
} = null,
+/// A hover asked from the keyboard (where the walk is on), drawn as ghost
+/// lines under the line it was asked at in its own body (pick-ui SPEC §3.5,
+/// the coordinator's R3: never written): until Esc, an edit of that text,
+/// or the next hover. Its first `hover_max` bytes.
+hover: ?struct { serial: u32, row: i32, revision: u32, text: Effect.Buf(hover_max) } = null,
+pub const hover_max = 1024;
const TAG_TEXT_INSET = pardes.TAG_TEXT_INSET;
pub fn lspRequest(p: *Pardes, asked: usize, kind: lsp.Kind, arg_in: []const u8) void {
@@ -247,6 +254,48 @@ fn applyLspEdits(p: *Pardes, pane: *Pane, revision: u32, edits: []const LspEdit)
return true;
}
+/// Rename typed in pane `id`'s own tag (SPEC §3.5): the field the name
+/// under its caret, which the body shows renamed as it is typed
+/// (body_layer.renameGhosts) until Enter asks the server, or Esc.
+pub fn openRename(p: *Pardes, id: usize) void {
+ const pane = p.panes[id] orelse return;
+ const old = renamedWord(pane) orelse return p.reportFailure(id, "Rename: nothing here to rename");
+ TagState.toRest(p);
+ const s = &p.view().tag_state;
+ s.kind = .rename;
+ s.host = pane.serial;
+ s.field.set(old);
+ s.previewing.set(id);
+}
+
+/// A key in Rename's field: Enter asks the server to rename to it (a name
+/// the same as the old is no question), Esc (the tag's) puts it away.
+pub fn renameKey(p: *Pardes, key: pardes.Key) void {
+ const s = &p.view().tag_state;
+ if (!key.ctrl and !key.alt and key.cp == pardes.Key.enter) {
+ const id = TagState.hostOf(p) orelse return TagState.toRest(p);
+ var name: Effect.Buf(128) = .{};
+ const typed = std.mem.trim(u8, s.field.text(), " ");
+ const same = std.mem.eql(u8, typed, renamedWord(p.panes[id].?) orelse "");
+ if (typed.len <= 128) name = .from(typed);
+ TagState.toRest(p);
+ if (same) return;
+ if (typed.len > 128) return p.reportFailure(id, "Rename: a name is at most 128 bytes");
+ return lspRequest(p, id, .rename, name.slice());
+ }
+ _ = s.field.key(key);
+}
+
+/// The name under pane `pane`'s caret, which a Rename renames.
+pub fn renamedWord(pane: *const Pane) ?[]const u8 {
+ const line = panes.File.sourceLine(pane, pane.body.cur_row);
+ var lo: usize = @min(@as(usize, @intCast(@max(0, pane.body.cur_col))), line.len);
+ var hi = lo;
+ while (lo > 0 and (std.ascii.isAlphanumeric(line[lo - 1]) or line[lo - 1] == '_')) lo -= 1;
+ while (hi < line.len and (std.ascii.isAlphanumeric(line[hi]) or line[hi] == '_')) hi += 1;
+ return if (hi > lo) line[lo..hi] else null;
+}
+
/// The builtin word that asks `kind`, for what it says.
fn lspWord(kind: lsp.Kind) []const u8 {
return switch (kind) {
@@ -333,6 +382,14 @@ pub fn lspResponse(p: *Pardes, id: u32, response: ?[]const u8) void {
return;
}
+ // A hover asked from the keyboard: ghost lines in its own body, no
+ // +Hover pane (SPEC §3.5).
+ if (w.kind == .hover and pardes.Pick.asked(p)) {
+ var cut = @min(rows.len, hover_max);
+ while (cut < rows.len and cut > 0 and rows[cut] & 0xC0 == 0x80) cut -= 1;
+ p.lsp_ask.hover = .{ .serial = pane.serial, .row = w.row, .revision = w.revision, .text = .from(rows[0..cut]) };
+ return;
+ }
const from: panes.Output.Origin = .{ .query = w.kind };
const nrows = std.mem.count(u8, rows, "\n");
if ((panes.Output.traits(from).jumps or w.kind == .diagnostics) and nrows == 1) {
@@ -536,13 +593,15 @@ test "Def and Refs are a speaking file's tag words; gd, gr and a 2-1 chord all r
// A symbol the file does not hold is said, and nothing is asked.
exec.runBuiltin(p, .Def, 0, "", "gamma");
try std.testing.expectError(error.NothingAsked, Asked.one(p, .definition));
- try std.testing.expectEqualStrings("Def: no gamma in this file", pane.msg[0..pane.msg_len]);
+ try std.testing.expectEqualStrings("Def: no gamma in this file", p.messages.saidBy(pane));
}
test "Callstack always opens and focuses its own pane, reusing it for another symbol" {
if (!lsp.supports.contains(.callstack)) return;
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
_ = try p.setTestFile("fn work() {}\n");
const source = p.panes[0].?;
p.lspRequest(0, .callstack, "");
@@ -586,7 +645,7 @@ test "Callers with one answer jumps to it and says where, in a msg" {
const wait = p.lsp_ask.wait.?;
p.update(.{ .lsp_resp = .{ .id = wait.id, .rows = "/test.txt:2:10 b\n" } });
try std.testing.expectEqual(@as(i32, 1), pane.body.cur_row);
- try std.testing.expectEqualStrings("Callers: the one, /test.txt:2:10", pane.msg[0..pane.msg_len]);
+ try std.testing.expectEqualStrings("Callers: the one, /test.txt:2:10", p.messages.saidBy(pane));
}
test "a Rename the language server finds nothing for says so, and changes nothing" {
@@ -597,7 +656,7 @@ test "a Rename the language server finds nothing for says so, and changes nothin
p.lspRequest(p.view().active, .rename, "renamed");
const wait = p.lsp_ask.wait.?;
p.update(.{ .lsp_resp = .{ .id = wait.id, .rows = "" } });
- try std.testing.expectEqualStrings("Rename: nothing here to rename", pane.msg[0..pane.msg_len]);
+ try std.testing.expectEqualStrings("Rename: nothing here to rename", p.messages.saidBy(pane));
try std.testing.expectEqualStrings("const value=1;\n", pane.file.?.content);
}
@@ -626,3 +685,95 @@ test "LSP failure clears only its matching wait without completion indentation"
try std.testing.expectEqualStrings("x ", pane.file.?.content);
try std.testing.expectEqual(@as(i32, 4), pane.body.cur_col);
}
+
+test "a hover asked from the keyboard is ghost lines under the line it was asked at, drawn and never written, no +Hover pane; Esc takes them away" {
+ if (!lsp.supports.contains(.hover)) return error.SkipZigTest;
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 80, .rows = 20 });
+ defer p.deinit();
+ const pane = try p.setTestFile("one\ntwo\nthree\nfour\n");
+ const id = p.view().active;
+ p.settings.jumps = .walk;
+ while (p.nextEffect()) |_| {}
+ pane.focus = .body;
+ pane.body.cur_row = 1;
+ var npanes: usize = 0;
+ for (p.panes) |slot| npanes += @intFromBool(slot != null);
+ p.lspRequest(id, .hover, "");
+ while (p.nextEffect()) |_| {}
+ lspResponse(p, p.lsp_ask.seq, "pub fn add(a: i32) i32\nadds them\n");
+ var now: usize = 0;
+ for (p.panes) |slot| now += @intFromBool(slot != null);
+ try std.testing.expectEqual(npanes, now);
+ var frame = std.heap.ArenaAllocator.init(std.testing.allocator);
+ defer frame.deinit();
+ p.sync();
+ var s = try p.render(frame.allocator());
+ const body = s.region(.body, id).?.rect;
+ var buf: [256]u8 = undefined;
+ try std.testing.expect(std.mem.indexOf(u8, rowText(s, body.x, body.y + 1, &buf), "two") != null);
+ try std.testing.expect(std.mem.indexOf(u8, rowText(s, body.x, body.y + 2, &buf), "pub fn add(a: i32) i32") != null);
+ try std.testing.expect(std.mem.indexOf(u8, rowText(s, body.x, body.y + 3, &buf), "adds them") != null);
+ try std.testing.expect(std.mem.indexOf(u8, rowText(s, body.x, body.y + 4, &buf), "three") != null);
+ try std.testing.expectEqualStrings("one\ntwo\nthree\nfour\n", pane.file.?.content);
+ p.update(.{ .key = .{ .cp = pardes.Key.escape } });
+ try std.testing.expect(p.lsp_ask.hover == null);
+ try std.testing.expectEqual(id, p.view().active);
+ _ = frame.reset(.retain_capacity);
+ s = try p.render(frame.allocator());
+ try std.testing.expect(std.mem.indexOf(u8, rowText(s, body.x, body.y + 2, &buf), "three") != null);
+}
+
+/// Grid row `y` of `s` from column `x`, as text.
+fn rowText(s: *const pardes.Surface, x: u16, y: u16, buf: []u8) []const u8 {
+ var n: usize = 0;
+ for (x..s.cols) |col| {
+ const g = s.cells[@as(usize, y) * s.cols + col].grapheme();
+ if (n + g.len > buf.len) break;
+ @memcpy(buf[n..][0..g.len], g);
+ n += g.len;
+ }
+ return buf[0..n];
+}
+
+test "SPC l r types the new name in the pane's own tag, the body showing each place in view renamed as it is typed, never written; Enter asks the server for it, Esc puts it away" {
+ if (!lsp.supports.contains(.rename)) return error.SkipZigTest;
+ const Key = pardes.Key;
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 80, .rows = 20 });
+ defer p.deinit();
+ const pane = try p.setTestFile("const best = 1;\nconst b = best + best;\nconst bestow = 2;\n");
+ const id = p.view().active;
+ p.settings.jumps = .walk;
+ pane.focus = .body;
+ pane.body.cur_row = 0;
+ pane.body.cur_col = 7;
+ for (" lr") |c| p.update(.{ .key = .{ .cp = c } });
+ const s = &p.view().tag_state;
+ try std.testing.expectEqual(TagState.Kind.rename, s.kind);
+ try std.testing.expectEqualStrings("best", s.field.text());
+ for ("er") |c| p.update(.{ .key = .{ .cp = c } });
+ var frame = std.heap.ArenaAllocator.init(std.testing.allocator);
+ defer frame.deinit();
+ const a = frame.allocator();
+ try std.testing.expect(std.mem.indexOf(u8, try pardes.tagline.tagText(p, a, pane), " Rename best → bester") != null);
+ p.sync();
+ const sf = try p.render(a);
+ const body = sf.region(.body, id).?.rect;
+ var buf: [256]u8 = undefined;
+ // Each `best` in view struck and followed by the new name; `bestow` is
+ // another word.
+ try std.testing.expect(std.mem.indexOf(u8, rowText(sf, body.x, body.y, &buf), "const bestbester = 1;") != null);
+ try std.testing.expect(std.mem.indexOf(u8, rowText(sf, body.x, body.y + 1, &buf), "const b = bestbester + bestbester;") != null);
+ try std.testing.expect(std.mem.indexOf(u8, rowText(sf, body.x, body.y + 2, &buf), "const bestow = 2;") != null);
+ try std.testing.expectEqualStrings("const best = 1;\nconst b = best + best;\nconst bestow = 2;\n", pane.file.?.content);
+ // Enter: the server asked to rename it, the tag at rest.
+ while (p.nextEffect()) |_| {}
+ p.update(.{ .key = .{ .cp = Key.enter } });
+ try std.testing.expectEqual(TagState.Kind.rest, s.kind);
+ try std.testing.expectEqualStrings("bester", p.lsp_ask.wait.?.arg.slice());
+ // Esc from the field asks nothing.
+ p.lsp_ask.wait = null;
+ for (" lr") |c| p.update(.{ .key = .{ .cp = c } });
+ p.update(.{ .key = .{ .cp = Key.escape } });
+ try std.testing.expectEqual(TagState.Kind.rest, s.kind);
+ try std.testing.expect(p.lsp_ask.wait == null);
+}
diff --git a/core/modal.zig b/core/modal.zig
index fda948a2..41ec6739 100644
--- a/core/modal.zig
+++ b/core/modal.zig
@@ -160,6 +160,7 @@ pub const Normal = struct {
macro_replay,
repeat_insert,
search,
+ search_back,
search_next,
search_prev,
search_selection,
@@ -305,6 +306,7 @@ pub const Normal = struct {
.macro_replay,
.repeat_insert,
.search,
+ .search_back,
.search_next,
.search_prev,
.search_selection,
diff --git a/core/mouse.zig b/core/mouse.zig
index 400d020b..89a8c5c6 100644
--- a/core/mouse.zig
+++ b/core/mouse.zig
@@ -499,6 +499,17 @@ fn chordCutPaste(p: *Pardes, cut: bool) edit.Error!void {
pub fn handleMouse(p: *Pardes, event: Mouse) void {
const v = p.view();
+ // A click that gives the keyboard to another pane ends the level or
+ // typing state of the tag out of rest as Esc does, its text's prefix
+ // with it (SPEC §3.4.6: only the pane with the keyboard leaves rest);
+ // one in its band or its own tag keeps it.
+ const host = pardes.TagState.hostOf(p);
+ defer if (host) |was| if (v.active != was) {
+ const to = v.active;
+ v.active = was;
+ pardes.TagState.toRest(p);
+ v.active = to;
+ };
var m = event;
// A click goes somewhere else: the question it leaves unanswered is
// taken back, and the pane stays. A wheel only looks around.
@@ -581,6 +592,21 @@ pub fn handleMouse(p: *Pardes, event: Mouse) void {
v.hover_col = mcol;
v.hover_row = mrow;
+ // The notice row: the execute or the look button on a word there runs
+ // it or Looks at it, as on a header (a place a message names, its
+ // cause); nothing else happens on it.
+ const foot = layout.noticeRowHeight(p);
+ if (foot > 0 and mrow >= v.screen_h - foot and v.drag == .none and v.header_sweep == null and !v.header_drag) {
+ if (m.kind != .press or (m.button != config.exec_button and m.button != config.look_button)) return;
+ var buf: [pardes.Messages.notice_row_cap]u8 = undefined;
+ const row = pardes.Messages.noticeRow(p, layout.tagCapacity(p, v.screen_w -| TAG_TEXT_INSET) -| 1, &buf);
+ const col = Layer.columnAt(p, .notice_row, 0, v.pointer_tag_hit, false, 0) orelse (mcol -| TAG_TEXT_INSET);
+ const bounds = tagline.wordBoundsAtCol(row.text, panes.File.rawAtDisplay(p.settings.tab, row.text, col)) orelse return;
+ const word = p.scratch.allocator().dupe(u8, row.text[bounds.lo..bounds.hi]) catch |err| return p.reportError(.at(v.active), "notice row", err);
+ if (m.button == config.exec_button) _ = exec.execute(p, v.active, word) else exec.runBuiltin(p, config.look_cmd, v.active, "", word);
+ return;
+ }
+
const hovered = paneAt(p, mcol, mrow);
// any press that is NOT the execute+select chord abandons a pending
@@ -851,6 +877,13 @@ pub fn handleMouse(p: *Pardes, event: Mouse) void {
pane.scrollBy(p.settings.tab, if (m.button == config.look_button) local else -local);
} else if (edit.pointerTextSelection(p, id, mcol, mrow, m.body_hit, v.pointer_tag_hit)) |pointed| {
if (m.button == config.look_button) v.active = id;
+ // A word of a message's detail, read as it is drawn:
+ // run or looked at as a typed one would be.
+ if (pointed.ghost) |row| {
+ const arena = p.scratch.allocator();
+ const word = (body_layer.wordAt(p, arena, id, row, @intCast(@max(0, pointed.sel.c0))) catch return) orelse return;
+ return exec.runBuiltin(p, if (m.button == config.exec_button) config.exec_cmd else config.look_cmd, id, "", arena.dupe(u8, word) catch return);
+ }
pane.clearPointerSelection(@backingInt(m.button));
pane.sel[@backingInt(m.button)] = pointed.sel;
v.drag = .{
@@ -963,7 +996,7 @@ pub fn dragUpdate(p: *Pardes, mcol: u16, mrow: u16, body_hit: ?Mouse.BodyHit) vo
if (supplied.serial == pane.serial) s.body = supplied.place;
const mapped_hit = bodyHitForPane(p, s.id, supplied, true) orelse return;
pane.sel[b].c1 = @as(i32, mapped_hit.col) - config.GUTTER;
- pane.sel[b].r1 = @as(i32, mapped_hit.row) + tag_rows;
+ pane.sel[b].r1 = pane.textRow(mapped_hit.row) + tag_rows;
return;
};
// A sweep that began on the tag stays on it, on the tag line
@@ -988,9 +1021,9 @@ pub fn dragUpdate(p: *Pardes, mcol: u16, mrow: u16, body_hit: ?Mouse.BodyHit) vo
else if (mrow < body_y)
-1
else if (mrow >= body_y + body_h or
- // The pointer cannot leave the screen: at a bottom pane,
- // its last row is the edge.
- (body_y + body_h >= v.screen_h and mrow + 1 >= body_y + body_h))
+ // The pointer cannot leave the screen: at a bottom pane
+ // (over the notice row), its last row is the edge.
+ (body_y + body_h + layout.noticeRowHeight(p) >= v.screen_h and mrow + 1 >= body_y + body_h))
1
else
0;
@@ -999,7 +1032,7 @@ pub fn dragUpdate(p: *Pardes, mcol: u16, mrow: u16, body_hit: ?Mouse.BodyHit) vo
else if (body_h == 0)
0
else
- @as(i32, @min(@max(mrow, body_y), body_y + body_h - 1)) - @as(i32, body_y) + tag_rows;
+ pane.textRow(@as(i32, @min(@max(mrow, body_y), body_y + body_h - 1)) - @as(i32, body_y)) + tag_rows;
if (pane.sel[b].r1 < tag_rows) pane.sel[b].c1 += @as(i32, pane.tag_scroll);
}
},
@@ -1265,7 +1298,7 @@ fn dragRelease(p: *Pardes, button: Mouse.Button) void {
// (pick-ui SPEC §6.3): the one place B1 does more than
// select.
if (!dragged and tagline.trailClick(p, s.id, row, col, false)) return;
- if (if (dragged) null else tagline.onName(p.settings.tab, pane, row, col)) |at| {
+ if (if (dragged) null else tagline.onName(p, pane, row, col)) |at| {
tagline.draftName(p, pane, at);
} else if (tagline.tagOffsetAt(p, pane, row, col)) |cursor| {
pane.tag.cur_row = @intCast(cursor.row);
@@ -1600,12 +1633,12 @@ test "a chorded exec an event reader holds is told with its argument, and writte
const line = try std.fmt.bufPrint(&back, "M{s}", .{records[0][1..]});
try std.testing.expectEqual(ctlfs.Status.ok, th.call(p, .{ .tag = 3, .op = .write, .node = event, .handle = h, .data = line }).reply.status);
const pane = p.panes[0].?;
- try std.testing.expectEqualStrings("arg-text", pane.msg[0..pane.msg_len]);
+ try std.testing.expectEqualStrings("arg-text", p.messages.saidBy(pane));
// All three records written back as read, in one write or in three:
// the two after the first are its argument and where it came from,
// never commands of their own.
for ([_]bool{ true, false }) |together| {
- pane.msg_len = 0;
+ p.messages.live_len = 0;
var all: [256]u8 = undefined;
var w = std.Io.Writer.fixed(&all);
for (records) |r| try w.print("M{s}", .{r[1..]});
@@ -1615,7 +1648,7 @@ test "a chorded exec an event reader holds is told with its argument, and writte
var one: [80]u8 = undefined;
_ = th.call(p, .{ .tag = 6, .op = .write, .node = event, .handle = h, .data = try std.fmt.bufPrint(&one, "M{s}", .{r[1..]}) });
}
- try std.testing.expectEqualStrings("arg-text", pane.msg[0..pane.msg_len]);
+ try std.testing.expectEqualStrings("arg-text", p.messages.saidBy(pane));
try std.testing.expect(!th.logHas(p, "run "));
}
_ = th.call(p, .{ .tag = 4, .op = .release, .node = event, .handle = h });
diff --git a/core/ninep/ctl.zig b/core/ninep/ctl.zig
index 84f3ba6b..637999c2 100644
--- a/core/ninep/ctl.zig
+++ b/core/ninep/ctl.zig
@@ -1747,6 +1747,8 @@ test "a look whose pane is refused a place fails with that alone, not a missing
// A screen with rows for one pane only.
const p = try Pardes.init(gpa, .{ .tty_only = true, .cols = 80, .rows = 5 });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
while (p.nextEffect()) |_| {}
_ = try p.setTestFile("x\n");
while (p.nextEffect()) |_| {}
@@ -2055,7 +2057,7 @@ test "a language server question that finds nothing, cannot be answered, or is a
_ = wr(p, root_exec, "Recent\n");
const listed = p.paneBySerial(try std.fmt.parseInt(u32, std.mem.trimEnd(u8, rd(p, root_exec, 0, 64).bytes, "\n"), 10)).?;
p.lspRequest(listed, .incoming_calls, "");
- try testing.expect(std.mem.indexOf(u8, p.panes[listed].?.msg[0..p.panes[listed].?.msg_len], "Callers: only a file's pane asks") != null);
+ try testing.expect(std.mem.indexOf(u8, p.messages.saidBy(p.panes[listed].?), "Callers: only a file's pane asks") != null);
// Nothing found: Callers says so, and the waiting write hears it.
p.fs.late_failure_len = 0;
p.lspRequest(id, .incoming_calls, "");
@@ -2126,6 +2128,8 @@ test "with no pane at all, the root look opens its file and the root exec runs i
if (pardes.Term.ops == null) return error.SkipZigTest; // a command pane
const p = try withFile(testing.allocator, "x\n");
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
var tmp = testing.tmpDir(.{});
defer tmp.cleanup();
try tmp.dir.writeFile(testing.io, .{ .sub_path = "f.txt", .data = "file\n" });
@@ -2264,7 +2268,7 @@ test "a column takes panes until their documented minimums fill it, not until no
const new = @backingInt(tree.TopFile.new);
while (call(p, .{ .tag = 1, .op = .open, .node = new }).reply.status == .ok) p.sync();
p.sync();
- const avail = p.view().screen_h - (p.topBarHeight() + layout.columnBarHeight(p));
+ const avail = p.view().screen_h - (p.topBarHeight() + layout.columnBarHeight(p) + layout.noticeRowHeight(p));
for (0..p.view().ncol) |c| {
var need: u32 = 0;
for (p.view().cols[c].panes[0..p.view().cols[c].n]) |k| need += layout.minRows(p, k);
@@ -2388,7 +2392,9 @@ test "a file changed on disk under unsaved edits is not reloaded: it says so, ge
pardes.panes.File.changed(p, 0, "three\n");
try testing.expectEqualStrings("two\nmine\n", f.content);
try testing.expect(f.revision != f.saved_revision);
- try testing.expect(th.logHas(p, "changed on disk (get reloads it, Save overwrites it)"));
+ // ...and asks, in its tag (Messages.waiting), which /log hears.
+ try testing.expect(p.messages.waiting(p.panes[0].?) != null);
+ try testing.expect(th.logHas(p, "changed on disk\n"));
var want: [32]u8 = undefined;
try testing.expect(th.logHas(p, try std.fmt.bufPrint(&want, "changed {d}\n", .{serial})));
// Exit and get still ask about the edits.
diff --git a/core/ninep/events.zig b/core/ninep/events.zig
index e18b5d96..fe9ec79a 100644
--- a/core/ninep/events.zig
+++ b/core/ninep/events.zig
@@ -1089,20 +1089,20 @@ test "writing an event record back performs the action it names" {
const w = wr(p, event, "FX0 10\n");
try testing.expectEqual(Status.ok, w.reply.status);
- try testing.expectEqualStrings("fs-ran", pane.msg[0..pane.msg_len]);
+ try testing.expectEqualStrings("fs-ran", p.messages.saidBy(pane));
- pane.msg_len = 0;
+ p.messages.live_len = 0;
try testing.expectEqual(Status.ok, wr(p, event, "FX0 10\nFX0 10\n").reply.status);
- try testing.expectEqualStrings("fs-ran", pane.msg[0..pane.msg_len]);
+ try testing.expectEqualStrings("fs-ran", p.messages.saidBy(pane));
// The last record needs no newline, as any line file's last line.
- pane.msg_len = 0;
+ p.messages.live_len = 0;
const bare = wr(p, event, "FX0 10");
try testing.expectEqual(Status.ok, bare.reply.status);
try testing.expectEqual(@as(u32, 6), bare.reply.written);
- try testing.expectEqualStrings("fs-ran", pane.msg[0..pane.msg_len]);
+ try testing.expectEqualStrings("fs-ran", p.messages.saidBy(pane));
- pane.msg_len = 0;
+ p.messages.live_len = 0;
for ([_][]const u8{
"FX0 10\nFQ0 1\n", // unknown type character
"FX0 999\n", // out of range
@@ -1111,7 +1111,7 @@ test "writing an event record back performs the action it names" {
"F\n",
}) |bad| {
try testing.expectEqual(E.INVAL, wr(p, event, bad).errno());
- try testing.expectEqual(@as(usize, 0), pane.msg_len);
+ try testing.expectEqual(@as(usize, 0), p.messages.saidBy(pane).len);
}
// A look written back sets what look reads back.
_ = wr(p, event, "FL0 3\n");
diff --git a/core/ninep/tree.zig b/core/ninep/tree.zig
index 01cfe297..4feb0153 100644
--- a/core/ninep/tree.zig
+++ b/core/ninep/tree.zig
@@ -2013,6 +2013,11 @@ test "random placements, refused or not, leave no pane under its tag and two row
const rows = r.intRangeAtMost(u16, 6, 40);
const p = try pardes.Pardes.init(testing.allocator, .{ .tty_only = true, .cols = r.intRangeAtMost(u16, 60, 240), .rows = rows });
defer p.deinit();
+ // Placements as a Look made them before the walk: `Jumps new-pane`
+ // (SPEC §6.6). Under the walk a step in place can wrap its tag in a
+ // column with no rows to give (seed 109): the trail's give-way,
+ // not a placement's refusal (Trail.lift lifts it when there are).
+ p.settings.jumps = .@"new-pane";
while (p.nextEffect()) |_| {}
_ = try p.setTestFile("x\n");
while (p.nextEffect()) |_| {}
diff --git a/core/normal.zig b/core/normal.zig
index 2ec8a4da..e1af647d 100644
--- a/core/normal.zig
+++ b/core/normal.zig
@@ -22,6 +22,7 @@ const sel_slot = pardes.sel_slot;
const Pardes = pardes.Pardes;
const Macro = pardes.Macro;
const Editor = @import("Editor.zig");
+const Prompt = @import("Prompt.zig");
fn isPrefix(key: Key, cp: u21) bool {
return key.cp == cp and !key.ctrl and !key.alt;
@@ -53,15 +54,19 @@ pub fn selRegexArmed(pane: *Pane) ?struct { pat: []const u8, mode: modal.Normal.
/// Select (or split on, keep or remove by) `pat` inside the selections `t`
/// had when s/S/K/Alt-K was pressed; the prompt's snapshot of them lives on
-/// `pane`.
-pub fn applySelRegex(p: *Pardes, pane: *Pane, t: *Text, pat: []const u8, mode: modal.Normal.RegexMode) void {
- selectByRegex(p.editor(), t, pane.sel_snap[0..pane.nsel_snap], pane.sel_snap_pri, pane.sel_snap_expl, pat, mode);
+/// `pane`. The ranges it found: none, the snapshot's back.
+pub fn applySelRegex(p: *Pardes, pane: *Pane, t: *Text, pat: []const u8, mode: modal.Normal.RegexMode) usize {
+ return selectByRegex(p.editor(), t, pane.sel_snap[0..pane.nsel_snap], pane.sel_snap_pri, pane.sel_snap_expl, pat, mode);
}
/// Select (or split on, keep or remove by) `pat` inside `snap`, the
-/// ranges there were (primary `pri`) when s/S/K/Alt-K was pressed.
-pub fn selectByRegex(e: Editor, t: *Text, snap: []modal.Selection, pri: usize, expl: bool, pat: []const u8, mode: modal.Normal.RegexMode) void {
- const text = edit.flatSurface(e, t) catch |err| return e.reportError(err);
+/// ranges there were (primary `pri`) when s/S/K/Alt-K was pressed; the
+/// ranges it found.
+pub fn selectByRegex(e: Editor, t: *Text, snap: []modal.Selection, pri: usize, expl: bool, pat: []const u8, mode: modal.Normal.RegexMode) usize {
+ const text = edit.flatSurface(e, t) catch |err| {
+ e.reportError(err);
+ return 0;
+ };
var out: [Text.max_selections]modal.Selection = undefined;
var m: usize = 0;
if (regexp.Regex.compile(pat)) |compiled| {
@@ -69,7 +74,10 @@ pub fn selectByRegex(e: Editor, t: *Text, snap: []modal.Selection, pri: usize, e
var hay_all = text;
if (for (pat) |c| {
if (std.ascii.isUpper(c)) break false;
- } else true) hay_all = std.ascii.allocLowerString(e.scratch, text) catch |err| return e.reportError(err);
+ } else true) hay_all = std.ascii.allocLowerString(e.scratch, text) catch |err| {
+ e.reportError(err);
+ return 0;
+ };
for (snap) |r| {
const from = @min(r.anchor, r.head);
const to = @min(@max(r.anchor, r.head), text.len);
@@ -116,9 +124,11 @@ pub fn selectByRegex(e: Editor, t: *Text, snap: []modal.Selection, pri: usize, e
r.anchor = @min(r.anchor, text.len);
r.head = @min(r.head, text.len);
}
- return t.setRanges(e.tab, text, snap, &.{}, pri, expl);
+ t.setRanges(e.tab, text, snap, &.{}, pri, expl);
+ return 0;
}
t.setRanges(e.tab, text, out[0..m], &.{}, 0, true); // helix keeps primary 0 (its own TODO)
+ return m;
}
fn lastMatch(re: *SearchRegex, hay: []const u8, from: usize, to: usize) ?regexp.Regex.Match {
@@ -249,7 +259,7 @@ fn objectJump(e: Editor, t: *Text, text: []const u8, range: modal.Selection, obj
const tree = nodeTree(e, t, text) orelse return;
var last = range;
for (0..count) |_| {
- const s = syntax.objectNext(tree.path, tree.root, tree.text, object, forward, tree.in(modal.selectionCursor(text, last))) orelse break;
+ const s = syntax.objectNext(tree.path, tree.root, tree.text, object, forward, tree.in(modal.selectionCursor(text, last)), null) orelse break;
const next: modal.Selection = .{ .anchor = tree.out(s.from, false), .head = tree.out(s.to, s.to > s.from) };
if (std.meta.eql(next, last)) break;
last = next;
@@ -600,6 +610,9 @@ fn actionPass(e: Editor, t: *Text, action: modal.Normal.Action) edit.Error!void
}
fn startSelRegex(p: *Pardes, pane: *Pane, t: *Text, mode: modal.Normal.RegexMode) edit.Error!void {
+ // A body's prompt is its tag's (Prompt.zig); a tag's or a header's asks
+ // on the notice band.
+ if (t.what == .body) return Prompt.open(p, pane, Prompt.ofMode(mode));
const text = try edit.flatSurface(p.editor(), t);
const got = t.ranges(text, 0, &pane.sel_snap);
pane.nsel_snap = @intCast(got.n);
@@ -1075,7 +1088,7 @@ fn shrinkSelToLineBounds(tab: u16, t: *Text, text: []const u8, range: modal.Sele
pub fn textRole(role: modal.Normal.Role, tree: bool) bool {
return switch (role) {
.all_children, .all_siblings, .expand_node, .goto_class, .goto_comment, .goto_entry, .goto_function, .goto_parameter, .goto_test, .goto_xml_element, .next_sibling, .parent_node_end, .parent_node_start, .prev_sibling, .shrink_node => tree,
- .append_output, .command_line, .format, .goto_callstack, .goto_change, .goto_declaration, .goto_definition, .goto_diagnostic, .goto_diagnostic_end, .goto_implementation, .goto_references, .goto_type_definition, .goto_view_bottom, .goto_view_top, .goto_word, .half_page_down, .half_page_up, .insert_output, .keep_pipe, .keep_regex, .leader, .macro_record, .macro_replay, .page_down, .page_up, .pipe_selection, .pipe_selection_to, .remove_regex, .repeat_insert, .search, .search_next, .search_prev, .select_regex, .split_regex, .view_bottom, .view_center, .view_middle, .view_scroll_down, .view_scroll_up, .view_top => false,
+ .append_output, .command_line, .format, .goto_callstack, .goto_change, .goto_declaration, .goto_definition, .goto_diagnostic, .goto_diagnostic_end, .goto_implementation, .goto_references, .goto_type_definition, .goto_view_bottom, .goto_view_top, .goto_word, .half_page_down, .half_page_up, .insert_output, .keep_pipe, .keep_regex, .leader, .macro_record, .macro_replay, .page_down, .page_up, .pipe_selection, .pipe_selection_to, .remove_regex, .repeat_insert, .search, .search_back, .search_next, .search_prev, .select_regex, .split_regex, .view_bottom, .view_center, .view_middle, .view_scroll_down, .view_scroll_up, .view_top => false,
else => true,
};
}
@@ -1094,6 +1107,20 @@ pub fn textAction(e: Editor, t: *Text, a: modal.Normal.Action) edit.Error!void {
if (comptime Editor.lib) return;
// typed again by a macro, Esc is only helix's
if (e.p.macro.replaying > 0) return;
+ // At rest a thing at a time (pick-ui SPEC §10.4): a search's
+ // tints (its word stays in the trail, dimmed: §7.3), then the
+ // warnings and errors, then the selections (the primary kept);
+ // with none of them left, the previous pane.
+ if (e.p.panes[e.p.view().active]) |pane| if (t == &pane.body and (pane.places.pattern.len > 0 or pane.places.hits.items.len > 0)) {
+ pane.places.clear(e.p.gpa);
+ e.p.needs_frame = true;
+ return;
+ };
+ if (e.p.messages.retire(&.{ .warn, .@"error" }) > 0) return;
+ if (t.nsel > 0) {
+ t.nsel = 0;
+ return;
+ }
tagline.exitHeader(e.p); // out of a header too, as Shift-Esc
return exec.runBuiltin(e.p, .Last, e.p.view().active, "", null);
},
@@ -1240,14 +1267,13 @@ pub fn textAction(e: Editor, t: *Text, a: modal.Normal.Action) edit.Error!void {
.decrement => return edit.normalAdjustNumber(e, t, -@as(i64, @intCast(a.count))),
.search_selection, .search_selection_word => {
try searchSelection(e, t, text, a.role == .search_selection_word);
- // The pattern is line 1 of this text's query pane, made or
- // reused, the keyboard staying here: n and N step its places.
+ // The pattern lights its places and is the pane's search word,
+ // no prompt asked (Prompt.zig): n and N step them.
const pane = t.pane() orelse return;
if (t.what == .body and pane.file != null and pane.query == null) {
const name = if (e.register.* != 0) e.register.* else '/';
const pat = e.registers.value(name, 0) orelse return;
- panes.Query.open(e.p, e.p.view().active, .text, pat, false);
- pane.places.provenance = .search;
+ Prompt.star(e.p, pane, pat);
}
},
// prefix keys: what they begin is the command
@@ -1317,7 +1343,7 @@ fn executeNormalAction(p: *Pardes, t: *Text, a: modal.Normal.Action) edit.Error!
.view_scroll_down => if (t.what == .body) return t.scrollViewMove(p.settings.tab, text, range, 1),
.view_scroll_up => if (t.what == .body) return t.scrollViewMove(p.settings.tab, text, range, -1),
// The next and the previous of the changes this view shows (jj.zig).
- .goto_change => if (@import("jj.zig").nextChange(p, pane, @intCast(@max(0, t.cur_row)), a.forward)) |line|
+ .goto_change => if (@import("jj.zig").nextChange(p, pane, @intCast(@max(0, t.cur_row)), a.forward, std.math.maxInt(usize))) |line|
return pointMove(p.settings.tab, t, text, range, modal.lineStartOffset(text, line)),
.goto_diagnostic, .goto_diagnostic_end => {
// Once a Diagnostics query fed them, the diagnostics are this
@@ -1360,15 +1386,23 @@ fn executeNormalAction(p: *Pardes, t: *Text, a: modal.Normal.Action) edit.Error!
.column, .workspace => tagline.exitHeader(p),
.body, .input => tagline.enterTag(p, pane),
},
- .pipe_selection => return panes.startPrompt(p, pane, t, .{ .pipe = .replace }),
- .pipe_selection_to => return panes.startPrompt(p, pane, t, .{ .pipe = .ignore }),
- .insert_output => return panes.startPrompt(p, pane, t, .{ .pipe = .insert }),
- .append_output => return panes.startPrompt(p, pane, t, .{ .pipe = .append }),
- .keep_pipe => return panes.startPrompt(p, pane, t, .{ .pipe = .keep }),
- // `/` in a text is its query pane's line 1 (Query.zig); a
- // terminal's still asks on the notice band.
- .search => if (pane.file != null and t.what == .body)
- panes.Query.open(p, v.active, .text, "", true)
+ inline .pipe_selection, .pipe_selection_to, .insert_output, .append_output, .keep_pipe => |role| {
+ const how: modal.Normal.PipeBehavior = switch (role) {
+ .pipe_selection => .replace,
+ .pipe_selection_to => .ignore,
+ .insert_output => .insert,
+ .append_output => .append,
+ else => .keep,
+ };
+ // A body's in its tag (Prompt.zig), else on the notice band.
+ if (t.what == .body) return Prompt.open(p, pane, Prompt.ofBehavior(how));
+ return panes.startPrompt(p, pane, t, .{ .pipe = how });
+ },
+ // `/` and `?` in a file's text search it in its tag (Prompt.zig),
+ // Alt-Enter keeping the places as its query pane's rows (Query.zig);
+ // a terminal's still asks on the notice band.
+ .search, .search_back => if (pane.file != null and t.what == .body)
+ return Prompt.open(p, pane, if (a.role == .search) .search else .search_back)
else
return panes.startPrompt(p, pane, &pane.body, .{ .search = config.search_marker }),
// In a file's text, n and N step its places while they answer for
@@ -1377,9 +1411,12 @@ fn executeNormalAction(p: *Pardes, t: *Text, a: modal.Normal.Action) edit.Error!
// places the rows hold, never the disk (a motion).
.search_next, .search_prev => if (t.what == .body and pane.addon != null)
return look.lookWalk(p, if (a.role == .search_next) 1 else -1, false)
- else if (t.what == .body and pane.file != null and pane.places.answersN(p, pane))
- return pane.places.step(p, pane, a.role == .search_next, a.count, t.select)
- else if (t.what == .body and panes.Pick.walkList(p, v.active, a.role == .search_next))
+ else if (t.what == .body and pane.file != null and pane.places.answersN(p, pane)) {
+ // The pane's search word says where it went (Prompt.zig).
+ const was = pane.places.current;
+ pane.places.step(p, pane, a.role == .search_next, a.count, t.select);
+ return Prompt.stepped(p, v.active, a.role == .search_next, was);
+ } else if (t.what == .body and panes.Pick.walkList(p, v.active, a.role == .search_next))
return
else
return searchStep(p.editor(), t, text, a.role == .search_next, a.count),
@@ -1659,7 +1696,7 @@ test "s and S search a multi-line selection as addr does: ^ and $ per line, . wi
}) |c| {
pane.sel_snap[0] = .{ .anchor = 0, .head = text.len };
pane.nsel_snap = 1;
- applySelRegex(p, pane, &pane.body, c.pat, c.mode);
+ _ = applySelRegex(p, pane, &pane.body, c.pat, c.mode);
var out: [Text.max_selections]modal.Selection = undefined;
const got = pane.body.ranges(text, 0, &out);
try std.testing.expectEqual(c.want.len, got.n);
diff --git a/core/panes.zig b/core/panes.zig
index 6fd5c679..e4ed3e9d 100644
--- a/core/panes.zig
+++ b/core/panes.zig
@@ -32,8 +32,8 @@ pub const Pane = struct {
/// it (views.zig). (The 9P server's part of `fs` says so in its type.)
pub const replica = .{
.local = .{ "pv", "pv_known" },
- .derived = .{ "band_rows", "wrap_line", "wrap_col", "wrap_pad", "wrap_n", "body_wrapped", "context_rows", "body_rows", "body_visible_rows", "context_row_limit", "geometry_key", "geometry_len", "top_skip", "notices", "pan" },
- .len = .{ .{ "msg", "msg_len" }, .{ "msg_older", "msg_older_len" }, .{ "question", "question_len" }, .{ "shell_tail", "shell_tail_len" }, .{ "sel_snap", "nsel_snap" } },
+ .derived = .{ "band_rows", "ghost_at", "ghost_rows", "wrap_line", "wrap_col", "wrap_pad", "wrap_n", "body_wrapped", "context_rows", "body_rows", "body_visible_rows", "context_row_limit", "geometry_key", "geometry_len", "top_skip", "notices", "pan" },
+ .len = .{ .{ "question", "question_len" }, .{ "shell_tail", "shell_tail_len" }, .{ "sel_snap", "nsel_snap" } },
// A picture's memory is its own allocator's (a dump loaded makes
// it there).
.alloc = .{ .{ "addon", "image" }, .{ "pdf", "image" }, .{ "terminal", "terminal" } },
@@ -243,8 +243,6 @@ pub const Pane = struct {
/// A question with its answers in it (`repl_choice`).
question: [96]u8 = undefined,
question_len: u8 = 0,
- /// The newest message says where an exec was sent: it is tinted.
- msg_sent: bool = false,
/// The revision an Exit or a Restore last warned this pane was modified
/// at, and which of them: only that word goes ahead on the warning
/// (builtins.zig warnModified).
@@ -273,6 +271,10 @@ pub const Pane = struct {
/// Its walk: the places it stepped through, its owner when it is a
/// reader, whether it is held (Trail.zig, pick-ui SPEC §6).
trail: Trail = .{},
+ /// The selections its recipe word's sam prompts made (gpa), for Look
+ /// on the word to put back (Prompt.zig, SPEC §7.5).
+ recipe_sels: []modal.Selection = &.{},
+ recipe_pri: u16 = 0,
/// `gw`'s words, labelled in order while it waits for a label to be
/// typed (gpa-owned); `jump_first` is the label's first letter once typed.
jump: std.ArrayList(modal.Selection) = .empty,
@@ -353,32 +355,19 @@ pub const Pane = struct {
/// terminals only: the typed-text buffer standing in for shell rows
ovl: ?Text.EditBuffer = null,
tty_filter: bool = false,
- msg: [256]u8 = undefined,
- msg_len: u16 = 0,
- /// Where the newest message line is in its life.
- msg_life: MessageLife = .{},
- /// When it was said, in monotonic ms (Messages.expireUnattended).
- msg_said_ms: i64 = 0,
- /// The row (among the notice rows) the newest line holds for its life.
- msg_slot: u8 = 0,
- /// Earlier message lines still on screen, oldest first, each running its
- /// own life: a new message stacks under them instead of replacing them.
- msg_older: [message_stack]OlderMessage = undefined,
- msg_older_len: u8 = 0,
- /// The newest line is a builtin announcing itself in this step: what
- /// the step says next replaces it rather than stacking under it.
- msg_announcement: bool = false,
- /// The newest line is a status (progress, a server's state): the next
- /// line replaces it rather than stacking under it.
- msg_status: bool = false,
/// The transient lines this pane shows between its body and its tagline:
- /// a builtin's message, the pending leader chord, a prompt waiting for
- /// input. Rebuilt every frame from the state that owns each one, so a
+ /// a prompt waiting for input. Rebuilt every frame from the state that owns each one, so a
/// line that goes away is simply not added again and the rest close the
/// gap -- there is no second copy of the truth to fall out of step. The
/// body layer reserves exactly `len` rows for them, the way it already
/// reserves rows for sticky context headers.
notices: Notices = .{},
+ /// A message's detail as the body drawn last has it (body_layer.zig
+ /// messageGhosts): `ghost_rows` read-only rows after body row
+ /// `ghost_at` (its line's last), the rows below drawn that many lower.
+ /// The mouse reads it, so that a click lands on what is drawn under it.
+ ghost_at: u16 = 0,
+ ghost_rows: u16 = 0,
/// Each other view's share of this pane, while it is not live
/// (views.zig): its cursor, scroll and place in that view's layout.
pv: [views.max]views.PaneView = undefined,
@@ -404,67 +393,14 @@ pub const Pane = struct {
/// that view's focus leaving the pane drops it.
prompt_view: u8 = 0,
- pub const MessagePhase = enum { shown, lingering };
- /// One message line's life: shown, or lingering after the key or click
- /// that dismissed it, `frame` frames of its linger gone.
- pub const MessageLife = struct {
- phase: MessagePhase = .shown,
- frame: u16 = 0,
- };
- /// Older message lines kept on screen under a new one.
- pub const message_stack = 3;
- pub const OlderMessage = struct {
- pub const replica = .{ .len = .{.{ "text", "len" }} };
- text: [256]u8 = undefined,
- len: u16 = 0,
- life: MessageLife = .{},
- slot: u8 = 0,
-
- pub fn slice(line: *const OlderMessage) []const u8 {
- return line.text[0..line.len];
- }
- };
-
- /// Move the newest line onto the stack of older ones, dropping the oldest
- /// when it is full; the newest slot is left empty for what arrives.
- pub fn pushOlderMessage(pane: *Pane) void {
- if (pane.msg_older_len == message_stack) {
- std.mem.copyForwards(OlderMessage, pane.msg_older[0 .. message_stack - 1], pane.msg_older[1..]);
- pane.msg_older_len -= 1;
- }
- pane.msg_older[pane.msg_older_len] = .{ .text = pane.msg, .len = pane.msg_len, .life = pane.msg_life, .slot = pane.msg_slot };
- pane.msg_older_len += 1;
- pane.msg_len = 0;
- pane.msg_life = .{};
- }
-
- /// The first row no older line holds. A line keeps its row until it
- /// leaves, and a new one fills the first gap: nothing on screen moves.
- pub fn freeMessageSlot(pane: *const Pane) u8 {
- var used: u8 = 0;
- for (pane.msg_older[0..pane.msg_older_len]) |line| used |= @as(u8, 1) << @intCast(line.slot);
- var slot: u8 = 0;
- while (used & (@as(u8, 1) << @intCast(slot)) != 0) slot += 1;
- return slot;
- }
-
- pub fn removeOlderMessage(pane: *Pane, i: usize) void {
- std.mem.copyForwards(OlderMessage, pane.msg_older[i .. pane.msg_older_len - 1], pane.msg_older[i + 1 .. pane.msg_older_len]);
- pane.msg_older_len -= 1;
- }
-
pub const Notices = struct {
/// Painted bottom-up in this order, so a prompt keeps the row nearest
/// the tagline that it has always had, and its cursor with it.
- /// `older` is an earlier message line still on screen; `index` says
- /// which (`Pane.msg_older`).
- pub const Kind = enum { older, message, leader, prompt };
- pub const max = @typeInfo(Kind).@"enum".field_names.len - 1 + message_stack;
+ pub const Kind = enum { prompt };
+ pub const max = @typeInfo(Kind).@"enum".field_names.len;
kinds: [max]Kind = undefined,
- index: [max]u8 = @splat(0),
- /// Each band's row below the body's top: message lines keep theirs,
- /// so a band that leaves leaves a gap rather than moving the rest.
+ /// Each band's row below the body's top.
row: [max]u8 = @splat(0),
/// Where each band's chip starts, as an absolute grid column. A chip
/// is only as wide as its own text, so the rest of the row underneath
@@ -474,14 +410,9 @@ pub const Pane = struct {
/// A band on the next row after every band so far.
pub fn push(n: *Notices, kind: Kind) void {
- n.pushAt(kind, 0, n.span());
- }
-
- pub fn pushAt(n: *Notices, kind: Kind, index: u8, row: u8) void {
if (n.len >= max) return;
n.kinds[n.len] = kind;
- n.index[n.len] = index;
- n.row[n.len] = row;
+ n.row[n.len] = n.span();
n.left[n.len] = std.math.maxInt(u16);
n.len += 1;
}
@@ -633,6 +564,14 @@ pub const Pane = struct {
return @min(pane.scrolled_to orelse output, output);
}
+ /// Body row `vr` as drawn, as the row map counts it (`wrapAt`): a row
+ /// under a message's detail is `ghost_rows` higher there; a row of the
+ /// detail is the line's it explains.
+ pub fn textRow(pane: *const Pane, vr: i32) i32 {
+ if (pane.ghost_rows == 0 or vr <= pane.ghost_at) return vr;
+ return @max(pane.ghost_at, vr - pane.ghost_rows);
+ }
+
/// The line and byte a body row shows from.
pub fn wrapAt(pane: *Pane, tab: u16, vr: i32) struct { line: i32, at: i32, pad: i32 = 0 } {
File.geometry(tab, pane);
@@ -1127,6 +1066,23 @@ pub const Pane = struct {
pane.feedOutput(p, said.print("{s}exit {s}\r\n", .{ lead, code }));
pane.noteRun(p, "exit", code);
p.needs_frame = true;
+ // A failed run whose report names places (a compiler's
+ // `path:line:col: error: ...`): an error of this pane, the places
+ // its words, the rows after its first its detail (SPEC §10.2). Its
+ // last rows only: a report's places are at its end.
+ if (status != 0) if (pane.terminal) |state| report: {
+ const grid = Term.grid(state);
+ const first = grid.total -| 400;
+ const rows = Term.editRows(state, p.scratch.allocator(), first, grid.total - first) catch break :report;
+ var found: pardes.Messages.Said = .{};
+ if (pardes.Messages.readPlaces(&found, pane.cwdSlice(), rows) == 0) break :report;
+ var words: pardes.Kind.Buf(32) = .{};
+ const kept = pardes.Messages.say(p, .@"error", id, words.print("exit {s}", .{code}));
+ kept.places = found.places;
+ kept.places_len = found.places_len;
+ kept.detail = found.detail;
+ kept.detail_len = found.detail_len;
+ };
}
};
@@ -1297,6 +1253,7 @@ pub fn teardownPane(p: *Pardes, pane: *Pane) void {
pane.input.deinit(p.gpa);
pane.jump.deinit(p.gpa);
pane.places.deinit(p.gpa);
+ p.gpa.free(pane.recipe_sels);
@import("jj.zig").forget(p, pane.serial);
if (pane.query) |q| {
q.deinit(p.gpa);
@@ -1679,14 +1636,14 @@ test "owned cwd preserves long paths aliases and failed updates" {
const effects = p.effects_len;
exec.saveTo(p, 0, "file.txt");
try std.testing.expectEqual(effects, p.effects_len);
- try std.testing.expect(std.mem.indexOf(u8, pane.msg[0..pane.msg_len], "path too long") != null);
+ try std.testing.expect(std.mem.indexOf(u8, p.messages.saidBy(pane), "path too long") != null);
const current = pane.cwdSlice();
allocator.fail_index = allocator.alloc_index;
p.setCwd(.at(0), "/replacement");
try std.testing.expectEqual(current.ptr, pane.cwdSlice().ptr);
try std.testing.expectEqualStrings(&path, pane.cwdSlice());
- try std.testing.expect(std.mem.indexOf(u8, pane.msg[0..pane.msg_len], "out of memory") != null);
+ try std.testing.expect(std.mem.indexOf(u8, p.messages.saidBy(pane), "out of memory") != null);
allocator.fail_index = std.math.maxInt(usize);
p.setCwd(.at(0), "/replacement");
try std.testing.expectEqualStrings("/replacement", pane.cwdSlice());
@@ -1791,7 +1748,7 @@ test "owned cwd EOF failure retains the pane and Del retries its close" {
try std.testing.expectEqual(parent, p.panes[0].?);
try std.testing.expectEqual(parent, child.cwd.inherited);
try std.testing.expectEqual(Text.Mode.normal, parent.body.mode);
- try std.testing.expect(std.mem.indexOf(u8, parent.msg[0..parent.msg_len], "Del retries close") != null);
+ try std.testing.expect(std.mem.indexOf(u8, p.messages.saidBy(parent), "Del retries close") != null);
try std.testing.expectEqual(@as(usize, 0), p.effects_len);
allocator.fail_index = std.math.maxInt(usize);
try std.testing.expect(p.executeBuiltinLine(0, "Del"));
@@ -1954,7 +1911,7 @@ test "a prompt chip is a band with its caret, still on the grid, and only the ch
for (pane.sel) |selection| try std.testing.expect(selection.state == .none);
}
-test "a prompt is typed on its own line in the notice band and leaves the tag row alone" {
+test "a Save prompt is typed on its own line in the notice band and leaves the tag row alone" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 80, .rows = 24 });
defer p.deinit();
const pane = try p.setTestFile("one two\n");
@@ -1964,13 +1921,13 @@ test "a prompt is typed on its own line in the notice band and leaves the tag ro
const tag_before = try std.testing.allocator.dupe(Cell, p.surface.tag_layers[0].cells);
defer std.testing.allocator.free(tag_before);
- // `s` keeps a prompt on the band (a text's `/` is its query pane's
- // line 1 now, Query.zig).
- p.update(.{ .key = .{ .cp = 's' } });
+ // Save's path keeps a prompt on the band (a body's `s`, `|` and `/`
+ // ask in its tag, Prompt.zig).
+ startPrompt(p, pane, &pane.body, .save);
p.update(.{ .key = .{ .cp = 't', .text = "tw" } });
p.update(.{ .key = .{ .cp = Key.left } });
- try std.testing.expect(pane.prompt == .search and pane.focus == .body);
- try std.testing.expectEqualStrings(config.select_marker ++ "tw", pane.promptText().?);
+ try std.testing.expect(pane.prompt == .save and pane.focus == .body);
+ try std.testing.expectEqualStrings(config.save_marker ++ "/tw", pane.promptText().?);
_ = frame.reset(.retain_capacity);
_ = try p.render(frame.allocator());
// The tagline is exactly what it was: nothing of the prompt is in it.
@@ -1987,7 +1944,39 @@ test "a prompt is typed on its own line in the notice band and leaves the tag ro
const grid = p.surface.cursor orelse return error.MissingPromptCursor;
try std.testing.expectEqual(p.bodyTop(pane, p.view().rects[0]), grid.y);
- // Submitting searches for what was typed and gives the prompt its line back.
- p.update(.{ .key = .{ .cp = Key.enter } });
+ // Esc gives the prompt its line back.
+ p.update(.{ .key = .{ .cp = Key.escape } });
try std.testing.expect(pane.prompt == .none and pane.input.own == null);
}
+
+test "a command whose run fails naming places is an error of its pane, those places its words, and the pane's next run takes it away" {
+ if (pardes.Term.ops == null) return error.SkipZigTest; // a command pane's terminal
+ const gpa = std.testing.allocator;
+ const p = try Pardes.init(gpa, .{});
+ defer p.deinit();
+ while (p.nextEffect()) |_| {}
+ p.setCwd(.at(0), "/tmp/pardes-cmd");
+ _ = try pardes.Kind.open(p, 1, pardes.Kind.test_kind.of(p), "/tmp/pardes-cmd/pic.ppm", null);
+ const dst = exec.execute(p, 1, "zig build") orelse return error.NoCommandPane;
+ while (p.nextEffect()) |_| {}
+ const pane = p.panes[dst].?;
+ p.update(.{ .output = .{ .pane = .at(dst), .bytes = "core/pick.zig:25:12: error: expected 2 argument(s), found 3\r\n const best = rank(q, name, 3);\r\n" } });
+ p.update(.{ .exited = .{ .pane = .at(dst), .status = 1 } });
+ const said = p.messages.headline() orelse return error.NothingSaid;
+ try std.testing.expectEqual(pardes.Messages.Kind.@"error", said.kind);
+ try std.testing.expectEqualStrings("exit 1", said.text.slice());
+ try std.testing.expect(std.mem.endsWith(u8, said.src.slice(), " zig build"));
+ try std.testing.expectEqual(@as(u8, 1), said.places_len);
+ try std.testing.expectEqualStrings("/tmp/pardes-cmd/core/pick.zig", said.places[0].path.slice());
+ try std.testing.expectEqualStrings(" const best = rank(q, name, 3);", said.detail[0].slice());
+ var frame = std.heap.ArenaAllocator.init(gpa);
+ defer frame.deinit();
+ const s = try p.render(frame.allocator());
+ const r = p.view().rects[dst];
+ try std.testing.expectEqualStrings("\u{2717}", s.at(r.x + config.GUTTER - 1, p.tagTop(pane, r)).grapheme());
+ // Its next run: the last run's error goes.
+ p.update(.{ .eof = .{ .pane = .at(dst) } });
+ try std.testing.expectEqual(@as(?usize, dst), exec.execute(p, 1, "zig build"));
+ while (p.nextEffect()) |_| {}
+ try std.testing.expect(p.messages.headline() == null or p.messages.headline().?.kind != .@"error");
+}
diff --git a/core/replica.zig b/core/replica.zig
index 2a66cc3d..97cbaeee 100644
--- a/core/replica.zig
+++ b/core/replica.zig
@@ -5687,6 +5687,8 @@ test "a replica joined after a pane closed: the session's jump to it, its Panes
const gpa = std.testing.allocator;
const a = try Authority.init(gpa, .{ .cols = 80, .rows = 24, .file = "mise.toml" }, TestHost.host());
defer a.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ a.core.settings.jumps = .@"new-pane";
// A file looked at and closed: a jump to it, Recent's, a closed pane.
var cwd: [std.Io.Dir.max_path_bytes]u8 = undefined;
var line: [std.Io.Dir.max_path_bytes + 32]u8 = undefined;
@@ -7335,6 +7337,7 @@ const may_wait = [_]Wait{
.{ .what = "*", .on = .shell, .stop = "pty_write", .why = "a key into a shell's program" },
// A file from the session's disk (P14).
.{ .what = "Look *", .on = .any, .stop = "resolve", .why = "a name looked for on the session's disk" },
+ .{ .what = "Look *", .on = .any, .stop = "read_file", .why = "a jump from a held pane (a kind's, a listing's) opens its reader on the file, read from the session's disk: a reading pane showing it is not focused (pick-ui SPEC §6.1)" },
.{ .what = "LookNext", .on = .any, .stop = "resolve", .why = "a Look's walk: each word asked of the disk" },
.{ .what = "LookPrev", .on = .any, .stop = "resolve", .why = "a Look's walk: each word asked of the disk" },
.{ .what = "Mini *", .on = .any, .stop = "resolve", .why = "a file opened by name, from the session's disk" },
@@ -7998,7 +8001,7 @@ test "a far client's drag in a kind's pane it grabbed, the pane since too short
}
for ([_]pardes.Event{
.{ .mouse = .{ .button = .left, .kind = .press, .col = col, .row = row } },
- .{ .resize = .{ .cols = 80, .rows = 4 } },
+ .{ .resize = .{ .cols = 80, .rows = 5 } },
.{ .mouse = .{ .button = .left, .kind = .drag, .col = col, .row = 30 } },
.{ .mouse = .{ .button = .left, .kind = .release, .col = col, .row = 30 } },
}) |ev| {
@@ -8395,7 +8398,7 @@ test "a far client's replay of a message its session's host stamped takes the se
r.confirm(u);
r.settle();
try agrees(a, r);
- try std.testing.expect(try shows(r.core(), "--:--:-- yanked x"));
+ try std.testing.expectEqualStrings("--:--:-- yanked x", r.core().messages.headline().?.text.slice());
}
// A script's `pty/run` in a shell (ninep/pty.zig): the open, the line, the
diff --git a/core/rollback.zig b/core/rollback.zig
index 2702594c..258a18d8 100644
--- a/core/rollback.zig
+++ b/core/rollback.zig
@@ -802,6 +802,8 @@ test "a rollback leaves the store and Recent as a speculation left them: they li
const gpa = e.allocator();
const p = try Pardes.init(gpa, .{ .cols = 80, .rows = 24, .file = "mise.toml", .image_allocator = gpa, .tree_sitter_allocator = gpa, .frame_allocator = gpa });
p.pump(.{}) catch {};
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
var line: [std.Io.Dir.max_path_bytes + 16]u8 = undefined;
p.update(.{ .command = try lookAt(&line, "build.zig.zon") });
p.update(.{ .command = "Del" });
diff --git a/core/root.zig b/core/root.zig
index a4adf7b1..c086e987 100644
--- a/core/root.zig
+++ b/core/root.zig
@@ -93,6 +93,7 @@ pub const bindings = @import("bindings.zig");
pub const TagState = @import("TagState.zig");
pub const Band = @import("Band.zig");
pub const Pick = @import("Pick.zig");
+pub const Prompt = @import("Prompt.zig");
pub const Addon = @import("Addon.zig");
pub const dump = @import("dump.zig");
pub const lsp = @import("lsp/lsp.zig");
@@ -143,11 +144,15 @@ pub const TagKind = Layer.Kind;
/// too long for its width.
pub const MAX_TAG_ROWS = 8;
/// Panes, then columns, then the workspace bar, then each pane's notice
-/// bands: a band to a tag, however many lines it has; then each pane's
-/// rows unrolled under its tag (Band.zig).
-pub const MAX_TAG_LAYERS = BAND_LAYER_BASE + MAX_PANES;
-pub const NOTICE_LAYER_BASE = MAX_PANES + MAX_COLS + 1;
-pub const BAND_LAYER_BASE = NOTICE_LAYER_BASE + MAX_PANES * Pane.Notices.max;
+/// bands: a band to a tag, however many lines it has; then the rows
+/// unrolled under the one tag out of rest (Band.zig: a view has one, the
+/// keyboard's, SPEC §3.4). A frame makes many a temporary Surface, each
+/// with every layer: a layer to a pane here cost every frame 0.9%.
+pub const MAX_TAG_LAYERS = BAND_LAYER + 1;
+/// The notice row's layer, after the workspace tag's.
+pub const NOTICE_ROW_LAYER = MAX_PANES + MAX_COLS + 1;
+pub const NOTICE_LAYER_BASE = MAX_PANES + MAX_COLS + 2;
+pub const BAND_LAYER = NOTICE_LAYER_BASE + MAX_PANES * Pane.Notices.max;
/// Columns a session holds (each costs about 8 KB of state, a column tag
/// being most of it).
pub const MAX_COLS = 16;
@@ -417,6 +422,7 @@ test {
_ = @import("Band.zig");
_ = @import("Pick.zig");
_ = @import("Field.zig");
+ _ = @import("Prompt.zig");
_ = @import("Effect.zig");
_ = @import("tape.zig");
_ = @import("replica.zig");
@@ -636,7 +642,7 @@ const machine_lines = [_]struct { []const u8, usize, []const u8 }{
.{ "FrameStats.zig", 7, "a frame's clock and log: frames are local, never digested" },
.{ "Handover.zig", 29, "a window carried to another process over a socket: the session's host" },
.{ "Kind.zig", 1, "host_io's KindJob: a kind's job is the host's" },
- .{ "Messages.zig", 6, "the message clock, read through tape.value(.clock); PARDES_NOTIME, the tests', read by a host's `stamp` alone (between steps, or in a host's call), whose text the tape carries in the setMessage it makes: never a step's" },
+ .{ "Messages.zig", 4, "PARDES_NOTIME, the tests', and the time of day, read by a host's `stamp` alone (between steps, or in a host's call), whose text the tape carries in the setMessage it makes: never a step's" },
.{ "Output.zig", 2, "the fonts module (Fonts lists them under tape.site(.fonts)) and the build's version line" },
.{ "Stream.zig", 14, "the disk search's worker: it runs off the step and its batches are inputs" },
.{ "builtins.zig", 2, "Mount's probe (tape.site(.probe)) and Term's shell check (tape.site(.shell))" },
@@ -761,6 +767,7 @@ const kept_out = [_]struct { []const u8, []const u8, []const u8 }{
.{ "Core.zig", "shell_rows", "a terminal's rows as read here, swept at every update; the terminal's own digest covers its active area, not its history (Term.zig `calls`)" },
.{ "Core.zig", "diff_output locations_cache tty_filter_palette body_chrome", "caches of pure functions of their key (a text, a theme): a step finds what it would make; a query row's colours from them are out of its digest (locations.Row.digest), and what a step asks a worker to paint is never decided by them (Stream.paintRows)" },
.{ "Core.zig", "retired_panes", "panes torn down this step, freed at its end" },
+ .{ "Core.zig", "theme_preview preview_chrome", "a themes picker's preview (colors.previewTheme): made from the live picker's cursor, in the digest with it, after every step (Pick.produceAll) and gone at its roll-up; a step reading a theme meanwhile reads the one its own state previews" },
.{ "Core.zig", "multi_first multi_stop multi_index multi_count exec_depth exec_column", "a step's own: set by a key's replay across the ranges (normal.replaySels) and a word's run (exec.zig), each put back before the step ends; between steps what `init` makes, so a load takes them as it makes them (a dump's said 2^30 ranges once: a yank sized its register by it)" },
.{ "Core.zig", "rects col_x col_w", "a view's geometry: the layout pass's (layout.compute) over its columns and screen, at every sync and resize, and at a load (dump.afterLoad); never read before it" },
.{ "Core.zig", "distrusted frames tape", "Options: the client's own list, its runner's statistics, its tape" },
@@ -768,6 +775,8 @@ const kept_out = [_]struct { []const u8, []const u8, []const u8 }{
.{ "panes.zig", "pv pv_known", "the views' shares as this process parks them (views.zig)" },
.{ "panes.zig", "wrap_line wrap_col wrap_pad wrap_n body_wrapped context_rows body_rows body_visible_rows context_row_limit geometry_key geometry_len top_skip", "File.geometry's, made by whoever asks first (a frame or a step) from everything its key hashes of the step's state (the tab's width too); top_skip, keyed by the geometry it is of, read only through File.topSkip, which walks one of another key again" },
.{ "panes.zig views.zig", "notices", "made again from the step's state at the top of update and presented, and at sync (Messages.collectNotices); a frame's are its own" },
+ .{ "panes.zig", "ghost_at", "where a message's detail is drawn under the caret's line (Messages.detailUnder), made again from the step's state with the notices (Messages.collectNotices: at the top of update, presented, sync, place); a frame's are its own" },
+ .{ "panes.zig", "ghost_rows", "the detail's rows there, made again with ghost_at" },
.{ "panes.zig views.zig", "band_rows", "the band's rows under a tag (Band.takes), made again from the view's tag state at every sync before anything reads them (layout.floorRows reads the last sync's, as it reads tag_rows)" },
.{ "panes.zig views.zig", "pan", "written by steps only (sync, a view unparked) from the pane and its terminal" },
.{ "File.zig", "cap line_starts line_cap widest", "the text's line index, of its bytes, and the widest line it found (an upper bound: which walk answers, never what)" },
diff --git a/core/surface.zig b/core/surface.zig
index 98696721..7c04a387 100644
--- a/core/surface.zig
+++ b/core/surface.zig
@@ -98,6 +98,9 @@ pub const Region = struct {
column_grip,
column_tag,
workspace_tag,
+ /// The row at the window's foot that indexes the live messages
+ /// (Messages.noticeRow).
+ notice_row,
/// A column below the workspace tag, its bar and panes: its left
/// edge is the spine a pixel shell rules down it.
column,
diff --git a/core/syntax.zig b/core/syntax.zig
index 08ea1fb4..a388573b 100644
--- a/core/syntax.zig
+++ b/core/syntax.zig
@@ -566,7 +566,7 @@ pub fn objectAt(path: []const u8, tree_ptr: *anyopaque, text: []const u8, object
/// `]f`/`[f` and kin: the next object starting after byte `at`, or the
/// previous one ending before it (helix goto_treesitter_object), from the
/// first of `.movement`, `.around`, `.inside` the query names.
-pub fn objectNext(path: []const u8, tree_ptr: *anyopaque, text: []const u8, object: Object, forward: bool, at: usize) ?Span {
+pub fn objectNext(path: []const u8, tree_ptr: *anyopaque, text: []const u8, object: Object, forward: bool, at: usize, within: ?[2]usize) ?Span {
const q = objectQuery(path) orelse return null;
var buf: [32]u8 = undefined;
const capture = for ([_][]const u8{ "movement", "around", "inside" }) |kind| {
@@ -576,6 +576,9 @@ pub fn objectNext(path: []const u8, tree_ptr: *anyopaque, text: []const u8, obje
const tree: *const ts.Tree = @ptrCast(@alignCast(tree_ptr));
const cursor = ts.QueryCursor.create();
defer cursor.destroy();
+ // Only the objects these bytes hold (a body's rows shown): its painted
+ // targets (body_layer.paintTargets).
+ if (within) |w| cursor.setByteRange(@intCast(w[0]), @intCast(w[1])) catch return null;
cursor.exec(q, tree.rootNode());
var best: ?Span = null;
while (cursor.nextMatch()) |match| {
diff --git a/core/tagline.zig b/core/tagline.zig
index 78d5a256..e95d68de 100644
--- a/core/tagline.zig
+++ b/core/tagline.zig
@@ -163,11 +163,12 @@ pub fn pathPrefix(p: *const Pardes, arena: std.mem.Allocator, pane: *Pane) ![]co
// Its walk's back steps before the name, its forward steps after
// it (Trail.zig), in the room `bytes` measures them.
const keep_word = if (keep) " Keep" else "";
- const room = try arena.alloc(u8, pane.trail.bytes(.back) + name.len + pane.trail.bytes(.forward) + keep_word.len);
+ const whole = pardes.Trail.folded(p, pane);
+ const room = try arena.alloc(u8, pane.trail.bytes(.back, whole) + name.len + pane.trail.bytes(.forward, whole) + keep_word.len);
var w: std.Io.Writer = .fixed(room);
- pane.trail.write(.back, &w) catch return error.OutOfMemory;
+ pane.trail.write(.back, whole, &w) catch return error.OutOfMemory;
w.writeAll(name) catch return error.OutOfMemory;
- pane.trail.write(.forward, &w) catch return error.OutOfMemory;
+ pane.trail.write(.forward, whole, &w) catch return error.OutOfMemory;
w.writeAll(keep_word) catch return error.OutOfMemory;
return w.buffered();
}
@@ -183,17 +184,29 @@ pub fn pathPrefix(p: *const Pardes, arena: std.mem.Allocator, pane: *Pane) ![]co
}
/// Where a file's name starts in its tag: after its walk's back steps.
-pub fn nameAt(pane: *const Pane) usize {
- return if (pane.file != null and pane.trail.n > 0) pane.trail.bytes(.back) else 0;
+pub fn nameAt(p: *const Pardes, pane: *const Pane) usize {
+ return if (pane.file != null and pane.trail.n > 0) pane.trail.bytes(.back, pardes.Trail.folded(p, pane)) else 0;
}
/// The bytes of a file's tag its walk's forward steps take, after its name.
-pub fn forwardSpan(pane: *const Pane) [2]usize {
+pub fn forwardSpan(p: *const Pardes, pane: *const Pane) [2]usize {
const f = pane.file orelse return .{ 0, 0 };
if (pane.trail.n == 0) return .{ 0, 0 };
+ const whole = pardes.Trail.folded(p, pane);
const name = if (pane.prompt == .name) pane.input.own orelse f.path else f.path;
- const lo = pane.trail.bytes(.back) + name.len;
- return .{ lo, lo + pane.trail.bytes(.forward) };
+ const lo = pane.trail.bytes(.back, whole) + name.len;
+ return .{ lo, lo + pane.trail.bytes(.forward, whole) };
+}
+
+/// The step of pane `pane`'s walk whose word is at byte `at` of its tag's
+/// text, if one is there.
+pub fn trailAt(p: *const Pardes, pane: *const Pane, at: usize) ?u8 {
+ if (pane.trail.n == 0 or pane.file == null) return null;
+ const whole = pardes.Trail.folded(p, pane);
+ const ahead = forwardSpan(p, pane);
+ if (at < nameAt(p, pane)) return pane.trail.stepAt(.back, whole, at);
+ if (at >= ahead[0] and at < ahead[1]) return pane.trail.stepAt(.forward, whole, at - ahead[0]);
+ return null;
}
/// A click at shown row `row`, display column `col` of pane `id`'s tag on
@@ -201,15 +214,9 @@ pub fn forwardSpan(pane: *const Pane) [2]usize {
/// (Trail.zig, pick-ui SPEC §6.3). True when it was on one.
pub fn trailClick(p: *Pardes, id: usize, row: usize, col: usize, run: bool) bool {
const pane = p.panes[id] orelse return false;
- if (pane.trail.n == 0 or pane.file == null) return false;
const at = tagOffsetAt(p, pane, row, col) orelse return false;
if (at.row != 0) return false;
- const lead = nameAt(pane);
- const ahead = forwardSpan(pane);
- const step = if (at.col < lead)
- pane.trail.stepAt(.back, at.col)
- else if (at.col >= ahead[0] and at.col < ahead[1]) pane.trail.stepAt(.forward, at.col - ahead[0]) else null;
- const i = step orelse return false;
+ const i = trailAt(p, pane, at.col) orelse return false;
if (run) pardes.Trail.execStep(p, id, i) else pardes.Trail.lookStep(p, id, i);
return true;
}
@@ -402,14 +409,15 @@ pub fn tagOffsetAt(p: *Pardes, pane: *Pane, row: usize, col: usize) ?modal.Curso
/// The display column in the name a click drafts at display column `col`
/// of the tag's shown row `row`: on a saving file's path, after its walk's
/// words; null off it.
-pub fn onName(tab: u16, pane: *Pane, row: usize, col: usize) ?usize {
+pub fn onName(p: *const Pardes, pane: *Pane, row: usize, col: usize) ?usize {
+ const tab = p.settings.tab;
if (row + pane.tag_top != 0) return null;
const f = pane.file orelse return null;
if (!panes.Output.fileTraits(f.output).saves) return null;
const name = if (pane.prompt == .name) pane.input.own orelse f.path else f.path;
var room: [pardes.Trail.max_steps * (pardes.Trail.max_text + 32)]u8 = undefined;
var w: std.Io.Writer = .fixed(&room);
- pane.trail.write(.back, &w) catch return null;
+ pane.trail.write(.back, pardes.Trail.folded(p, pane), &w) catch return null;
const lead = panes.File.displayWidth(tab, w.buffered());
if (col < lead or col >= lead + panes.File.displayWidth(tab, name)) return null;
return col - lead;
@@ -424,8 +432,8 @@ pub fn typedIntoName(p: *Pardes, pane: *Pane, key: pardes.Key) bool {
if (!panes.Output.fileTraits(f.output).saves or pane.tag.cur_row != 0) return false;
// The name starts after its walk's words.
const col: usize = @intCast(@max(0, pane.tag.cur_col));
- if (col < nameAt(pane)) return false;
- const at = col - nameAt(pane);
+ if (col < nameAt(p, pane)) return false;
+ const at = col - nameAt(p, pane);
const back = key.cp == pardes.Key.backspace or pardes.hit(key, config.insert_backspace_alias);
const forward = key.cp == pardes.Key.delete or pardes.hit(key, config.insert_delete_alias);
const typed = key.text.len > 0 and !key.ctrl and !key.alt;
diff --git a/dev/Inbox.zig b/dev/Inbox.zig
index 1df516cb..bc7c7e8a 100644
--- a/dev/Inbox.zig
+++ b/dev/Inbox.zig
@@ -354,7 +354,8 @@ pub fn land(q: *Inbox, core: *pardes.Pardes, m: Msg) void {
},
.lsp_status => |text| {
var mbuf: [256]u8 = undefined;
- core.setStatus(.at(core.view().active), pardes.Messages.Message.stamp(&mbuf, "lsp", text));
+ // A server's progress, of no pane: the workspace tag's.
+ core.setStatus(.at(pardes.MAX_PANES), pardes.Messages.Message.stamp(&mbuf, "lsp", text));
q.lsp_allocator.free(text);
},
.pipe => |response_value| {
diff --git a/dev/file_watch.zig b/dev/file_watch.zig
index d97e1d3d..74cde864 100644
--- a/dev/file_watch.zig
+++ b/dev/file_watch.zig
@@ -830,7 +830,7 @@ test "a Zerox twin's save wakes its other twin's watch, which says nothing: thei
try tmp.dir.writeFile(io, .{ .sub_path = "twinned", .data = "after\n" });
_ = reloadPane(core, io, &watches, twin, true);
const other = core.panes[twin].?;
- try std.testing.expect(std.mem.indexOf(u8, other.msg[0..other.msg_len], "reloaded") == null);
+ try std.testing.expect(std.mem.indexOf(u8, core.messages.saidBy(other), "reloaded") == null);
try std.testing.expectEqualStrings("after\n", other.file.?.content);
}
diff --git a/dev/gui/gui.zig b/dev/gui/gui.zig
index bc831a69..923db181 100644
--- a/dev/gui/gui.zig
+++ b/dev/gui/gui.zig
@@ -2827,14 +2827,9 @@ fn waitInput(ctx: ?*anyopaque, timeout_ms: u32) void {
/// Detached: no window, asleep until the queue's wake (an SDL user event:
/// a pty's output, the daemon's window request), the core's next wake, or a
-/// quit (SDL makes SIGTERM and SIGINT one). With nobody to dismiss them,
-/// messages go on the clock (the pump's, after this wait), which wakes it.
+/// quit (SDL makes SIGTERM and SIGINT one).
fn waitDetached(core: *pardes.Pardes, timeout_ms: u32) void {
- var ms: c_int = if (timeout_ms != 0) @intCast(@min(timeout_ms, std.math.maxInt(c_int))) else -1;
- for (core.panes) |slot| if (slot) |pane| if (pane.msg_len > 0) {
- ms = if (ms < 0) 100 else @min(ms, 100);
- break;
- };
+ const ms: c_int = if (timeout_ms != 0) @intCast(@min(timeout_ms, std.math.maxInt(c_int))) else -1;
var sev = std.mem.zeroes(c.SDL_Event);
pardes.turn.rest();
var got = c.SDL_WaitEventTimeout(&sev, ms);
@@ -4982,7 +4977,7 @@ fn buildDecor(g: *Gui, gpa: std.mem.Allocator, surface: *const pardes.Surface, g
// A tag on the last row runs on through the pixels under the grid.
const grid_bottom = @as(f32, @floatFromInt(surface.rows)) * layout.h;
const tag_last = for (regions) |region| switch (region.kind) {
- .grip, .tag, .column_grip, .column_tag, .workspace_tag => if (region.rect.h != 0 and region.rect.y + region.rect.h == surface.rows) break true,
+ .grip, .tag, .column_grip, .column_tag, .workspace_tag, .notice_row => if (region.rect.h != 0 and region.rect.y + region.rect.h == surface.rows) break true,
else => {},
} else false;
if (grid_bottom < win_h and tag_last) try addDecor(g, gpa, 0, grid_bottom, win_w, win_h, chrome.tag_bg, 1, win_w, win_h);
@@ -6341,7 +6336,7 @@ test "background opacity acknowledges success and rolls back unsupported surface
try std.testing.expectEqual(applied, core.settings.window_opacity);
try std.testing.expect(!core.settings.window_opacity_pending);
const pane = core.panes[0].?;
- try std.testing.expectEqualStrings("WindowOpacity: background transparency requires an alpha-capable SDL window", pane.msg[0..pane.msg_len]);
+ try std.testing.expectEqualStrings("WindowOpacity: background transparency requires an alpha-capable SDL window", core.messages.saidBy(pane));
try std.testing.expect(core.executeBuiltinLine(0, "WindowOpacity 40"));
try std.testing.expect(core.settings.window_opacity_pending);
diff --git a/dev/tui/tui.zig b/dev/tui/tui.zig
index 44f931b6..542ef59a 100644
--- a/dev/tui/tui.zig
+++ b/dev/tui/tui.zig
@@ -1487,14 +1487,6 @@ const Shell = struct {
// a time while they move: on a virtual clock a millisecond's wait
// moves it a frame (waitOnce), on the real one the pace below sets it.
if (s.moving()) wait = 1;
- // Detached, nobody's key dismisses a message: they go on the clock
- // (the pump's, after this wait), which wakes it.
- if (s.detached()) {
- for (s.core.panes) |slot| if (slot) |pane| if (pane.msg_len > 0) {
- wait = if (wait == 0) 100 else @min(wait, 100);
- break;
- };
- }
const paced = s.test_clock == null and s.moving();
var tick: u64 = 0;
if (paced) {
@@ -2577,9 +2569,9 @@ test "a bracketed paste past the paste limit is cut and said, and a reply droppe
const paste = [_]Msg{ .paste_start, .{ .key_press = .{ .codepoint = 'x', .text = big } }, .{ .key_press = .{ .codepoint = 'y', .text = "y" } }, .paste_end };
for (paste) |ev| _ = shell.apply(ev);
try std.testing.expectEqual(max_paste_bytes, pane.file.?.content.len);
- try std.testing.expect(std.mem.indexOf(u8, pane.msg[0..pane.msg_len], "paste cut") != null);
+ try std.testing.expect(std.mem.indexOf(u8, core.messages.saidBy(pane), "paste cut") != null);
_ = shell.apply(.reply_dropped);
- try std.testing.expectEqualStrings(reply_dropped_words, pane.msg[0..pane.msg_len]);
+ try std.testing.expectEqualStrings(reply_dropped_words, core.messages.saidBy(pane));
}
test "terminal input split at every byte with a gap reads as it does whole" {
diff --git a/docs/typ/builtins-gui.json b/docs/typ/builtins-gui.json
index 28b824f9..6466a845 100644
--- a/docs/typ/builtins-gui.json
+++ b/docs/typ/builtins-gui.json
@@ -59,6 +59,7 @@
{"name": "Jumplist", "leader": "SPC j l", "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "List the places jumped from in a +Jumps, each a place to go.", "text": "List the places jumped from in a +Jumps, each a place to go."},
{"name": "Jumps", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "walk, new-pane", "doc": "A jump steps its pane or that pane's reader (walk), or opens a pane for each file (new-pane).", "text": "A jump steps its pane or that pane's reader (walk), or opens a pane for each file (new-pane)."},
{"name": "Keep", "leader": "SPC j k", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Keep this pane: a reading pane, which a jump steps, is held from now on.", "text": "Keep this pane: a reading pane, which a jump steps, is held from now on.\nIts walk leaves its tag (its places, its owner): the next jump from its owner makes a new reader. Editing a reading pane keeps it too."},
+ {"name": "Keys", "leader": "SPC h k", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Show what a key sequence runs: the next keys typed are replayed in the tag.", "text": "Show what a key sequence runs: the next keys typed are replayed in the tag.\nThe tag shows `Keys` and the keys as they are typed; a sequence that reaches a leaf unrolls its level under the tag with the leaf on the cursor and its documentation beside it, and Enter runs it. Every root answers: SPC, g, m, z, Z, [, ], window mode's C-w. A sequence nothing is bound to is shown struck, `runs nothing`. Esc leaves it."},
{"name": "Kill", "leader": null, "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "Stop the commands pardes started that are still running.", "text": "Stop the commands pardes started that are still running.\nThey are the lines pardes typed into a terminal (from an exec, a middle click, a pty/run) and its command panes. Bare, every one; `Kill make ls`, those whose line starts with one of the words. Each gets SIGTERM: a command pane's whole command, a terminal's foreground job, never its shell, which stays."},
{"name": "Last", "leader": "SPC j j", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Go back to the last place jumped from in another pane.", "text": "Go back to the last place jumped from in another pane.\nWith none, to the pane beside this one."},
{"name": "Left", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Move the keyboard to the pane, or column tag, to the left.", "text": "Move the keyboard to the pane, or column tag, to the left."},
@@ -68,8 +69,9 @@
{"name": "LookPrev", "leader": "SPC j p", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Select the previous thing a Look would open, as LookNext walks forward.", "text": "Select the previous thing a Look would open, as LookNext walks forward.\nEnter opens what it selected."},
{"name": "Lspinfo", "leader": "SPC l i", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Show which index and language server serve this file, and their state, in a +Lsp.", "text": "Show which index and language server serve this file, and their state, in a +Lsp.\nThe index.scip it asks (or the Index that would write one), its server and the server's state (not started yet, failed and waiting to retry), and what answered each query lately."},
{"name": "Lspwhy", "leader": "SPC l w", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Explain, step by step in a +Lsp, how the last language server request was answered.", "text": "Explain, step by step in a +Lsp, how the last language server request was answered."},
- {"name": "MessageLinger", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "How long, in milliseconds, a message stays after what dismisses it.", "text": "How long, in milliseconds, a message stays after what dismisses it."},
- {"name": "Messages", "leader": "SPC h m", "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Show the messages said so far in a +Messages.", "text": "Show the messages said so far in a +Messages."},
+ {"name": "Message", "leader": "SPC e", "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Act on the message the notice row leads with.", "text": "Act on the message the notice row leads with.\nAn error that names places lands them as a list in the pane's walk, n and N walking them (where jumps do not walk, a +Search the Look walk steps through); a question takes the keyboard in its pane's tag (its answer's key answers it, Esc leaves it waiting); anything else opens the history."},
+ {"name": "MessageLinger", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "How long, in milliseconds, an echo or a notice stays bright before it dims; a warning twice as long.", "text": "How long, in milliseconds, an echo or a notice stays bright before it dims; a warning twice as long."},
+ {"name": "Messages", "leader": "SPC h m", "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Show the messages said so far, the newest first, an error's places under it.", "text": "Show the messages said so far, the newest first, an error's places under it.\nWhere jumps walk, a list in the pane's tag: Enter Looks a row (a message's cause, a place), C-q keeps it as a +Messages; else the +Messages."},
{"name": "Mini", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Map a file of this pane's directory in braille dots: `Mini notes.txt`.", "text": "Map a file of this pane's directory in braille dots: `Mini notes.txt`.\nA pane of its own, drawn once: a Mini of the same file again draws it anew."},
{"name": "Mode", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Step this pane to its next input mode: normal, insert, and in a terminal raw.", "text": "Step this pane to its next input mode: normal, insert, and in a terminal raw.\nFrom the last it goes back to normal. The keyboard goes to the pane's text."},
{"name": "More", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Let a query pane's Grep stopped at its 2000 lines go on for 2000 more.", "text": "Let a query pane's Grep stopped at its 2000 lines go on for 2000 more."},
diff --git a/docs/typ/builtins-tui.json b/docs/typ/builtins-tui.json
index cace0988..70d7c73d 100644
--- a/docs/typ/builtins-tui.json
+++ b/docs/typ/builtins-tui.json
@@ -65,8 +65,9 @@
{"name": "LookPrev", "leader": "SPC j p", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Select the previous thing a Look would open, as LookNext walks forward.", "text": "Select the previous thing a Look would open, as LookNext walks forward.\nEnter opens what it selected."},
{"name": "Lspinfo", "leader": "SPC l i", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Show which index and language server serve this file, and their state, in a +Lsp.", "text": "Show which index and language server serve this file, and their state, in a +Lsp.\nThe index.scip it asks (or the Index that would write one), its server and the server's state (not started yet, failed and waiting to retry), and what answered each query lately."},
{"name": "Lspwhy", "leader": "SPC l w", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Explain, step by step in a +Lsp, how the last language server request was answered.", "text": "Explain, step by step in a +Lsp, how the last language server request was answered."},
- {"name": "MessageLinger", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "How long, in milliseconds, a message stays after what dismisses it.", "text": "How long, in milliseconds, a message stays after what dismisses it."},
- {"name": "Messages", "leader": "SPC h m", "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Show the messages said so far in a +Messages.", "text": "Show the messages said so far in a +Messages."},
+ {"name": "Message", "leader": "SPC e", "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Act on the message the notice row leads with.", "text": "Act on the message the notice row leads with.\nAn error that names places lands them as a list in the pane's walk, n and N walking them (where jumps do not walk, a +Search the Look walk steps through); a question takes the keyboard in its pane's tag (its answer's key answers it, Esc leaves it waiting); anything else opens the history."},
+ {"name": "MessageLinger", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "How long, in milliseconds, an echo or a notice stays bright before it dims; a warning twice as long.", "text": "How long, in milliseconds, an echo or a notice stays bright before it dims; a warning twice as long."},
+ {"name": "Messages", "leader": "SPC h m", "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Show the messages said so far, the newest first, an error's places under it.", "text": "Show the messages said so far, the newest first, an error's places under it.\nWhere jumps walk, a list in the pane's tag: Enter Looks a row (a message's cause, a place), C-q keeps it as a +Messages; else the +Messages."},
{"name": "Mini", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Map a file of this pane's directory in braille dots: `Mini notes.txt`.", "text": "Map a file of this pane's directory in braille dots: `Mini notes.txt`.\nA pane of its own, drawn once: a Mini of the same file again draws it anew."},
{"name": "Mode", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Step this pane to its next input mode: normal, insert, and in a terminal raw.", "text": "Step this pane to its next input mode: normal, insert, and in a terminal raw.\nFrom the last it goes back to normal. The keyboard goes to the pane's text."},
{"name": "More", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Let a query pane's Grep stopped at its 2000 lines go on for 2000 more.", "text": "Let a query pane's Grep stopped at its 2000 lines go on for 2000 more."},
diff --git a/docs/typ/reference.typ b/docs/typ/reference.typ
index fac705c6..6b90fcdc 100644
--- a/docs/typ/reference.typ
+++ b/docs/typ/reference.typ
@@ -455,7 +455,7 @@ word clicked in a tag does. The same lines go in the startup file
[#word("Theme") `<name>`], [`orchard`; names as #word("Themes") lists them, #word("NextColor") steps to the next in that list (#doc("themes"))],
[#word("ThemeFile") `<path>`], [a `.zon` theme, relative to the config directory; reloads live when saved],
[#word("Verbose")], [on: a builtin announces its name on the message row],
- [#word("MessageLinger")], [800 milliseconds, at most 60000: how long a message stays after the key or click that dismisses it],
+ [#word("MessageLinger")], [4000 milliseconds, at most 60000: how long an echo or a notice stays bright on the notice row before it dims (a warning twice as long); it stays until the next message],
[#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`],
[#word("DumpDir") `<dir>`], [`$XDG_DATA_HOME/pardes`, else `~/.local/share/pardes`: the directory of the state file, `pardes.xitdb`, which keeps Recent and the dumps and which every session of the user shares (one that cannot be read as one is kept aside as `pardes.xitdb.broken` and a new one started); an absolute or `~` path to a directory that may be written (made if missing); a relative one, or one under a directory that may not be written, is refused; bare returns to the default],
[#word("TreeContext")], [off: sticky declaration headers in a source pane, in the tagline style (per pane, dumped)],
diff --git a/runtime/9p_io.zig b/runtime/9p_io.zig
index 50011690..7933f87d 100644
--- a/runtime/9p_io.zig
+++ b/runtime/9p_io.zig
@@ -2241,7 +2241,7 @@ test "a runtime directory that makes the socket's path pass sun_path is refused
// The session's own words, where its pane shows them; no listener.
try testing.expect(start(testing.io, testing.allocator, p) == null);
const pane = p.panes[0].?;
- try testing.expect(std.mem.startsWith(u8, pane.msg[0..pane.msg_len], "9p: the socket path is "));
+ try testing.expect(std.mem.startsWith(u8, p.messages.saidBy(pane), "9p: the socket path is "));
}
test "a runtime directory open to others is refused in words, never a silent session with no socket" {
@@ -2258,7 +2258,7 @@ test "a runtime directory open to others is refused in words, never a silent ses
try testing.expect(std.mem.indexOf(u8, words, "must be a directory of yours alone (mode 755") != null);
try testing.expect(start(testing.io, testing.allocator, p) == null);
const pane = p.panes[0].?;
- try testing.expect(std.mem.indexOf(u8, pane.msg[0..pane.msg_len], "chmod 700 it") != null);
+ try testing.expect(std.mem.indexOf(u8, p.messages.saidBy(pane), "chmod 700 it") != null);
try testing.expectEqual(@as(c_int, 0), libc.chmod(&rt.directory, 0o700));
try testing.expect(noSocket("x", &buf) == null);
}
diff --git a/runtime/macos.zig b/runtime/macos.zig
index 3221737a..ff30061a 100644
--- a/runtime/macos.zig
+++ b/runtime/macos.zig
@@ -818,7 +818,7 @@ fn drainInbox(st: *State) bool {
},
.lsp_status => |text| {
var mbuf: [256]u8 = undefined;
- st.core.setStatus(.at(st.core.view().active), message.stamp(&mbuf, "lsp", text));
+ st.core.setStatus(.at(pardes.MAX_PANES), message.stamp(&mbuf, "lsp", text));
},
.pipe => |value| {
st.core.update(.{ .pipe_resp = .{
diff --git a/runtime/upgrade.zig b/runtime/upgrade.zig
index 12163743..62f49ffa 100644
--- a/runtime/upgrade.zig
+++ b/runtime/upgrade.zig
@@ -479,16 +479,11 @@ pub fn load(gpa: std.mem.Allocator, core_gpa: std.mem.Allocator, opts: pardes.Op
}
}
-/// An Upgrade is the session's news, not the asking view's: said in every
-/// view at the pane its keyboard is on (each client reads it on its own
-/// screen), a pane two views are on once; the live view is only the one
-/// whose input came last before the dump.
+/// An Upgrade is the session's news, not the asking view's: said once, of
+/// no pane in particular, it is on every view's notice row (each client
+/// reads it on its own screen).
fn tellEveryView(p: *pardes.Pardes, text: []const u8) void {
- var told: [pardes.MAX_PANES]bool = @splat(false);
- for (p.views) |v| if (v) |view| if (!told[view.active]) {
- told[view.active] = true;
- p.setMessage(.at(view.active), text);
- };
+ _ = pardes.Messages.say(p, .notice, pardes.MAX_PANES, text);
}
test "an upgrade's outcome is said in every view, at the pane its keyboard is on, whichever view's input came last" {
@@ -514,7 +509,7 @@ test "an upgrade's outcome is said in every view, at the pane its keyboard is on
try std.testing.expect(q.views[0].?.active != q.views[k.index()].?.active);
}
-test "an upgrade's outcome waits in each view kept for its client until that client is back for it: no other view's key and no clock take it" {
+test "an upgrade's outcome stays on every view's notice row until something else is said: no key and no clock take it" {
const gpa = std.testing.allocator;
const p = try pardes.Pardes.init(gpa, .{ .tty_only = true });
defer p.deinit();
@@ -531,35 +526,24 @@ test "an upgrade's outcome waits in each view kept for its client until that cli
for (kept) |k| p.awayView(k);
const q = try upgradedForTest(gpa, p);
defer q.deinit();
- // As the daemon's tests run (MessageLinger 0): a dismissal is at once.
- q.settings.message_linger_ms = 0;
const key: pardes.Event = .{ .key = .{ .cp = 'j', .text = "j" } };
- // A key in the session's own view: its outcome goes, not theirs.
q.update(key);
- try std.testing.expect(!saysOutcome(q, q.live));
- for (kept) |k| try std.testing.expect(saysOutcome(q, k.index()));
- // Nobody attached: the clock takes nothing a kept view waits for.
q.unattended = true;
q.update(.tick);
- for (kept) |k| try std.testing.expect(saysOutcome(q, k.index()));
q.unattended = false;
- // A client back for its view has it (its join's dump); the next key,
- // anyone's, takes it.
try std.testing.expect(q.rejoinView(kept[0]));
- try std.testing.expect(saysOutcome(q, kept[0].index()));
q.update(key);
- try std.testing.expect(!saysOutcome(q, kept[0].index()));
- try std.testing.expect(saysOutcome(q, kept[1].index()));
- // One never back: once its view's kept time is up, as anyone's.
q.advance(q.views[kept[1].index()].?.away_ns + pardes.views.away_kept_ns);
- q.update(key);
- try std.testing.expect(!saysOutcome(q, kept[1].index()));
+ for (kept) |k| try std.testing.expect(saysOutcome(q, k.index()));
+ try std.testing.expect(saysOutcome(q, q.live));
}
-/// Whether view `k`'s keyboard pane says the Upgrade's outcome.
+/// Whether view `k`'s notice row says the Upgrade's outcome (every view
+/// has the session's one).
fn saysOutcome(q: *const pardes.Pardes, k: usize) bool {
- const pane = q.panes[q.views[k].?.active].?;
- return std.mem.startsWith(u8, pane.msg[0..pane.msg_len], "Upgrade: now pardes ");
+ if (q.views[k] == null) return false;
+ const said = q.messages.headline() orelse return false;
+ return std.mem.startsWith(u8, said.text.slice(), "Upgrade: now pardes ");
}
/// `p` dumped and loaded as an Upgrade's new process loads it (`load`).
@@ -648,5 +632,5 @@ test "an older build's dump named by a path past 4096 bytes is refused in words
defer q.deinit();
try std.testing.expect(rec.fresh);
const pane = q.panes[q.view().active].?;
- try std.testing.expect(std.mem.indexOf(u8, pane.msg[0..pane.msg_len], "Upgrade: no build could load the session") != null);
+ try std.testing.expect(std.mem.indexOf(u8, q.messages.saidBy(pane), "Upgrade: no build could load the session") != null);
}
diff --git a/test/behaviour/addons.zig b/test/behaviour/addons.zig
index 8b54de02..ce3c7b02 100644
--- a/test/behaviour/addons.zig
+++ b/test/behaviour/addons.zig
@@ -188,6 +188,8 @@ test "addons: the image addon opens the pictures a Look names, fitted, with the
test "addons: a plumbing rule to a loaded kind opens that kind's pane; to one not loaded, or with its kind gone, the look falls through to text" {
var s = try Session.initFile(std.testing.allocator, "x\n");
defer s.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try s.write("/ctl", "Jumps new-pane\n");
try load(&s, Session.image_addon);
var tmp = std.testing.tmpDir(.{});
defer tmp.cleanup();
diff --git a/test/behaviour/columns_and_tags.zig b/test/behaviour/columns_and_tags.zig
index d5820610..9abe64f4 100644
--- a/test/behaviour/columns_and_tags.zig
+++ b/test/behaviour/columns_and_tags.zig
@@ -22,6 +22,8 @@ test "columns-and-tags: a look after Newcol fills the empty column the keyboard
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();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try s.write("/ctl", "Jumps new-pane\n");
// Newcol makes an empty column and gives its tag the keyboard; no pane
// has it, so focus reads empty.
try s.write("/ctl", "Newcol\n");
@@ -166,6 +168,8 @@ test "columns-and-tags: New is a column tag's word, in no pane's tag nor the wor
test "columns-and-tags: a click past a column tag's text types after it, a newline typed there a space, and a long tag scrolls to its caret" {
var s = try Session.initFile(std.testing.allocator, "body\n");
defer s.deinit();
+ // A held pane (Keep): its tag as it was before the walk, no `Keep` word (SPEC §6.5).
+ try s.write(s.at("/pane/{d}/exec", .{try s.focused()}), "Keep\n");
const tag = s.at("/col/{d}/tag", .{try s.column(0)});
// Its row, then the pane's tag: the column's stays one row.
const rows = " New Term Find Grep Joincol Delcol";
diff --git a/test/behaviour/follow.zig b/test/behaviour/follow.zig
index 22c1c3d5..bf0141d2 100644
--- a/test/behaviour/follow.zig
+++ b/test/behaviour/follow.zig
@@ -172,6 +172,8 @@ test "follow: a collapsed page is passed over: the cursor past the page before i
test "follow: Unfollow leaves a twin with its own scroll and closes the chain up; Del of the head makes the next one head" {
var s = try init();
defer s.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try s.write("/ctl", "Jumps new-pane\n");
const head = try s.focused();
try s.write(s.at("/pane/{d}/exec", .{head}), "Follow\n");
const second = try newest(&s);
diff --git a/test/behaviour/keys.zig b/test/behaviour/keys.zig
index 78503dec..e02b1fa5 100644
--- a/test/behaviour/keys.zig
+++ b/test/behaviour/keys.zig
@@ -9,23 +9,27 @@ const window = "\x17"; // Ctrl-w
test "keys: a prompt's entry and cancellation leave the tag, the body and its cursor as they were" {
var s = try Session.initFile(std.testing.allocator, "one\ntwo\n");
defer s.deinit();
+ // A held pane (Keep): its tag as it was before the walk, no `Keep` word (SPEC §6.5).
+ try s.write(s.at("/pane/{d}/exec", .{try s.focused()}), "Keep\n");
const n = try s.focused();
const tag = s.at("/pane/{d}/tag", .{n});
const dot = s.at("/pane/{d}/dot", .{n});
try s.replace(tag, " keep");
for ([_]struct { keys: []const u8, shown: []const u8 }{
- .{ .keys = "s", .shown = " /zq" },
- .{ .keys = "|", .shown = " |zq" },
- .{ .keys = alt ++ "|", .shown = " |-zq" },
- .{ .keys = "!", .shown = " !zq" },
- .{ .keys = alt ++ "!", .shown = " !+zq" },
+ .{ .keys = "s", .shown = " s zq" },
+ .{ .keys = "|", .shown = " | zq" },
+ .{ .keys = alt ++ "|", .shown = " A-| zq" },
+ .{ .keys = "!", .shown = " ! zq" },
+ .{ .keys = alt ++ "!", .shown = " A-! zq" },
}) |case| {
try s.write(dot, "6 6");
try s.keys(case.keys);
- // The answer is typed into the prompt's own line, never the tag.
+ // The answer is typed into the tag's head (walk UI), shown in place
+ // of the tag's own text, which it never touches.
try s.keys("zq");
_ = try s.where(case.shown);
- try std.testing.expectEqualStrings("/test.txt keep", try s.read(tag));
+ const head = try s.read(tag);
+ try std.testing.expect(std.mem.startsWith(u8, head, "/test.txt") and std.mem.startsWith(u8, head["/test.txt".len..], case.shown));
try s.keys("\x1b");
try std.testing.expectError(error.NotOnScreen, s.where(case.shown));
try std.testing.expect(std.mem.endsWith(u8, try s.read(s.at("/pane/{d}/ctl", .{n})), " mode:normal "));
@@ -56,8 +60,8 @@ test "keys: a prompt opens whatever the tag already holds" {
try s.keys(key);
try s.keys("zq");
_ = try s.where("zq");
- try std.testing.expectEqualStrings(full, try s.read(tag));
try s.keys("\x1b");
+ try std.testing.expectEqualStrings(full, try s.read(tag));
}
}
@@ -108,6 +112,8 @@ test "keys: a count or a prefix a click or a change of pane cancels leaves nothi
errdefer std.debug.print("\nkeys={s} gesture={s}\n", .{ typed, @tagName(gesture) });
var s = try Session.initFile(std.testing.allocator, "abcdefghij\n");
defer s.deinit();
+ // A held pane (Keep): its tag as it was before the walk, no `Keep` word (SPEC §6.5).
+ try s.write(s.at("/pane/{d}/exec", .{try s.focused()}), "Keep\n");
const n = try s.focused();
try s.write("/ctl", "Newcol\n");
const other = try s.newPane();
@@ -353,6 +359,12 @@ 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 "));
}
+/// The screen as drawn, its notice row left out.
+fn panesShown(s: *Session) ![]const u8 {
+ const shown = try s.screen();
+ return shown[0 .. std.mem.lastIndexOfScalar(u8, shown, '\n') orelse shown.len];
+}
+
/// Screen row `row` as drawn.
fn screenRow(s: *Session, row: usize) ![]const u8 {
var rows = std.mem.splitScalar(u8, try s.screen(), '\n');
@@ -378,9 +390,9 @@ test "keys: a PDF in normal mode keeps : (its tag and back), SPC (a leader, canc
// The leader shows its key cell in the tag at once (walk UI) until a
// key the PDF takes, which takes the leader away.
try s.keys(" ");
- try std.testing.expect(std.mem.indexOf(u8, try s.screen(), " ␣ ") != null);
+ try std.testing.expect(std.mem.indexOf(u8, try panesShown(&s), " ␣ ") != null);
try s.keys("!");
- try std.testing.expect(std.mem.indexOf(u8, try s.screen(), " ␣ ") == null);
+ try std.testing.expect(std.mem.indexOf(u8, try panesShown(&s), " ␣ ") == null);
try s.keys("/");
try std.testing.expect(try s.cursor() != null);
try std.testing.expectEqual(n, try s.focused());
@@ -394,9 +406,11 @@ test "keys: zz and zc put the cursor's line in the middle row of an odd view, as
for (&lines, 0..) |*l, i| _ = try std.fmt.bufPrint(l, "l{d:0>2}\n", .{i});
var s = try Session.initFile(std.testing.allocator, std.mem.asBytes(&lines));
defer s.deinit();
+ s.resize(80, 25);
for ([_][]const u8{ "15jzz", "ztzc" }) |keys| {
try s.keys(keys);
- // 80x24 gives the pane 21 rows: l05 to l25, l15 the eleventh
+ // 80x25 gives the pane 21 rows (the notice row under it): l05 to
+ // l25, l15 the eleventh
const top = (try s.where("l05"))[1];
try std.testing.expectEqual(top + 10, (try s.where("l15"))[1]);
try std.testing.expectEqual(top + 20, (try s.where("l25"))[1]);
diff --git a/test/behaviour/language_servers.zig b/test/behaviour/language_servers.zig
index ab9585ed..904fcfba 100644
--- a/test/behaviour/language_servers.zig
+++ b/test/behaviour/language_servers.zig
@@ -200,6 +200,8 @@ test "language-servers: Symbols lists the file's definitions by name, a local's
defer tmp.cleanup();
var s = try Session.initLanguage(std.testing.allocator);
defer s.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try s.write("/ctl", "Jumps new-pane\n");
const main = try open(&s, &tmp, "4:13");
try s.write(s.at("/pane/{d}/look", .{main}), s.at("{s}/lib.rs\n", .{std.fs.path.dirname(std.mem.trimEnd(u8, try s.read(s.at("/pane/{d}/name", .{main})), "\n")).?}));
try s.write(s.at("/pane/{d}/ctl", .{try s.focused()}), "Symbols\n");
@@ -230,6 +232,8 @@ test "language-servers: what the index does not know, and a pane with unsaved ch
defer tmp.cleanup();
var s = try Session.initLanguage(std.testing.allocator);
defer s.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try s.write("/ctl", "Jumps new-pane\n");
// `mod`, which no occurrence covers: the scripted server's answer,
// lib.rs's second line.
const main = try open(&s, &tmp, "1:1");
@@ -249,6 +253,8 @@ test "language-servers: what the index does not know, and a pane with unsaved ch
test "language-servers: a real indexer's index answers too (rust-analyzer's, test/scipfixture), and Lspinfo says what it holds" {
var s = try Session.initLanguage(std.testing.allocator);
defer s.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try s.write("/ctl", "Jumps new-pane\n");
const main = try s.lookFile("test/scipfixture/main.rs:5:13");
try s.write(s.at("/pane/{d}/ctl", .{main}), "Hover\n");
try std.testing.expectEqualStrings("pub fn add(a: i32, b: i32) -> i32\n\nAdds two numbers.\n", try bodyOf(&s, "+Hover"));
diff --git a/test/behaviour/look_and_exec.zig b/test/behaviour/look_and_exec.zig
index 1bc4f040..a7de93cd 100644
--- a/test/behaviour/look_and_exec.zig
+++ b/test/behaviour/look_and_exec.zig
@@ -448,6 +448,8 @@ test "look-and-exec: a look opens spaced paths and locations without editing the
try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "two words.zig", .data = "first\nsecond\nthird\n" });
var s = try Session.initFile(std.testing.allocator, "source stays intact\n");
defer s.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try s.write("/ctl", "Jumps new-pane\n");
const path = s.at("{s}/two words.zig", .{try tmpPath(&s, &tmp)});
const source = try s.focused();
const ctl = try s.read(s.at("/pane/{d}/ctl", .{source}));
@@ -478,6 +480,8 @@ test "look-and-exec: a look opens spaced paths and locations without editing the
test "look-and-exec: a look validates the whole batch before opening virtual files" {
var s = try Session.initFile(std.testing.allocator, "source\n");
defer s.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try s.write("/ctl", "Jumps new-pane\n");
const source = try s.focused();
const look = s.at("/pane/{d}/look", .{source});
const index = try s.read("/index");
@@ -596,6 +600,8 @@ test "look-and-exec: a look line's trailing colon is dropped, and a look whose a
try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "a.txt", .data = "one\ntwo\nthree\n" });
var s = try Session.initFile(std.testing.allocator, "x\n");
defer s.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try s.write("/ctl", "Jumps new-pane\n");
const dir = try tmpPath(&s, &tmp);
const before = lines(try s.read("/index"));
// Failing addresses: nothing opened, the write still answered.
@@ -617,6 +623,8 @@ test "look-and-exec: a look that misses file:/re/ names the file, and is logged
try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "f.txt", .data = "alpha\n" });
var s = try Session.initFile(std.testing.allocator, "x\n");
defer s.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try s.write("/ctl", "Jumps new-pane\n");
const dir = try tmpPath(&s, &tmp);
const first = try s.focused();
try s.write("/look", s.at("{s}/f.txt\n", .{dir}));
@@ -631,6 +639,8 @@ test "look-and-exec: a look that goes to another pane leaves the looking pane's
try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "f.txt", .data = "f one\nf two\n" });
var s = try Session.initFile(std.testing.allocator, "alpha bravo\ncharlie\n");
defer s.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try s.write("/ctl", "Jumps new-pane\n");
const dir = try tmpPath(&s, &tmp);
const source = try s.focused();
const other = try s.newPane();
diff --git a/test/behaviour/modes.zig b/test/behaviour/modes.zig
index a50cfb0e..0f7c9d26 100644
--- a/test/behaviour/modes.zig
+++ b/test/behaviour/modes.zig
@@ -17,6 +17,8 @@ test "modes: Esc in normal mode alternates between two panes of the same kind" {
const at = dir[0..try tmp.dir.realPath(std.testing.io, &dir)];
var s = try Session.initFile(std.testing.allocator, "a\n");
defer s.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try s.write("/ctl", "Jumps new-pane\n");
const a = try s.focused();
try s.write("/look", s.at("{s}/b.txt\n", .{at}));
const b = try s.focused();
@@ -133,6 +135,8 @@ fn outlined(s: *Session, lit: []const u8, names: []const []const u8) ![]const u8
test "modes: Ctrl-w outlines a pane, h j k l move the outline, and Enter, Esc, : or a pane's letter gives it the keyboard" {
var s = try Session.initFile(std.testing.allocator, "left\n");
defer s.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try s.write("/ctl", "Jumps new-pane\n");
const a, const b, const c = try threePanes(&s);
const names = &[_][]const u8{ "/a.txt", "/b.txt", "/c.txt" };
try s.keys("\x17");
@@ -176,6 +180,8 @@ 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();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try s.write("/ctl", "Jumps new-pane\n");
const top = try s.focused();
try s.write(s.at("/pane/{d}/exec", .{top}), "New\n");
const mid = try s.focused();
diff --git a/test/behaviour/other_files.zig b/test/behaviour/other_files.zig
index bd8cbccd..b19ffa0f 100644
--- a/test/behaviour/other_files.zig
+++ b/test/behaviour/other_files.zig
@@ -124,6 +124,8 @@ test "other-files: a Jumplist entry is (closed) only while no pane has its file
try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "b.txt", .data = "two\n" });
var s = try Session.initFile(std.testing.allocator, "x\n");
defer s.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try s.write("/ctl", "Jumps new-pane\n");
const dir = try tmpPath(&s, &tmp);
try s.write("/look", s.at("{s}/a.txt\n", .{dir}));
const a = try s.focused();
@@ -157,6 +159,8 @@ test "other-files: a closed file is found again: Recent and /recent list it clos
try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "b.txt", .data = "bee\n" });
var s = try Session.initFile(std.testing.allocator, "x\n");
defer s.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try s.write("/ctl", "Jumps new-pane\n");
const dir = try tmpPath(&s, &tmp);
const a = s.at("{s}/a.txt", .{dir});
// Opened, its dot on line 3, then closed.
@@ -224,6 +228,8 @@ test "other-files: Back and Forward over a closed file's entries: one reopen is
try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "c.txt", .data = "sea\n" });
var s = try Session.initFile(std.testing.allocator, "x\n");
defer s.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try s.write("/ctl", "Jumps new-pane\n");
const dir = try tmpPath(&s, &tmp);
try s.write("/look", s.at("{s}/b.txt\n", .{dir}));
const b = try s.focused();
@@ -285,6 +291,8 @@ test "other-files: Back over a closed file deleted since skips it, says so, and
for ([_][]const u8{ "a.txt", "gone.txt", "c.txt" }) |name| try tmp.dir.writeFile(std.testing.io, .{ .sub_path = name, .data = "text\n" });
var s = try Session.initFile(std.testing.allocator, "x\n");
defer s.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try s.write("/ctl", "Jumps new-pane\n");
const dir = try tmpPath(&s, &tmp);
try s.write("/look", s.at("{s}/a.txt\n", .{dir}));
const a = try s.focused();
@@ -306,6 +314,8 @@ test "other-files: a remembered place is clamped to the file as it is now, its s
try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "c.txt", .data = "one\ntwo\nthree\nfour\nfive\n" });
var s = try Session.initFile(std.testing.allocator, "x\n");
defer s.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try s.write("/ctl", "Jumps new-pane\n");
const dir = try tmpPath(&s, &tmp);
try s.write("/look", s.at("{s}/c.txt:2\n", .{dir}));
const c = try s.focused();
diff --git a/test/behaviour/panes.zig b/test/behaviour/panes.zig
index 4d4c812c..96bae187 100644
--- a/test/behaviour/panes.zig
+++ b/test/behaviour/panes.zig
@@ -170,6 +170,8 @@ test "panes: a second lock is refused until the holder unlocks or closes, and bi
test "panes: an unsaved file's tag is its name alone, its dirty file says it is unsaved" {
var s = try Session.initFile(std.testing.allocator, "before\n");
defer s.deinit();
+ // A held pane (Keep): its tag as it was before the walk, no `Keep` word (SPEC §6.5).
+ try s.write(s.at("/pane/{d}/exec", .{try s.focused()}), "Keep\n");
const n = try s.focused();
const tag = s.at("/pane/{d}/tag", .{n});
const clean = try s.read(tag);
@@ -265,6 +267,8 @@ test "panes: a pane its whole text fits in never scrolls to keep a margin" {
const at = dir[0..try tmp.dir.realPath(std.testing.io, &dir)];
var s = try Session.initFile(std.testing.allocator, "one\ntwo\nthree\n");
defer s.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try s.write("/ctl", "Jumps new-pane\n");
const n = try s.focused();
// A second pane under it, as acme's placement puts one: right under the
// three lines, which leaves the file exactly three body rows.
diff --git a/test/behaviour/placement.zig b/test/behaviour/placement.zig
index 73d69883..467afd1b 100644
--- a/test/behaviour/placement.zig
+++ b/test/behaviour/placement.zig
@@ -10,6 +10,8 @@ test "placement: an empty active column takes the new pane whole, a look from an
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();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try s.write("/ctl", "Jumps new-pane\n");
const first = try s.focused();
// Its tag has the keyboard: it is the active column, and stays so
// when Esc gives the keyboard back.
@@ -31,6 +33,8 @@ fn tagRow(s: *Session, name: []const u8) !usize {
test "placement: New and 9P's new take the bottom half of the column's last pane" {
var s = try Session.initFile(std.testing.allocator, "x\n");
defer s.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try s.write("/ctl", "Jumps new-pane\n");
const first = try s.focused();
try s.write(s.at("/pane/{d}/exec", .{first}), "New\n");
const last = try s.focused();
@@ -69,7 +73,8 @@ test "placement: a look from a pane pane/new made after Delcol opens its file in
fn spans(s: *Session, comptime n: usize, names: [n][]const u8) ![n][2]usize {
var out: [n][2]usize = undefined;
for (names, 0..) |name, i| out[i][0] = try tagRow(s, name);
- const rows = std.mem.count(u8, try s.screen(), "\n") + 1;
+ // The last pane ends over the notice row.
+ const rows = std.mem.count(u8, try s.screen(), "\n");
for (0..n) |i| out[i][1] = (if (i + 1 < n) out[i + 1][0] else rows) - out[i][0];
return out;
}
@@ -82,6 +87,8 @@ test "placement: a look from a pane's text goes under its text when it has many
const at = dir[0..try tmp.dir.realPath(std.testing.io, &dir)];
var s = try Session.initFile(std.testing.allocator, "one\ntwo\nthree\n");
defer s.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try s.write("/ctl", "Jumps new-pane\n");
s.detach();
// Wide enough that a tag with the test's temporary path stays one row,
// wherever the checkout is.
@@ -116,6 +123,8 @@ test "placement: a look from the middle of a column splits only the pane it came
const at = dir[0..try tmp.dir.realPath(std.testing.io, &dir)];
var s = try Session.initFile(std.testing.allocator, "one\n");
defer s.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try s.write("/ctl", "Jumps new-pane\n");
s.detach();
try s.write("/ctl", "size 100 60\n");
const top = try s.focused();
@@ -131,8 +140,8 @@ test "placement: a look from the middle of a column splits only the pane it came
const names = [_][]const u8{ "/test.txt", "/mid", "/low", "/made" };
// The top and bottom panes dragged by their boxes to two and three
// rows, under a placement's minimum; the middle one full of text, so
- // the one halved.
- const rows = std.mem.count(u8, try s.screen(), "\n") + 1;
+ // the one halved. (The panes end over the notice row.)
+ const rows = std.mem.count(u8, try s.screen(), "\n");
const r = try spans(&s, 3, names[0..3].*);
try s.write("/mousein", s.at("m 0 {d} 1\nm 0 {d} 1\nm 0 {d} 0\n", .{ r[1][0], r[0][0] + 2, r[0][0] + 2 }));
try s.write("/mousein", s.at("m 0 {d} 1\nm 0 {d} 1\nm 0 {d} 0\n", .{ r[2][0], rows - 3, rows - 3 }));
diff --git a/test/behaviour/settings.zig b/test/behaviour/settings.zig
index a6e09f35..731d4c45 100644
--- a/test/behaviour/settings.zig
+++ b/test/behaviour/settings.zig
@@ -132,6 +132,8 @@ test "settings: Back and Forward written to exec keep to the focused file" {
const dir = buf[0..try tmp.dir.realPath(std.testing.io, &buf)];
var s = try Session.initFile(std.testing.allocator, "x\n");
defer s.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try s.write("/ctl", "Jumps new-pane\n");
// Each a look, as a user's jumps are: b1 a1 b40 a40 b80 a80.
for ([_][]const u8{ "b.txt:1", "a.txt:1", "b.txt:40", "a.txt:40", "b.txt:80", "a.txt:80" }) |place| try s.write("/look", s.at("{s}/{s}\n", .{ dir, place }));
const Step = struct { []const u8, []const u8, u32 };
diff --git a/test/behaviour/tags.zig b/test/behaviour/tags.zig
index 395b63c8..e4e4c04b 100644
--- a/test/behaviour/tags.zig
+++ b/test/behaviour/tags.zig
@@ -22,6 +22,8 @@ fn tagCol(s: *Session, path: []const u8) !usize {
test "tags: s and S in a tag answer for the tag's own text; / still searches the body" {
var s = try Session.initFile(std.testing.allocator, "Some body\n");
defer s.deinit();
+ // A held pane (Keep): its tag as it was before the walk, no `Keep` word (SPEC §6.5).
+ try s.write(s.at("/pane/{d}/exec", .{try s.focused()}), "Keep\n");
const n = try s.focused();
try s.replace(s.at("/pane/{d}/tag", .{n}), " Save Del Snarf");
// The tag's line, its S's selected, then changed: both are the tag's.
@@ -37,6 +39,8 @@ test "tags: s and S in a tag answer for the tag's own text; / still searches the
test "tags: ms and md edit a tag's own text, and the text the edit made is read back whole" {
var s = try Session.initFile(std.testing.allocator, "body\n");
defer s.deinit();
+ // A held pane (Keep): its tag as it was before the walk, no `Keep` word (SPEC §6.5).
+ try s.write(s.at("/pane/{d}/exec", .{try s.focused()}), "Keep\n");
const n = try s.focused();
try s.keys(":miwms(");
try std.testing.expectEqualStrings("/test.txt (Save) Term Collapse Follow Del", try tag(&s, n));
@@ -47,6 +51,8 @@ test "tags: ms and md edit a tag's own text, and the text the edit made is read
test "tags: the keyboard reaches a tag's path, which it can select and yank but not edit" {
var s = try Session.initFile(std.testing.allocator, "body\n");
defer s.deinit();
+ // A held pane (Keep): its tag as it was before the walk, no `Keep` word (SPEC §6.5).
+ try s.write(s.at("/pane/{d}/exec", .{try s.focused()}), "Keep\n");
const n = try s.focused();
const before = try tag(&s, n);
// `0` is the line's start, as in acme, where the name is ordinary text.
@@ -73,6 +79,8 @@ test "tags: the keyboard reaches a tag's path, which it can select and yank but
test "tags: a tag remembers its cursor, starts on Save, and a click moves it" {
var s = try Session.initFile(std.testing.allocator, "body\n");
defer s.deinit();
+ // A held pane (Keep): its tag as it was before the walk, no `Keep` word (SPEC §6.5).
+ try s.write(s.at("/pane/{d}/exec", .{try s.focused()}), "Keep\n");
const first = try s.focused();
try s.write("/ctl", "Newcol\n");
const second = try s.newPane();
@@ -133,6 +141,8 @@ test "tags: executing a word from the tag runs it and gives the keyboard back to
test "tags: a renamed path moves the tag's cursor with the text after it and a shorter tag pulls it back" {
var s = try Session.initFile(std.testing.allocator, "body\n");
defer s.deinit();
+ // A held pane (Keep): its tag as it was before the walk, no `Keep` word (SPEC §6.5).
+ try s.write(s.at("/pane/{d}/exec", .{try s.focused()}), "Keep\n");
const n = try s.focused();
try s.keys("::"); // on Save, and back
try s.write(s.at("/pane/{d}/name", .{n}), "/界.zig");
@@ -166,6 +176,8 @@ test "tags: window keys move between panes from a tag and each tag keeps its cur
test "tags: a tag's normal mode is the body's: motions stay in the tag and insert types into it" {
var s = try Session.initFile(std.testing.allocator, "body\n");
defer s.deinit();
+ // A held pane (Keep): its tag as it was before the walk, no `Keep` word (SPEC §6.5).
+ try s.write(s.at("/pane/{d}/exec", .{try s.focused()}), "Keep\n");
const first = try s.focused();
try s.write("/ctl", "Newcol\n");
const right_pane = try s.newPane();
@@ -189,6 +201,8 @@ test "tags: a tag's normal mode is the body's: motions stay in the tag and inser
test "tags: a tag with a newline in it is as tall as its lines, and each line is typed into and pointed at" {
var s = try Session.initFile(std.testing.allocator, "body\n");
defer s.deinit();
+ // A held pane (Keep): its tag as it was before the walk, no `Keep` word (SPEC §6.5).
+ try s.write(s.at("/pane/{d}/exec", .{try s.focused()}), "Keep\n");
const n = try s.focused();
// Insert mode in a tag is a body's: Enter is a new line.
try s.keys(":A\nSecond");
@@ -292,6 +306,8 @@ fn clickPathEnd(s: *Session, path: []const u8) !void {
test "tags: a name drafted in the tag commits with Enter, cancels with two Escs, and changes neither body nor tag text" {
var s = try Session.initFile(std.testing.allocator, "original body\n");
defer s.deinit();
+ // A held pane (Keep): its tag as it was before the walk, no `Keep` word (SPEC §6.5).
+ try s.write(s.at("/pane/{d}/exec", .{try s.focused()}), "Keep\n");
const n = try s.focused();
const name = s.at("/pane/{d}/name", .{n});
try s.write(s.at("/pane/{d}/tag", .{n}), " JumpTrail");
@@ -317,21 +333,25 @@ test "tags: a name drafted in the tag commits with Enter, cancels with two Escs,
test "tags: a drafted name's edits are by grapheme, and an empty one is not committed" {
var s = try Session.initFile(std.testing.allocator, "untouched\n");
defer s.deinit();
+ // A held pane (Keep): its tag as it was before the walk, no `Keep` word (SPEC §6.5).
+ try s.write(s.at("/pane/{d}/exec", .{try s.focused()}), "Keep\n");
const n = try s.focused();
try clickPathEnd(&s, "/test.txt");
try s.keys("\x15/café界\x08");
_ = try s.where("/café Save");
try s.keys("\x08");
_ = try s.where("/caf Save");
+ // (The tag, not the screen: the notice row says where the caret is.)
+ const tagfile = s.at("/pane/{d}/tag", .{n});
try s.keys("\x15\n");
- try std.testing.expectError(error.NotOnScreen, s.where("/test.txt"));
+ try std.testing.expect(std.mem.indexOf(u8, try s.read(tagfile), "/test.txt") == null);
try s.expect(s.at("/pane/{d}/name", .{n}), "/test.txt\n");
try s.expect(s.at("/pane/{d}/body", .{n}), "untouched\n");
// Esc keeps the draft pending; a second drops it.
try s.keys("\x1b");
- try std.testing.expectError(error.NotOnScreen, s.where("/test.txt"));
+ try std.testing.expect(std.mem.indexOf(u8, try s.read(tagfile), "/test.txt") == null);
try s.keys("\x1b");
- _ = try s.where("/test.txt");
+ try std.testing.expect(std.mem.indexOf(u8, try s.read(tagfile), "/test.txt") != null);
}
test "tags: leaving a pane or entering a header drops an uncommitted name" {
@@ -351,6 +371,8 @@ test "tags: leaving a pane or entering a header drops an uncommitted name" {
test "tags: middle clicking Save commits the drafted name before saving" {
var s = try Session.initFile(std.testing.allocator, "untouched\n");
defer s.deinit();
+ // A held pane (Keep): its tag as it was before the walk, no `Keep` word (SPEC §6.5).
+ try s.write(s.at("/pane/{d}/exec", .{try s.focused()}), "Keep\n");
const n = try s.focused();
try clickPathEnd(&s, "/test.txt");
try s.keys("\x15/renamed.txt");
@@ -427,6 +449,8 @@ test "tags: a pane's tag reads whole, its path first, and a write appends to its
test "tags: truncating a tag clears its own text, u in the tag undoes it, and > drops the one newline ending it" {
var s = try Session.initFile(std.testing.allocator, "x\n");
defer s.deinit();
+ // A held pane (Keep): its tag as it was before the walk, no `Keep` word (SPEC §6.5).
+ try s.write(s.at("/pane/{d}/exec", .{try s.focused()}), "Keep\n");
const n = try s.focused();
const path = s.at("/pane/{d}/tag", .{n});
try s.write(path, " Mine");
diff --git a/test/hxdiff.zig b/test/hxdiff.zig
index db858561..67b4e777 100644
--- a/test/hxdiff.zig
+++ b/test/hxdiff.zig
@@ -327,10 +327,11 @@ fn runCase(arena: std.mem.Allocator, case: Case, pane_kind: []const u8) !Result
const core = try pardes.Pardes.init(gpa, .{ .tty_only = true });
defer core.deinit();
// helix's harness runs at 80x24, a view of 22 text rows under its
- // status and command lines; pardes's chrome takes a row more, so 25
+ // status and command lines; pardes's chrome (the workspace and column
+ // tags, the pane's tag and the notice row) takes two rows more, so 26
// rows give its pane the same 22 that every page, half page and gb
// counts in
- core.update(.{ .resize = .{ .cols = 80, .rows = 25 } });
+ core.update(.{ .resize = .{ .cols = 80, .rows = 26 } });
pump(core);
if (std.mem.eql(u8, pane_kind, "file")) {
diff --git a/test/monkey9p.zig b/test/monkey9p.zig
index 1f213a3b..aaef1de6 100644
--- a/test/monkey9p.zig
+++ b/test/monkey9p.zig
@@ -1318,7 +1318,7 @@ fn oneFailureRule(c: *Ctx, a: Allocator, res: *Res) ?[]const u8 {
// is the host's news, said whenever it arrives: no write's.
var msgs: std.ArrayList([]const u8) = .empty;
for (occurrences(a, window, "msg")) |m| {
- if (std.mem.indexOf(u8, m, " deleted on disk (") != null or std.mem.indexOf(u8, m, " changed on disk (") != null or
+ if (std.mem.indexOf(u8, m, " deleted on disk (") != null or std.mem.indexOf(u8, m, " changed on disk") != null or
std.mem.indexOf(u8, m, " reloaded ") != null) continue;
msgs.append(a, m) catch oom();
}
diff --git a/test/panes.zig b/test/panes.zig
index fd974b6c..127043a2 100644
--- a/test/panes.zig
+++ b/test/panes.zig
@@ -1714,6 +1714,8 @@ const OutputTests = struct {
test "Callstack aligns source below locations and keeps exact emphasis and navigation" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 80, .rows = 30 });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
const source = " pub fn caller(\n value: u32,\n ) void {\n work(value);\n }\n";
const pane = try TreeContextTests.setZigFile(p, source);
const input = try std.fmt.allocPrint(p.gpa, "╰──┬ {s}:1:12-17 caller\n@callstack-match ╰─ {s}:4:9-12 work(value);\n", .{ pane.file.?.path, pane.file.?.path });
@@ -1755,6 +1757,8 @@ const OutputTests = struct {
test "Callstack signatures share unsaved tree context and keep guides out of Look selections" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 110, .rows = 30 });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
const source = "const Box = struct {\n" ++
" pub fn caller(\n" ++
" value: u32,\n" ++
@@ -1848,6 +1852,8 @@ const OutputTests = struct {
test "Locations context uses unsaved sources and navigation visits only matches" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 100, .rows = 30 });
defer p.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ p.settings.jumps = .@"new-pane";
p.locations_config.layout = .@"inline";
const source = "const Box = struct {\n" ++
" pub fn run() void {\n" ++
@@ -3030,7 +3036,7 @@ const TerminalTests = struct {
// background, and wraps the glyph to the next row. A head OWNS its column,
// so skipping it the way a tail is skipped left the row's final column bare.
for ([_]panes.Text.Mode{ .tty, .normal }) |mode| {
- const p = try Pardes.init(testing.allocator, .{ .startup_config = "Theme helix\n", .tty_only = true, .cols = 16, .rows = 8 });
+ const p = try Pardes.init(testing.allocator, .{ .startup_config = "Theme helix\n", .tty_only = true, .cols = 16, .rows = 9 });
defer p.deinit();
while (p.nextEffect()) |_| {}
const pane = p.panes[0].?;
@@ -3215,7 +3221,7 @@ const TerminalTests = struct {
test "an edit overlay never changes tty-mode ansi colors" {
const testing = std.testing;
- const p = try Pardes.init(testing.allocator, .{ .startup_config = "Theme helix\n", .tty_only = true, .cols = 18, .rows = 6 });
+ const p = try Pardes.init(testing.allocator, .{ .startup_config = "Theme helix\n", .tty_only = true, .cols = 18, .rows = 7 });
defer p.deinit();
while (p.nextEffect()) |_| {}
const pane = p.panes[0].?;
diff --git a/test/perf.zig b/test/perf.zig
index 16066e9f..8e622680 100644
--- a/test/perf.zig
+++ b/test/perf.zig
@@ -70,6 +70,31 @@ const Op = enum {
/// the window: a kind's frame costs its window's cells, never its
/// picture (docs: architecture §16.1, its trigger 5% of a frame).
image_frame,
+ /// The walk UI's tag states (TagState.zig), each key pumped and the
+ /// frame that draws it: SPC struck at rest, its level shown when its
+ /// delay is up, Esc back to rest (three frames, two keys).
+ spc,
+ /// A Down in SPC's unrolled level: its cursor a row on, the band drawn.
+ spc_down,
+ /// A character typed in Help's field and a Backspace: its rows
+ /// filtered again each time (two keys).
+ help_type,
+ /// describe-key's `g d` replayed: the level and the leaf's doc under the
+ /// tag (two keys).
+ describe,
+ /// `j` and `k` at rest in the same loop (two keys, two frames): what
+ /// the tag states' keys compare with (key-down's frames each draw
+ /// another place of the file).
+ rest_keys,
+
+ /// Run only when named (`--op`): a full run, its cells and the sums a
+ /// gate takes over them (perfops' "terminal on all") are as before.
+ fn named(o: Op) bool {
+ return switch (o) {
+ .spc, .spc_down, .help_type, .describe, .rest_keys => true,
+ else => false,
+ };
+ }
fn label(o: Op) []const u8 {
return switch (o) {
@@ -88,6 +113,11 @@ const Op = enum {
.body_appends => "body-appends",
.deep_selection => "deep-sel",
.image_frame => "image-frame",
+ .spc => "spc",
+ .spc_down => "spc-down",
+ .help_type => "help-type",
+ .describe => "describe",
+ .rest_keys => "rest-keys",
};
}
};
@@ -396,6 +426,8 @@ const Options = struct {
search: bool = false,
/// A picker's key and frame (`measurePick`).
pick: bool = false,
+ /// The walk UI's line F: registers, painted targets, themes (`measureWalkF`).
+ walkf: bool = false,
terminal_mib: ?usize = null,
/// The real binary's keystroke-to-present, `yes` stream and big open
/// (a tty pardes), or its keystrokes alone (a pardes-gui).
@@ -412,7 +444,7 @@ const Options = struct {
while (i < args.len) : (i += 1) {
const arg = args[i];
if (!std.mem.startsWith(u8, arg, "--")) return error.UnknownOption;
- const option = std.meta.stringToEnum(enum { json, creation, startup, mini, search, pick, @"terminal-mib", @"self-test", reps, cols, rows, base, only, op, @"max-ratio", live, @"live-gui" }, arg[2..]) orelse
+ const option = std.meta.stringToEnum(enum { json, creation, startup, mini, search, pick, walkf, @"terminal-mib", @"self-test", reps, cols, rows, base, only, op, @"max-ratio", live, @"live-gui" }, arg[2..]) orelse
return error.UnknownOption;
switch (option) {
.json => opts.json = true,
@@ -421,6 +453,7 @@ const Options = struct {
.mini => opts.mini = true,
.search => opts.search = true,
.pick => opts.pick = true,
+ .walkf => opts.walkf = true,
.@"self-test" => opts.self_test = true,
else => {
i += 1;
@@ -484,6 +517,7 @@ pub fn main(init: std.process.Init) !void {
if (opts.mini) return measureMini(init.io, init.gpa, reps, opts.json);
if (opts.search) return measureSearch(init.io);
if (opts.pick) return measurePick(init.io);
+ if (opts.walkf) return measureWalkF(init.io);
if (opts.live) |exe| return measureLive(init.io, exe, false, reps, opts.json);
if (opts.live_gui) |exe| return measureLive(init.io, exe, true, reps, opts.json);
// The image-frame cells load the image addon by the path the build baked
@@ -528,6 +562,7 @@ pub fn main(init: std.process.Init) !void {
for (fixtures, 0..) |fx, fi| {
if (only) |name| if (!std.mem.eql(u8, name, fx.name)) continue;
if (opts.op) |o| if (o != op) continue;
+ if (op.named() and opts.op == null) continue;
cells[oi][fi] = try measure(op, fx, paths[fi], bytes[fi], reps);
}
}
@@ -542,7 +577,7 @@ pub fn main(init: std.process.Init) !void {
}
}
- if (opts.json) try reportJson(init.io, &cells, &term_cells, &bytes, opts) else reportText(&cells, &term_cells, &bytes, reps, opts.base, base);
+ if (opts.json) try reportJson(init.io, &cells, &term_cells, &bytes, opts) else reportText(&cells, &term_cells, &bytes, reps, opts.op, opts.base, base);
if (opts.max_ratio) |ratio| try gate(&cells, &base.?, ratio);
}
@@ -587,6 +622,7 @@ fn measure(op: Op, fx: Fixture, path: []const u8, expected_bytes: usize, reps: u
switch (op) {
.image_frame => return measureImage(std.fs.path.dirname(path).?, samples, warmup),
.client_key_down, .client_edit_char, .client_delete_undo => return measureClient(op, path, reps),
+ .spc, .spc_down, .help_type, .describe, .rest_keys => return measureTag(op, path, reps),
else => {},
}
if (op == .open) {
@@ -641,7 +677,7 @@ fn measure(op: Op, fx: Fixture, path: []const u8, expected_bytes: usize, reps: u
const wheel_row = rect.y + pardes.BOX_H;
const t0 = nowNs();
switch (op) {
- .open, .image_frame, .client_key_down, .client_edit_char, .client_delete_undo => unreachable,
+ .open, .image_frame, .client_key_down, .client_edit_char, .client_delete_undo, .spc, .spc_down, .help_type, .describe, .rest_keys => unreachable,
.render, .deep_selection => {},
.key_down => core.update(.{ .key = .{ .cp = 'j', .text = "j" } }),
.key_right => core.update(.{ .key = .{ .cp = 'l', .text = "l" } }),
@@ -655,7 +691,7 @@ fn measure(op: Op, fx: Fixture, path: []const u8, expected_bytes: usize, reps: u
_ = try frame(core);
const dt = nowNs() -| t0;
switch (op) {
- .open, .image_frame, .client_key_down, .client_edit_char, .client_delete_undo => unreachable,
+ .open, .image_frame, .client_key_down, .client_edit_char, .client_delete_undo, .spc, .spc_down, .help_type, .describe, .rest_keys => unreachable,
.body_write => if (pane.file.?.content.len != before.len + 8 * body_chunk.len) return error.BodyWriteWasNotAppended,
.body_appends => if (pane.file.?.content.len != before.len + append_count * append_chunk_len) return error.BodyAppendsWereNotAppended,
.render, .deep_selection => if (pane.body.cur_row != before.row or pane.body.cur_col != before.col or pane.file.?.content.len != before.len)
@@ -740,6 +776,68 @@ fn clientKey(a: *pardes.replica.Authority, r: *pardes.replica.Replica, ev: parde
r.settle();
}
+/// A tag state's keys on the fixture's pane, each pumped and its frame
+/// drawn, from the state the op starts in (entered untimed); the state
+/// checked after each repetition.
+fn measureTag(op: Op, path: []const u8, reps: usize) !Cell {
+ const Key = pardes.Key;
+ const warmup = 3;
+ const samples = try gpa.alloc(u64, reps);
+ defer gpa.free(samples);
+ const core = try boot();
+ defer core.deinit();
+ pardes.look.lookAt(core, 0, path);
+ pump(core);
+ const id = filePane(core) orelse return error.OpenDidNotOpenFile;
+ core.view().active = id;
+ const enter: []const Key = switch (op) {
+ .spc, .rest_keys => &.{},
+ .spc_down => &.{ .{ .cp = ' ', .text = " " }, .{ .cp = Key.down } },
+ .help_type => &.{ .{ .cp = ' ', .text = " " }, .{ .cp = '?', .text = "?" } },
+ .describe => &.{ .{ .cp = ' ', .text = " " }, .{ .cp = 'h', .text = "h" }, .{ .cp = 'k', .text = "k" } },
+ else => unreachable,
+ };
+ for (enter) |k| core.update(.{ .key = k });
+ pump(core);
+ _ = try frame(core);
+ const keys: []const Key = switch (op) {
+ .spc => &.{ .{ .cp = ' ', .text = " " }, .{ .cp = Key.escape } },
+ .spc_down => &.{.{ .cp = Key.down }},
+ .help_type => &.{ .{ .cp = 'e', .text = "e" }, .{ .cp = Key.backspace } },
+ .describe => &.{ .{ .cp = 'g', .text = "g" }, .{ .cp = 'd', .text = "d" } },
+ .rest_keys => &.{ .{ .cp = 'j', .text = "j" }, .{ .cp = 'k', .text = "k" } },
+ else => unreachable,
+ };
+ const s = &core.view().tag_state;
+ for (0..warmup + samples.len) |n| {
+ const t0 = nowNs();
+ for (keys) |k| {
+ core.update(.{ .key = k });
+ pump(core);
+ _ = try frame(core);
+ // SPC's level when its delay is up: the frame that shows it.
+ if (op == .spc and k.cp == ' ') {
+ core.advance(core.clock.now_ns);
+ core.clock.now_ns = s.due_ns;
+ if (!pardes.TagState.shown(core, core.view())) return error.LevelNotShown;
+ _ = try frame(core);
+ }
+ }
+ const dt = nowNs() -| t0;
+ const held = switch (op) {
+ .spc => s.kind == .rest and s.root == null,
+ .spc_down => s.unrolled and core.panes[id].?.band_rows > 0,
+ .help_type => s.kind == .help and s.field.len == 0 and s.nhits > 0,
+ .describe => s.kind == .describe and s.found,
+ .rest_keys => s.kind == .rest and s.root == null and core.panes[id].?.body.cur_row == 0,
+ else => unreachable,
+ };
+ if (!held) return error.TagStateLost;
+ if (n >= warmup) samples[n - warmup] = dt / 1000;
+ }
+ return summarize(samples);
+}
+
fn measureImage(dir: []const u8, samples: []u64, warmup: usize) !Cell {
const path = try std.fmt.allocPrint(gpa, "{s}/picture.ppm", .{dir});
defer gpa.free(path);
@@ -1826,6 +1924,38 @@ fn measureSearch(io: std.Io) !void {
}
slow.report("fill", pattern, set.hits.items.len);
}
+
+ // A key typed into a text prompt in the tag (core/Prompt.zig) on a 1 MB
+ // file, with its frame: `/` from the middle (its places from the view on,
+ // a frame's budget a tick after), `s` over the whole text (`%`).
+ const mb: Fixture = .{ .name = "onemeg", .lines = 17_000, .cols = 60 };
+ const mb_path = try std.fmt.allocPrint(gpa, "{s}/{s}.zig", .{ dir, mb.name });
+ defer gpa.free(mb_path);
+ const mb_text = try generate(mb);
+ try writeFile(mb_path, mb_text);
+ std.debug.print("prompt keys over {d} bytes\n", .{mb_text.len});
+ gpa.free(mb_text);
+ for ([_][]const u8{ "/", "%s" }) |opener| for ([_][]const u8{ "helper", "qqq" }) |typed| {
+ const core = try boot();
+ defer core.deinit();
+ pardes.look.lookAt(core, 0, mb_path);
+ pump(core);
+ const id = filePane(core) orelse return error.OpenDidNotOpenFile;
+ const pane = core.panes[id].?;
+ seek(pane, mb, 0);
+ pane.file.?.scroll = mb.lines / 2;
+ pane.body.cur_row = @intCast(mb.lines / 2);
+ _ = try frame(core);
+ for (opener) |c| core.update(.{ .key = .{ .cp = c, .text = &[_]u8{c} } });
+ _ = try frame(core);
+ for (typed, 0..) |c, n| {
+ const was = counter.read();
+ const t0 = nowNs();
+ core.update(.{ .key = .{ .cp = c, .text = &[_]u8{c} } });
+ _ = try frame(core);
+ std.debug.print("prompt {s} \"{s}\": {d} instructions, {d} us (key and frame)\n", .{ opener, typed[0 .. n + 1], counter.read() -| was, (nowNs() -| t0) / 1000 });
+ }
+ };
}
/// `--pick`: a picker's hot paths (core/Pick.zig, walk UI line D), each
@@ -1903,6 +2033,77 @@ fn measurePick(io: std.Io) !void {
if (!std.mem.endsWith(u8, landing.file.?.path, ".zig") or std.mem.indexOf(u8, landing.file.?.path, "pickme_") == null) return error.NoPreview;
}
+/// `--walkf`: line F's hot paths in a 2,000-line file, each a step and
+/// the frame that draws it, its instructions counted: a key in the
+/// registers' level unrolled (Down, its value step read again); a frame
+/// with `]`'s targets painted against one at rest; a cursor move in the
+/// themes picker (the window wearing the next theme).
+fn measureWalkF(io: std.Io) !void {
+ var random: [12]u8 = undefined;
+ io.random(&random);
+ const dir = try std.fmt.allocPrint(gpa, "/tmp/pardes-walkf-{x}", .{random});
+ defer gpa.free(dir);
+ try std.Io.Dir.createDirAbsolute(io, dir, .default_dir);
+ defer std.Io.Dir.cwd().deleteTree(io, dir) catch {};
+ const path = try std.fmt.allocPrint(gpa, "{s}/walkf.zig", .{dir});
+ defer gpa.free(path);
+ var body: std.ArrayList(u8) = .empty;
+ defer body.deinit(gpa);
+ for (0..250) |i| try body.print(gpa, "/// The {d}th.\nfn f{d}(a: u32) u32 {{\n const b = a + {d};\n return b;\n}}\n\ntest \"f{d}\" {{\n}}\n", .{ i, i, i, i });
+ try writeFile(path, body.items);
+ var counter: Instructions = try .open();
+ defer counter.close();
+ const core = try boot();
+ defer core.deinit();
+ core.settings.jumps = .walk;
+ pardes.look.lookAt(core, 0, path);
+ pump(core);
+ _ = filePane(core) orelse return error.OpenDidNotOpenFile;
+ for ("abcdefgh", 0..) |r, i| try core.registers.put(gpa, r, body.items[i * 40 ..][0..200], 0, 1, true);
+ try frame(core);
+ const Step = struct {
+ fn run(c: *pardes.Pardes, ev: pardes.Event, n: *Instructions, s: *Slowest) !void {
+ const was = n.read();
+ const t0 = nowNs();
+ c.update(ev);
+ try frame(c);
+ s.add(nowNs() -| t0, n.read() -| was, 0);
+ }
+ };
+ const shown = struct {
+ fn wait(c: *pardes.Pardes) !void {
+ c.advance(c.clock.now_ns);
+ c.clock.now_ns = c.view().tag_state.due_ns;
+ try frame(c);
+ }
+ };
+ // Registers: `"`, its level shown, unrolled; then Down over its rows.
+ core.update(.{ .key = .{ .cp = '"' } });
+ try shown.wait(core);
+ core.update(.{ .key = .{ .cp = pardes.Key.down } });
+ var regs: Slowest = .{};
+ for (0..8) |_| try Step.run(core, .{ .key = .{ .cp = pardes.Key.down } }, &counter, &regs);
+ regs.report("registers Down + frame", "\"", 0);
+ core.update(.{ .key = .{ .cp = pardes.Key.escape } });
+ // A frame at rest, then frames with `]`'s targets painted.
+ var rest: Slowest = .{};
+ var painted: Slowest = .{};
+ for (0..8) |_| try Step.run(core, .tick, &counter, &rest);
+ core.update(.{ .key = .{ .cp = ']' } });
+ try shown.wait(core);
+ for (0..8) |_| try Step.run(core, .tick, &counter, &painted);
+ rest.report("tick + frame at rest", "", 0);
+ painted.report("tick + frame, ] painted", "]", 0);
+ core.update(.{ .key = .{ .cp = pardes.Key.escape } });
+ // The themes picker: Down, the window wearing the next.
+ pardes.Pick.open(core, core.view().active, .themes, "", "", "");
+ try frame(core);
+ var themes: Slowest = .{};
+ for (0..8) |_| try Step.run(core, .{ .key = .{ .cp = pardes.Key.down } }, &counter, &themes);
+ themes.report("themes Down + frame", "", 0);
+ if (core.theme_preview == null) return error.NoThemePreview;
+}
+
/// The longest of a scan's calls.
const Slowest = struct {
calls: usize = 0,
@@ -2067,6 +2268,7 @@ fn reportText(
term_cells: *const [std.enums.values(TermOp).len][term_fixtures.len]Cell,
bytes: *const [fixtures.len]usize,
reps: usize,
+ named: ?Op,
base_path: ?[]const u8,
base: ?Base,
) void {
@@ -2090,6 +2292,7 @@ fn reportText(
o("\n{s}\n", .{if (base != null) &@as([12 + fixtures.len * 20]u8, @splat('-')) else &@as([12 + fixtures.len * 13]u8, @splat('-'))});
var worst_jitter: f64 = 0;
for (std.enums.values(Op), 0..) |op, oi| {
+ if (op.named() and named != op) continue;
o("{s:<12}", .{op.label()});
for (0..fixtures.len) |fi| {
const c = cells[oi][fi];
@@ -2179,6 +2382,7 @@ fn writeJson(
for (fixtures, 0..) |fx, fi| {
if (opts.only) |name| if (!std.mem.eql(u8, name, fx.name)) continue;
if (opts.op) |o| if (o != op) continue;
+ if (op.named() and opts.op == null) continue;
const c = cells[oi][fi];
try out.print("{s}{{\"op\":\"{s}\",\"fixture\":\"{s}\",\"min_us\":{d},\"med_us\":{d},\"p90_us\":{d},\"max_us\":{d}}}", .{
if (first) "" else ",", op.label(), fx.name, c.min_us, c.med_us, c.p90_us, c.max_us,
@@ -2283,7 +2487,7 @@ fn parseBase(src: []const u8, opts: Options, bytes: *const [fixtures.len]usize)
}
for (fixtures, 0..) |fixture, fi| {
if (opts.only) |name| if (!std.mem.eql(u8, name, fixture.name)) continue;
- for (file_seen) |row| if (!row[fi]) return error.BaselineCoverage;
+ for (file_seen, std.enums.values(Op)) |row, op| if (!row[fi] and !op.named()) return error.BaselineCoverage;
}
if (opts.only == null) for (term_seen) |row| {
for (row) |seen| if (!seen) return error.BaselineCoverage;
diff --git a/test/process/edit.zig b/test/process/edit.zig
index 30477552..7e86bc8a 100644
--- a/test/process/edit.zig
+++ b/test/process/edit.zig
@@ -36,7 +36,8 @@ const Slow = struct {
};
fn editCommands(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
- var d = try process.Detached.start(gpa, exe, "edit", .{});
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ var d = try process.Detached.start(gpa, exe, "edit", .{ .init = "Jumps new-pane\n" });
defer d.deinit();
const f = &d.files;
var arena = std.heap.ArenaAllocator.init(gpa);
diff --git a/test/process/flags.zig b/test/process/flags.zig
index 3c54a7ad..10cfd00e 100644
--- a/test/process/flags.zig
+++ b/test/process/flags.zig
@@ -143,7 +143,8 @@ fn forwarding(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var arena = std.heap.ArenaAllocator.init(gpa);
defer arena.deinit();
const a = arena.allocator();
- var d = try process.Detached.start(gpa, exe, "forwarding", .{});
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ var d = try process.Detached.start(gpa, exe, "forwarding", .{ .init = "Jumps new-pane\n" });
defer d.deinit();
const c = try Conn.dial(gpa, d.socket());
defer c.deinit(gpa);
@@ -310,7 +311,8 @@ fn waitAndPager(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var arena = std.heap.ArenaAllocator.init(gpa);
defer arena.deinit();
const a = arena.allocator();
- var d = try process.Detached.start(gpa, exe, "wait", .{});
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ var d = try process.Detached.start(gpa, exe, "wait", .{ .init = "Jumps new-pane\n" });
var ended = false;
defer if (!ended) d.deinit();
const c = try Conn.dial(gpa, d.socket());
diff --git a/test/process/look_and_exec.zig b/test/process/look_and_exec.zig
index 8ba52534..0c38f241 100644
--- a/test/process/look_and_exec.zig
+++ b/test/process/look_and_exec.zig
@@ -67,7 +67,8 @@ fn canary(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var arena = std.heap.ArenaAllocator.init(gpa);
defer arena.deinit();
const a = arena.allocator();
- var d = try process.Detached.start(gpa, exe, "flow", .{});
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ var d = try process.Detached.start(gpa, exe, "flow", .{ .init = "Jumps new-pane\n" });
defer d.deinit();
try d.put("a.txt", "alpha one\nshared word\n");
try d.put("b.txt", "beta two\nshared word\n");
diff --git a/test/process/mounts.zig b/test/process/mounts.zig
index 8a7fc6fe..8ac016c3 100644
--- a/test/process/mounts.zig
+++ b/test/process/mounts.zig
@@ -32,7 +32,9 @@ fn startup(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
defer client.deinit(gpa);
const address = first.abs("pardes-9p-first.sock");
const own = first.abs("pardes-9p-second.sock");
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
var second = try Detached.start(gpa, exe, "second", .{
+ .init = "Jumps new-pane\n",
.root = first.root(),
.args = &.{ try std.fmt.allocPrintSentinel(a, "--mount=peer={s}", .{address}, 0), try std.fmt.allocPrintSentinel(a, "--mount=own={s}", .{own}, 0) },
});
diff --git a/test/process/other_files.zig b/test/process/other_files.zig
index 38aa0bd5..69f65884 100644
--- a/test/process/other_files.zig
+++ b/test/process/other_files.zig
@@ -97,7 +97,8 @@ fn recentSurvivesRestart(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
defer arena.deinit();
const a = arena.allocator();
var root_buf: [4096]u8 = undefined;
- var one = try process.Detached.start(gpa, exe, "recent1", .{});
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ var one = try process.Detached.start(gpa, exe, "recent1", .{ .init = "Jumps new-pane\n" });
const root = keepRoot(&one, &root_buf);
defer removeRoot(root);
const kept = try std.fmt.allocPrint(a, "{s}/kept.txt", .{root});
@@ -147,7 +148,8 @@ fn recentShared(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
defer arena.deinit();
const a = arena.allocator();
var root_buf: [4096]u8 = undefined;
- var one = try process.Detached.start(gpa, exe, "store1", .{});
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ var one = try process.Detached.start(gpa, exe, "store1", .{ .init = "Jumps new-pane\n" });
const root = keepRoot(&one, &root_buf);
defer removeRoot(root);
{
diff --git a/test/process/root_ctl.zig b/test/process/root_ctl.zig
index 979cfc48..5fdac20b 100644
--- a/test/process/root_ctl.zig
+++ b/test/process/root_ctl.zig
@@ -12,7 +12,7 @@ const check = process.check;
pub const cases = .{
.{ "root-ctl: Exit is answered before the editor quits", exitAnswers },
- .{ "root-ctl: with nothing attached a message leaves after MessageLinger on its own clock", messagesExpire },
+ .{ "root-ctl: with nothing attached a message stays on the notice row until the next one: no clock takes it", messagesStay },
.{ "root-ctl: Putall with one pane's file changed on disk fails, answered once the other panes' saves have landed", putallAfterSaves },
.{ "root-ctl: long and odd paths where a path goes (name, look, DumpDir, Dump, Save) are refused or said, never a crash; a bad ThemeFile fails the write", oddPaths },
.{ "root-ctl: Restore asks once about unsaved text, is answered before it cuts every connection, and the dump's panes come back under their serials", restore },
@@ -26,7 +26,7 @@ fn exitAnswers(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
}
/// Nothing attached, no key, no click, no other request comes to move it along.
-fn messagesExpire(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
+fn messagesStay(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
// With nothing attached: a window always is.
try process.only(.tui);
var d = try process.Detached.start(gpa, exe, "msg", .{});
@@ -35,11 +35,15 @@ fn messagesExpire(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try expect(has(try d.files.screen(), "lingering-words"));
// Reading /screen is itself a request, so wait without asking.
process.sleep(2500);
- try expect(!has(try d.files.screen(), "lingering-words"));
+ try expect(has(try d.files.screen(), "lingering-words"));
+ try d.files.write("/pane/1/ctl", "Msg next-words\n");
+ const shown = try d.files.screen();
+ try expect(has(shown, "next-words") and !has(shown, "lingering-words"));
}
fn putallAfterSaves(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
- var d = try process.Detached.start(gpa, exe, "putall", .{});
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ var d = try process.Detached.start(gpa, exe, "putall", .{ .init = "Jumps new-pane\n" });
defer d.deinit();
const f = &d.files;
var arena = std.heap.ArenaAllocator.init(gpa);
diff --git a/test/process/tree.zig b/test/process/tree.zig
index 8fe3d881..86786603 100644
--- a/test/process/tree.zig
+++ b/test/process/tree.zig
@@ -582,7 +582,8 @@ fn looks(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var arena = std.heap.ArenaAllocator.init(gpa);
defer arena.deinit();
const a = arena.allocator();
- var d = try process.Detached.start(gpa, exe, "first", .{});
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ var d = try process.Detached.start(gpa, exe, "first", .{ .init = "Jumps new-pane\n" });
defer d.deinit();
const c = try Conn.dial(gpa, d.socket());
defer c.deinit(gpa);
@@ -606,7 +607,8 @@ fn longNames(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var arena = std.heap.ArenaAllocator.init(gpa);
defer arena.deinit();
const a = arena.allocator();
- var d = try process.Detached.start(gpa, exe, "long-names", .{});
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ var d = try process.Detached.start(gpa, exe, "long-names", .{ .init = "Jumps new-pane\n" });
defer d.deinit();
const c = try Conn.dial(gpa, d.socket());
defer c.deinit(gpa);
diff --git a/test/process/tty_boot.zig b/test/process/tty_boot.zig
index 01b35a24..2680a499 100644
--- a/test/process/tty_boot.zig
+++ b/test/process/tty_boot.zig
@@ -114,14 +114,17 @@ fn boot(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
fn builtins(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "builtins");
defer t.deinit();
- try t.lines("notes.txt", 6, "");
+ // SPC ? is Help in the tag now (pick-ui SPEC §4.5): the +Help index is
+ // the word's, `Help` run from the workspace's tag, `Help c` swept here.
+ try t.file("notes.txt", "Help c Help h\nline 2\nline 3\nline 4\nline 5\nline 6\n");
try t.start(67, 120, &.{"notes.txt"});
try t.wait(8000, "notes.txt");
try t.stable(700, 20000);
try t.snap("boot");
// The full index includes commands without leader paths.
- try t.key("space ?");
+ try t.press("middle", "@Help", 1);
+ try t.release("middle", "@Help", 1);
try t.wait(10000, "pardes builtins: each one's keys and its name");
try t.wait(10000, "ClipPasteBefore");
// The words with no SPC path come last, each under its documentation:
@@ -141,19 +144,20 @@ fn builtins(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.key("space j n space j n space j n");
try t.wait(10000, "Look enter, right-click");
try t.wait(10000, "Look at its argument as B3 does");
- try t.key("space c ?");
+ try sweepHelp(&t, "@Help#1", 4);
try t.wait(10000, "under SPC c");
try t.wait(10000, "Joincol");
try t.stable(700, 15000);
try t.snap("column-group");
- try t.key("space h ?");
+ try sweepHelp(&t, "@Help#2", 4);
try t.wait(10000, "Tutor");
try t.stable(700, 15000);
try t.snap("docs-group");
- // Tutor's row, under the documentation of the three before it
- try t.press("middle", "@Tutor", 24);
- try t.release("middle", "@Tutor", 24);
+ // Tutor's row, under the documentation of the four before it (Keys,
+ // describe-key, is SPC h k; Messages' runs to three rows)
+ try t.press("middle", "@Tutor", 32);
+ try t.release("middle", "@Tutor", 32);
try t.wait(10000, "PARDES TUTOR");
try t.stable(700, 15000);
try t.snap("tutor-from-index");
@@ -436,6 +440,8 @@ fn tutor(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
fn topbarexec(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "topbarexec");
defer t.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try t.config("Jumps new-pane");
try t.file("zmarkfile.txt", "hay ZQNEEDLE stack");
try t.start(21, 90, &.{ "-n", "3" });
try t.wait(8000, "zmarkfile.txt");
@@ -472,13 +478,18 @@ fn topbarexec(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
fn leader(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "leader");
defer t.deinit();
- try t.file("cmds.txt", "Help");
+ // SPC ? and `?` down a level are Help in the tag now (pick-ui SPEC
+ // §4.5): the +Help index for a group is the word's, `Help h` swept here.
+ try t.file("cmds.txt", "Help Help h Help t Help c Help l");
try t.start(41, 100, &.{"cmds.txt"});
try t.wait(8000, "Newcol Joincol");
try t.wait(8000, "cmds.txt");
try t.stable(700, 20000);
+ // SPC's level, rolled in the tag once its delay is up (a frame on the
+ // clock, which a quiet screen does not wait for)
try t.key("space");
+ try t.wait(5000, "↓ unroll");
try t.stable(400, 5000);
try t.snap("spc");
try t.key("h");
@@ -489,15 +500,21 @@ fn leader(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.stable(400, 5000);
try t.snap("abandoned");
try t.key("space x");
+ try t.wait(5000, "↓ unroll");
try t.stable(400, 5000);
try t.snap("unmapped");
+ // A key the level has no child for is struck and the level stays
+ // (which-key); Esc leaves it.
+ try t.key("esc");
+ try t.settle(100);
+ try t.stable(400, 5000);
// 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: each one's keys and its name");
try t.wait(10000, "ClipPasteBefore");
- try t.key("space h ?");
+ try sweepHelp(&t, "@Help#2", 4);
try t.wait(10000, "under SPC h");
try t.stable(700, 15000);
try t.snap("help-group");
@@ -517,23 +534,24 @@ fn leader(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.key("space d");
try t.stable(700, 15000);
- try t.key("space ?");
+ try t.press("middle", "@Help", 4);
+ try t.release("middle", "@Help", 4);
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 sweepHelp(&t, "@Help#3", 4);
try t.wait(10000, "under SPC t");
// 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 sweepHelp(&t, "@Help#4", 4);
try t.wait(10000, "under SPC c");
try t.wait(10000, "Joincol");
try t.stable(700, 15000);
try t.snap("help-column");
- try t.key("space l ?");
+ try sweepHelp(&t, "@Help#5", 4);
try t.wait(10000, "WsDiagnostics");
try t.stable(700, 15000);
try t.snap("help-language");
@@ -544,6 +562,15 @@ fn leader(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.done();
}
+/// B2 swept over `Help <key>` from the word `at` on `row` (its six
+/// cells): the word and its argument run, as a sweep anywhere runs them.
+fn sweepHelp(t: *Tty, at: []const u8, row: u16) !void {
+ const end = try std.fmt.allocPrint(t.arena, "{s}+6", .{at});
+ try t.press("middle", at, row);
+ try t.drag("middle", end, row);
+ try t.release("middle", end, row);
+}
+
fn mini(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "mini");
defer t.deinit();
@@ -904,6 +931,8 @@ fn savepane(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
fn filewatch(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "filewatch");
defer t.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try t.config("Jumps new-pane");
try t.dir("sub");
try t.file("w.txt", "line 1\nline 2\n/tmp/pardes-snap/filewatch/cwd/sub/s.txt\nline 4\nline 5\nline 6\nline 7\nline 8\nline 9\nline 10\nline 11\nline 12\n");
try t.lines("sub/s.txt", 8, "");
diff --git a/test/process/tty_editing.zig b/test/process/tty_editing.zig
index 53e1da1e..0ae99de7 100644
--- a/test/process/tty_editing.zig
+++ b/test/process/tty_editing.zig
@@ -365,13 +365,16 @@ fn pipe(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
fn chordcut(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "chordcut");
defer t.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try t.config("Jumps new-pane");
try t.lines("f.txt", 5, "");
try t.lines("g.txt", 2, "");
// The narrow-window fallback splits below the source shell and leaves the
// unrelated right column untouched. Give the caller enough cells that the selected
// `echo B''OO g.txt` remains one displayed row; this test is about chords, not
// soft-wrap traversal.
- try t.start(31, 120, &.{ "-n", "3" });
+ // A row more than its panes take: the notice row under them.
+ try t.start(32, 120, &.{ "-n", "3" });
try t.wait(8000, "f.txt");
try t.stable(700, 20000);
// open f.txt: click a body spot, type the name, look it
@@ -608,9 +611,12 @@ fn find(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.start(41, 120, &.{"here.txt"});
try t.wait(8000, "here.txt");
try t.stable(700, 20000);
- // SPC f is a group (Find, New, Save, Recent, Grep): the indicator waits
+ // SPC f is a group (Find, New, Save, Recent, Grep): its level rolled in
+ // the tag once SPC's delay is up (a frame on the clock, which a quiet
+ // screen does not wait for)
try t.key("space");
try t.key("f");
+ try t.wait(5000, "↓ unroll");
try t.stable(400, 5000);
try t.snap("group");
// the second f opens the query pane: every file listed, line 1 `Find `
@@ -738,6 +744,8 @@ fn fsearch(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
fn grep(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "grep");
defer t.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try t.config("Jumps new-pane");
try t.dir("sub");
try t.file("a.txt", "hello TARGET one\nnothing here\nlast TARGET line");
try t.file("sub/b.txt", "deep\nTARGET inside sub");
@@ -1325,6 +1333,8 @@ fn jumps(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
fn cmdword(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "cmdword");
defer t.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try t.config("Jumps new-pane");
try t.file("cmds.txt", "@`echo ZZ''E` @`echo ZZ''L` Look p.txt @`Look .`");
try t.file("p.txt", "just text");
try t.file("zzmark.txt", "x");
@@ -1887,6 +1897,8 @@ fn lspdebug(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
fn lsprelpath(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "lsprelpath");
defer t.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try t.config("Jumps new-pane");
try t.dir("sub");
try t.dir("sub/inner");
try t.file("shade.zig", "pub const Shade = enum {\n verdigris,\n cinnabar,\n};\n");
@@ -1984,6 +1996,8 @@ fn lsp_rename(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
fn lsp_rename_files(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "lsp-rename-files");
defer t.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try t.config("Jumps new-pane");
try t.file("lib.rs", "// main.rs\npub fn add(a: i32, b: i32) -> i32 {\n a + b\n}\n");
try t.file("main.rs", "mod lib;\n\nfn main() {\n let x = add(1, 2);\n let y = add(3, 4);\n let _ = x + y;\n}\n");
try t.start(25, 100, &.{"lib.rs"});
diff --git a/test/process/tty_images.zig b/test/process/tty_images.zig
index 5c39d4f3..9c37a40d 100644
--- a/test/process/tty_images.zig
+++ b/test/process/tty_images.zig
@@ -15,7 +15,8 @@ fn images(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "images");
defer t.deinit();
try t.ppmDiag("pic.ppm");
- try t.start(31, 150, &.{ "-n", "3" });
+ // A row more than its panes take: the notice row under them.
+ try t.start(32, 150, &.{ "-n", "3" });
try t.wait(8000, "pic.ppm");
try t.stable(700, 20000);
try t.press("left", "5", 9);
diff --git a/test/process/tty_layout.zig b/test/process/tty_layout.zig
index 08a02488..e0396a53 100644
--- a/test/process/tty_layout.zig
+++ b/test/process/tty_layout.zig
@@ -288,9 +288,12 @@ fn layout_close(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
fn layout_open(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "layout-open");
defer t.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try t.config("Jumps new-pane");
try t.dir("sub");
try t.file("sub/f.txt", "echo 'TTY'OK");
- try t.start(31, 100, &.{ "-n", "3" });
+ // A row more than its panes take: the notice row under them.
+ try t.start(32, 100, &.{ "-n", "3" });
try t.wait(8000, "sub");
try t.stable(700, 20000);
// give pane 0 (top-left) some content so its content-height split is visible
diff --git a/test/process/tty_terminals.zig b/test/process/tty_terminals.zig
index 9f7c9308..838b2aea 100644
--- a/test/process/tty_terminals.zig
+++ b/test/process/tty_terminals.zig
@@ -226,12 +226,13 @@ fn ttyhelp(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
// row 0, which is not a pane, so the terminal never saw it.
try t.key("c-b");
try t.stable(600, 10000);
+ // SPC ? is Help in the focused pane's tag (pick-ui SPEC §4.5): a field
+ // typed in, the leaves it matches in rows under the tag, the cursor's
+ // documentation beside them.
try t.key("space");
try t.key("?");
- // 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 ? Help");
+ try t.send("tutor");
+ try t.wait(10000, "SPC h t · Tutor · help");
try t.stable(700, 15000);
try t.snap("leaderworks");
try t.done();
@@ -590,7 +591,8 @@ fn reflow(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
fn respawn(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "respawn");
defer t.deinit();
- try t.start(31, 140, &.{ "-n", "3" });
+ // A row more than its panes take: the notice row under them.
+ try t.start(32, 140, &.{ "-n", "3" });
try t.wait(8000, "Newcol Joincol");
try t.stable(700, 20000);
// middle-click Del on the lower-left pane's tag: the pane id is freed while
diff --git a/test/snapshots/argv.golden b/test/snapshots/argv.golden
index c88ca476..67bf7c16 100644
--- a/test/snapshots/argv.golden
+++ b/test/snapshots/argv.golden
@@ -22,10 +22,18 @@
|
| /tmp/pardes-snap/argv/cwd/+New Save Term Collapse Follow Del
| 1
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/argv/cwd
== snap filearg grid=100x31 cursor=7,3
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/argv/cwd/notes.txt Save Term Collapse Follow Del
+| /tmp/pardes-snap/argv/cwd/notes.txt Keep Save Term Collapse Follow Del
| 3 line 3
| 4 line 4
| 5 line 5
@@ -33,10 +41,31 @@
| 7 line 7
| 8 line 8
| ~
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/argv/cwd/notes.txt:3
== snap filearg-n3 grid=100x31 cursor=7,3
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/argv/cwd/notes.txt Save Term Collapse Follow Del
+| /tmp/pardes-snap/argv/cwd/notes.txt Keep Save Term Collapse Follow Del
| 1 line 1
| 2 line 2
| 3 line 3
@@ -46,9 +75,54 @@
| 7 line 7
| 8 line 8
| ~
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/argv/cwd/notes.txt:1
== snap dirarg grid=100x31 cursor=4,5
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
| /tmp/pardes-snap/argv/cwd/sub Term+bash Save Mode Filter Collapse Del
| ls
| inside.txt
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/argv/cwd/sub
diff --git a/test/snapshots/badutf.golden b/test/snapshots/badutf.golden
index be23a9b2..62687621 100644
--- a/test/snapshots/badutf.golden
+++ b/test/snapshots/badutf.golden
@@ -1,17 +1,64 @@
== snap badbytes grid=100x31 cursor=7,3
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/badutf/cwd/bad.txt Save Term Collapse Follow Del
+| /tmp/pardes-snap/badutf/cwd/bad.txt Keep Save Term Collapse Follow Del
| 1 hello �� world
| 2 latin-1 caf� tail
| 3 truncated �� here
| 4 end
| ~
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/badutf/cwd/bad.txt:1
== snap hscroll-midglyph grid=50x31 cursor=46,4
| Newcol Joincol Find Grep Help Changelog Tutor Du
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/badutf/cwd/wide.txt Save Term C
-| ollapse Follow Del
+| /tmp/pardes-snap/badutf/cwd/wide.txt Keep Save T
+| erm Collapse Follow Del
| 1 日本語 日本語 日本語 日本語 日本語 tail
| 2
| ~
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| ✓ /tmp/pardes-snap/badutf/c 1 message · SPC h m
diff --git a/test/snapshots/boot.golden b/test/snapshots/boot.golden
index 1b10e36b..c64b3fc8 100644
--- a/test/snapshots/boot.golden
+++ b/test/snapshots/boot.golden
@@ -4,6 +4,32 @@
| /tmp/pardes-snap/boot/cwd Term+bash Save Mode Filter Collapse Del
| ls
| hello.txt
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/boot/cwd
== style boot grid=100x31
|0: 0-1 d,#1d2824, 2-99 #b2c3b8,#1d2824,
|1: 0-1 d,#887455, 2-99 #becfc4,#314738,
@@ -35,4 +61,4 @@
|27: 0-0 d,#608269, 1-99 d,#0d1410,
|28: 0-0 d,#608269, 1-99 d,#0d1410,
|29: 0-0 d,#608269, 1-99 d,#0d1410,
-|30: 0-0 d,#608269, 1-99 d,#0d1410,
+|30: 0-1 d,#1d2824, 2-99 #b2c3b8,#1d2824,
diff --git a/test/snapshots/builtins.golden b/test/snapshots/builtins.golden
index 516bbf56..a93bdf9b 100644
--- a/test/snapshots/builtins.golden
+++ b/test/snapshots/builtins.golden
@@ -1,14 +1,71 @@
== snap boot grid=120x67 cursor=7,3
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/builtins/cwd/notes.txt Save Term Collapse Follow Del
-| 1 line 1
+| /tmp/pardes-snap/builtins/cwd/notes.txt Keep Save Term Collapse Follow Del
+| 1 Help c Help h
| 2 line 2
| 3 line 3
| 4 line 4
| 5 line 5
| 6 line 6
| ~
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/builtins/cwd/notes.txt:1
== snap column-group grid=120x67 cursor=7,10
|9: /tmp/pardes-snap/builtins/cwd/+Help Save Term Collapse Follow Del
|10: 1 pardes builtins under SPC c
@@ -32,9 +89,10 @@
|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:224:1 Look enter, right-click
+|56: +Search 1/1 Save Undock Del
+|57: /^ +Look
+|58: @p2:237:1 Look enter, right-click
+|66: ✓ /tmp/pardes-snap/builtins/cwd/notes.txt Help 3 messages · SPC h m
== snap docs-group grid=120x67 cursor=7,10
|10: 1 pardes builtins under SPC h
|12: 3 SPC h b Build
@@ -44,50 +102,46 @@
|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,37
-|10: 1 pardes builtins under SPC h Tutor
-|26: +Search 1/1 Save Undock Del
-|27: /^ +Look
-|28: @p2:224:1 Look enter, right-click
-|36: /tmp/pardes-snap/builtins/cwd/+Tutor Save Term Collapse Follow Del
-|37: 1
-|38: 2 PARDES TUTOR
-|39: 3
-|40: 4 This pane is +Tutor, a copy: edit it freely; there is no need to
-|41: 5 Save it (a bare Save asks for a path to write a copy to).
-|42: 6 `Del` in its tag closes it; once you have edited it, `Del` refuses
-|43: 7 once and the second `Del` discards. `Tutor` or SPC h t opens a
-|44: 8 fresh copy.
-|45: 9
-|46: 10 The guide (docs/typ/guide.typ) explains; this is the hands-on part.
-|47: 11 Each lesson is a few things to do, then names its guide section.
-|48: 12 Words in backticks, like `Save`, are builtins.
-|49: 13 `Exec` (B2) runs the builtin a word names, or else runs it as a
-|50: 14 shell line; `Look` (B3) opens what the text names, or else finds
-|51: 15 it. Type a builtin in any tag and `Exec` it. Lines starting with
-|52: 16 "| " are tags.
-|53: 17
-|54: 18 Press j until you reach part 1.
-|55: 19
-|56: 20
-|57: 21 =================================================================
-|58: 22 = PART 1 — MODES =
-|59: 23 =================================================================
-|60: 24
-|61: 25 1. The box left of this pane's tag is blank, so you are in
-|62: 26 NORMAL mode. Press i: it shows ^ (INSERT). Type a word, then
-|63: 27 Esc: blank again.
-|64: 28 2. Press Esc once more, in NORMAL: the keyboard goes back to the
-|65: 29 pane you were in before (not what helix does). Come back with
-|66: 30 Esc again.
+|20: 10 SPC h k Keys
+|21: 11 Show what a key sequence runs: the next keys typed are replayed in the tag.
+|22: 12 The tag shows `Keys` and the keys as they are typed; a sequence that reaches a leaf unrolls its level under the ↩
+|23: tag with the leaf on the cursor and its documentation beside it, and Enter runs it. Every root answers: SPC, g, ↩
+|24: m, z, Z, [, ], window mode's C-w. A sequence nothing is bound to is shown struck, `runs nothing`. Esc leaves it.
+|25: 13
+|26: 14 SPC h m Messages
+|27: 15 Show the messages said so far, the newest first, an error's places under it.
+|28: 16 Where jumps walk, a list in the pane's tag: Enter Looks a row (a message's cause, a place), C-q keeps it as a +M↩
+|29: essages; else the +Messages.
+|30: 17
+|31: 18 SPC h t Tutor topbar
+|32: 19 Open the tutor, a document to work through.
+|33: 20
+|34: ~
+|66: ✓ /tmp/pardes-snap/builtins/cwd/notes.txt Help 5 messages · SPC h m
+== snap tutor-from-index grid=120x67 cursor=7,45
+|34: +Search 1/1 Save Undock Del
+|35: /^ +Look
+|36: @p2:237:1 Look enter, right-click
+|44: /tmp/pardes-snap/builtins/cwd/+Tutor Keep Save Term Collapse Follow Del
+|45: 1
+|46: 2 PARDES TUTOR
+|47: 3
+|48: 4 This pane is +Tutor, a copy: edit it freely; there is no need to
+|49: 5 Save it (a bare Save asks for a path to write a copy to).
+|50: 6 `Del` in its tag closes it; once you have edited it, `Del` refuses
+|51: 7 once and the second `Del` discards. `Tutor` or SPC h t opens a
+|52: 8 fresh copy.
+|53: 9
+|54: 10 The guide (docs/typ/guide.typ) explains; this is the hands-on part.
+|55: 11 Each lesson is a few things to do, then names its guide section.
+|56: 12 Words in backticks, like `Save`, are builtins.
+|57: 13 `Exec` (B2) runs the builtin a word names, or else runs it as a
+|58: 14 shell line; `Look` (B3) opens what the text names, or else finds
+|59: 15 it. Type a builtin in any tag and `Exec` it. Lines starting with
+|60: 16 "| " are tags.
+|61: 17
+|62: 18 Press j until you reach part 1.
+|63: 19
+|64: 20
+|65: 21 =================================================================
+|66: ✓ /tmp/pardes-snap/builtins/cwd/+Help Tutor 7 messages · SPC h m
diff --git a/test/snapshots/callstack.golden b/test/snapshots/callstack.golden
index 2f666c89..69b2f311 100644
--- a/test/snapshots/callstack.golden
+++ b/test/snapshots/callstack.golden
@@ -1,8 +1,8 @@
== snap hierarchy grid=110x40 cursor=7,11
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/callstack/cwd/main.rs Save Term Collapse Follow TreeContext Def Refs Del
-| 1 mod lib; --:--:-- lsp rust-analyzer: ready
+| /tmp/pardes-snap/callstack/cwd/main.rs Keep Save Term Collapse Follow TreeContext Def Refs Del
+| 1 mod lib;
| 2
| 3 fn main() {
| 4 let x = add(1, 2);
@@ -23,11 +23,27 @@
| 11 ╰─ main.rs:5:13-15
| 12 let y = add(3, 4);
| ~
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| ✓ /tmp/pardes-snap/callstack/cwd/main.rs Callstack 1 message · SPC h m
== style hierarchy grid=110x40
|0: 0-1 d,#1d2824, 2-109 #b2c3b8,#1d2824,
|1: 0-1 d,#887455, 2-109 #becfc4,#314738,
-|2: 0-1 d,#496656, 2-32 #b2c3b8,#1d2824, 33-40 #d3b0d9,#1d2824, 41-109 #b2c3b8,#1d2824,
-|3: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-10 #c9a7ed,#0d1410, 11-73 #e5eee5,#0d1410, 74-74 #e5eee5,#1d2824, 75-109 #b2c3b8,#1d2824,
+|2: 0-1 d,#496656, 2-32 #b2c3b8,#2c2819, 33-40 #d3b0d9,#2c2819, 41-109 #b2c3b8,#2c2819,
+|3: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-10 #c9a7ed,#0d1410, 11-109 #e5eee5,#0d1410,
|4: 0-0 d,#608269, 1-4 d,#0d1410, 5-109 #59675c,#0d1410,
|5: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-9 #c9a7ed,#0d1410, 10-109 #e5eee5,#0d1410,
|6: 0-0 d,#608269, 1-4 d,#0d1410, 5-10 #59675c,#0d1410, 11-14 #c9a7ed,#0d1410, 15-109 #e5eee5,#0d1410,
@@ -63,6 +79,14 @@
|36: 0-0 d,#608269, 1-109 d,#0d1410,
|37: 0-0 d,#608269, 1-109 d,#0d1410,
|38: 0-0 d,#608269, 1-109 d,#0d1410,
-|39: 0-0 d,#608269, 1-109 d,#0d1410,
-== snap caller grid=110x40 cursor=13,5
-|3: 1 mod lib;
+|39: 0-1 d,#1d2824, 2-109 #67756e,#1d2824,
+== snap caller grid=110x40 cursor=13,27
+|24: ‹@p2 › /tmp/pardes-snap/callstack/cwd/main.rs Keep Save Term Collapse Follow TreeContext Def Refs Del
+|25: 1 mod lib;
+|26: 2
+|27: 3 fn main() {
+|28: 4 let x = add(1, 2);
+|29: 5 let y = add(3, 4);
+|30: 6 let _ = x + y;
+|31: 7 }
+|32: ~
diff --git a/test/snapshots/chordcut.golden b/test/snapshots/chordcut.golden
index e711855a..a52c6ae8 100644
--- a/test/snapshots/chordcut.golden
+++ b/test/snapshots/chordcut.golden
@@ -1,4 +1,4 @@
-== snap opened grid=120x31 cursor=7,9
+== snap opened grid=120x32 cursor=7,9
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
| /tmp/pardes-snap/chordcut/cwd Term+bash Save Mode Filter C /tmp/pardes-snap/chordcut/cwd Term+bash Save Mode Filter C
@@ -20,32 +20,42 @@
| ollapse Del
| ls
| f.txt g.txt
-== snap cut grid=120x31 cursor=7,9
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| · @p1 a copy of the terminal's text: Tab or B2 runs it; what the program draws next replaces it ( 1 message · SPC h m
+== snap cut grid=120x32 cursor=7,9
|7: */tmp/pardes-snap/chordcut/cwd/f.txt Save Term Collapse Fol
|9: 1 1
-== snap copied grid=120x31 cursor=10,10
-== snap pointpaste grid=120x31 cursor=16,11
+== snap copied grid=120x32 cursor=10,10
+== snap pointpaste grid=120x32 cursor=16,11
|11: 3 line 3line
-== snap replaced grid=120x31 cursor=11,12
+== snap replaced grid=120x32 cursor=11,12
|12: 4 lline 4
-== snap cancelexec grid=120x31 cursor=25,9
+== snap cancelexec grid=120x32 cursor=25,9
|9: 1 1echo B''OO g.txt
-== snap execafter grid=120x31 cursor=25,9
-|9: 1 1echo B''OO g.txt Exec
+== snap execafter grid=120x32 cursor=25,9
|17: /tmp/pardes-snap/chordcut/cwd Term+bash Save Mode Filter C /tmp/pardes-snap/chordcut/cwd (echo B''OO) exit 0 Kill Sav
|18: ollapse Del e Collapse Del
|19: ls % echo B''OO
|20: f.txt g.txt BOO
|21: exit 0
-== snap cancellook grid=120x31 cursor=25,9
-|9: 1 1echo B''OO g.txt
-== snap lookafter grid=120x31 cursor=7,24
+|31: ✓ /tmp/pardes-snap/chordcut/cwd/f.txt Exec 2 messages · SPC h m
+== snap cancellook grid=120x32 cursor=25,9
+== snap lookafter grid=120x32 cursor=7,24
|22: /tmp/pardes-snap/chordcut/cwd/g.txt Save Term Collapse Fol
|23: low Del
|24: 1 line 1
|25: 2 line 2
|26: ~
-== style chordsel grid=120x31
+== style chordsel grid=120x32
|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,#496656, 2-31 #b2c3b8,#1d2824, 32-41 #d3b0d9,#1d2824, 42-59 #b2c3b8,#1d2824, 60-61 #b2c3b8,#496656, 62-91 #b2c3b8,#1d2824, 92-101 #d3b0d9,#1d2824, 102-119 #b2c3b8,#1d2824,
@@ -77,10 +87,11 @@
|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,
-== style clickdismiss grid=120x31
+|31: 0-1 d,#1d2824, 2-119 #67756e,#1d2824,
+== style clickdismiss grid=120x32
|23: 0-1 d,#314738, 2-59 #becfc4,#314738, 60-60 #becfc4,#608269, 61-119 #becfc4,#0d1410,
|24: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410,
-== snap ttyprobe grid=120x31 cursor=22,24
+== snap ttyprobe grid=120x32 cursor=22,24
|22: /tmp/pardes-snap/chordcut/cwd/g.stty -icanon -echo; printf
|23: '\x1b[?2004h\x1b[?1000h\x1b[?1006h'; cat -vtxt Save Term
|24: Collapse Follow Delel
@@ -88,5 +99,6 @@
|26: 2 line 2 '\x1b[?2004h\x1b[?1000h\x1b[?1006h'; cat -vtxt Save Term
|27: ~ Collapse Follow Del Unfollow
|28: ~
-== snap ttyprompt grid=120x31 cursor=24,24
+|31: ✓ /tmp/pardes-snap/chordcut/cwd/g.txt Follow 4 messages · SPC h m
+== snap ttyprompt grid=120x32 cursor=24,24
|24: Collapse Follow Delelel
diff --git a/test/snapshots/cmdexit.golden b/test/snapshots/cmdexit.golden
index f32588c9..99c7f513 100644
--- a/test/snapshots/cmdexit.golden
+++ b/test/snapshots/cmdexit.golden
@@ -1,15 +1,41 @@
== snap opened grid=120x31 cursor=7,3
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/cmdexit/cwd/cmds.txt Save Term Collapse Follow Del
+| /tmp/pardes-snap/cmdexit/cwd/cmds.txt Keep Save Term Collapse Follow Del
| 1 sleep 30 & echo BG''STARTED
| 2 exec </dev/null >/dev/null 2>&1; sleep 1; false
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/cmdexit/cwd/cmds.txt:1
== snap background grid=120x31 cursor=7,3
-|17: /tmp/pardes-snap/cmdexit/cwd (sleep 30 & echo BG''STARTED) exit 0 Kill Save Collapse Del
-|18: % sleep 30 & echo BG''STARTED
-|19: BGSTARTED
-|20: exit 0
+|16: /tmp/pardes-snap/cmdexit/cwd (sleep 30 & echo BG''STARTED) exit 0 Kill Save Collapse Del
+|17: % sleep 30 & echo BG''STARTED
+|18: BGSTARTED
+|19: exit 0
== snap letgo grid=120x31 cursor=7,3
-|24: /tmp/pardes-snap/cmdexit/cwd (exec </dev/null >/dev/null 2>&1; sleep 1; false) exit 1 Kill Save Collapse Del
-|25: % exec </dev/null >/dev/null 2>&1; sleep 1; false
-|26: exit 1
+|23: /tmp/pardes-snap/cmdexit/cwd (exec </dev/null >/dev/null 2>&1; sleep 1; false) exit 1 Kill Save Collapse Del
+|24: % exec </dev/null >/dev/null 2>&1; sleep 1; false
+|25: exit 1
diff --git a/test/snapshots/cmdword.golden b/test/snapshots/cmdword.golden
index 44c50036..67a51000 100644
--- a/test/snapshots/cmdword.golden
+++ b/test/snapshots/cmdword.golden
@@ -3,28 +3,58 @@
| New Term Find Grep Joincol Delcol
| /tmp/pardes-snap/cmdword/cwd/cmds.txt Save Term Collapse Follow Del
| 1 @`echo ZZ''E` @`echo ZZ''L` Look p.txt @`Look .`
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/cmdword/cwd/cmds.txt:1
== 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
+|16: /tmp/pardes-snap/cmdword/cwd (echo ZZ''E) exit 0 Kill Save Collapse Del
+|17: % echo ZZ''E
+|18: ZZE
+|19: exit 0
+== snap atlook grid=120x31 cursor=2,23
+|16: /tmp/pardes-snap/cmdword/cwd (echo ZZ''L) exit 0 Kill Save Collapse Del
+|20: % echo ZZ''L
+|21: ZZL
+|22: exit 0
+|30: /tmp/pardes-snap/cmdword/cwd
== snap lookword grid=120x31 cursor=7,6
|5: /tmp/pardes-snap/cmdword/cwd/p.txt Save Term Collapse Follow Del
|6: 1 just text
+|30: /tmp/pardes-snap/cmdword/cwd/p.txt:1
== snap nested grid=120x31 cursor=7,9
|8: /tmp/pardes-snap/cmdword/cwd/ Get Term Collapse Del
|9: 1 cmds.txt p.txt zzmark.txt
|10: ~
+|30: /tmp/pardes-snap/cmdword/cwd/:1
== snap execword grid=120x31 cursor=7,9
|8: /tmp/pardes-snap/cmdword/cwd/ Get Term Collapse Del Exec
== snap tagcmd grid=120x31 cursor=7,9
|8: /tmp/pardes-snap/cmdword/cwd/ Get Term Collapse Del Exec @`echo ZZ''T`
-|17: /tmp/pardes-snap/cmdword/cwd (echo ZZ''T) exit 0 Kill Save Collapse Del
-|24: % echo ZZ''T
-|25: ZZT
-|26: exit 0
+|16: /tmp/pardes-snap/cmdword/cwd (echo ZZ''T) exit 0 Kill Save Collapse Del
+|23: % echo ZZ''T
+|24: ZZT
+|25: exit 0
diff --git a/test/snapshots/colgrip.golden b/test/snapshots/colgrip.golden
index a64be69c..e41cf833 100644
--- a/test/snapshots/colgrip.golden
+++ b/test/snapshots/colgrip.golden
@@ -1,8 +1,8 @@
== style rest grid=100x24
|0: 0-1 d,#1d2824, 2-99 #b2c3b8,#1d2824,
|1: 0-1 d,#887455, 2-49 #b2c3b8,#1d2824, 50-51 #b2c3b8,#887455, 52-99 #becfc4,#314738,
-|2: 0-1 d,#496656, 2-30 #b2c3b8,#1d2824, 31-36 #d3b0d9,#1d2824, 37-49 #b2c3b8,#1d2824, 50-51 #b2c3b8,#add38a, 52-80 #becfc4,#314738, 81-90 #dfbce5,#314738, 91-99 #becfc4,#314738,
-|3: 0-1 d,#1d2824, 2-49 #b2c3b8,#1d2824, 50-52 #b2c3b8,#314738, 53-99 #becfc4,#314738,
+|2: 0-1 d,#496656, 2-30 #b2c3b8,#2c2819, 31-36 #d3b0d9,#2c2819, 37-49 #b2c3b8,#2c2819, 50-51 #b2c3b8,#add38a, 52-80 #becfc4,#314738, 81-90 #dfbce5,#314738, 91-99 #becfc4,#314738,
+|3: 0-1 d,#2c2819, 2-49 #b2c3b8,#2c2819, 50-52 #b2c3b8,#314738, 53-99 #becfc4,#314738,
|4: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
|5: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
|6: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
@@ -22,28 +22,46 @@
|20: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
|21: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
|22: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
-|23: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
+|23: 0-1 d,#1d2824, 2-99 #b2c3b8,#1d2824,
== style held grid=100x24
|1: 0-1 d,#887455, 2-49 #b2c3b8,#1d2824, 50-51 #b2c3b8,#f4c086, 52-99 #becfc4,#314738,
== snap resize-drag grid=100x24 cursor=54,6
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/colgrip/cwd/w.txt Save Term Col /tmp/pardes-snap/colgrip/cwd Term+bash Save Mode
-| lapse Follow Del Filter Collapse Del
+| /tmp/pardes-snap/colgrip/cwd/w.txt Keep Save Ter /tmp/pardes-snap/colgrip/cwd Term+bash Save Mode
+| m Collapse Follow Del Filter Collapse Del
| 1 x ls
| w.txt
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/colgrip/cwd
== style resize-drag grid=100x24
== snap resize-done grid=100x24 cursor=44,6
|1: New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
-|2: /tmp/pardes-snap/colgrip/cwd/w.txt Sav /tmp/pardes-snap/colgrip/cwd Term+bash Save Mode Filter Co
-|3: e Term Collapse Follow Del llapse Del
+|2: /tmp/pardes-snap/colgrip/cwd/w.txt Kee /tmp/pardes-snap/colgrip/cwd Term+bash Save Mode Filter Co
+|3: p Save Term Collapse Follow Del llapse Del
|4: 1 x ls
|5: w.txt
== snap reorder-drag grid=100x24 cursor=44,6
== style reorder-drag grid=100x24
|1: 0-1 d,#887455, 2-39 #b2c3b8,#1d2824, 40-41 #b2c3b8,#f4c086, 42-99 #becfc4,#314738,
-|2: 0-1 d,#496656, 2-30 #b2c3b8,#1d2824, 31-36 #d3b0d9,#1d2824, 37-39 #b2c3b8,#1d2824, 40-41 #b2c3b8,#add38a, 42-70 #becfc4,#314738, 71-80 #dfbce5,#314738, 81-99 #becfc4,#314738,
-|3: 0-1 d,#1d2824, 2-39 #b2c3b8,#1d2824, 40-41 #b2c3b8,#314738, 42-99 #becfc4,#314738,
+|2: 0-1 d,#496656, 2-30 #b2c3b8,#2c2819, 31-36 #d3b0d9,#2c2819, 37-39 #b2c3b8,#2c2819, 40-41 #b2c3b8,#add38a, 42-70 #becfc4,#314738, 71-80 #dfbce5,#314738, 81-99 #becfc4,#314738,
+|3: 0-1 d,#2c2819, 2-39 #b2c3b8,#2c2819, 40-41 #b2c3b8,#314738, 42-99 #becfc4,#314738,
|4: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-39 #e5eee5,#0d1410, 40-40 #e5eee5,#608269, 41-99 #e5eee5,#0d1410,
|5: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-41 d,#0d1410, 42-99 #e5eee5,#0d1410,
|6: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410,
@@ -63,10 +81,9 @@
|20: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410,
|21: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410,
|22: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410,
-|23: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410,
== snap reorder-done grid=100x24 cursor=4,6
|1: New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
-|2: /tmp/pardes-snap/colgrip/cwd Term+bash Save Mode Filter Co /tmp/pardes-snap/colgrip/cwd/w.txt Sav
-|3: llapse Del e Term Collapse Follow Del
+|2: /tmp/pardes-snap/colgrip/cwd Term+bash Save Mode Filter Co /tmp/pardes-snap/colgrip/cwd/w.txt Kee
+|3: llapse Del p Save Term Collapse Follow Del
|4: ls 1 x
|5: w.txt
diff --git a/test/snapshots/collapse.golden b/test/snapshots/collapse.golden
index 3f73e051..89155f5e 100644
--- a/test/snapshots/collapse.golden
+++ b/test/snapshots/collapse.golden
@@ -1,21 +1,41 @@
== snap before grid=160x25 cursor=7,3
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/collapse/cwd/kept.txt Save Term Collapse Follow Del
+| /tmp/pardes-snap/collapse/cwd/kept.txt Keep Save Term Collapse Follow Del
| 1 KEEP-FIRST
| 2 KEEP-SECOND
| 3 KEEP-THIRD
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/collapse/cwd/kept.txt:1
== snap middle-collapsed grid=160x25 cursor=hidden
|3:
|4:
|5:
+|24: ✓ /tmp/pardes-snap/collapse/cwd/kept.txt Collapse 2 messages · SPC h m
== 9p middle-collapsed-cursor grid=160x25 cursor=none
|0: Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
@0: 0-84 #b2c3b8,#1d2824,,tagline 85-159 d,#1d2824,,tagline
|1: New Term Find Grep Joincol Delcol
@1: 0-1 #ffffff,#887455,,tagline 2-34 #becfc4,#314738,,tagline 35-159 d,#314738,,tagline
-|2: /tmp/pardes-snap/collapse/cwd/kept.txt Save Term Collapse Follow Del
-@2: 0-1 #000000,#add38a,,tagline 2-31 #becfc4,#314738,,tagline 32-39 #dfbce5,#314738,,tagline 40-69 #becfc4,#314738,,tagline 70-159 d,#314738,,tagline
+|2: /tmp/pardes-snap/collapse/cwd/kept.txt Keep Save Term Collapse Follow Del
+@2: 0-1 #000000,#add38a,,tagline 2-31 #becfc4,#2c2819,,tagline 32-39 #dfbce5,#2c2819,,tagline 40-74 #becfc4,#2c2819,,tagline 75-159 d,#2c2819,,tagline
|3:
@3: 0-159 d,#486152,,body
|4:
@@ -58,21 +78,28 @@
@22: 0-159 d,#486152,,body
|23:
@23: 0-159 d,#486152,,body
-|24:
-@24: 0-159 d,#486152,,body
+|24: ✓ /tmp/pardes-snap/collapse/cwd/kept.txt Collapse 2 messages · SPC h m
++24: 2="✓" 150="·"
+@24: 0-1 d,#1d2824,,tagline 2-50 #67756e,#1d2824,,tagline 51-138 #b2c3b8,#1d2824,,tagline 139-158 #67756e,#1d2824,,tagline 159-159 d,#1d2824,,tagline
== snap middle-restored grid=160x25 cursor=7,3
-|3: 1 KEEP-FIRST Collapse
+|3: 1 KEEP-FIRST
|4: 2 KEEP-SECOND
|5: 3 KEEP-THIRD
+|24: ✓ /tmp/pardes-snap/collapse/cwd/kept.txt Collapse 4 messages · SPC h m
== snap tab-collapsed grid=160x25 cursor=hidden
|3:
|4:
|5:
+|24: ✓ /tmp/pardes-snap/collapse/cwd/kept.txt Collapse 7 messages · SPC h m
== 9p tab-collapsed-cursor grid=160x25 cursor=none
+|24: ✓ /tmp/pardes-snap/collapse/cwd/kept.txt Collapse 7 messages · SPC h m
++24: 2="✓" 150="·"
+@24: 0-1 d,#1d2824,,tagline 2-50 #67756e,#1d2824,,tagline 51-138 #b2c3b8,#1d2824,,tagline 139-158 #67756e,#1d2824,,tagline 159-159 d,#1d2824,,tagline
== snap tab-restored grid=160x25 cursor=7,3
-|3: 1 KEEP-FIRST Collapse
+|3: 1 KEEP-FIRST
|4: 2 KEEP-SECOND
|5: 3 KEEP-THIRD
+|24: ✓ /tmp/pardes-snap/collapse/cwd/kept.txt Collapse 10 messages · SPC h m
== file unchanged
KEEP-FIRST
KEEP-SECOND
diff --git a/test/snapshots/cursorline.golden b/test/snapshots/cursorline.golden
index c12df520..6ee64e71 100644
--- a/test/snapshots/cursorline.golden
+++ b/test/snapshots/cursorline.golden
@@ -1,57 +1,68 @@
-== snap top grid=150x31 cursor=7,7
+== snap top grid=150x31 cursor=82,18
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
| /tmp/pardes-snap/cursorline/cwd Term+bash Save Mode Filter Collapse Del /tmp/pardes-snap/cursorline/cwd Term+bash Save Mode Filter Collapse Del
| ls ls
| cur.txt cur.txt
|
-| /tmp/pardes-snap/cursorline/cwd/cur.txt Save Term Collapse Follow Del
-| 1 line 1
-| 2 line 2
-| 3 line 3
-| 4 line 4
-| 5 line 5
-| 6 line 6
-| 7 line 7
-| 8 line 8
-| 9 line 9
-| 10 line 10
-| /tmp/pardes-snap/cursorline/cwd Term+bash Save Mode Filter Collapse Del
-| ls
-| cur.txt
+|
+|
+| cur.txt
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/cursorline/cwd Term+bash Save Mode Filter Collapse Del ‹@p1 › /tmp/pardes-snap/cursorline/cwd/cur.txt Keep Save Term Collapse Fo
+| ls llow Del
+| cur.txt 1 line 1
+| 2 line 2
+| 3 line 3
+| 4 line 4
+| 5 line 5
+| 6 line 6
+| 7 line 7
+| 8 line 8
+| 9 line 9
+| 10 line 10
+| 11 line 11
+| 12 line 12
+| · @p1 a copy of the terminal's text: Tab or B2 runs it; what the program draws next replaces it (Ctrl-b types to the program) 1 message · SPC h m
== style top grid=150x31
|0: 0-1 d,#1d2824, 2-149 #b2c3b8,#1d2824,
-|1: 0-1 d,#887455, 2-74 #becfc4,#314738, 75-76 #becfc4,#887455, 77-149 #b2c3b8,#1d2824,
+|1: 0-1 d,#887455, 2-74 #b2c3b8,#1d2824, 75-76 #b2c3b8,#887455, 77-149 #becfc4,#314738,
|2: 0-1 d,#496656, 2-33 #b2c3b8,#1d2824, 34-43 #d3b0d9,#1d2824, 44-74 #b2c3b8,#1d2824, 75-76 #b2c3b8,#496656, 77-108 #b2c3b8,#1d2824, 109-118 #d3b0d9,#1d2824, 119-149 #b2c3b8,#1d2824,
|3: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
|4: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
|5: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|6: 0-1 d,#add38a, 2-33 #becfc4,#314738, 34-41 #dfbce5,#314738, 42-74 #becfc4,#314738, 75-75 #becfc4,#608269, 76-149 #becfc4,#0d1410,
-|7: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|8: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|9: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|10: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|11: 0-0 d,#152019, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|12: 0-0 d,#152019, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|13: 0-0 d,#152019, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|14: 0-0 d,#152019, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|15: 0-0 d,#152019, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|16: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|17: 0-1 d,#496656, 2-33 #b2c3b8,#1d2824, 34-43 #d3b0d9,#1d2824, 44-74 #b2c3b8,#1d2824, 75-75 #b2c3b8,#608269, 76-149 #b2c3b8,#0d1410,
-|18: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|19: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|20: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|21: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|22: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|23: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|24: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|25: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|26: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|27: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|28: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|29: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|30: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-== snap down3 grid=150x31 cursor=7,10
+|6: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
+|7: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
+|8: 0-0 d,#608269, 1-3 d,#0d1410, 4-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
+|9: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
+|10: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
+|11: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
+|12: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
+|13: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
+|14: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
+|15: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
+|16: 0-1 d,#496656, 2-33 #b2c3b8,#1d2824, 34-43 #d3b0d9,#1d2824, 44-74 #b2c3b8,#1d2824, 75-76 #b2c3b8,#add38a, 77-115 #becfc4,#2c2819, 116-123 #dfbce5,#2c2819, 124-149 #becfc4,#2c2819,
+|17: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-76 #e5eee5,#2c2819, 77-149 #becfc4,#2c2819,
+|18: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-76 #e5eee5,#0d1410, 77-79 #e5eee5,#0d1410,b 80-81 #616f64,#0d1410,b 82-149 #e5eee5,#0d1410,
+|19: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-79 d,#0d1410, 80-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410,
+|20: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-79 d,#0d1410, 80-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410,
+|21: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-79 d,#0d1410, 80-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410,
+|22: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-79 d,#0d1410, 80-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410,
+|23: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-79 d,#0d1410, 80-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410,
+|24: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#152019, 76-79 d,#0d1410, 80-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410,
+|25: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#152019, 76-79 d,#0d1410, 80-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410,
+|26: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#152019, 76-79 d,#0d1410, 80-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410,
+|27: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#152019, 76-78 d,#0d1410, 79-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410,
+|28: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#152019, 76-78 d,#0d1410, 79-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410,
+|29: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#152019, 76-78 d,#0d1410, 79-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410,
+|30: 0-1 d,#1d2824, 2-149 #67756e,#1d2824,
+== snap down3 grid=150x31 cursor=82,21
== style down3 grid=150x31
-|7: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|10: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
+|18: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-79 #e5eee5,#0d1410, 80-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410,
+|21: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-76 d,#0d1410, 77-79 d,#0d1410,b 80-81 #616f64,#0d1410,b 82-149 #e5eee5,#0d1410,
diff --git a/test/snapshots/delask.golden b/test/snapshots/delask.golden
index f0cd6978..3d4f924f 100644
--- a/test/snapshots/delask.golden
+++ b/test/snapshots/delask.golden
@@ -1,7 +1,7 @@
== snap three grid=100x36 cursor=18,20
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/delask/cwd/top.txt Save Term Collapse Follow Del
+| /tmp/pardes-snap/delask/cwd/top.txt Keep Save Term Collapse Follow Del
| 1 top-marker
|
|
@@ -26,30 +26,40 @@
|
|
|
-|
| */tmp/pardes-snap/delask/cwd/+New Save Term Collapse Follow Del
| 1 bottom-pane
+|
+|
+|
+|
+|
+|
+| ✓ /tmp/pardes-snap/delask/cwd/+New Window 3 messages · SPC h m
== snap asked grid=100x36 cursor=18,20
|20: 1 middle-pane Del: give space to k above j below
+|35: /tmp/pardes-snap/delask/cwd/+New:1 4 messages · SPC h m
== snap kept grid=100x36 cursor=18,20
|20: 1 middle-pane
== snap below-took grid=100x36 cursor=18,20
|20: 1 bottom-pane
+|27:
|28:
-|29:
+|35: ✓ /tmp/pardes-snap/delask/cwd/+New Del 4 messages · SPC h m
== snap typed grid=100x36 cursor=27,20
|20: 1 bottom-pane DelBelow
-|28: */tmp/pardes-snap/delask/cwd/+New Save Term Collapse Follow Del
-|29: 1 third-pane
+|27: */tmp/pardes-snap/delask/cwd/+New Save Term Collapse Follow Del
+|28: 1 third-pane
+|35: ✓ /tmp/pardes-snap/delask/cwd/+New Window 6 messages · SPC h m
== snap below-took-click grid=100x36 cursor=17,20
|20: 1 third-pane
+|27:
|28:
-|29:
-== snap four grid=100x36 cursor=7,29
-|3: 1 top-marker New
-|28: /tmp/pardes-snap/delask/cwd/+New Save Term Collapse Follow Del
-|29: 1
-== snap mouse-del grid=100x36 cursor=7,29
-|3: 1 top-marker
+|35: ✓ /tmp/pardes-snap/delask/cwd/+New DelBelow 8 messages · SPC h m
+== snap four grid=100x36 cursor=7,28
+|27: /tmp/pardes-snap/delask/cwd/+New Save Term Collapse Follow Del
+|28: 1
+|35: ✓ /tmp/pardes-snap/delask/cwd/top.txt New 9 messages · SPC h m
+== snap mouse-del grid=100x36 cursor=7,28
|19:
|20:
+|35: ✓ /tmp/pardes-snap/delask/cwd/+New Del 11 messages · SPC h m
diff --git a/test/snapshots/diffstack.golden b/test/snapshots/diffstack.golden
index 51251c4c..cd4ce739 100644
--- a/test/snapshots/diffstack.golden
+++ b/test/snapshots/diffstack.golden
@@ -24,9 +24,12 @@
|
|
|
-|
| /tmp/pardes-snap/diffstack/cwd/+New Save Term Collapse Follow Del
| 1
+|
+|
+|
+| /tmp/pardes-snap/diffstack/cwd
== style diff-stack-colours grid=100x31
|0: 0-1 d,#1d2824, 2-99 #b2c3b8,#1d2824,
|1: 0-1 d,#887455, 2-99 #becfc4,#314738,
@@ -53,9 +56,9 @@
|22: 0-0 d,#608269, 1-99 d,#0d1410,
|23: 0-0 d,#608269, 1-99 d,#0d1410,
|24: 0-0 d,#608269, 1-99 d,#0d1410,
-|25: 0-0 d,#608269, 1-99 d,#0d1410,
-|26: 0-1 d,#496656, 2-32 #b2c3b8,#1d2824, 33-37 #d3b0d9,#1d2824, 38-99 #b2c3b8,#1d2824,
-|27: 0-0 d,#608269, 1-4 d,#0d1410, 5-99 #59675c,#0d1410,
+|25: 0-1 d,#496656, 2-32 #b2c3b8,#1d2824, 33-37 #d3b0d9,#1d2824, 38-99 #b2c3b8,#1d2824,
+|26: 0-0 d,#608269, 1-4 d,#0d1410, 5-99 #59675c,#0d1410,
+|27: 0-0 d,#608269, 1-99 d,#0d1410,
|28: 0-0 d,#608269, 1-99 d,#0d1410,
|29: 0-0 d,#608269, 1-99 d,#0d1410,
-|30: 0-0 d,#608269, 1-99 d,#0d1410,
+|30: 0-1 d,#1d2824, 2-99 #b2c3b8,#1d2824,
diff --git a/test/snapshots/diffview.golden b/test/snapshots/diffview.golden
index 50e1b195..e5020d48 100644
--- a/test/snapshots/diffview.golden
+++ b/test/snapshots/diffview.golden
@@ -1,7 +1,7 @@
== snap diff-pane grid=100x31 cursor=7,3
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/diffview/cwd/change.diff Save Term Diff Collapse Follow Del
+| /tmp/pardes-snap/diffview/cwd/change.diff Keep Save Term Diff Collapse Follow Del
| 1 diff --git a/src/shape.zig b/src/shape.zig
| 2 index 1111111..2222222 100644
| 3 --- a/src/shape.zig
@@ -22,10 +22,18 @@
| 18 ;
| 19 };
| ~
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/diffview/cwd/change.diff:1
== style diff-colours grid=100x31
|0: 0-1 d,#1d2824, 2-99 #b2c3b8,#1d2824,
|1: 0-1 d,#887455, 2-99 #becfc4,#314738,
-|2: 0-1 d,#add38a, 2-31 #becfc4,#314738, 32-43 #dfbce5,#314738, 44-99 #becfc4,#314738,
+|2: 0-1 d,#add38a, 2-31 #becfc4,#2c2819, 32-43 #dfbce5,#2c2819, 44-99 #becfc4,#2c2819,
|3: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-99 #b9f480,#0d1410,
|4: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-99 #b9f480,#0d1410,
|5: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-99 #b9f480,#0d1410,
@@ -53,27 +61,35 @@
|27: 0-0 d,#608269, 1-99 d,#0d1410,
|28: 0-0 d,#608269, 1-99 d,#0d1410,
|29: 0-0 d,#608269, 1-99 d,#0d1410,
-|30: 0-0 d,#608269, 1-99 d,#0d1410,
-== snap look-added-line grid=100x31 cursor=55,22
-|16: /tmp/pardes-snap/diffview/cwd/src/shape.zig Save Term Collapse Follow TreeContext Def Refs Del
-|17: 1 const std = @import("std");
-|18: 2
-|19: 3 pub const Shape = union(enum) {
-|20: 4 circle: f32,
-|21: 5 square: f32,
-|22: 6 triangle: struct { base: f32, height: f32 },
-|23: 7
-|24: 8 const note =
-|25: 9 \\areas, defer
-|26: 10 \\summed
-|27: 11 ;
-|28: 12 };
-|29: ~
+|30: 0-1 d,#1d2824, 2-99 #b2c3b8,#1d2824,
+== snap look-added-line grid=100x31 cursor=55,9
+|2: change.diff:12 › /tmp/pardes-snap/diffview/cwd/src/shape.zig Keep Save Term Collapse Follow TreeCo
+|3: ntext Def Refs Del
+|4: 1 const std = @import("std");
+|5: 2
+|6: 3 pub const Shape = union(enum) {
+|7: 4 circle: f32,
+|8: 5 square: f32,
+|9: 6 triangle: struct { base: f32, height: f32 },
+|10: 7
+|11: 8 const note =
+|12: 9 \\areas, defer
+|13: 10 \\summed
+|14: 11 ;
+|15: 12 };
+|16: ~
+|17:
+|18:
+|19:
+|20:
+|21:
+|22:
+|30: /tmp/pardes-snap/diffview/cwd/src/shape.zig:6
== snap command-pane grid=100x31 cursor=7,3
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/diffview/cwd/cmds.txt Save Term Collapse Follow Del
-| 1 cat change.diff Exec
+| /tmp/pardes-snap/diffview/cwd/cmds.txt Keep Save Term Collapse Follow Del
+| 1 cat change.diff
| ~
|
|
@@ -86,7 +102,6 @@
|
|
|
-|
| /tmp/pardes-snap/diffview/cwd (cat change.diff) exit 0 Kill Save Collapse Del
| circle: f32,
| - square: u8 = 7,
@@ -100,11 +115,13 @@
| ;
| };
| exit 0
+|
+| ✓ /tmp/pardes-snap/diffview/cwd/cmds.txt Exec 1 message · SPC h m
== style command-colours grid=100x31
|0: 0-1 d,#1d2824, 2-99 #b2c3b8,#1d2824,
|1: 0-1 d,#887455, 2-99 #becfc4,#314738,
-|2: 0-1 d,#add38a, 2-31 #becfc4,#314738, 32-40 #dfbce5,#314738, 41-99 #becfc4,#314738,
-|3: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-93 #e5eee5,#0d1410, 94-94 #e5eee5,#1d2824, 95-99 #b2c3b8,#1d2824,
+|2: 0-1 d,#add38a, 2-31 #becfc4,#2c2819, 32-40 #dfbce5,#2c2819, 41-99 #becfc4,#2c2819,
+|3: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-99 #e5eee5,#0d1410,
|4: 0-0 d,#608269, 1-4 d,#0d1410, 5-99 #59675c,#0d1410,
|5: 0-0 d,#608269, 1-99 d,#0d1410,
|6: 0-0 d,#608269, 1-99 d,#0d1410,
@@ -117,32 +134,32 @@
|13: 0-0 d,#608269, 1-99 d,#0d1410,
|14: 0-0 d,#608269, 1-99 d,#0d1410,
|15: 0-0 d,#608269, 1-99 d,#0d1410,
-|16: 0-0 d,#608269, 1-99 d,#0d1410,
-|17: 0-1 d,#496656, 2-99 #b2c3b8,#1d2824,
-|18: 0-0 d,#152019, 1-6 d,#0d1410, 7-99 #e5eee5,#0d1410,
-|19: 0-0 d,#152019, 1-1 d,#0d1410, 2-2 #f1a39b,#302b25,b 3-6 #f1a39b,#302b25, 7-19 #e5eee5,#302b25, 20-20 #f8c082,#302b25, 21-99 #e5eee5,#302b25,
-|20: 0-0 d,#152019, 1-1 d,#0d1410, 2-2 #b6ce94,#263025,b 3-6 #b6ce94,#263025, 7-99 #e5eee5,#263025,
-|21: 0-0 d,#152019, 1-1 d,#0d1410, 2-2 #b6ce94,#263025,b 3-6 #b6ce94,#263025, 7-16 #e5eee5,#263025, 17-23 #c9a7ed,#263025, 24-99 #e5eee5,#263025,
-|22: 0-0 d,#152019, 1-99 d,#0d1410,
-|23: 0-0 d,#608269, 1-6 d,#0d1410, 7-99 #e5eee5,#0d1410,
-|24: 0-0 d,#608269, 1-1 d,#0d1410, 2-2 #f1a39b,#302b25,b 3-10 #f1a39b,#302b25, 11-99 #b8d88a,#302b25,
+|16: 0-1 d,#496656, 2-99 #b2c3b8,#1d2824,
+|17: 0-0 d,#152019, 1-6 d,#0d1410, 7-99 #e5eee5,#0d1410,
+|18: 0-0 d,#152019, 1-1 d,#0d1410, 2-2 #f1a39b,#302b25,b 3-6 #f1a39b,#302b25, 7-19 #e5eee5,#302b25, 20-20 #f8c082,#302b25, 21-99 #e5eee5,#302b25,
+|19: 0-0 d,#152019, 1-1 d,#0d1410, 2-2 #b6ce94,#263025,b 3-6 #b6ce94,#263025, 7-99 #e5eee5,#263025,
+|20: 0-0 d,#152019, 1-1 d,#0d1410, 2-2 #b6ce94,#263025,b 3-6 #b6ce94,#263025, 7-16 #e5eee5,#263025, 17-23 #c9a7ed,#263025, 24-99 #e5eee5,#263025,
+|21: 0-0 d,#152019, 1-99 d,#0d1410,
+|22: 0-0 d,#608269, 1-6 d,#0d1410, 7-99 #e5eee5,#0d1410,
+|23: 0-0 d,#608269, 1-1 d,#0d1410, 2-2 #f1a39b,#302b25,b 3-10 #f1a39b,#302b25, 11-99 #b8d88a,#302b25,
+|24: 0-0 d,#608269, 1-1 d,#0d1410, 2-2 #b6ce94,#263025,b 3-10 #b6ce94,#263025, 11-99 #b8d88a,#263025,
|25: 0-0 d,#608269, 1-1 d,#0d1410, 2-2 #b6ce94,#263025,b 3-10 #b6ce94,#263025, 11-99 #b8d88a,#263025,
-|26: 0-0 d,#608269, 1-1 d,#0d1410, 2-2 #b6ce94,#263025,b 3-10 #b6ce94,#263025, 11-99 #b8d88a,#263025,
-|27: 0-0 d,#608269, 1-6 d,#0d1410, 7-99 #e5eee5,#0d1410,
-|28: 0-0 d,#608269, 1-2 d,#0d1410, 3-99 #e5eee5,#0d1410,
-|29: 0-0 d,#608269, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|30: 0-0 d,#152019, 1-99 d,#0d1410,
-== snap command-look grid=100x31 cursor=23,10
-|3: 1 cat change.diff
-|5: /tmp/pardes-snap/diffview/cwd/src/shape.zig Save Term Collapse Follow TreeContext Def Refs Del
-|6: 1 const std = @import("std");
-|7: 2
-|8: 3 pub const Shape = union(enum) {
-|9: 4 circle: f32,
-|10: 5 square: f32,
-|11: 6 triangle: struct { base: f32, height: f32 },
-|12: 7
-|13: 8 const note =
-|14: 9 \\areas, defer
-|15: 10 \\summed
-|16: 11 ;
+|26: 0-0 d,#608269, 1-6 d,#0d1410, 7-99 #e5eee5,#0d1410,
+|27: 0-0 d,#608269, 1-2 d,#0d1410, 3-99 #e5eee5,#0d1410,
+|28: 0-0 d,#608269, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
+|29: 0-0 d,#152019, 1-99 d,#0d1410,
+|30: 0-1 d,#1d2824, 2-99 #67756e,#1d2824,
+== snap command-look grid=100x31 cursor=55,28
+|17: + \\areas, defer
+|18: + \\summed
+|19: ;
+|20: };
+|21: exit 0
+|22:
+|23: ‹@p2 › /tmp/pardes-snap/diffview/cwd/src/shape.zig Keep Save Term Collapse Follow TreeContext Def
+|24: Refs Del
+|25: 3 pub const Shape = union(enum) {
+|26: 4 circle: f32,
+|27: 5 square: f32,
+|28: 6 triangle: struct { base: f32, height: f32 },
+|29: 7
diff --git a/test/snapshots/dirpane.golden b/test/snapshots/dirpane.golden
index e8cca4f9..c9251994 100644
--- a/test/snapshots/dirpane.golden
+++ b/test/snapshots/dirpane.golden
@@ -1,13 +1,30 @@
== snap dir-open grid=80x24 cursor=7,6
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/dirpane/cwd/top.txt Save Term Collapse Follow Del
+| /tmp/pardes-snap/dirpane/cwd/top.txt Keep Save Term Collapse Follow Del
| 1 sub
|
| /tmp/pardes-snap/dirpane/cwd/sub/ Get Term Collapse Del
| 1 .hidden beta-gamma.txt inner.txt
| 2 alpha.txt deeper/ zeta
| ~
-== snap entry-open grid=80x24 cursor=7,9
-|8: /tmp/pardes-snap/dirpane/cwd/sub/inner.txt Save Term Collapse Follow Del
-|9: 1 inner-marker
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/dirpane/cwd/sub/:1
+== snap entry-open grid=80x24 cursor=7,16
+|14: ‹@p2 › /tmp/pardes-snap/dirpane/cwd/sub/inner.txt Keep Save Term Collapse Foll
+|15: ow Del
+|16: 1 inner-marker
+|23: /tmp/pardes-snap/dirpane/cwd/sub/inner.txt:1
diff --git a/test/snapshots/dump.golden b/test/snapshots/dump.golden
index 222c9720..8915ffe0 100644
--- a/test/snapshots/dump.golden
+++ b/test/snapshots/dump.golden
@@ -3,7 +3,7 @@
| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
| /tmp/pardes-snap/dump/cwd Term+bash Save Mode Fi /tmp/pardes-snap/dump/cwd Term+bash Save Mode Fi
| lter Collapse Del lter Collapse Del
-| ls Dump ls
+| ls ls
| d.txt d.txt
|
| ── restored history ── ── restored history ──
@@ -15,10 +15,18 @@
|
|
|
-|
| /tmp/pardes-snap/dump/cwd Term+bash Save Mode Fi
| lter Collapse Del
| ls
| d.txt
|
| ── restored history ──
+|
+|
+|
+|
+|
+|
+|
+|
+| ✓ @p1 Dump 2 messages · SPC h m
diff --git a/test/snapshots/edit.golden b/test/snapshots/edit.golden
index 8dcdcc36..42b8f753 100644
--- a/test/snapshots/edit.golden
+++ b/test/snapshots/edit.golden
@@ -15,11 +15,21 @@
|
|
|
-|
| /tmp/pardes-snap/edit/cwd Term+bash Save Mode Fi
| lter Collapse Del
| ls
| e.txt
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| · @p1 a copy of the terminal's text: Tab or B2 runs it; what the program draw 1 message · SPC h m
== style inserted grid=100x31
|0: 0-1 d,#1d2824, 2-99 #b2c3b8,#1d2824,
|1: 0-1 d,#887455, 2-49 #becfc4,#314738, 50-51 #becfc4,#887455, 52-99 #b2c3b8,#1d2824,
@@ -37,11 +47,11 @@
|13: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
|14: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
|15: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
-|16: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
-|17: 0-1 d,#496656, 2-27 #b2c3b8,#1d2824, 28-37 #d3b0d9,#1d2824, 38-49 #b2c3b8,#1d2824, 50-50 #b2c3b8,#608269, 51-99 #b2c3b8,#0d1410,
-|18: 0-1 d,#1d2824, 2-49 #b2c3b8,#1d2824, 50-50 #b2c3b8,#608269, 51-99 #b2c3b8,#0d1410,
+|16: 0-1 d,#496656, 2-27 #b2c3b8,#1d2824, 28-37 #d3b0d9,#1d2824, 38-49 #b2c3b8,#1d2824, 50-50 #b2c3b8,#608269, 51-99 #b2c3b8,#0d1410,
+|17: 0-1 d,#1d2824, 2-49 #b2c3b8,#1d2824, 50-50 #b2c3b8,#608269, 51-99 #b2c3b8,#0d1410,
+|18: 0-0 d,#608269, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
|19: 0-0 d,#608269, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
-|20: 0-0 d,#608269, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
+|20: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
|21: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
|22: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
|23: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
@@ -51,4 +61,4 @@
|27: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
|28: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
|29: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
-|30: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
+|30: 0-1 d,#1d2824, 2-99 #67756e,#1d2824,
diff --git a/test/snapshots/emptycol.golden b/test/snapshots/emptycol.golden
index 505b2bbc..f76f9c8c 100644
--- a/test/snapshots/emptycol.golden
+++ b/test/snapshots/emptycol.golden
@@ -1,17 +1,37 @@
== snap newcol grid=100x24 cursor=52,1
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/emptycol/cwd/notes.txt Save Ter
-| m Collapse Follow Del
+| /tmp/pardes-snap/emptycol/cwd/notes.txt Keep Sav
+| e Term Collapse Follow Del
| 1 one
| 2 two
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/emptycol/cwd/notes.txt:1
== snap filled grid=100x24 cursor=54,6
-|2: /tmp/pardes-snap/emptycol/cwd/notes.txt Save Ter /tmp/pardes-snap/emptycol/cwd Term+bash Save Mod
-|3: m Collapse Follow Del e Filter Collapse Del
+|2: /tmp/pardes-snap/emptycol/cwd/notes.txt Keep Sav /tmp/pardes-snap/emptycol/cwd Term+bash Save Mod
+|3: e Term Collapse Follow Del e Filter Collapse Del
|4: 1 one ls
|5: 2 two notes.txt
+|23: /tmp/pardes-snap/emptycol/cwd
== snap emptied grid=100x24 cursor=52,1
-|2: /tmp/pardes-snap/emptycol/cwd/notes.txt Save Ter
-|3: m Collapse Follow Del
+|2: /tmp/pardes-snap/emptycol/cwd/notes.txt Keep Sav
+|3: e Term Collapse Follow Del
|4: 1 one
|5: 2 two
+|23: /tmp/pardes-snap/emptycol/cwd/notes.txt:1
diff --git a/test/snapshots/exec-bigdrag.golden b/test/snapshots/exec-bigdrag.golden
index 6290882a..54015143 100644
--- a/test/snapshots/exec-bigdrag.golden
+++ b/test/snapshots/exec-bigdrag.golden
@@ -2,12 +2,8 @@
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
| /tmp/pardes-snap/exec-bigdrag/cwd Term+bash Save Mode Filter Collapse Del /tmp/pardes-snap/exec-bigdrag/cwd Term+bash Save Mode Filter Collapse Del
-| ls 2
-| big.txt bash: 91line: command not found
-| 802line 2803line 2804line 2805line 2806line 2807line 2808line 2809line 2810line 2811line 2812lin
-| e
-| bash: 802line: command not found
-| 2813line 2814line 2815line 2816line 2817line 2818line 2819line 2820line 2821line 2822line 2823li
+| ls bash: 802line: command not found
+| big.txt 2813line 2814line 2815line 2816line 2817line 2818line 2819line 2820line 2821line 2822line 2823li
| ne
| bash: 2813line: command not found
| 2824line 2825line 2826line 2827line 2828line 2829line 2830line 2831line 2832line 2833line 2834l
@@ -31,17 +27,17 @@
| 89line 2890line 2891line 2892line 2893line 2894line 2895line 2896line 2897line 2898line 2899line
| 2
| bash: 89line: command not found
-| /tmp/pardes-snap/exec-bigdrag/cwd Term+bash Save Mode Filter Collapse Del 900line 2901line 2902line 2903line 2904line 2905line 2906line 2907line 2908line 2909line 2910lin
-| ls e
-| big.txt bash: 900line: command not found
-| 2911line 2912line 2913line 2914line 2915line 2916line 2917line 2918line 2919line 2920line 2921li
-| ne
-| bash: 2911line: command not found
-| 2echo alive-o''k922line 2923line 2924line 2925line 2926line 2927line 2928line 2929line 2930line 2
+| 900line 2901line 2902line 2903line 2904line 2905line 2906line 2907line 2908line 2909line 2910lin
+| e
+| bash: 900line: command not found
+| /tmp/pardes-snap/exec-bigdrag/cwd Term+bash Save Mode Filter Collapse Del 2911line 2912line 2913line 2914line 2915line 2916line 2917line 2918line 2919line 2920line 2921li
+| ls ne
+| big.txt bash: 2911line: command not found
+| 2922line 2923line 2924line 2925line 2926line 2927line 2928line 2929line 2930line 2931line 2932l
| in
| bash: 2922line: command not found
| e 2933line 2934line 2935line 2936line 2937line 2938line 2939line 2940line 2941line 2942line 2943
-| li
+| liecho alive-o''k
| bash: e: command not found
| ne 2944line 2945line 2946line 2947line 2948line 2949line 2950line 2951line 2952line 2953line 295
| 4l
@@ -56,6 +52,11 @@
| 29
| bash: 6line: command not found
| 87line 2988line 2989line 2990line 2991line 2992line 2993line 2994line 2995line 2996line 2997line
+| 2
| bash: 87line: command not found
+| 998line 2999line 3000
+| bash: 998line: command not found
| echo alive-o''k
| alive-ok
+|
+| · @p3 a copy of the terminal's text: Tab or B2 runs it; what the program draws next replaces it (Ctrl-b types to the program) 1 message · SPC h m
diff --git a/test/snapshots/exec.golden b/test/snapshots/exec.golden
index 736dfe4f..b7d4f5e7 100644
--- a/test/snapshots/exec.golden
+++ b/test/snapshots/exec.golden
@@ -2,7 +2,7 @@
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
| /tmp/pardes-snap/exec/cwd Term+bash Save Mode Filter Collapse Del /tmp/pardes-snap/exec/cwd Term+bash Save Mode Filter Collapse Del
-| ls Exec ls
+| ls ls
| e.txt e.txt
|
|
@@ -15,24 +15,36 @@
|
|
|
-|
| /tmp/pardes-snap/exec/cwd Term+bash Save Mode Filter Collapse Del
| ls
| e.txt
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| ✓ @p1 Exec 2 messages · SPC h m
== snap kept grid=140x31 cursor=6,3
|3: ZZARG ls
|4: ./c.sh e.txt
|8:
|9:
== snap chord grid=140x31 cursor=6,3
-|3: ZZARG Exec ls
|5: ./c.sh ZZARG
|6: CHORDARG:ZZARG
+|30: ✓ @p1 Exec ×2 2 messages · SPC h m
== snap deleted grid=140x31 cursor=4,5
|3: ls ls
|4: e.txt e.txt
|5:
|6:
+|16:
|17:
|18:
-|19:
+|30: ✓ @p1 Del 3 messages · SPC h m
diff --git a/test/snapshots/fileedit.golden b/test/snapshots/fileedit.golden
index 44ee25df..c4e0f145 100644
--- a/test/snapshots/fileedit.golden
+++ b/test/snapshots/fileedit.golden
@@ -5,42 +5,37 @@
| ls ls
| f.txt f.txt
|
-| */tmp/pardes-snap/fileedit/cwd/f.txt Save Term Collapse Follow Del
-| 1 liEDIT''MEne 1
-| 2 line 2
-| 3 line 3
-| 4 line 4
-| 5 line 5
-| 6 line 6
-| 7 line 7
-| 8 line 8
-| 9 line 9
-| 10 line 10
-| /tmp/pardes-snap/fileedit/cwd Term+bash Save Mode Filter Collapse Del
-| ls
-| f.txt
-== snap deleted grid=150x31 cursor=7,8
-|8: 2 line 3
-|9: 3 line 4
-|10: 4 line 5
-|11: 5 line 6
-|12: 6 line 7
-|13: 7 line 8
-|14: 8 line 9
-|15: 9 line 10
-|16: 10 line 11
-== snap undone grid=150x31 cursor=13,8
-|8: 2 line 2
-|9: 3 line 3
-|10: 4 line 4
-|11: 5 line 5
-|12: 6 line 6
-|13: 7 line 7
-|14: 8 line 8
-|15: 9 line 9
-|16: 10 line 10
+|
+| EDIT''ME
+| f.txt
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/fileedit/cwd Term+bash Save Mode Filter Collapse Del ‹@p1 › /tmp/pardes-snap/fileedit/cwd/f.txt Keep Save Term Collapse Follow
+| ls Del
+| f.txt 1 line 1
+| 2 line 2
+| 3 line 3
+| 4 line 4
+| 5 line 5
+| 6 line 6
+| 7 line 7
+| 8 line 8
+| 9 line 9
+| 10 line 10
+| 11 line 11
+| 12 line 12
+| · @p1 a copy of the terminal's text: Tab or B2 runs it; what the program draws next replaces it (Ctrl-b types to the program) 1 message · SPC h m
+== snap deleted grid=150x31 cursor=2,8
+|8:
+== snap undone grid=150x31 cursor=8,8
+|8: f.txt
== file saved
-liEDIT''MEne 1
+line 1
line 2
line 3
line 4
diff --git a/test/snapshots/filewatch.golden b/test/snapshots/filewatch.golden
index 26ba330d..dfac8cd6 100644
--- a/test/snapshots/filewatch.golden
+++ b/test/snapshots/filewatch.golden
@@ -17,7 +17,6 @@
| 9 line 9
| 10 line 10
| 11 line 11
-| 12 line 12
| /tmp/pardes-snap/filewatch/cwd/sub/s.txt Save Term Collapse Follow Del
| 1 line 1
| 2 line 2
@@ -28,15 +27,20 @@
| 7 line 7
| 8 line 8
| ~
+|
+|
+| · @p1 a copy of the terminal's text: Tab or B2 runs it; what the program draws next replaces it (Ctrl-b types to the program) 1 message · SPC h m
== snap kept grid=210x31 cursor=15,7
-|7: 1 liMYEDITne 1 /tmp/pardes-snap/filewatch/cwd/w.txt changed on disk (get reloads it, Save overwrites it)
+|6: ?/tmp/pardes-snap/filewatch/cwd/w.txt changed on disk ▸ r Reload k Keep mine d Diff · SPC e to answer
+|30: ? /tmp/pardes-snap/filewatch/cwd/w.txt changed on disk 1 question · SPC e
== snap reloaded_sub grid=210x31 cursor=15,7
-|20: 1 RENAMED --:--:-- reloaded /tmp/pardes-snap/filewatch/cwd/sub/s.txt
-|21: ~
+|19: 1 RENAMED
+|20: ~
+|21:
|22:
|23:
|24:
|25:
|26:
|27:
-|28:
+|30: ? /tmp/pardes-snap/filewatch/cwd/w.txt changed on disk +1 · 1 question · SPC e
diff --git a/test/snapshots/find.golden b/test/snapshots/find.golden
index 4825d1dc..c20b3473 100644
--- a/test/snapshots/find.golden
+++ b/test/snapshots/find.golden
@@ -1,62 +1,98 @@
-== snap group grid=120x41 cursor=7,3
+== snap group grid=120x41 cursor=7,4
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/find/cwd/here.txt Save Term Collapse Follow Del
-| 1 Find zqm SPC f
-== snap armed grid=120x41 cursor=7,23
-|3: 1 Find zqm Find
-|22: ^ +Search 1/5 Del
-|23: Find
-|24: here.txt
-|25: other.txt
-|26: sub/ZQMARK-beta.txt
-|27: sub/nest/zqmark-gamma.txt
-|28: zqmark-alpha.txt
-|32: /tmp/pardes-snap/find/cwd/+Preview Del
-|33: 1
-== snap typing grid=120x41 cursor=10,23
-|3: 1 Find zqm
-|22: ^ +Search 1/3 Del
-|23: Find zqm
-|24: zqmark-alpha.txt
-|25: sub/ZQMARK-beta.txt
-|26: sub/nest/zqmark-gamma.txt
-|27:
-|28:
-|32: /tmp/pardes-snap/find/cwd/zqmark-alpha.txt Del
-|33: 1 alpha body
-== snap next grid=120x41 cursor=10,23
-|22: ^ +Search 2/3 Del
-|32: /tmp/pardes-snap/find/cwd/sub/ZQMARK-beta.txt Del
-|33: 1 beta body
-== snap promoted grid=120x41 cursor=7,33
-|22: +Search 2/3 Save Undock Del
-|32: /tmp/pardes-snap/find/cwd/sub/ZQMARK-beta.txt Save Term Collapse Follow Del
-== snap nomatch grid=120x41 cursor=11,14
-|13: ^ +Search 0 Del
-|14: Find zzqq
-|22:
-|23: /tmp/pardes-snap/find/cwd/+Preview Del
-|24: 1
-|25:
-|26:
+| /tmp/pardes-snap/find/cwd/here.txt Keep ␣ f ▸ c Config f Find g Grep h History n New r Recent s Save ↓ unroll
+| · ? help
+| 1 Find zqm
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/find/cwd/here.txt:1
+== snap armed grid=120x41 cursor=51,2
+|2: ^ /tmp/pardes-snap/find/cwd/here.txt Keep ␣ f Find 1/5
+|3: │ │ Walk Look Split Newcol Grep Edit Copy Keep Drop | Grep Recent Panes Symbol
+|4: s All Jumplist
+|5: ▶ here.txt
+|6: other.txt
+|7: sub/ZQMARK-beta.txt
+|8: sub/nest/zqmark-gamma.txt
+|9: zqmark-alpha.txt
+|10: 1 Find zqm
+|40: ✓ /tmp/pardes-snap/find/cwd/here.txt Find 1 message · SPC h m
+== snap typing grid=120x41 cursor=57,2
+|2: ^ /tmp/pardes-snap/find/cwd/zqmark-alpha.txt ␣ f Find zqm 1/3
+|3: │ │ Walk Look Split Newcol Grep Edit Copy Keep Drop | Grep Recent Panes Sym
+|4: bols All Jumplist
+|5: ▶ zqmark-alpha.txt
+|6: sub/ZQMARK-beta.txt
+|7: sub/nest/zqmark-gamma.txt
+|8:
+|9:
+|10: 1 alpha body
+== snap next grid=120x41 cursor=60,2
+|2: ^ /tmp/pardes-snap/find/cwd/sub/ZQMARK-beta.txt ␣ f Find zqm 2/3
+|3: │ │ Walk Look Split Newcol Grep Edit Copy Keep Drop | Grep Recent Panes
+|4: Symbols All Jumplist
+|5: zqmark-alpha.txt
+|6: ▶ sub/ZQMARK-beta.txt
+|10: 1 beta body
+== snap promoted grid=120x41 cursor=7,3
+|2: here.txt:1 › Find zqm 2/3 › /tmp/pardes-snap/find/cwd/sub/ZQMARK-beta.txt Keep Save Term Collapse Follow Del
+|3: 1 beta body
+|4:
+|5:
+|6:
+|7:
+|10:
+== snap nomatch grid=120x41 cursor=94,2
+|2: ^ here.txt:1 › Find zqm 2/3 › /tmp/pardes-snap/find/cwd/sub/ZQMARK-beta.txt Keep ␣ f Find zzqq 0/0
+|3: │ │ Walk Look Split Newcol Grep Edit Co
+|4: py Keep Drop | Grep Recent Panes Symbols All Jumplist
+|5: nothing matches
+|7: 1 beta body
+|40: ✓ /tmp/pardes-snap/find/cwd/sub/ZQMARK-beta.txt Find 2 messages · SPC h m
== snap cancel grid=120x41 cursor=7,3
-|13:
-|14:
-|22: +Search 2/3 Save Undock Del
-|23: Find zqm
-|24: zqmark-alpha.txt
-|25: sub/ZQMARK-beta.txt
-|26: sub/nest/zqmark-gamma.txt
-== snap topbar grid=120x41 cursor=14,3
-|3: 1 Find zqm Find
-|13: +Search 1/3 Del
-|14: Find zqm
-|15: zqmark-alpha.txt
-|16: sub/ZQMARK-beta.txt
-|17: sub/nest/zqmark-gamma.txt
-|22:
-|23: /tmp/pardes-snap/find/cwd/zqmark-alpha.txt Del
-|24: 1 alpha body
-|25:
-|26:
+|2: here.txt:1 › Find zqm 2/3 › /tmp/pardes-snap/find/cwd/sub/ZQMARK-beta.txt Keep Save Term Collapse Follow Del
+|3: 1 beta body
+|4:
+|5:
+|7:
+== snap topbar grid=120x41 cursor=93,2
+|2: ^ here.txt:1 › Find zqm 2/3 › /tmp/pardes-snap/find/cwd/sub/ZQMARK-beta.txt Keep ␣ f Find bod 0/0
+|3: │ │ Walk Look Split Newcol Grep Edit Co
+|4: py Keep Drop | Grep Recent Panes Symbols All Jumplist
+|5: nothing matches
+|7: 1 beta body
+|40: ✓ /tmp/pardes-snap/find/cwd/sub/ZQMARK-beta.txt Find ×2 2 messages · SPC h m
diff --git a/test/snapshots/follow.golden b/test/snapshots/follow.golden
index 69749b42..56de4eb4 100644
--- a/test/snapshots/follow.golden
+++ b/test/snapshots/follow.golden
@@ -1,61 +1,59 @@
== snap three-pages grid=150x30 cursor=7,3
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/follow/cwd/big.txt Save Term Collapse Follow Del /tmp/pardes-snap/follow/cwd/big.txt /tmp/pardes-snap/follow/cwd/big.txt
-| 1 line 1 Follow Save Term Collapse Follow Del Unfoll Save Term Collapse Follow Del Unfo
-| 2 line 2 ow llow
-| 3 line 3 28 line 28 53 line 53
-| 4 line 4 29 line 29 54 line 54
-| 5 line 5 30 line 30 55 line 55
-| 6 line 6 31 line 31 56 line 56
-| 7 line 7 32 line 32 57 line 57
-| 8 line 8 33 line 33 58 line 58
-| 9 line 9 34 line 34 59 line 59
-| 10 line 10 35 line 35 60 line 60
-| 11 line 11 36 line 36 61 line 61
-| 12 line 12 37 line 37 62 line 62
-| 13 line 13 38 line 38 63 line 63
-| 14 line 14 39 line 39 64 line 64
-| 15 line 15 40 line 40 65 line 65
-| 16 line 16 41 line 41 66 line 66
-| 17 line 17 42 line 42 67 line 67
-| 18 line 18 43 line 43 68 line 68
-| 19 line 19 44 line 44 69 line 69
-| 20 line 20 45 line 45 70 line 70
-| 21 line 21 46 line 46 71 line 71
-| 22 line 22 47 line 47 72 line 72
-| 23 line 23 48 line 48 73 line 73
-| 24 line 24 49 line 49 74 line 74
-| 25 line 25 50 line 50 75 line 75
-| 26 line 26 51 line 51 76 line 76
-| 27 line 27 52 line 52 77 line 77
-== snap hop grid=150x30 cursor=82,5
-|3: 1 line 1 Save Term Collapse Follow Del Unfoll Save Term Collapse Follow Del Unfo
-== snap wheel grid=150x30 cursor=hidden
-|3: 2 line 2 Save Term Collapse Follow Del Unfoll Save Term Collapse Follow Del Unfo
-|4: 3 line 3 ow llow
-|5: 4 line 4 29 line 29 54 line 54
-|6: 5 line 5 30 line 30 55 line 55
-|7: 6 line 6 31 line 31 56 line 56
-|8: 7 line 7 32 line 32 57 line 57
-|9: 8 line 8 33 line 33 58 line 58
-|10: 9 line 9 34 line 34 59 line 59
-|11: 10 line 10 35 line 35 60 line 60
-|12: 11 line 11 36 line 36 61 line 61
-|13: 12 line 12 37 line 37 62 line 62
-|14: 13 line 13 38 line 38 63 line 63
-|15: 14 line 14 39 line 39 64 line 64
-|16: 15 line 15 40 line 40 65 line 65
-|17: 16 line 16 41 line 41 66 line 66
-|18: 17 line 17 42 line 42 67 line 67
-|19: 18 line 18 43 line 43 68 line 68
-|20: 19 line 19 44 line 44 69 line 69
-|21: 20 line 20 45 line 45 70 line 70
-|22: 21 line 21 46 line 46 71 line 71
-|23: 22 line 22 47 line 47 72 line 72
-|24: 23 line 23 48 line 48 73 line 73
-|25: 24 line 24 49 line 49 74 line 74
-|26: 25 line 25 50 line 50 75 line 75
-|27: 26 line 26 51 line 51 76 line 76
-|28: 27 line 27 52 line 52 77 line 77
-|29: 28 line 28 53 line 53 78 line 78
+| /tmp/pardes-snap/follow/cwd/big.txt Keep Save Term Collapse Follow Del /tmp/pardes-snap/follow/cwd/big.txt /tmp/pardes-snap/follow/cwd/big.txt
+| 1 line 1 Keep Save Term Collapse Follow Del U Keep Save Term Collapse Follow Del
+| 2 line 2 nfollow Unfollow
+| 3 line 3 27 line 27 51 line 51
+| 4 line 4 28 line 28 52 line 52
+| 5 line 5 29 line 29 53 line 53
+| 6 line 6 30 line 30 54 line 54
+| 7 line 7 31 line 31 55 line 55
+| 8 line 8 32 line 32 56 line 56
+| 9 line 9 33 line 33 57 line 57
+| 10 line 10 34 line 34 58 line 58
+| 11 line 11 35 line 35 59 line 59
+| 12 line 12 36 line 36 60 line 60
+| 13 line 13 37 line 37 61 line 61
+| 14 line 14 38 line 38 62 line 62
+| 15 line 15 39 line 39 63 line 63
+| 16 line 16 40 line 40 64 line 64
+| 17 line 17 41 line 41 65 line 65
+| 18 line 18 42 line 42 66 line 66
+| 19 line 19 43 line 43 67 line 67
+| 20 line 20 44 line 44 68 line 68
+| 21 line 21 45 line 45 69 line 69
+| 22 line 22 46 line 46 70 line 70
+| 23 line 23 47 line 47 71 line 71
+| 24 line 24 48 line 48 72 line 72
+| 25 line 25 49 line 49 73 line 73
+| 26 line 26 50 line 50 74 line 74
+| ✓ /tmp/pardes-snap/follow/cwd/big.txt Follow ×2 1 message · SPC h m
+== snap hop grid=150x30 cursor=82,6
+== snap wheel grid=150x30 cursor=82,5
+|3: 2 line 2 Keep Save Term Collapse Follow Del U Keep Save Term Collapse Follow Del
+|4: 3 line 3 nfollow Unfollow
+|5: 4 line 4 28 line 28 52 line 52
+|6: 5 line 5 29 line 29 53 line 53
+|7: 6 line 6 30 line 30 54 line 54
+|8: 7 line 7 31 line 31 55 line 55
+|9: 8 line 8 32 line 32 56 line 56
+|10: 9 line 9 33 line 33 57 line 57
+|11: 10 line 10 34 line 34 58 line 58
+|12: 11 line 11 35 line 35 59 line 59
+|13: 12 line 12 36 line 36 60 line 60
+|14: 13 line 13 37 line 37 61 line 61
+|15: 14 line 14 38 line 38 62 line 62
+|16: 15 line 15 39 line 39 63 line 63
+|17: 16 line 16 40 line 40 64 line 64
+|18: 17 line 17 41 line 41 65 line 65
+|19: 18 line 18 42 line 42 66 line 66
+|20: 19 line 19 43 line 43 67 line 67
+|21: 20 line 20 44 line 44 68 line 68
+|22: 21 line 21 45 line 45 69 line 69
+|23: 22 line 22 46 line 46 70 line 70
+|24: 23 line 23 47 line 47 71 line 71
+|25: 24 line 24 48 line 48 72 line 72
+|26: 25 line 25 49 line 49 73 line 73
+|27: 26 line 26 50 line 50 74 line 74
+|28: 27 line 27 51 line 51 75 line 75
diff --git a/test/snapshots/fsearch.golden b/test/snapshots/fsearch.golden
index 71a9900a..bcd0fcfb 100644
--- a/test/snapshots/fsearch.golden
+++ b/test/snapshots/fsearch.golden
@@ -1,87 +1,102 @@
-== snap opened grid=180x31 cursor=7,7
+== snap opened grid=180x31 cursor=97,17
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
| /tmp/pardes-snap/fsearch/cwd Term+bash Save Mode Filter Collapse Del /tmp/pardes-snap/fsearch/cwd Term+bash Save Mode Filter Collapse Del
| ls ls
| g.txt g.txt
|
-| /tmp/pardes-snap/fsearch/cwd/g.txt Save Term Collapse Follow Del
-| 1 l1
-| 2 MARK a
-| 3 l3
-| 4 l4
-| 5 l5
-| 6 MARK b
-| 7 l7
-| 8 l8
-| 9 l9
-| 10 MARK c
-| /tmp/pardes-snap/fsearch/cwd Term+bash Save Mode Filter Collapse Del
-| ls
-| g.txt
-== snap slash grid=180x31 cursor=3,10
-|9: ^ +Search 0 Del
-|10: /
-|11:
-|12:
-|13:
-|14:
-|15:
-|16:
-== snap typing grid=180x31 cursor=7,10
-|9: ^ +Search 1/3 Del
-|10: /MARK
-|11: g.txt:2:1 MARK a
-|12: g.txt:6:1 MARK b
-|13: g.txt:10:1 MARK c
+|
+|
+| g.txt
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/fsearch/cwd Term+bash Save Mode Filter Collapse Del ‹@p1 › /tmp/pardes-snap/fsearch/cwd/g.txt Keep Save Term Collapse Follow Del
+| ls 1 l1
+| g.txt 2 MARK a
+| 3 l3
+| 4 l4
+| 5 l5
+| 6 MARK b
+| 7 l7
+| 8 l8
+| 9 l9
+| 10 MARK c
+| 11 l11
+| 12 l12
+|
+| · @p1 a copy of the terminal's text: Tab or B2 runs it; what the program draws next replaces it (Ctrl-b types to the program) 1 message · SPC h m
+== snap slash grid=180x31 cursor=141,16
+|16: /tmp/pardes-snap/fsearch/cwd Term+bash Save Mode Filter Collapse Del ^ ‹@p1 › /tmp/pardes-snap/fsearch/cwd/g.txt Keep / ⏎ land · M-⏎ as a list · C-r history
+|17: ls · esc
+|18: g.txt 1 l1
+|19: 2 MARK a
+|20: 3 l3
+|21: 4 l4
+|22: 5 l5
+|23: 6 MARK b
+|24: 7 l7
+|25: 8 l8
+|26: 9 l9
+|27: 10 MARK c
+|28: 11 l11
+|29: 12 l12
+== snap typing grid=180x31 cursor=145,16
+|16: /tmp/pardes-snap/fsearch/cwd Term+bash Save Mode Filter Collapse Del ^ ‹@p1 › /tmp/pardes-snap/fsearch/cwd/g.txt Keep / MARK = Look /MARK/ 1/3 · 3 lines ⏎
+|17: ls land · M-⏎ as a list · C-r history · esc
+|19: 2▸MARK a
+|23: 6▪MARK b
+|27: 10▪MARK c
== style typing grid=180x31
|0: 0-1 d,#1d2824, 2-179 #b2c3b8,#1d2824,
-|1: 0-1 d,#887455, 2-89 #becfc4,#314738, 90-91 #becfc4,#887455, 92-179 #b2c3b8,#1d2824,
-|2: 0-1 d,#496656, 2-30 #b2c3b8,#1d2824, 31-40 #d3b0d9,#1d2824, 41-89 #b2c3b8,#1d2824, 90-91 #b2c3b8,#496656, 92-120 #b2c3b8,#1d2824, 121-130 #d3b0d9,#1d2824, 131-179 #b2c3b8,#1d2824,
-|3: 0-0 d,#608269, 1-1 d,#0d1410, 2-89 #e5eee5,#0d1410, 90-90 #e5eee5,#608269, 91-179 #e5eee5,#0d1410,
-|4: 0-0 d,#608269, 1-1 d,#0d1410, 2-89 #e5eee5,#0d1410, 90-90 #e5eee5,#608269, 91-179 #e5eee5,#0d1410,
-|5: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-179 d,#0d1410,
-|6: 0-1 d,#496656, 2-30 #b2c3b8,#1d2824, 31-36 #d3b0d9,#1d2824, 37-89 #b2c3b8,#1d2824, 90-90 #b2c3b8,#608269, 91-179 #b2c3b8,#0d1410,
-|7: 0-0 d,#5e4923, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-89 #e5eee5,#0d1410, 90-90 #e5eee5,#608269, 91-179 #e5eee5,#0d1410,
-|8: 0-0 d,#5e4923, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-10 #f5f7ee,#3c614a, 11-11 #f5f7ee,#0d1410, 12-89 #e5eee5,#0d1410, 90-90 #e5eee5,#608269, 91-179 #e5eee5,#0d1410,
-|9: 0-1 #000000,#add38a, 2-89 #becfc4,#314738, 90-90 #becfc4,#608269, 91-179 #becfc4,#0d1410,
-|10: 0-0 d,#608269, 1-1 d,#0d1410, 2-89 #e5eee5,#0d1410, 90-90 #e5eee5,#608269, 91-179 #e5eee5,#0d1410,
-|11: 0-0 d,#608269, 1-1 d,#0d1410, 2-15 #59675c,#243a2d, 16-19 #f7e4a5,#5e4923, 20-20 #f7e4a5,#243a2d, 21-89 #e5eee5,#243a2d, 90-90 #e5eee5,#608269, 91-179 #e5eee5,#0d1410,
-|12: 0-0 d,#608269, 1-1 d,#0d1410, 2-15 #59675c,#0d1410, 16-19 #f7e4a5,#352e19, 20-20 #f7e4a5,#0d1410, 21-89 #e5eee5,#0d1410, 90-90 #e5eee5,#608269, 91-179 #e5eee5,#0d1410,
-|13: 0-0 d,#608269, 1-1 d,#0d1410, 2-15 #59675c,#0d1410, 16-19 #f7e4a5,#352e19, 20-20 #f7e4a5,#0d1410, 21-89 #e5eee5,#0d1410, 90-90 #e5eee5,#608269, 91-179 #e5eee5,#0d1410,
-|14: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-179 d,#0d1410,
-|15: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-179 d,#0d1410,
-|16: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-179 d,#0d1410,
-|17: 0-1 d,#496656, 2-30 #b2c3b8,#1d2824, 31-40 #d3b0d9,#1d2824, 41-89 #b2c3b8,#1d2824, 90-90 #b2c3b8,#608269, 91-179 #b2c3b8,#0d1410,
-|18: 0-0 d,#608269, 1-1 d,#0d1410, 2-89 #e5eee5,#0d1410, 90-90 #e5eee5,#608269, 91-179 #e5eee5,#0d1410,
-|19: 0-0 d,#608269, 1-1 d,#0d1410, 2-89 #e5eee5,#0d1410, 90-90 #e5eee5,#608269, 91-179 #e5eee5,#0d1410,
-|20: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-179 d,#0d1410,
-|21: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-179 d,#0d1410,
-|22: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-179 d,#0d1410,
-|23: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-179 d,#0d1410,
-|24: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-179 d,#0d1410,
-|25: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-179 d,#0d1410,
-|26: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-179 d,#0d1410,
-|27: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-179 d,#0d1410,
-|28: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-179 d,#0d1410,
-|29: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-179 d,#0d1410,
-|30: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-179 d,#0d1410,
-== snap ctrln grid=180x31 cursor=7,10
-|7: 5 l5
-|8: 6 MARK b
-|9: ^ +Search 2/3 Del
-== snap landed grid=180x31 cursor=10,8
-|9: +Search 2/3 Save Undock Del
-== snap n grid=180x31 cursor=10,8
-|7: 9 l9
-|8: 10 MARK c
-== snap N grid=180x31 cursor=10,7
-|7: 6 MARK b
-|8: 7 l7
-== snap cancel grid=180x31 cursor=10,7
-== snap nomatch grid=180x31 cursor=7,10
-|9: ^ +Search 0 Del
-|10: /zzqq
-|11:
-|12:
-|13:
+|1: 0-1 d,#887455, 2-89 #b2c3b8,#1d2824, 90-91 #b2c3b8,#887455, 92-179 #becfc4,#314738,
+|2: 0-1 d,#496656,f 2-30 #b2c3b8,#1d2824,f 31-40 #d3b0d9,#1d2824,f 41-89 #b2c3b8,#1d2824,f 90-91 #b2c3b8,#496656,f 92-120 #b2c3b8,#1d2824,f 121-130 #d3b0d9,#1d2824,f 131-179 #b2c3b8,#1d2824,f
+|3: 0-0 d,#608269,f 1-1 d,#0d1410,f 2-89 #e5eee5,#0d1410,f 90-90 #e5eee5,#608269,f 91-179 #e5eee5,#0d1410,f
+|4: 0-0 d,#608269,f 1-1 d,#0d1410,f 2-89 #e5eee5,#0d1410,f 90-90 #e5eee5,#608269,f 91-179 #e5eee5,#0d1410,f
+|5: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269,f 91-179 d,#0d1410,f
+|6: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269,f 91-179 d,#0d1410,f
+|7: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269,f 91-179 d,#0d1410,f
+|8: 0-0 d,#608269,f 1-3 d,#0d1410,f 4-89 #e5eee5,#0d1410,f 90-90 #e5eee5,#608269,f 91-179 #e5eee5,#0d1410,f
+|9: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269,f 91-179 d,#0d1410,f
+|10: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269,f 91-179 d,#0d1410,f
+|11: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269,f 91-179 d,#0d1410,f
+|12: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269,f 91-179 d,#0d1410,f
+|13: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269,f 91-179 d,#0d1410,f
+|14: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269,f 91-179 d,#0d1410,f
+|15: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269,f 91-179 d,#0d1410,f
+|16: 0-1 d,#496656,f 2-30 #b2c3b8,#1d2824,f 31-40 #d3b0d9,#1d2824,f 41-89 #b2c3b8,#1d2824,f 90-91 #000000,#add38a, 92-127 #becfc4,#2c2819, 128-133 #dfbce5,#2c2819, 134-138 #becfc4,#2c2819, 139-139 #add38a,#2c2819,b 140-140 #add38a,#2c2819, 141-144 #becfc4,#2c2819, 145-152 #becfc4,#2c2819,f 153-178 #becfc4,#2c2819, 179-179 #becfc4,#2c2819,f
+|17: 0-0 d,#608269,f 1-1 d,#0d1410,f 2-89 #e5eee5,#0d1410,f 90-91 #e5eee5,#2c2819, 92-92 #e5eee5,#2c2819,f 93-132 #becfc4,#2c2819,f 133-179 #becfc4,#2c2819,
+|18: 0-0 d,#608269,f 1-1 d,#0d1410,f 2-89 #e5eee5,#0d1410,f 90-90 #e5eee5,#e5eee5, 91-94 #e5eee5,#0d1410, 95-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410,
+|19: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269, 91-91 d,#0d1410, 92-94 d,#0d1410,b 95-95 #616f64,#0d1410,b 96-96 #add38a,#0d1410,b 97-100 #f5f7ee,#3c614a, 101-101 #f5f7ee,#0d1410, 102-179 #e5eee5,#0d1410,
+|20: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269, 91-94 d,#0d1410, 95-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410,
+|21: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269, 91-94 d,#0d1410, 95-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410,
+|22: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#5e4923, 91-94 d,#0d1410, 95-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410,
+|23: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269, 91-94 d,#0d1410, 95-95 #59675c,#0d1410, 96-96 #add38a,#0d1410, 97-100 #e5eee5,#352e19, 101-179 #e5eee5,#0d1410,
+|24: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269, 91-94 d,#0d1410, 95-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410,
+|25: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269, 91-94 d,#0d1410, 95-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410,
+|26: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269, 91-94 d,#0d1410, 95-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410,
+|27: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#5e4923, 91-93 d,#0d1410, 94-95 #59675c,#0d1410, 96-96 #add38a,#0d1410, 97-100 #e5eee5,#352e19, 101-179 #e5eee5,#0d1410,
+|28: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269, 91-93 d,#0d1410, 94-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410,
+|29: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269, 91-93 d,#0d1410, 94-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410,
+|30: 0-1 d,#1d2824, 2-179 #67756e,#1d2824,
+== snap ctrln grid=180x31 cursor=145,16
+== snap landed grid=180x31 cursor=100,19
+|16: /tmp/pardes-snap/fsearch/cwd Term+bash Save Mode Filter Collapse Del ‹@p1 › /MARK/ 1/3 › /tmp/pardes-snap/fsearch/cwd/g.txt Keep Save Term Collapse Follow De
+|17: ls l
+|19: 2 MARK a
+|23: 6 MARK b
+|27: 10 MARK c
+== snap n grid=180x31 cursor=100,23
+|16: /tmp/pardes-snap/fsearch/cwd Term+bash Save Mode Filter Collapse Del ‹@p1 › /MARK/ 2/3 › /tmp/pardes-snap/fsearch/cwd/g.txt Keep Save Term Collapse Follow De
+|30: · /tmp/pardes-snap/fsearch/cwd/g.txt /MARK/ 2/3 · line 6 2 messages · SPC h m
+== snap N grid=180x31 cursor=100,19
+|16: /tmp/pardes-snap/fsearch/cwd Term+bash Save Mode Filter Collapse Del ‹@p1 › /MARK/ 1/3 › /tmp/pardes-snap/fsearch/cwd/g.txt Keep Save Term Collapse Follow De
+|30: · /tmp/pardes-snap/fsearch/cwd/g.txt /MARK/ 1/3 · line 2 3 messages · SPC h m
+== snap cancel grid=180x31 cursor=100,19
+== snap nomatch grid=180x31 cursor=158,16
+|16: /tmp/pardes-snap/fsearch/cwd Term+bash Save Mode Filter Collapse Del ^ ‹@p1 › /MARK/ 1/3 › /tmp/pardes-snap/fsearch/cwd/g.txt Keep / zzqq = Look /zzqq/ 0
+|17: ls ⏎ land · M-⏎ as a list · C-r history · esc
diff --git a/test/snapshots/ghostty-mid.golden b/test/snapshots/ghostty-mid.golden
index 02658b3d..47c40260 100644
--- a/test/snapshots/ghostty-mid.golden
+++ b/test/snapshots/ghostty-mid.golden
@@ -15,8 +15,18 @@
|
|
|
-|
| /tmp/pardes-snap/ghostty-mid/cwd Term+bash Save
| Mode Filter Collapse Del
| ls
| g.txt
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| ✓ @p1 Exec 1 message · SPC h m
diff --git a/test/snapshots/grep.golden b/test/snapshots/grep.golden
index 52633372..26fcb692 100644
--- a/test/snapshots/grep.golden
+++ b/test/snapshots/grep.golden
@@ -1,14 +1,13 @@
-== snap opened grid=180x31 cursor=7,7
+== snap opened grid=180x31 cursor=7,21
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
| /tmp/pardes-snap/grep/cwd Term+bash Save Mode Filter Collapse Del /tmp/pardes-snap/grep/cwd Term+bash Save Mode Filter Collapse Del
| ls ls
| a.txt noise.txt sub a.txt noise.txt sub
|
-| /tmp/pardes-snap/grep/cwd/a.txt Save Term Collapse Follow Del
-| 1 hello TARGET one
-| 2 nothing here
-| 3 last TARGET line
+|
+|
+| a.txt
|
|
|
@@ -19,28 +18,39 @@
| /tmp/pardes-snap/grep/cwd Term+bash Save Mode Filter Collapse Del
| ls
| a.txt noise.txt sub
-== snap typing grid=180x31 cursor=13,10
-|9: ^ +Search 1/3 Del
-|10: Grep TARGET
-|11: a.txt
-|12: a.txt:1:7 hello TARGET one
-|13: /tmp/pardes-snap/grep/cwd/+Preview Del
-|14: 1
-== snap second grid=180x31 cursor=13,10
-|7: 2 nothing here
-|8: 3 last TARGET line
-|9: ^ +Search 2/3 Del
-== snap preview grid=180x31 cursor=13,10
-|9: ^ +Search 3/3 Del
-|13: /tmp/pardes-snap/grep/cwd/sub/b.txt Del
-|14: 1 deep
-|15: 2 TARGET inside sub
-== snap opened-hit grid=180x31 cursor=12,15
-|9: +Search 3/3 Save Undock Del
-|13: /tmp/pardes-snap/grep/cwd/sub/b.txt Save Term Collapse Follow Del
-== snap nomatch grid=180x31 cursor=11,15
-|14: ^ +Search 0 Del
-|15: Grep zzqq
-== snap esc grid=180x31 cursor=12,15
-|14: 1 deep
-|15: 2 TARGET inside sub
+|
+| /tmp/pardes-snap/grep/cwd/a.txt Save Term Collapse Follow Del
+| 1 hello TARGET one
+| 2 nothing here
+| 3 last TARGET line
+|
+|
+|
+|
+|
+|
+| · @p1 a copy of the terminal's text: Tab or B2 runs it; what the program draws next replaces it (Ctrl-b types to the program) 1 message · SPC h m
+== snap typing grid=180x31 cursor=13,24
+|23: ^ +Search 1/3 Del
+|24: Grep TARGET
+|25: a.txt
+|26: /tmp/pardes-snap/grep/cwd/+Preview Del
+|27: 1
+== snap second grid=180x31 cursor=13,24
+|21: 2 nothing here
+|22: 3 last TARGET line
+|23: ^ +Search 2/3 Del
+== snap preview grid=180x31 cursor=13,24
+|23: ^ +Search 3/3 Del
+|26: /tmp/pardes-snap/grep/cwd/sub/b.txt Del
+|27: 1 deep
+|28: 2 TARGET inside sub
+== snap opened-hit grid=180x31 cursor=12,28
+|23: +Search 3/3 Save Undock Del
+|26: /tmp/pardes-snap/grep/cwd/sub/b.txt Save Term Collapse Follow Del
+== snap nomatch grid=180x31 cursor=11,28
+|27: ^ +Search 0 Del
+|28: Grep zzqq
+== snap esc grid=180x31 cursor=12,28
+|27: 1 deep
+|28: 2 TARGET inside sub
diff --git a/test/snapshots/headersweep-restored.golden b/test/snapshots/headersweep-restored.golden
index d730585f..3952525b 100644
--- a/test/snapshots/headersweep-restored.golden
+++ b/test/snapshots/headersweep-restored.golden
@@ -10,16 +10,16 @@
|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-1 d,#496656, 2-43 #b2c3b8,#1d2824, 44-53 #d3b0d9,#1d2824, 54-59 #b2c3b8,#1d2824, 60-60 #b2c3b8,#608269, 61-119 #b2c3b8,#0d1410,
-|13: 0-1 d,#1d2824, 2-59 #b2c3b8,#1d2824, 60-60 #b2c3b8,#608269, 61-119 #b2c3b8,#0d1410,
-|14: 0-0 d,#608269, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410,
-|15: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
-|16: 0-0 d,#608269, 1-1 d,#0d1410, 2-23 #e5eee5,#0d1410,f 24-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410,
+|11: 0-1 d,#496656, 2-43 #b2c3b8,#1d2824, 44-53 #d3b0d9,#1d2824, 54-59 #b2c3b8,#1d2824, 60-60 #b2c3b8,#608269, 61-119 #b2c3b8,#0d1410,
+|12: 0-1 d,#1d2824, 2-59 #b2c3b8,#1d2824, 60-60 #b2c3b8,#608269, 61-119 #b2c3b8,#0d1410,
+|13: 0-0 d,#608269, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410,
+|14: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|15: 0-0 d,#608269, 1-1 d,#0d1410, 2-23 #e5eee5,#0d1410,f 24-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410,
+|16: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
|17: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
|18: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
|19: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
-|20: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|20: 0-1 d,#1d2824, 2-119 #67756e,#1d2824,
== snap col-swept grid=120x21 cursor=4,7
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit Restore /tmp/pardes-snap/headerswe
| New Term Find Grep Joincol Delcol echo RE''STORED-COL New Term Find Grep Joincol Delcol
@@ -32,7 +32,6 @@
|
|
|
-|
| /tmp/pardes-snap/headersweep-restored/cwd Term+bash Save M
| ode Filter Collapse Del
|
@@ -41,15 +40,17 @@
| /tmp/pardes-snap/headersweep-restored/cwd (echo RE''STORED
| -COL) exit 0 Kill Save Collapse Del
| exit 0
+|
+| ✓ @p1 Dump 1 message · SPC h m
== style ws-sweeping grid=120x21
|0: 0-1 d,#1d2824, 2-100 #b2c3b8,#1d2824, 101-108 #f5f7ee,#5b7e5a, 109-119 #b2c3b8,#1d2824,
|1: 0-1 d,#887455, 2-59 #becfc4,#314738, 60-61 #becfc4,#887455, 62-119 #b2c3b8,#1d2824,
-|14: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
-|15: 0-0 d,#608269, 1-1 d,#0d1410, 2-23 #e5eee5,#0d1410,f 24-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410,
-|16: 0-0 d,#152019, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
-|17: 0-1 d,#496656, 2-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,#152019, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410,
+|13: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|14: 0-0 d,#608269, 1-1 d,#0d1410, 2-23 #e5eee5,#0d1410,f 24-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410,
+|15: 0-0 d,#152019, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|16: 0-1 d,#496656, 2-59 #b2c3b8,#1d2824, 60-60 #b2c3b8,#608269, 61-119 #b2c3b8,#0d1410,
+|17: 0-1 d,#1d2824, 2-59 #b2c3b8,#1d2824, 60-60 #b2c3b8,#608269, 61-119 #b2c3b8,#0d1410,
+|18: 0-0 d,#152019, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410,
== snap ws-swept grid=120x21 cursor=4,7
|0: Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit Restore /tmp/pardes-snap/header ec
-|18: -WS) exit 0 Kill Save Collapse Del
+|17: -WS) exit 0 Kill Save Collapse Del
diff --git a/test/snapshots/headersweep.golden b/test/snapshots/headersweep.golden
index ef6bc786..0d57cdcd 100644
--- a/test/snapshots/headersweep.golden
+++ b/test/snapshots/headersweep.golden
@@ -10,16 +10,16 @@
|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-1 d,#496656, 2-34 #b2c3b8,#1d2824, 35-44 #d3b0d9,#1d2824, 45-59 #b2c3b8,#1d2824, 60-60 #b2c3b8,#608269, 61-119 #b2c3b8,#0d1410,
-|13: 0-1 d,#1d2824, 2-59 #b2c3b8,#1d2824, 60-60 #b2c3b8,#608269, 61-119 #b2c3b8,#0d1410,
+|11: 0-1 d,#496656, 2-34 #b2c3b8,#1d2824, 35-44 #d3b0d9,#1d2824, 45-59 #b2c3b8,#1d2824, 60-60 #b2c3b8,#608269, 61-119 #b2c3b8,#0d1410,
+|12: 0-1 d,#1d2824, 2-59 #b2c3b8,#1d2824, 60-60 #b2c3b8,#608269, 61-119 #b2c3b8,#0d1410,
+|13: 0-0 d,#608269, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410,
|14: 0-0 d,#608269, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410,
-|15: 0-0 d,#608269, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#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-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
|18: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
|19: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
-|20: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|20: 0-1 d,#1d2824, 2-119 #b2c3b8,#1d2824,
== snap col-swept grid=120x21 cursor=4,6
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol echo SW''EPT-COL New Term Find Grep Joincol Delcol
@@ -32,7 +32,6 @@
|
|
|
-|
| /tmp/pardes-snap/headersweep/cwd Term+bash Save Mode Filte
| r Collapse Del
| ls
@@ -41,23 +40,27 @@
| /tmp/pardes-snap/headersweep/cwd (echo SW''EPT-COL) exit 0
| Kill Save Collapse Del
| exit 0
+|
+| /tmp/pardes-snap/headersweep/cwd
== snap ws-swept grid=120x21 cursor=4,6
|0: Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit echo SW''EPT-WS
-|17: /tmp/pardes-snap/headersweep/cwd (echo SW''EPT-WS) exit 0
-|18: Kill Save Collapse Del
-== snap ws-looked grid=120x21 cursor=7,9
+|16: /tmp/pardes-snap/headersweep/cwd (echo SW''EPT-WS) exit 0
+|17: Kill Save Collapse Del
+== snap ws-looked grid=120x21 cursor=67,14
|0: Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit echo SW''EPT-WS xxhay.txtxx
-|7: /tmp/pardes-snap/headersweep/cwd/hay.txt Save Term Collaps
-|8: e Follow Del
-|9: 1 ZQNEEDLE
-== snap cancelled grid=120x21 cursor=7,9
+|12: r Collapse Del ‹@p1 › /tmp/pardes-snap/headersweep/cwd/hay.txt Keep Save
+|13: ls Term Collapse Follow Del
+|14: hay.txt 1 ZQNEEDLE
+|20: /tmp/pardes-snap/headersweep/cwd/hay.txt:1
+== snap cancelled grid=120x21 cursor=4,6
+|20: /tmp/pardes-snap/headersweep/cwd
== style selected grid=120x21
|1: 0-1 d,#887455, 2-59 #b2c3b8,#1d2824, 60-61 #b2c3b8,#887455, 62-70 #becfc4,#314738, 71-80 #f5f7ee,#3c614a, 81-119 #becfc4,#314738,
|2: 0-1 d,#496656, 2-34 #b2c3b8,#1d2824, 35-44 #d3b0d9,#1d2824, 45-59 #b2c3b8,#1d2824, 60-61 #b2c3b8,#add38a, 62-94 #becfc4,#314738, 95-104 #dfbce5,#314738, 105-119 #becfc4,#314738,
|3: 0-1 d,#1d2824, 2-59 #b2c3b8,#1d2824, 60-61 #b2c3b8,#314738, 62-119 #becfc4,#314738,
-|7: 0-1 d,#496656, 2-34 #b2c3b8,#1d2824, 35-42 #d3b0d9,#1d2824, 43-59 #b2c3b8,#1d2824, 60-60 #b2c3b8,#608269, 61-119 #b2c3b8,#0d1410,
-|8: 0-1 d,#1d2824, 2-59 #b2c3b8,#1d2824, 60-60 #b2c3b8,#608269, 61-119 #b2c3b8,#0d1410,
-|9: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410,
-|17: 0-1 d,#496656, 2-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,#152019, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410,
+|12: 0-1 d,#1d2824, 2-59 #b2c3b8,#1d2824, 60-61 #b2c3b8,#496656, 62-101 #b2c3b8,#2c2819, 102-109 #d3b0d9,#2c2819, 110-119 #b2c3b8,#2c2819,
+|13: 0-0 d,#608269, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-61 #e5eee5,#2c2819, 62-119 #b2c3b8,#2c2819,
+|14: 0-0 d,#608269, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-64 #e5eee5,#0d1410, 65-66 #59675c,#0d1410, 67-119 #e5eee5,#0d1410,
+|16: 0-1 d,#496656, 2-59 #b2c3b8,#1d2824, 60-60 #b2c3b8,#608269, 61-119 #b2c3b8,#0d1410,
+|17: 0-1 d,#1d2824, 2-59 #b2c3b8,#1d2824, 60-60 #b2c3b8,#608269, 61-119 #b2c3b8,#0d1410,
+|18: 0-0 d,#152019, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410,
diff --git a/test/snapshots/hscroll.golden b/test/snapshots/hscroll.golden
index 4799b3b5..53b9f68a 100644
--- a/test/snapshots/hscroll.golden
+++ b/test/snapshots/hscroll.golden
@@ -1,4 +1,4 @@
-== snap opened grid=90x31 cursor=7,9
+== snap opened grid=90x31 cursor=52,19
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
| /tmp/pardes-snap/hscroll/cwd Term+bash Save /tmp/pardes-snap/hscroll/cwd Term+bash Save
@@ -6,9 +6,8 @@
| ls ls
| wide.txt wide.txt
|
-| /tmp/pardes-snap/hscroll/cwd/wide.txt Save
-| Term Collapse Follow Del
-| 1 short1 END_A_MARKER_WAY_OUT_RIGHT_padp
+|
+| wide.txt
|
|
|
@@ -17,14 +16,23 @@
|
|
| /tmp/pardes-snap/hscroll/cwd Term+bash Save
-| Mode Filter Collapse Del
-| ls
-| wide.txt
-== snap wheeled grid=90x31 cursor=hidden
-|9: 1 ND_A_MARKER_WAY_OUT_RIGHT_padpadpadpad
-== snap clamped grid=90x31 cursor=7,9
-|9: 1 short1 END_A_MARKER_WAY_OUT_RIGHT_padp
-== snap dollar grid=90x31 cursor=41,9
-|9: 1 padpadpadpadpadpadpadpadpadpad_TAIL
-== snap zero grid=90x31 cursor=7,9
-|9: 1 short1 END_A_MARKER_WAY_OUT_RIGHT_padp
+| Mode Filter Collapse Del ‹@p1 › /tmp/pardes-snap/hscroll/cwd/wide.tx
+| ls t Keep Save Term Collapse Follow Del
+| wide.txt 1 short1 END_A_MARKER_WAY_OUT_RIGHT_padp
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| · @p1 a copy of the terminal's text: Tab or B2 runs it; what the p 2 messages · SPC h m
+== snap wheeled grid=90x31 cursor=52,19
+== snap clamped grid=90x31 cursor=52,19
+== snap dollar grid=90x31 cursor=86,19
+|19: wide.txt 1 padpadpadpadpadpadpadpadpadpad_TAIL
+== snap zero grid=90x31 cursor=52,19
+|19: wide.txt 1 short1 END_A_MARKER_WAY_OUT_RIGHT_padp
diff --git a/test/snapshots/images.golden b/test/snapshots/images.golden
index 04797da3..9cf46ec4 100644
--- a/test/snapshots/images.golden
+++ b/test/snapshots/images.golden
@@ -1,4 +1,4 @@
-== snap img-open grid=150x31 cursor=hidden
+== snap img-open grid=150x32 cursor=hidden
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
| /tmp/pardes-snap/images/cwd Term+bash Save Mode Filter Collapse Del /tmp/pardes-snap/images/cwd Term+bash Save Mode Filter Collapse Del
@@ -19,7 +19,19 @@
| /tmp/pardes-snap/images/cwd Term+bash Save Mode Filter Collapse Del
| ls
| pic.ppm
-== style img-open grid=150x31
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| · @p1 a copy of the terminal's text: Tab or B2 runs it; what the program draws next replaces it (Ctrl-b types to the program) 1 message · SPC h m
+== style img-open grid=150x32
|0: 0-1 d,#1d2824, 2-149 #b2c3b8,#1d2824,
|1: 0-1 d,#887455, 2-74 #becfc4,#314738, 75-76 #becfc4,#887455, 77-149 #b2c3b8,#1d2824,
|2: 0-1 d,#496656, 2-29 #b2c3b8,#1d2824, 30-39 #d3b0d9,#1d2824, 40-74 #b2c3b8,#1d2824, 75-76 #b2c3b8,#496656, 77-104 #b2c3b8,#1d2824, 105-114 #d3b0d9,#1d2824, 115-149 #b2c3b8,#1d2824,
@@ -51,29 +63,31 @@
|28: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
|29: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
|30: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-== style term-palette grid=150x31
+|31: 0-1 d,#1d2824, 2-149 #67756e,#1d2824,
+== style term-palette grid=150x32
|6: 0-1 d,#add38a, 2-70 #becfc4,#314738, 71-74 #dfbce5,#314738, 75-75 #dfbce5,#608269, 76-149 #dfbce5,#0d1410,
|7: 0-1 d,#314738, 2-5 #dfbce5,#314738, 6-74 #becfc4,#314738, 75-75 #becfc4,#608269, 76-149 #becfc4,#0d1410,
-|8: 0-0 d,#152019, 1-65 d,#0d1410, 66-66 d,#1d2824, 67-74 #b2c3b8,#1d2824, 75-75 #b2c3b8,#608269, 76-149 #b2c3b8,#0d1410,
-|9: 0-0 d,#152019, 1-29 d,#0d1410, 30-33 p8,p4, 34-34 p4,p8, 35-35 p8,p4, 36-36 p4,p8, 37-43 p8,p4, 44-44 p8,p12, 45-45 p12,p8, 46-74 p12,#0d1410, 75-75 p12,#608269, 76-149 p12,#0d1410,
-|10: 0-0 d,#152019, 1-29 d,#0d1410, 30-30 p4,p8, 31-31 p8,p4, 32-32 p4,p8, 33-41 p8,p4, 42-43 p12,p8, 44-45 p12,p12, 46-74 p12,#0d1410, 75-75 p12,#608269, 76-149 p12,#0d1410,
-|11: 0-0 d,#152019, 1-29 d,#0d1410, 30-34 p8,p4, 35-36 p4,p8, 37-37 p8,p4, 38-39 p4,p8, 40-40 p8,p12, 41-41 p12,p8, 42-45 p12,p12, 46-74 p12,#0d1410, 75-75 p12,#608269, 76-149 p12,#0d1410,
-|12: 0-0 d,#152019, 1-29 d,#0d1410, 30-31 p8,p4, 32-32 p4,p8, 33-34 p8,p4, 35-35 p4,p8, 36-37 p8,p4, 38-38 p8,p12, 39-39 p12,p8, 40-45 p12,p12, 46-74 p12,#0d1410, 75-75 p12,#608269, 76-149 p12,#0d1410,
-|13: 0-0 d,#152019, 1-29 d,#0d1410, 30-31 p8,p4, 32-32 p4,p8, 33-35 p8,p4, 36-36 p8,p12, 37-37 p12,p8, 38-45 p12,p12, 46-74 p12,#0d1410, 75-75 p12,#608269, 76-149 p12,#0d1410,
-|14: 0-0 d,#152019, 1-29 d,#0d1410, 30-32 p8,p4, 33-33 p4,p8, 34-34 p8,p12, 35-35 p12,p8, 36-45 p12,p12, 46-74 p12,#0d1410, 75-75 p12,#608269, 76-149 p12,#0d1410,
-|15: 0-0 d,#152019, 1-29 d,#0d1410, 30-30 p4,p8, 31-31 p8,p4, 32-32 p8,p12, 33-33 p12,p8, 34-45 p12,p12, 46-74 p12,#0d1410, 75-75 p12,#608269, 76-149 p12,#0d1410,
-|16: 0-0 d,#152019, 1-29 d,#0d1410, 30-30 p8,p12, 31-31 p12,p8, 32-45 p12,p12, 46-74 p12,#0d1410, 75-75 p12,#608269, 76-149 p12,#0d1410,
-== snap no-ascii grid=150x31 cursor=hidden
+|8: 0-0 d,#152019, 1-28 d,#0d1410, 29-31 p8,p4, 32-33 p4,p8, 34-37 p8,p4, 38-38 p4,p8, 39-44 p8,p4, 45-45 p8,p12, 46-46 p12,p8, 47-74 p12,#0d1410, 75-75 p12,#608269, 76-149 p12,#0d1410,
+|9: 0-0 d,#152019, 1-28 d,#0d1410, 29-29 p8,p4, 30-30 p4,p8, 31-35 p8,p4, 36-36 p5,p8, 37-37 p8,p4, 38-38 p4,p8, 39-41 p8,p4, 42-42 p4,p8, 43-43 p8,p12, 44-45 p12,p8, 46-46 p12,p12, 47-74 p12,#0d1410, 75-75 p12,#608269, 76-149 p12,#0d1410,
+|10: 0-0 d,#152019, 1-28 d,#0d1410, 29-30 p8,p4, 31-32 p4,p8, 33-40 p8,p4, 41-41 p8,p12, 42-43 p12,p8, 44-46 p12,p12, 47-74 p12,#0d1410, 75-75 p12,#608269, 76-149 p12,#0d1410,
+|11: 0-0 d,#152019, 1-28 d,#0d1410, 29-31 p8,p4, 32-32 p4,p8, 33-34 p8,p4, 35-37 p4,p8, 38-38 p8,p4, 39-39 p8,p12, 40-41 p12,p8, 42-46 p12,p12, 47-74 p12,#0d1410, 75-75 p12,#608269, 76-149 p12,#0d1410,
+|12: 0-0 d,#152019, 1-28 d,#0d1410, 29-36 p8,p4, 37-37 p8,p12, 38-39 p12,p8, 40-46 p12,p12, 47-74 p12,#0d1410, 75-75 p12,#608269, 76-149 p12,#0d1410,
+|13: 0-0 d,#152019, 1-28 d,#0d1410, 29-30 p4,p8, 31-34 p8,p4, 35-35 p8,p12, 36-36 p12,p8, 37-46 p12,p12, 47-74 p12,#0d1410, 75-75 p12,#608269, 76-149 p12,#0d1410,
+|14: 0-0 d,#152019, 1-28 d,#0d1410, 29-29 p4,p8, 30-31 p8,p4, 32-32 p4,p8, 33-33 p8,p12, 34-35 p12,p8, 36-46 p12,p12, 47-74 p12,#0d1410, 75-75 p12,#608269, 76-149 p12,#0d1410,
+|15: 0-0 d,#152019, 1-28 d,#0d1410, 29-29 p4,p8, 30-30 p8,p4, 31-31 p8,p12, 32-32 p12,p8, 33-46 p12,p12, 47-74 p12,#0d1410, 75-75 p12,#608269, 76-149 p12,#0d1410,
+|16: 0-0 d,#152019, 1-28 d,#0d1410, 29-29 p8,p12, 30-30 p12,p8, 31-46 p12,p12, 47-74 p12,#0d1410, 75-75 p12,#608269, 76-149 p12,#0d1410,
+== snap no-ascii grid=150x32 cursor=hidden
|6: img petscii:on palette:terminal ascii:off /tmp/pardes-snap/images/cwd/pic
-|8: Ascii
-|9: ██████████████🬝🬹
-|10: ██████🬛█████🬝▄
-|11: ██████████🬝▄
-|12: ██╱█████🬝▄
-|13: █🬸╲███🬝🬹
-|14: ████🬝▄
-|15: │█🬝▄
-|16: 🬝🬹
+|8: █🬝█╲███▙🬸🬬🬻█████🬝🬵
+|9: ███████🬻██🬸█🬝█🬝▄█
+|10: ████████████🬝▄█
+|11: ███🬸██████🬝▄█
+|12: ████████🬝🬵█
+|13: ╱█████🬝▄
+|14: █🬬█╲🬝🬵█
+|15: 🬺█🬝🬵
+|16: 🬝▄
+|31: ✓ /tmp/pardes-snap/images/cwd/pic.ppm Ascii 3 messages · SPC h m
== snap tag-edit grid=400x31 cursor=85,6
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
@@ -95,3 +109,14 @@
| /tmp/pardes-snap/images/cwd Term+bash Save Mode Filter Collapse Del
| ls
| pic.ppm
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| ✓ /tmp/pardes-snap/images/cwd/pic.ppm Ascii 3 messages · SPC h m
diff --git a/test/snapshots/jumps.golden b/test/snapshots/jumps.golden
index 34712e6e..bc1f5996 100644
--- a/test/snapshots/jumps.golden
+++ b/test/snapshots/jumps.golden
@@ -1,7 +1,7 @@
== snap start grid=150x31 cursor=7,3
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/jumps/cwd/big.txt Save Term Collapse Follow Del
+| /tmp/pardes-snap/jumps/cwd/big.txt Keep Save Term Collapse Follow Del
| 1 line 1
| 2 line 2
| 3 line 3
@@ -29,44 +29,45 @@
| 25 line 25
| 26 line 26
| 27 line 27
-| 28 line 28
+| /tmp/pardes-snap/jumps/cwd/big.txt:1
== snap to-shell grid=150x31 cursor=79,5
|1: New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
-|2: /tmp/pardes-snap/jumps/cwd/big.txt Save Term Collapse Follow Del /tmp/pardes-snap/jumps/cwd Term+bash Save Mode Filter Collapse Del
+|2: /tmp/pardes-snap/jumps/cwd/big.txt Keep Save Term Collapse Follow Del /tmp/pardes-snap/jumps/cwd Term+bash Save Mode Filter Collapse Del
|3: 1 line 1 ls
|4: 2 line 2 big.txt
+|30: /tmp/pardes-snap/jumps/cwd
== snap to-file grid=150x31 cursor=7,3
-== snap goto-100 grid=150x31 cursor=7,27
-|3: 76 line 76 ls
-|4: 77 line 77 big.txt
-|5: 78 line 78
-|6: 79 line 79
-|7: 80 line 80
-|8: 81 line 81
-|9: 82 line 82
-|10: 83 line 83
-|11: 84 line 84
-|12: 85 line 85
-|13: 86 line 86
-|14: 87 line 87
-|15: 88 line 88
-|16: 89 line 89
-|17: 90 line 90
-|18: 91 line 91
-|19: 92 line 92
-|20: 93 line 93
-|21: 94 line 94
-|22: 95 line 95
-|23: 96 line 96
-|24: 97 line 97
-|25: 98 line 98
-|26: 99 line 99
-|27: 100 line 100
-|28: 101 line 101
-|29: 102 line 102
-|30: 103 line 103
+|30: ✓ @p2 Window 1 message · SPC h m
+== snap goto-100 grid=150x31 cursor=7,26
+|3: 77 line 77 ls
+|4: 78 line 78 big.txt
+|5: 79 line 79
+|6: 80 line 80
+|7: 81 line 81
+|8: 82 line 82
+|9: 83 line 83
+|10: 84 line 84
+|11: 85 line 85
+|12: 86 line 86
+|13: 87 line 87
+|14: 88 line 88
+|15: 89 line 89
+|16: 90 line 90
+|17: 91 line 91
+|18: 92 line 92
+|19: 93 line 93
+|20: 94 line 94
+|21: 95 line 95
+|22: 96 line 96
+|23: 97 line 97
+|24: 98 line 98
+|25: 99 line 99
+|26: 100 line 100
+|27: 101 line 101
+|28: 102 line 102
+|29: 103 line 103
== snap back-in-file grid=150x31 cursor=7,3
-|3: 1 line 1 Back ls
+|3: 1 line 1 ls
|4: 2 line 2 big.txt
|5: 3 line 3
|6: 4 line 4
@@ -93,124 +94,136 @@
|27: 25 line 25
|28: 26 line 26
|29: 27 line 27
-|30: 28 line 28
+|30: ✓ /tmp/pardes-snap/jumps/cwd/big.txt Back 2 messages · SPC h m
== snap back-to-shell grid=150x31 cursor=79,5
+|30: ✓ /tmp/pardes-snap/jumps/cwd/big.txt Back ×2 2 messages · SPC h m
== snap forward-file grid=150x31 cursor=7,3
-|3: 1 line 1 ls Forward
-== snap forward-100 grid=150x31 cursor=7,17
-|3: 86 line 86 Forward ls
-|4: 87 line 87 big.txt
-|5: 88 line 88
-|6: 89 line 89
-|7: 90 line 90
-|8: 91 line 91
-|9: 92 line 92
-|10: 93 line 93
-|11: 94 line 94
-|12: 95 line 95
-|13: 96 line 96
-|14: 97 line 97
-|15: 98 line 98
-|16: 99 line 99
-|17: 100 line 100
-|18: 101 line 101
-|19: 102 line 102
-|20: 103 line 103
-|21: 104 line 104
-|22: 105 line 105
-|23: 106 line 106
-|24: 107 line 107
-|25: 108 line 108
-|26: 109 line 109
-|27: 110 line 110
-|28: 111 line 111
-|29: 112 line 112
-|30: 113 line 113
+|30: ✓ @p2 Forward 3 messages · SPC h m
+== snap forward-100 grid=150x31 cursor=7,16
+|3: 87 line 87 ls
+|4: 88 line 88 big.txt
+|5: 89 line 89
+|6: 90 line 90
+|7: 91 line 91
+|8: 92 line 92
+|9: 93 line 93
+|10: 94 line 94
+|11: 95 line 95
+|12: 96 line 96
+|13: 97 line 97
+|14: 98 line 98
+|15: 99 line 99
+|16: 100 line 100
+|17: 101 line 101
+|18: 102 line 102
+|19: 103 line 103
+|20: 104 line 104
+|21: 105 line 105
+|22: 106 line 106
+|23: 107 line 107
+|24: 108 line 108
+|25: 109 line 109
+|26: 110 line 110
+|27: 111 line 111
+|28: 112 line 112
+|29: 113 line 113
+|30: ✓ /tmp/pardes-snap/jumps/cwd/big.txt Forward 4 messages · SPC h m
== snap last grid=150x31 cursor=79,5
-|3: 86 line 86 Last ls
-== snap last-back grid=150x31 cursor=7,17
-|3: 86 line 86 ls Last
-== snap jumplist grid=150x31 cursor=hidden
-|3: 86 line 86 Jumplist ls
-|16: /tmp/pardes-snap/jumps/cwd/+Jumps Save Term Collapse Follow LocationsConf
-|17: ig Del
-|18: 1 @p2:3:3 /tmp/pardes-snap/jumps/cwd
-|19: 2 /tmp/pardes-snap/jumps/cwd/big.txt:1:1 line 1
-|20: 3 @p2:3:3 /tmp/pardes-snap/jumps/cwd
-|21: 4 /tmp/pardes-snap/jumps/cwd/big.txt:100:1 line 100
-|22: ~
-|23:
-|24:
-|25:
-|26:
-|27:
-|28:
-|29:
-|30:
-== snap step1-shell grid=150x31 cursor=79,5
-|3: 86 line 86 ls
+|30: ✓ /tmp/pardes-snap/jumps/cwd/big.txt Last 5 messages · SPC h m
+== snap last-back grid=150x31 cursor=7,16
+|30: ✓ @p2 Last 6 messages · SPC h m
+== snap jumplist grid=150x31 cursor=55,2
+|2: ^ /tmp/pardes-snap/jumps/cwd/big.txt Keep ␣ j Jumplist 1/4 /tmp/pardes-snap/jumps/cwd Term+bash Save Mode Filter Collapse Del
+|3: │ │ Walk Look Split Newcol Grep E ls
+|4: dit Copy Keep Drop | Find Grep Recent Panes Symbols All big.txt
+|5: ▶ @p2:3:3 /tmp/pardes-snap/jumps/cwd
+|6: /tmp/pardes-snap/jumps/cwd/big.txt:1:1 line 1
+|7: @p2:3:3 /tmp/pardes-snap/jumps/cwd
+|8: /tmp/pardes-snap/jumps/cwd/big.txt:100:1 line 100
+|9: 87 line 87
+|10: 88 line 88
+|11: 89 line 89
+|12: 90 line 90
+|13: 91 line 91
+|14: 92 line 92
+|15: 93 line 93
+|16: 94 line 94
+|17: 95 line 95
+|18: 96 line 96
+|19: 97 line 97
+|20: 98 line 98
+|21: 99 line 99
+|22: 100 line 100
+|23: 101 line 101
+|24: 102 line 102
+|25: 103 line 103
+|26: 104 line 104
+|27: 105 line 105
+|28: 106 line 106
+|29: 107 line 107
+|30: ✓ /tmp/pardes-snap/jumps/cwd/big.txt Jumplist 7 messages · SPC h m
+== snap step1-shell grid=150x31 cursor=7,4
+|2: big.txt:100 › Jumplist jn 1/2 › /tmp/pardes-snap/jumps/cwd/big.txt Keep /tmp/pardes-snap/jumps/cwd Term+bash Save Mode Filter Collapse Del
+|3: Save Term Collapse Follow Del ls
+|4: 1 line 1 big.txt
+|5: 2 line 2
+|6: 3 line 3
+|7: 4 line 4
+|8: 5 line 5
+|9: 6 line 6
+|10: 7 line 7
+|11: 8 line 8
+|12: 9 line 9
+|13: 10 line 10
+|14: 11 line 11
+|15: 12 line 12
+|16: 13 line 13
+|17: 14 line 14
+|18: 15 line 15
+|19: 16 line 16
+|20: 17 line 17
+|21: 18 line 18
+|22: 19 line 19
+|23: 20 line 20
+|24: 21 line 21
+|25: 22 line 22
+|26: 23 line 23
+|27: 24 line 24
+|28: 25 line 25
+|29: 26 line 26
== style step1-shell grid=150x31
|0: 0-1 d,#1d2824, 2-149 #b2c3b8,#1d2824,
-|1: 0-1 d,#887455, 2-74 #b2c3b8,#1d2824, 75-76 #b2c3b8,#887455, 77-149 #becfc4,#314738,
-|2: 0-1 d,#496656, 2-28 #b2c3b8,#1d2824, 29-36 #d3b0d9,#1d2824, 37-74 #b2c3b8,#1d2824, 75-76 #b2c3b8,#add38a, 77-103 #becfc4,#314738, 104-113 #dfbce5,#314738, 114-149 #becfc4,#314738,
-|3: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|4: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|5: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|6: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|7: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|8: 0-0 d,#608269, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|9: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|10: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|11: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|12: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
+|1: 0-1 d,#887455, 2-74 #becfc4,#314738, 75-76 #becfc4,#887455, 77-149 #b2c3b8,#1d2824,
+|2: 0-1 d,#add38a, 2-61 #becfc4,#2c2819, 62-69 #dfbce5,#2c2819, 70-74 #becfc4,#2c2819, 75-76 #becfc4,#496656, 77-103 #b2c3b8,#1d2824, 104-113 #d3b0d9,#1d2824, 114-149 #b2c3b8,#1d2824,
+|3: 0-1 d,#2c2819, 2-74 #becfc4,#2c2819, 75-75 #becfc4,#608269, 76-76 #becfc4,#0d1410, 77-149 #e5eee5,#0d1410,
+|4: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
+|5: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
+|6: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
+|7: 0-0 d,#152019, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
+|8: 0-0 d,#152019, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
+|9: 0-0 d,#152019, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
+|10: 0-0 d,#152019, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
+|11: 0-0 d,#152019, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
+|12: 0-0 d,#152019, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
|13: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
|14: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
|15: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|16: 0-1 d,#496656, 2-28 #b2c3b8,#1d2824, 29-35 #d3b0d9,#1d2824, 36-74 #b2c3b8,#1d2824, 75-75 #b2c3b8,#608269, 76-149 #b2c3b8,#0d1410,
-|17: 0-1 d,#1d2824, 2-74 #b2c3b8,#1d2824, 75-75 #b2c3b8,#608269, 76-149 #b2c3b8,#0d1410,
-|18: 0-0 d,#608269, 1-4 d,#0d1410, 5-14 #59675c,#0d1410, 15-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|19: 0-0 d,#608269, 1-4 d,#0d1410, 5-45 #59675c,#0d1410, 46-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|20: 0-0 d,#608269, 1-4 d,#0d1410, 5-14 #59675c,#0d1410, 15-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|21: 0-0 d,#608269, 1-4 d,#0d1410, 5-47 #59675c,#0d1410, 48-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|22: 0-0 d,#608269, 1-4 d,#0d1410, 5-74 #59675c,#0d1410, 75-75 #59675c,#608269, 76-149 #59675c,#0d1410,
-|23: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|24: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|25: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|26: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|27: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|28: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|29: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|30: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-== snap step2-file grid=150x31 cursor=7,3
-|3: 1 line 1 ls
-|4: 2 line 2 big.txt
-|5: 3 line 3
-|6: 4 line 4
-|7: 5 line 5
-|8: 6 line 6
-|9: 7 line 7
-|10: 8 line 8
-|11: 9 line 9
-|12: 10 line 10
-|13: 11 line 11
-|14: 12 line 12
-|15: 13 line 13
-== snap step4-line100 grid=150x31 cursor=7,9
-|3: 94 line 94 ls
-|4: 95 line 95 big.txt
-|5: 96 line 96
-|6: 97 line 97
-|7: 98 line 98
-|8: 99 line 99
-|9: 100 line 100
-|10: 101 line 101
-|11: 102 line 102
-|12: 103 line 103
-|13: 104 line 104
-|14: 105 line 105
-|15: 106 line 106
-== snap step-back grid=150x31 cursor=79,5
-== snap look-row grid=150x31 cursor=7,23
-|22: /tmp/pardes-snap/jumps/cwd/ Get Term Collapse Del
-|23: 1 big.txt
-|24: ~
+|16: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
+|17: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
+|18: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
+|19: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
+|20: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
+|21: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
+|22: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
+|23: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
+|24: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
+|25: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
+|26: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
+|27: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
+|28: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
+|29: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
+|30: 0-1 d,#1d2824, 2-149 #67756e,#1d2824,
+== snap step2-file grid=150x31 cursor=10,4
+== snap step4-line100 grid=150x31 cursor=10,5
+== snap step-back grid=150x31 cursor=10,6
+== snap look-row grid=150x31 cursor=10,6
diff --git a/test/snapshots/layout-close.golden b/test/snapshots/layout-close.golden
index d91402a7..dfdd7f4d 100644
--- a/test/snapshots/layout-close.golden
+++ b/test/snapshots/layout-close.golden
@@ -1,4 +1,4 @@
-== snap built grid=140x41 cursor=4,16
+== snap built grid=140x41 cursor=4,35
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
| /tmp/pardes-snap/layout-close/cwd Term+bash Save Mode Filter Collaps /tmp/pardes-snap/layout-close/cwd Term+bash Save Mode Filter Collaps
@@ -11,10 +11,9 @@
| ls
| marker.txt
|
-| /tmp/pardes-snap/layout-close/cwd Term+bash Save Mode Filter Collaps
-| e Del
-| ls
-| marker.txt
+|
+|
+|
|
|
|
@@ -30,6 +29,17 @@
| e Del
| ls
| marker.txt
+|
+| /tmp/pardes-snap/layout-close/cwd Term+bash Save Mode Filter Collaps
+| e Del
+| ls
+| marker.txt
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/layout-close/cwd
== snap altc grid=140x41 cursor=39,7
|1: New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
|2: /tmp/pardes-snap/layout-close/cwd /tmp/pardes-snap/layout-close/cwd /tmp/pardes-snap/layout-close/cwd Term+bash Save Mode Filter Collaps
@@ -42,18 +52,18 @@
|9: pse Del
|10: ls
|11: marker.txt
-|12:
-|13:
-|14:
-|15:
-|22: /tmp/pardes-snap/layout-close/cwd
-|23: Term+bash Save Mode Filter Colla
-|24: pse Del
-|27: /tmp/pardes-snap/layout-close/cwd
-|28: Term+bash Save Mode Filter Colla
-|29: pse Del
-|30: ls
-|31: marker.txt
+|21: /tmp/pardes-snap/layout-close/cwd
+|22: Term+bash Save Mode Filter Colla
+|23: pse Del
+|26: /tmp/pardes-snap/layout-close/cwd
+|27: Term+bash Save Mode Filter Colla
+|28: pse Del
+|29: ls
+|30: marker.txt
+|31:
+|32:
+|33:
+|34:
== snap del grid=140x41 cursor=4,9
|5: ls ls marker.txt
|6: marker.txt marker.txt
@@ -62,11 +72,12 @@
|9:
|10:
|11:
+|40: ✓ @p5 Del 1 message · SPC h m
== snap exit grid=140x41 cursor=4,9
+|21:
|22:
|23:
|24:
-|25:
== snap colclose grid=140x41 cursor=37,1
|2: /tmp/pardes-snap/layout-close/cwd /tmp/pardes-snap/layout-close/cwd Term+bash Save Mode Filter Collaps
|3: Term+bash Save Mode Filter Colla e Del
diff --git a/test/snapshots/layout-open.golden b/test/snapshots/layout-open.golden
index 92423b64..51ddea02 100644
--- a/test/snapshots/layout-open.golden
+++ b/test/snapshots/layout-open.golden
@@ -1,4 +1,4 @@
-== snap before grid=100x31 cursor=4,9
+== snap before grid=100x32 cursor=4,9
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
| /tmp/pardes-snap/layout-open/cwd Term+bash Save /tmp/pardes-snap/layout-open/cwd Term+bash Save
@@ -20,23 +20,36 @@
| Mode Filter Collapse Del
| ls
| sub
-== snap altn-left grid=100x31 cursor=4,11
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| · @p1 a copy of the terminal's text: Tab or B2 runs it; what the program draw 1 message · SPC h m
+== snap altn-left grid=100x32 cursor=4,11
|7: /tmp/pardes-snap/layout-open/cwd Term+bash Save
|8: Mode Filter Collapse Del
|9: ls
|10: sub
-== snap altn-right grid=100x31 cursor=54,11
+== snap altn-right grid=100x32 cursor=54,11
|7: /tmp/pardes-snap/layout-open/cwd Term+bash Save /tmp/pardes-snap/layout-open/cwd Term+bash Save
|8: Mode Filter Collapse Del Mode Filter Collapse Del
|9: ls ls
|10: sub sub
-== snap file-open grid=100x31 cursor=7,24
+== snap file-open grid=100x32 cursor=7,24
|22: /tmp/pardes-snap/layout-open/cwd/sub/f.txt Save
|23: Term Collapse Follow Del
|24: 1 echo 'TTY'OK
-== snap ttydir grid=100x31 cursor=7,24
+|31: · @p2 a copy of the terminal's text: Tab or B2 runs it; what the program dra 2 messages · SPC h m
+== snap ttydir grid=100x32 cursor=7,24
|20: sub /tmp/pardes-snap/layout-open/cwd/sub (echo 'TTY'
|21: OK) exit 0 Kill Save Collapse Del
|22: /tmp/pardes-snap/layout-open/cwd/sub/f.txt Save % echo 'TTY'OK
|23: Term Collapse Follow Del TTYOK
|24: 1 echo 'TTY'OK exit 0
+|31: ✓ /tmp/pardes-snap/layout-open/cwd/sub/f.txt Exec 3 messages · SPC h m
diff --git a/test/snapshots/leader.golden b/test/snapshots/leader.golden
index 9f523992..c6a5460e 100644
--- a/test/snapshots/leader.golden
+++ b/test/snapshots/leader.golden
@@ -1,14 +1,63 @@
-== snap spc grid=100x41 cursor=7,3
+== snap spc grid=100x41 cursor=7,5
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/leader/cwd/cmds.txt Save Term Collapse Follow Del
-| 1 Help SPC
-== snap spc-h grid=100x41 cursor=7,3
-|3: 1 Help SPC h
+| /tmp/pardes-snap/leader/cwd/cmds.txt Keep ␣ ▸ b buffer… c column… f file… h help… j jump… l l
+| sp… n new… s session… t view… ' Resume / All ? Help d Del e Message p ClipPaste P ClipPa
+| steBefore q Exit R ClipReplace w Window y ClipYank Y ClipYankMain ↓ unroll · ? help
+| 1 Help Help h Help t Help c Help l
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/leader/cwd/cmds.txt:1
+== snap spc-h grid=100x41 cursor=7,4
+|2: /tmp/pardes-snap/leader/cwd/cmds.txt Keep ␣ h ▸ b Build c Changelog k Keys m Messages t Tutor
+|3: ↓ unroll · ? help
+|4: 1 Help Help h Help t Help c Help l
+|5:
== snap abandoned grid=100x41 cursor=7,3
-|3: 1 Help
-== snap unmapped grid=100x41 cursor=7,3
+|2: /tmp/pardes-snap/leader/cwd/cmds.txt Keep Save Term Collapse Follow Del
+|3: 1 Help Help h Help t Help c Help l
+|4:
+== snap unmapped grid=100x41 cursor=7,5
+|2: /tmp/pardes-snap/leader/cwd/cmds.txt Keep ␣ ▸ b buffer… c column… f file… h help… j jump… l l
+|3: sp… n new… s session… t view… ' Resume / All ? Help d Del e Message p ClipPaste P ClipPa
+|4: steBefore q Exit R ClipReplace w Window y ClipYank Y ClipYankMain x ↓ unroll · ? help
+|5: 1 Help Help h Help t Help c Help l
== snap help-group grid=100x41 cursor=7,6
+|2: /tmp/pardes-snap/leader/cwd/cmds.txt Keep Save Term Collapse Follow Del
+|3: 1 Help Help h Help t Help c Help l
+|4:
|5: /tmp/pardes-snap/leader/cwd/+Help Save Term Collapse Follow Del
|6: 1 pardes builtins under SPC h
|7: 2
@@ -20,16 +69,25 @@
|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: ~
+|16: 10 SPC h k Keys
+|17: 11 Show what a key sequence runs: the next keys typed are replayed in the tag.
+|18: 12 The tag shows `Keys` and the keys as they are typed; a sequence that reaches a leaf unrolls ↩
+|19: its level under the tag with the leaf on the cursor and its documentation beside it, and Ent↩
+|20: er runs it. Every root answers: SPC, g, m, z, Z, [, ], window mode's C-w. A sequence nothing↩
+|21: is bound to is shown struck, `runs nothing`. Esc leaves it.
+|22: 13
+|23: 14 SPC h m Messages
+|24: 15 Show the messages said so far, the newest first, an error's places under it.
+|25: 16 Where jumps walk, a list in the pane's tag: Enter Looks a row (a message's cause, a place), ↩
+|26: C-q keeps it as a +Messages; else the +Messages.
+|27: 17
+|28: 18 SPC h t Tutor topbar
+|29: 19 Open the tutor, a document to work through.
+|30: 20
+|31: ~
+|40: ✓ /tmp/pardes-snap/leader/cwd/cmds.txt Help 4 messages · SPC h m
== snap tutor grid=100x41 cursor=7,23
-|6: 1 pardes builtins under SPC h Tutor
-|22: /tmp/pardes-snap/leader/cwd/+Tutor Save Term Collapse Follow Del
+|22: /tmp/pardes-snap/leader/cwd/+Tutor Keep Save Term Collapse Follow Del
|23: 1
|24: 2 PARDES TUTOR
|25: 3
@@ -47,7 +105,7 @@
|37: 15 it. Type a builtin in any tag and `Exec` it. Lines starting with
|38: 16 "| " are tags.
|39: 17
-|40: 18 Press j until you reach part 1.
+|40: ✓ /tmp/pardes-snap/leader/cwd/+Help Tutor 5 messages · SPC h m
== snap deleted grid=100x41 cursor=7,3
|5:
|6:
@@ -67,24 +125,24 @@
|20:
|21:
|22:
-|23:
-|24: /tmp/pardes-snap/leader/cwd/+Help Save Term Collapse Follow Del
-|25: 1 pardes builtins under SPC h
-|26: 2
-|27: 3 SPC h b Build
-|28: 4 Show this build in a +Build: its version, compiler, optimize mode, target and dependencies.
-|29: 5 A stamped build's (a release, or the ~/.local install) commit, jj change and build time too,↩
-|30: its platform, its grammars, and whether the addons are compiled in.
-|31: 6
-|32: 7 SPC h c Changelog topbar
-|33: 8 Show this build's version and what changed to reach it, in a +Changelog.
-|34: 9
-|35: 10 SPC h m Messages
-|36: 11 Show the messages said so far in a +Messages.
-|37: 12
-|38: 13 SPC h t Tutor topbar
-|39: 14 Open the tutor, a document to work through.
-|40: 15
+|23: /tmp/pardes-snap/leader/cwd/+Help Save Term Collapse Follow Del
+|24: 1 pardes builtins under SPC h
+|25: 2
+|26: 3 SPC h b Build
+|27: 4 Show this build in a +Build: its version, compiler, optimize mode, target and dependencies.
+|28: 5 A stamped build's (a release, or the ~/.local install) commit, jj change and build time too,↩
+|29: its platform, its grammars, and whether the addons are compiled in.
+|30: 6
+|31: 7 SPC h c Changelog topbar
+|32: 8 Show this build's version and what changed to reach it, in a +Changelog.
+|33: 9
+|34: 10 SPC h k Keys
+|35: 11 Show what a key sequence runs: the next keys typed are replayed in the tag.
+|36: 12 The tag shows `Keys` and the keys as they are typed; a sequence that reaches a leaf unrolls ↩
+|37: its level under the tag with the leaf on the cursor and its documentation beside it, and Ent↩
+|38: er runs it. Every root answers: SPC, g, m, z, Z, [, ], window mode's C-w. A sequence nothing↩
+|39: is bound to is shown struck, `runs nothing`. Esc leaves it.
+|40: ✓ /tmp/pardes-snap/leader/cwd/+Tutor Del 6 messages · SPC h m
== 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
@@ -121,7 +179,7 @@
|37:
|38:
|39:
-|40:
+|40: ✓ /tmp/pardes-snap/leader/cwd/cmds.txt Help 14 messages · SPC h m
== snap help-language grid=100x41 cursor=7,6
|6: 1 pardes builtins under SPC l
|8: 3 SPC l C Callees
@@ -156,7 +214,7 @@
|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
+|40: ✓ /tmp/pardes-snap/leader/cwd/cmds.txt Help 16 messages · SPC h m
== snap del-output grid=100x41 cursor=7,3
|5:
|6:
@@ -193,4 +251,4 @@
|37:
|38:
|39:
-|40:
+|40: ✓ /tmp/pardes-snap/leader/cwd/+Help Del 17 messages · SPC h m
diff --git a/test/snapshots/load.golden b/test/snapshots/load.golden
index cb0cce1f..ded020a4 100644
--- a/test/snapshots/load.golden
+++ b/test/snapshots/load.golden
@@ -1,13 +1,12 @@
-== snap loaded grid=100x31 cursor=4,16
+== snap loaded grid=100x31 cursor=4,15
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
| /tmp/pardes-snap/load/cwd Term+bash Save Mode Fi /tmp/pardes-snap/load/cwd Term+bash Save Mode Fi
| lter Collapse Del lter Collapse Del
-| 28 Dump ls
-| 29 d.txt
-| 30
-| 31 ── restored history ──
-| 32
+| 29 ls
+| 30 d.txt
+| 31
+| 32 ── restored history ──
| 33
| 34
| 35
@@ -22,12 +21,21 @@
| d.txt
|
| ── restored history ──
+|
+|
+|
+|
+|
+|
+|
+|
+| ✓ @p1 Dump 1 message · SPC h m
== style loaded grid=100x31
|0: 0-1 d,#1d2824, 2-47 #b2c3b8,#1d2824, 48-51 #f5f7ee,#3c614a, 52-52 #f5f7ee,#1d2824, 53-99 #b2c3b8,#1d2824,
|1: 0-1 d,#887455, 2-49 #becfc4,#314738, 50-51 #becfc4,#887455, 52-99 #b2c3b8,#1d2824,
|2: 0-1 d,#add38a, 2-27 #becfc4,#314738, 28-37 #dfbce5,#314738, 38-49 #becfc4,#314738, 50-51 #becfc4,#496656, 52-77 #b2c3b8,#1d2824, 78-87 #d3b0d9,#1d2824, 88-99 #b2c3b8,#1d2824,
|3: 0-1 d,#314738, 2-49 #becfc4,#314738, 50-51 #becfc4,#1d2824, 52-99 #b2c3b8,#1d2824,
-|4: 0-0 d,#152019, 1-1 d,#0d1410, 2-43 #e5eee5,#0d1410, 44-44 #e5eee5,#1d2824, 45-49 #b2c3b8,#1d2824, 50-50 #b2c3b8,#608269, 51-51 #b2c3b8,#0d1410, 52-99 #e5eee5,#0d1410,
+|4: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
|5: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
|6: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
|7: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-51 #e5eee5,#0d1410, 52-73 #e5eee5,#0d1410,f 74-99 #e5eee5,#0d1410,
@@ -39,13 +47,13 @@
|13: 0-0 d,#608269, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
|14: 0-0 d,#608269, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
|15: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
-|16: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
-|17: 0-1 d,#496656, 2-27 #b2c3b8,#1d2824, 28-37 #d3b0d9,#1d2824, 38-49 #b2c3b8,#1d2824, 50-50 #b2c3b8,#608269, 51-99 #b2c3b8,#0d1410,
-|18: 0-1 d,#1d2824, 2-49 #b2c3b8,#1d2824, 50-50 #b2c3b8,#608269, 51-99 #b2c3b8,#0d1410,
+|16: 0-1 d,#496656, 2-27 #b2c3b8,#1d2824, 28-37 #d3b0d9,#1d2824, 38-49 #b2c3b8,#1d2824, 50-50 #b2c3b8,#608269, 51-99 #b2c3b8,#0d1410,
+|17: 0-1 d,#1d2824, 2-49 #b2c3b8,#1d2824, 50-50 #b2c3b8,#608269, 51-99 #b2c3b8,#0d1410,
+|18: 0-0 d,#608269, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
|19: 0-0 d,#608269, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
-|20: 0-0 d,#608269, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
-|21: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
-|22: 0-0 d,#608269, 1-1 d,#0d1410, 2-23 #e5eee5,#0d1410,f 24-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
+|20: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
+|21: 0-0 d,#608269, 1-1 d,#0d1410, 2-23 #e5eee5,#0d1410,f 24-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
+|22: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
|23: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
|24: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
|25: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
@@ -53,4 +61,4 @@
|27: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
|28: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
|29: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
-|30: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
+|30: 0-1 d,#1d2824, 2-99 #67756e,#1d2824,
diff --git a/test/snapshots/logquiet.golden b/test/snapshots/logquiet.golden
index b002b71b..6ec9e6e6 100644
--- a/test/snapshots/logquiet.golden
+++ b/test/snapshots/logquiet.golden
@@ -5,3 +5,28 @@
| $ ls
| $ printf '\033_Ga=q,i=1,s=1,v=1,f=24,t=d;AAAA\033\\\033[>0p'
| $ '\033_Ga=q,i=1,s=1,v=1,f=24,t=d;AAAA\033\\\033[>0p'Gi=1;OK
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/logquiet/cwd
diff --git a/test/snapshots/look-center.golden b/test/snapshots/look-center.golden
index 8463f103..ce1ab924 100644
--- a/test/snapshots/look-center.golden
+++ b/test/snapshots/look-center.golden
@@ -1,43 +1,50 @@
-== snap center-open grid=150x31 cursor=15,12
+== snap center-open grid=150x31 cursor=90,24
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
| /tmp/pardes-snap/look-center/cwd Term+bash Save Mode Filter Collapse Del /tmp/pardes-snap/look-center/cwd Term+bash Save Mode Filter Collapse Del
| ls ls
| big.txt big.txt
|
-| /tmp/pardes-snap/look-center/cwd/big.txt Save Term Collapse Follow Del
-| 95 line 95
-| 96 line 96
-| 97 line 97
-| 98 line 98
-| 99 line 99
-| 100 line 100
-| 101 line 101
-| 102 line 102
-| 103 line 103
-| 104 line 104
-| /tmp/pardes-snap/look-center/cwd Term+bash Save Mode Filter Collapse Del
-| ls
-| big.txt
-== snap center-dedup grid=150x31 cursor=15,12
-|7: 145 line 145
-|8: 146 line 146 big.txt:150 big.txt:2
-|9: 147 line 147
-|10: 148 line 148
-|11: 149 line 149
-|12: 150 line 150
-|13: 151 line 151
-|14: 152 line 152
-|15: 153 line 153
-|16: 154 line 154
-== snap center-clamp grid=150x31 cursor=13,8
-|7: 1 line 1
-|8: 2 line 2 big.txt:150 big.txt:2
-|9: 3 line 3
-|10: 4 line 4
-|11: 5 line 5
-|12: 6 line 6
-|13: 7 line 7
-|14: 8 line 8
-|15: 9 line 9
-|16: 10 line 10
+|
+|
+| big.txt:100 big.txt:150 big.txt:2
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/look-center/cwd Term+bash Save Mode Filter Collapse Del ‹@p1 › /tmp/pardes-snap/look-center/cwd/big.txt Keep Save Term Collapse F
+| ls ollow Del
+| big.txt 94 line 94
+| 95 line 95
+| 96 line 96
+| 97 line 97
+| 98 line 98
+| 99 line 99
+| 100 line 100
+| 101 line 101
+| 102 line 102
+| 103 line 103
+| 104 line 104
+| 105 line 105
+| · @p1 a copy of the terminal's text: Tab or B2 runs it; what the program draws next replaces it (Ctrl-b types to the program) 1 message · SPC h m
+== snap center-dedup grid=150x31 cursor=15,28
+|8: big.txt:100 big.txt:150 big.txt:2 big.txt:150 big.txt:2
+|23: ‹@p3 › /tmp/pardes-snap/look-center/cwd/big.txt Keep Save Term Collapse F 99 line 99
+|24: ollow Del 100 line 100
+|25: 147 line 147 101 line 101
+|26: 148 line 148 102 line 102
+|27: 149 line 149 103 line 103
+|28: 150 line 150 104 line 104
+|29: 151 line 151 105 line 105
+|30: · @p3 a copy of the terminal's text: Tab or B2 runs it; what the program draws next replaces it (Ctrl-b types to the program) 2 messages · SPC h m
+== snap center-clamp grid=150x31 cursor=13,26
+|23: ‹@p3 › big.txt:150 › /tmp/pardes-snap/look-center/cwd/big.txt Keep Save T 99 line 99
+|24: erm Collapse Follow Del 100 line 100
+|25: 1 line 1 101 line 101
+|26: 2 line 2 102 line 102
+|27: 3 line 3 103 line 103
+|28: 4 line 4 104 line 104
+|29: 5 line 5 105 line 105
diff --git a/test/snapshots/look-fd-deep.golden b/test/snapshots/look-fd-deep.golden
index b71de0c8..dc1e34f0 100644
--- a/test/snapshots/look-fd-deep.golden
+++ b/test/snapshots/look-fd-deep.golden
@@ -22,9 +22,19 @@
|
| /tmp/pardes-snap/look-fd-deep/cwd/+New Save Term Collapse Follow Del
| 1
-== snap fd-path-looked grid=100x31 cursor=7,11
-|10: /tmp/pardes-snap/look-fd-deep/cwd/a/b/c.txt Save Term Collapse Follow Del
-|11: 1 deep-marker
-== snap ls-name-looked grid=100x31 cursor=7,14
-|13: /tmp/pardes-snap/look-fd-deep/cwd/a/top.txt Save Term Collapse Follow Del
-|14: 1 top-marker
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/look-fd-deep/cwd/a
+== snap fd-path-looked grid=100x31 cursor=7,12
+|11: ‹@p1 › /tmp/pardes-snap/look-fd-deep/cwd/a/b/c.txt Keep Save Term Collapse Follow Del
+|12: 1 deep-marker
+|30: /tmp/pardes-snap/look-fd-deep/cwd/a/b/c.txt:1
+== snap ls-name-looked grid=100x31 cursor=7,12
+|11: ‹@p1 › c.txt:1 › /tmp/pardes-snap/look-fd-deep/cwd/a/top.txt Keep Save Term Collapse Follow Del
+|12: 1 top-marker
+|30: /tmp/pardes-snap/look-fd-deep/cwd/a/top.txt:1
diff --git a/test/snapshots/look-file-1col.golden b/test/snapshots/look-file-1col.golden
index 12484893..deedfac1 100644
--- a/test/snapshots/look-file-1col.golden
+++ b/test/snapshots/look-file-1col.golden
@@ -1,17 +1,21 @@
-== snap file-open-1col grid=100x31 cursor=14,19
+== snap file-open-1col grid=100x31 cursor=14,23
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
| /tmp/pardes-snap/look-file-1col/cwd Term+bash Save Mode Filter Collapse Del
| ls
| big.txt
|
-| /tmp/pardes-snap/look-file-1col/cwd/big.txt Save Term Collapse Follow Del
-| 28 line 28
-| 29 line 29
-| 30 line 30
-| 31 line 31
-| 32 line 32
-| 33 line 33
+|
+|
+| big.txt:40
+|
+|
+|
+|
+|
+|
+|
+| ‹@p1 › /tmp/pardes-snap/look-file-1col/cwd/big.txt Keep Save Term Collapse Follow Del
| 34 line 34
| 35 line 35
| 36 line 36
@@ -25,8 +29,4 @@
| 44 line 44
| 45 line 45
| 46 line 46
-| 47 line 47
-| 48 line 48
-| 49 line 49
-| 50 line 50
-| 51 line 51
+| · @p1 a copy of the terminal's text: Tab or B2 runs it; what the program draw 1 message · SPC h m
diff --git a/test/snapshots/look-file.golden b/test/snapshots/look-file.golden
index 992fa1cc..757a174e 100644
--- a/test/snapshots/look-file.golden
+++ b/test/snapshots/look-file.golden
@@ -1,53 +1,64 @@
-== snap file-open grid=150x31 cursor=14,12
+== snap file-open grid=150x31 cursor=89,24
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
| /tmp/pardes-snap/look-file/cwd Term+bash Save Mode Filter Collapse Del /tmp/pardes-snap/look-file/cwd Term+bash Save Mode Filter Collapse Del
| ls ls
| big.txt big.txt
|
-| /tmp/pardes-snap/look-file/cwd/big.txt Save Term Collapse Follow Del
-| 35 line 35
-| 36 line 36
-| 37 line 37
-| 38 line 38
-| 39 line 39
-| 40 line 40
-| 41 line 41
-| 42 line 42
-| 43 line 43
-| 44 line 44
-| /tmp/pardes-snap/look-file/cwd Term+bash Save Mode Filter Collapse Del
-| ls
-| big.txt
+|
+|
+| big.txt:40
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/look-file/cwd Term+bash Save Mode Filter Collapse Del ‹@p1 › /tmp/pardes-snap/look-file/cwd/big.txt Keep Save Term Collapse Fol
+| ls low Del
+| big.txt 34 line 34
+| 35 line 35
+| 36 line 36
+| 37 line 37
+| 38 line 38
+| 39 line 39
+| 40 line 40
+| 41 line 41
+| 42 line 42
+| 43 line 43
+| 44 line 44
+| 45 line 45
+| · @p1 a copy of the terminal's text: Tab or B2 runs it; what the program draws next replaces it (Ctrl-b types to the program) 1 message · SPC h m
== style file-open grid=150x31
|0: 0-1 d,#1d2824, 2-149 #b2c3b8,#1d2824,
-|1: 0-1 d,#887455, 2-74 #becfc4,#314738, 75-76 #becfc4,#887455, 77-149 #b2c3b8,#1d2824,
+|1: 0-1 d,#887455, 2-74 #b2c3b8,#1d2824, 75-76 #b2c3b8,#887455, 77-149 #becfc4,#314738,
|2: 0-1 d,#496656, 2-32 #b2c3b8,#1d2824, 33-42 #d3b0d9,#1d2824, 43-74 #b2c3b8,#1d2824, 75-76 #b2c3b8,#496656, 77-107 #b2c3b8,#1d2824, 108-117 #d3b0d9,#1d2824, 118-149 #b2c3b8,#1d2824,
|3: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
|4: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
|5: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|6: 0-1 d,#add38a, 2-32 #becfc4,#314738, 33-40 #dfbce5,#314738, 41-74 #becfc4,#314738, 75-75 #becfc4,#608269, 76-149 #becfc4,#0d1410,
-|7: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|8: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|9: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|10: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|11: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|12: 0-0 d,#608269, 1-1 d,#0d1410, 2-3 d,#0d1410,b 4-6 #616f64,#0d1410,b 7-14 #f5f7ee,#3c614a, 15-74 #f5f7ee,#0d1410, 75-75 #f5f7ee,#608269, 76-149 #f5f7ee,#0d1410,
-|13: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|14: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|15: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|16: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|17: 0-1 d,#496656, 2-32 #b2c3b8,#1d2824, 33-42 #d3b0d9,#1d2824, 43-74 #b2c3b8,#1d2824, 75-75 #b2c3b8,#608269, 76-149 #b2c3b8,#0d1410,
-|18: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|19: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|20: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|21: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|22: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|23: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|24: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|25: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|26: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|27: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|28: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|29: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|30: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
+|6: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
+|7: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
+|8: 0-0 d,#608269, 1-3 d,#0d1410, 4-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
+|9: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
+|10: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
+|11: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
+|12: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
+|13: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
+|14: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
+|15: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
+|16: 0-1 d,#496656, 2-32 #b2c3b8,#1d2824, 33-42 #d3b0d9,#1d2824, 43-74 #b2c3b8,#1d2824, 75-76 #b2c3b8,#add38a, 77-114 #becfc4,#2c2819, 115-122 #dfbce5,#2c2819, 123-149 #becfc4,#2c2819,
+|17: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-76 #e5eee5,#2c2819, 77-149 #becfc4,#2c2819,
+|18: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 #e5eee5,#152019, 76-78 #e5eee5,#0d1410, 79-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410,
+|19: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#152019, 76-78 d,#0d1410, 79-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410,
+|20: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#152019, 76-78 d,#0d1410, 79-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410,
+|21: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#152019, 76-78 d,#0d1410, 79-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410,
+|22: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#152019, 76-78 d,#0d1410, 79-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410,
+|23: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#152019, 76-78 d,#0d1410, 79-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410,
+|24: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-76 d,#0d1410, 77-78 d,#0d1410,b 79-81 #616f64,#0d1410,b 82-89 #f5f7ee,#3c614a, 90-149 #f5f7ee,#0d1410,
+|25: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-78 d,#0d1410, 79-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410,
+|26: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#152019, 76-78 d,#0d1410, 79-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410,
+|27: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#152019, 76-78 d,#0d1410, 79-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410,
+|28: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#152019, 76-78 d,#0d1410, 79-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410,
+|29: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#152019, 76-78 d,#0d1410, 79-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410,
+|30: 0-1 d,#1d2824, 2-149 #67756e,#1d2824,
diff --git a/test/snapshots/lookloaded.golden b/test/snapshots/lookloaded.golden
index d32b1463..87326928 100644
--- a/test/snapshots/lookloaded.golden
+++ b/test/snapshots/lookloaded.golden
@@ -1,4 +1,4 @@
-== snap file-open grid=100x31 cursor=14,13
+== snap file-open grid=100x31 cursor=64,25
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
| /tmp/pardes-snap/lookloaded/cwd Term+bash Save M /tmp/pardes-snap/lookloaded/cwd Term+bash Save M
@@ -6,30 +6,35 @@
| ls ls
| big.txt big.txt
|
-| /tmp/pardes-snap/lookloaded/cwd/big.txt Save Ter
-| m Collapse Follow Del
-| 36 line 36
-| 37 line 37
-| 38 line 38
-| 39 line 39
-| 40 line 40
-| 41 line 41
-| 42 line 42
-| 43 line 43
+|
+| big.txt:40 big.txt:10
+|
+|
+|
+|
+|
+|
+|
| /tmp/pardes-snap/lookloaded/cwd Term+bash Save M
-| ode Filter Collapse Del
-| ls
-| big.txt
+| ode Filter Collapse Del ‹@p1 › /tmp/pardes-snap/lookloaded/cwd/big.txt K
+| ls eep Save Term Collapse Follow Del
+| big.txt 34 line 34
+| 35 line 35
+| 36 line 36
+| 37 line 37
+| 38 line 38
+| 39 line 39
+| 40 line 40
+| 41 line 41
+| 42 line 42
+| 43 line 43
+| 44 line 44
+| · @p1 a copy of the terminal's text: Tab or B2 runs it; what the program draw 1 message · SPC h m
== snap removed grid=100x31 cursor=54,8
|6: rm big.txt; echo GO''NE
-|7: */tmp/pardes-snap/lookloaded/cwd/big.txt Save Ter GONE
-== snap look-noFS grid=100x31 cursor=14,13
-|8: m Collapse Follow Del big.txt:10
-|9: 6 line 6
-|10: 7 line 7
-|11: 8 line 8
-|12: 9 line 9
-|13: 10 line 10
-|14: 11 line 11
-|15: 12 line 12
-|16: 13 line 13
+|7: GONE
+|17: ode Filter Collapse Del *‹@p1 › /tmp/pardes-snap/lookloaded/cwd/big.txt K
+|30: · /tmp/pardes-snap/lookloaded/cwd/big.txt deleted on disk (Save writes it ag 2 messages · SPC h m
+== snap look-noFS grid=100x31 cursor=56,8
+|8: big.txt:40 big.txt:10 big.txt:10
+|30: · @p3 Look: /tmp/pardes-snap/lookloaded/cwd/big.txt: no such file 4 messages · SPC h m
diff --git a/test/snapshots/lookpanes.golden b/test/snapshots/lookpanes.golden
index e3fbe1ed..2027b910 100644
--- a/test/snapshots/lookpanes.golden
+++ b/test/snapshots/lookpanes.golden
@@ -1,8 +1,8 @@
== snap shells grid=130x51 cursor=122,4
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History 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 Follow Del pse Del
+| /tmp/pardes-snap/lookpanes/cwd/beta/bmark.txt Keep Save Term Co /tmp/pardes-snap/lookpanes/cwd Term+bash Save Mode Filter Colla
+| llapse Follow Del pse Del
| 1 both.txt ls zqonly.txt pick.txt twin.txt
| 2 b-marker alpha beta zzboot.txt
|
@@ -10,40 +10,81 @@
| 1 amark.txt pick.txt zqonly.txt
| 2 both.txt twin.txt
| ~
-== snap other-dir grid=130x51 cursor=7,8
-|6: /tmp/pardes-snap/lookpanes/cwd/alpha/zqonly.txt Save Term Colla
-|7: pse Follow Del /tmp/pardes-snap/lookpanes/cwd/alpha/ Get Term Collapse Del
-|8: 1 ONLY-IN-ALPHA 1 amark.txt pick.txt zqonly.txt
-== snap clicked-wins grid=130x51 cursor=7,12
-|10: /tmp/pardes-snap/lookpanes/cwd/beta/both.txt Save Term Collapse ~
-|11: Follow Del
-|12: 1 BOTH-FROM-BETA
-== snap mru-alpha grid=130x51 cursor=72,12
-|10: /tmp/pardes-snap/lookpanes/cwd/beta/both.txt Save Term Collapse /tmp/pardes-snap/lookpanes/cwd/alpha/pick.txt Save Term Collaps
-|11: Follow Del e Follow Del
-|12: 1 BOTH-FROM-BETA 1 PICK-FROM-ALPHA
-== snap mru-beta grid=130x51 cursor=7,16
-|14: /tmp/pardes-snap/lookpanes/cwd/beta/twin.txt Save Term Collapse
-|15: Follow Del
-|16: 1 TWIN-FROM-BETA
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| · @p2 a copy of the terminal's text: Tab or B2 runs it; what the program draws next replaces it (Ctrl-b typ 1 message · SPC h m
+== snap other-dir grid=130x51 cursor=7,29
+|27: ‹@p2 › /tmp/pardes-snap/lookpanes/cwd/alpha/zqonly.txt Keep Sav
+|28: e Term Collapse Follow Del
+|29: 1 ONLY-IN-ALPHA
+== snap clicked-wins grid=130x51 cursor=7,4
+|2: bmark.txt:1 › /tmp/pardes-snap/lookpanes/cwd/beta/both.txt Keep /tmp/pardes-snap/lookpanes/cwd Term+bash Save Mode Filter Colla
+|3: Save Term Collapse Follow Del pse Del
+|4: 1 BOTH-FROM-BETA ls zqonly.txt pick.txt twin.txt
+|5: alpha beta zzboot.txt
+== snap mru-alpha grid=130x51 cursor=7,29
+|27: ‹@p2 › zqonly.txt:1 › /tmp/pardes-snap/lookpanes/cwd/alpha/pick
+|28: .txt Keep Save Term Collapse Follow Del
+|29: 1 PICK-FROM-ALPHA
+== snap mru-beta grid=130x51 cursor=7,29
+|27: ‹@p2 › zqonly.txt:1 › pick.txt:1 › /tmp/pardes-snap/lookpanes/c
+|28: wd/beta/twin.txt Keep Save Term Collapse Follow Del
+|29: 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,
+|2: 0-1 d,#496656, 2-51 #b2c3b8,#2c2819, 52-60 #d3b0d9,#2c2819, 61-64 #b2c3b8,#2c2819, 65-66 #b2c3b8,#496656, 67-97 #b2c3b8,#1d2824, 98-107 #d3b0d9,#1d2824, 108-129 #b2c3b8,#1d2824,
+|3: 0-2 d,#2c2819, 3-64 #b2c3b8,#2c2819, 65-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-129 #b2c3b8,#1d2824,
-|8: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-64 #e5eee5,#0d1410, 65-65 #e5eee5,#608269, 66-69 #e5eee5,#0d1410, 70-71 #59675c,#0d1410, 72-129 #e5eee5,#0d1410,
-|9: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#152019, 66-69 d,#0d1410, 70-71 #59675c,#0d1410, 72-129 #e5eee5,#0d1410,
-|10: 0-1 d,#496656, 2-37 #b2c3b8,#1d2824, 38-46 #d3b0d9,#1d2824, 47-64 #b2c3b8,#1d2824, 65-66 #b2c3b8,#496656, 67-103 #b2c3b8,#1d2824, 104-112 #d3b0d9,#1d2824, 113-129 #b2c3b8,#1d2824,
-|11: 0-2 d,#1d2824, 3-129 #b2c3b8,#1d2824,
-|12: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-64 #e5eee5,#0d1410, 65-65 #e5eee5,#608269, 66-69 #e5eee5,#0d1410, 70-71 #59675c,#0d1410, 72-129 #e5eee5,#0d1410,
+|5: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
+|6: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
+|7: 0-0 d,#608269, 1-64 d,#0d1410, 65-66 d,#496656, 67-129 #b2c3b8,#1d2824,
+|8: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-69 d,#0d1410, 70-71 #59675c,#0d1410, 72-129 #e5eee5,#0d1410,
+|9: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-69 d,#0d1410, 70-71 #59675c,#0d1410, 72-129 #e5eee5,#0d1410,
+|10: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-69 d,#0d1410, 70-129 #59675c,#0d1410,
+|11: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
+|12: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
|13: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
-|14: 0-1 d,#add38a, 2-37 #becfc4,#314738, 38-46 #dfbce5,#314738, 47-64 #becfc4,#314738, 65-65 #becfc4,#608269, 66-129 #becfc4,#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,
+|14: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
+|15: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
+|16: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#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,
@@ -54,9 +95,9 @@
|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,
+|27: 0-1 d,#add38a, 2-64 #becfc4,#2c2819, 65-65 #becfc4,#608269, 66-129 #becfc4,#0d1410,
+|28: 0-1 d,#2c2819, 2-9 #becfc4,#2c2819, 10-18 #dfbce5,#2c2819, 19-64 #becfc4,#2c2819, 65-65 #becfc4,#608269, 66-129 #becfc4,#0d1410,
+|29: 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,
|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,
@@ -77,4 +118,4 @@
|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,
+|50: 0-1 d,#1d2824, 2-129 #67756e,#1d2824,
diff --git a/test/snapshots/lookrange.golden b/test/snapshots/lookrange.golden
index c677fb8f..63171bff 100644
--- a/test/snapshots/lookrange.golden
+++ b/test/snapshots/lookrange.golden
@@ -1,40 +1,65 @@
== snap opened grid=150x31 cursor=7,3
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/lookrange/cwd/look.txt Save Term Collapse Follow Del
+| /tmp/pardes-snap/lookrange/cwd/look.txt Keep Save Term Collapse Follow Del
| 1 r.txt:3-5
| 2 r.txt:7:4-9
| 3 r.txt:3:2-5:3
| 4 r.txt:8:6-99:9
-== snap wholelines grid=150x31 cursor=11,12
-|7: /tmp/pardes-snap/lookrange/cwd/r.txt Save Term Collapse Follow Del
-|8: 1 aaaa
-|9: 2 bbbb
-|10: 3 cccc dccc
-|11: 4 dddd
-|12: 5 eeee
-|13: 6 ffff
-|14: 7 gg NEEDLE gg
-|15: 8 hhhh NEEDLE
-|16: 9 iiii
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/lookrange/cwd/look.txt:1
+== snap wholelines grid=150x31 cursor=11,7
+|2: look.txt:1 › /tmp/pardes-snap/lookrange/cwd/r.txt Keep Save Term Collapse Follow Del
+|3: 1 aaaa
+|4: 2 bbbb
+|5: 3 cccc dccc
+|6: 4 dddd
+|7: 5 eeee
+|8: 6 ffff
+|9: 7 gg NEEDLE gg
+|10: 8 hhhh NEEDLE
+|11: 9 iiii
+|30: /tmp/pardes-snap/lookrange/cwd/r.txt:5
== style wholelines grid=150x31
|0: 0-1 d,#1d2824, 2-149 #b2c3b8,#1d2824,
|1: 0-1 d,#887455, 2-149 #becfc4,#314738,
-|2: 0-1 d,#496656, 2-32 #b2c3b8,#1d2824, 33-41 #d3b0d9,#1d2824, 42-149 #b2c3b8,#1d2824,
+|2: 0-1 d,#add38a, 2-45 #becfc4,#2c2819, 46-51 #dfbce5,#2c2819, 52-149 #becfc4,#2c2819,
|3: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-149 #e5eee5,#0d1410,
|4: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-149 #e5eee5,#0d1410,
-|5: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-149 #e5eee5,#0d1410,
-|6: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-149 #e5eee5,#0d1410,
-|7: 0-1 d,#add38a, 2-32 #becfc4,#314738, 33-38 #dfbce5,#314738, 39-149 #becfc4,#314738,
+|5: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-149 #f5f7ee,#3c614a,
+|6: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-149 #f5f7ee,#3c614a,
+|7: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-11 #f5f7ee,#3c614a, 12-149 #f5f7ee,#0d1410,
|8: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-149 #e5eee5,#0d1410,
|9: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-149 #e5eee5,#0d1410,
-|10: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-149 #f5f7ee,#3c614a,
-|11: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-149 #f5f7ee,#3c614a,
-|12: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-11 #f5f7ee,#3c614a, 12-149 #f5f7ee,#0d1410,
-|13: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-149 #e5eee5,#0d1410,
-|14: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-149 #e5eee5,#0d1410,
-|15: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-149 #e5eee5,#0d1410,
-|16: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-149 #e5eee5,#0d1410,
+|10: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-149 #e5eee5,#0d1410,
+|11: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-149 #e5eee5,#0d1410,
+|12: 0-0 d,#608269, 1-149 d,#0d1410,
+|13: 0-0 d,#608269, 1-149 d,#0d1410,
+|14: 0-0 d,#608269, 1-149 d,#0d1410,
+|15: 0-0 d,#608269, 1-149 d,#0d1410,
+|16: 0-0 d,#608269, 1-149 d,#0d1410,
|17: 0-0 d,#608269, 1-149 d,#0d1410,
|18: 0-0 d,#608269, 1-149 d,#0d1410,
|19: 0-0 d,#608269, 1-149 d,#0d1410,
@@ -48,53 +73,40 @@
|27: 0-0 d,#608269, 1-149 d,#0d1410,
|28: 0-0 d,#608269, 1-149 d,#0d1410,
|29: 0-0 d,#608269, 1-149 d,#0d1410,
-|30: 0-0 d,#608269, 1-149 d,#0d1410,
-== snap onelinespan grid=150x31 cursor=15,14
+|30: 0-1 d,#1d2824, 2-149 #b2c3b8,#1d2824,
+== snap onelinespan grid=150x31 cursor=11,7
== style onelinespan grid=150x31
-|10: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-149 #e5eee5,#0d1410,
-|11: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-149 #e5eee5,#0d1410,
-|12: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-149 #e5eee5,#0d1410,
-|14: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-9 #e5eee5,#0d1410, 10-15 #f5f7ee,#3c614a, 16-16 #f5f7ee,#0d1410, 17-149 #e5eee5,#0d1410,
-== snap fullspan grid=150x31 cursor=9,12
+== snap fullspan grid=150x31 cursor=10,7
== style fullspan grid=150x31
-|10: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-7 #e5eee5,#0d1410, 8-149 #f5f7ee,#3c614a,
-|11: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-149 #f5f7ee,#3c614a,
-|12: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-9 #f5f7ee,#3c614a, 10-149 #e5eee5,#0d1410,
-|14: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-149 #e5eee5,#0d1410,
-== snap stale grid=150x31 cursor=10,16
+|7: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-10 #f5f7ee,#3c614a, 11-149 #f5f7ee,#0d1410,
+== snap stale grid=150x31 cursor=10,7
== style stale grid=150x31
-|10: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-149 #e5eee5,#0d1410,
-|11: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-149 #e5eee5,#0d1410,
-|12: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-149 #e5eee5,#0d1410,
-|15: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-11 #e5eee5,#0d1410, 12-149 #f5f7ee,#3c614a,
-|16: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-10 #f5f7ee,#3c614a, 11-149 #f5f7ee,#0d1410,
-== snap hit1 grid=150x31 cursor=17,15
-|21: +Search 2/2 Save Undock Del
-|22: /NEEDLE
-|23: r.txt:7:4 gg NEEDLE gg
-|24: r.txt:8:6 hhhh NEEDLE
+== snap hit1 grid=150x31 cursor=15,9
+|2: look.txt:1 › /NEEDLE/ 1/2 › /tmp/pardes-snap/lookrange/cwd/r.txt Keep Save Term Collapse Follow Del
+|30: /tmp/pardes-snap/lookrange/cwd/r.txt:7
== style hit1 grid=150x31
-|14: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-9 #e5eee5,#0d1410, 10-15 #e5eee5,#352e19, 16-149 #e5eee5,#0d1410,
-|15: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-11 #e5eee5,#0d1410, 12-17 #f5f7ee,#3c614a, 18-149 #f5f7ee,#0d1410,
-|16: 0-0 d,#5e4923, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-149 #e5eee5,#0d1410,
-|18: 0-0 d,#e5eee5, 1-149 d,#0d1410,
-|21: 0-1 d,#496656, 2-149 #b2c3b8,#1d2824,
-|22: 0-0 d,#608269, 1-1 d,#0d1410, 2-149 #e5eee5,#0d1410,
-|23: 0-0 d,#608269, 1-1 d,#0d1410, 2-14 #59675c,#0d1410, 15-17 #e5eee5,#0d1410, 18-23 #f7e4a5,#352e19, 24-24 #f7e4a5,#0d1410, 25-149 #e5eee5,#0d1410,
-|24: 0-0 d,#608269, 1-1 d,#0d1410, 2-14 #59675c,#243a2d, 15-19 #e5eee5,#243a2d, 20-25 #f7e4a5,#5e4923, 26-149 #f7e4a5,#243a2d,
-== snap hit2 grid=150x31 cursor=15,14
+|2: 0-1 d,#add38a, 2-60 #becfc4,#2c2819, 61-66 #dfbce5,#2c2819, 67-149 #becfc4,#2c2819,
+|5: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-149 #e5eee5,#0d1410,
+|6: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-149 #e5eee5,#0d1410,
+|7: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-149 #e5eee5,#0d1410,
+|9: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-9 #e5eee5,#0d1410, 10-15 #f5f7ee,#3c614a, 16-16 #f5f7ee,#0d1410, 17-149 #e5eee5,#0d1410,
+|10: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-11 #e5eee5,#0d1410, 12-17 #e5eee5,#352e19, 18-149 #e5eee5,#0d1410,
+|20: 0-0 d,#e5eee5, 1-149 d,#0d1410,
+|23: 0-0 d,#5e4923, 1-149 d,#0d1410,
+== snap hit2 grid=150x31 cursor=17,10
+|2: look.txt:1 › /NEEDLE/ 2/2 › /tmp/pardes-snap/lookrange/cwd/r.txt Keep Save Term Collapse Follow Del
+|30: · /tmp/pardes-snap/lookrange/cwd/r.txt /NEEDLE/ 2/2 · line 8 1 message · SPC h m
== style hit2 grid=150x31
-|14: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-9 #e5eee5,#0d1410, 10-15 #f5f7ee,#3c614a, 16-16 #f5f7ee,#0d1410, 17-149 #e5eee5,#0d1410,
-|15: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-11 #e5eee5,#0d1410, 12-17 #e5eee5,#352e19, 18-149 #e5eee5,#0d1410,
-|16: 0-0 d,#e5eee5, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-149 #e5eee5,#0d1410,
-|18: 0-0 d,#5e4923, 1-149 d,#0d1410,
-|23: 0-0 d,#608269, 1-1 d,#0d1410, 2-14 #59675c,#0d1410, 15-17 #e5eee5,#0d1410, 18-23 #f7e4a5,#5e4923, 24-24 #f7e4a5,#0d1410, 25-149 #e5eee5,#0d1410,
-|24: 0-0 d,#608269, 1-1 d,#0d1410, 2-14 #59675c,#243a2d, 15-19 #e5eee5,#243a2d, 20-25 #f7e4a5,#352e19, 26-149 #f7e4a5,#243a2d,
-== snap back grid=150x31 cursor=17,15
+|9: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-9 #e5eee5,#0d1410, 10-15 #e5eee5,#352e19, 16-149 #e5eee5,#0d1410,
+|10: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-11 #e5eee5,#0d1410, 12-17 #f5f7ee,#3c614a, 18-149 #f5f7ee,#0d1410,
+|20: 0-0 d,#5e4923, 1-149 d,#0d1410,
+|23: 0-0 d,#e5eee5, 1-149 d,#0d1410,
+|30: 0-1 d,#1d2824, 2-149 #67756e,#1d2824,
+== snap back grid=150x31 cursor=15,9
+|2: look.txt:1 › /NEEDLE/ 1/2 › /tmp/pardes-snap/lookrange/cwd/r.txt Keep Save Term Collapse Follow Del
+|30: · /tmp/pardes-snap/lookrange/cwd/r.txt /NEEDLE/ 1/2 · line 7 2 messages · SPC h m
== style back grid=150x31
-|14: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-9 #e5eee5,#0d1410, 10-15 #e5eee5,#352e19, 16-149 #e5eee5,#0d1410,
-|15: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-11 #e5eee5,#0d1410, 12-17 #f5f7ee,#3c614a, 18-149 #f5f7ee,#0d1410,
-|16: 0-0 d,#5e4923, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-149 #e5eee5,#0d1410,
-|18: 0-0 d,#e5eee5, 1-149 d,#0d1410,
-|23: 0-0 d,#608269, 1-1 d,#0d1410, 2-14 #59675c,#0d1410, 15-17 #e5eee5,#0d1410, 18-23 #f7e4a5,#352e19, 24-24 #f7e4a5,#0d1410, 25-149 #e5eee5,#0d1410,
-|24: 0-0 d,#608269, 1-1 d,#0d1410, 2-14 #59675c,#243a2d, 15-19 #e5eee5,#243a2d, 20-25 #f7e4a5,#5e4923, 26-149 #f7e4a5,#243a2d,
+|9: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-9 #e5eee5,#0d1410, 10-15 #f5f7ee,#3c614a, 16-16 #f5f7ee,#0d1410, 17-149 #e5eee5,#0d1410,
+|10: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-11 #e5eee5,#0d1410, 12-17 #e5eee5,#352e19, 18-149 #e5eee5,#0d1410,
+|20: 0-0 d,#e5eee5, 1-149 d,#0d1410,
+|23: 0-0 d,#5e4923, 1-149 d,#0d1410,
diff --git a/test/snapshots/lsp-client-edit.golden b/test/snapshots/lsp-client-edit.golden
index 5911baa4..0e47e43f 100644
--- a/test/snapshots/lsp-client-edit.golden
+++ b/test/snapshots/lsp-client-edit.golden
@@ -1,8 +1,9 @@
-== snap formatted grid=100x25 cursor=7,4
+== snap formatted grid=100x25 cursor=7,5
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
-| */tmp/pardes-snap/lsp-client-edit/cwd/main.rs Save Term Collapse Follow TreeContext Def Refs Del
-| 1 // formatted by mock formatted 1 range(s)
+| */tmp/pardes-snap/lsp-client-edit/cwd/main.rs Keep Save Term Collapse Follow TreeContext Def Refs D
+| el
+| 1 // formatted by mock
| 2 mod lib;
| 3
| 4 fn main() {
@@ -11,24 +12,35 @@
| 7 let _ = x + y;
| 8 }
| ~
-== snap unformatted grid=100x25 cursor=7,3
-|2: /tmp/pardes-snap/lsp-client-edit/cwd/main.rs Save Term Collapse Follow TreeContext Def Refs Del
-|3: 1 mod lib;
-|4: 2
-|5: 3 fn main() {
-|6: 4 let x = add(1, 2);
-|7: 5 let y = add(3, 4);
-|8: 6 let _ = x + y;
-|9: 7 }
-|10: ~
-|11:
-== snap renamed grid=100x25 cursor=12,5
-|2: */tmp/pardes-snap/lsp-client-edit/cwd/main.rs Save Term Collapse Follow TreeContext Def Refs Del
-|3: 1 mod lib; renamed 2 range(s)
-|6: 4 let x = sum(1, 2);
-|7: 5 let y = sum(3, 4);
-== snap unrenamed grid=100x25 cursor=12,5
-|2: /tmp/pardes-snap/lsp-client-edit/cwd/main.rs Save Term Collapse Follow TreeContext Def Refs Del
-|3: 1 mod lib;
-|6: 4 let x = add(1, 2);
-|7: 5 let y = add(3, 4);
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| · /tmp/pardes-snap/lsp-client-edit/cwd/main.rs formatted 1 range(s) 1 message · SPC h m
+== snap unformatted grid=100x25 cursor=7,4
+|2: /tmp/pardes-snap/lsp-client-edit/cwd/main.rs Keep Save Term Collapse Follow TreeContext Def Refs D
+|4: 1 mod lib;
+|5: 2
+|6: 3 fn main() {
+|7: 4 let x = add(1, 2);
+|8: 5 let y = add(3, 4);
+|9: 6 let _ = x + y;
+|10: 7 }
+|11: ~
+|12:
+== snap renamed grid=100x25 cursor=7,5
+|2: */tmp/pardes-snap/lsp-client-edit/cwd/main.rs Keep Save Term Collapse Follow TreeContext Def Refs D
+|7: 4 let x = sum(1, 2);
+|8: 5 let y = sum(3, 4);
+|24: · /tmp/pardes-snap/lsp-client-edit/cwd/main.rs renamed 2 range(s) 3 messages · SPC h m
+== snap unrenamed grid=100x25 cursor=7,5
+|2: /tmp/pardes-snap/lsp-client-edit/cwd/main.rs Keep Save Term Collapse Follow TreeContext Def Refs D
+|7: 4 let x = add(1, 2);
+|8: 5 let y = add(3, 4);
diff --git a/test/snapshots/lsp-client.golden b/test/snapshots/lsp-client.golden
index 42c378d1..f7f663f1 100644
--- a/test/snapshots/lsp-client.golden
+++ b/test/snapshots/lsp-client.golden
@@ -1,30 +1,51 @@
-== snap gd-jumped grid=100x25 cursor=16,12
+== snap gd-jumped grid=100x25 cursor=16,5
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/lsp-client/cwd/main.rs Save Term Collapse Follow TreeContext Def Refs Del
-| 1 mod lib; --:--:-- lsp rust-analyzer: ready
-| 2
-| 3 fn main() {
-| 4 let x = add(1, 2);
-| 5 let y = add(3, 4);
-| 6 let _ = x + y;
-| 7 }
-| /tmp/pardes-snap/lsp-client/cwd/lib.rs Save Term Collapse Follow TreeContext Def Refs Del
+| main.rs:3 › /tmp/pardes-snap/lsp-client/cwd/lib.rs Keep Save Term Collapse Follow TreeContext Def
+| Refs Del
| 1 // mock fixture
| 2 pub fn add(a: i32, b: i32) -> i32 {
| 3 a + b
| 4 }
| ~
-== snap gr-list grid=100x25 cursor=2,16
-|3: 1 mod lib;
-|13: +Search 1/3 Del
-|14: Refs
-|15: lib.rs
-|16: lib.rs:2:8 pub fn add(a: i32, b: i32) -> i32 {
-|17: main.rs
-|18: main.rs:4:13 let x = add(1, 2);
-|19: /tmp/pardes-snap/lsp-client/cwd/+Preview Del
-|20: 1
-== snap gr-opened grid=100x25 cursor=21,6
-|13: +Search 2/3 Save Undock Del
-== snap gr-back grid=100x25 cursor=21,7
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/lsp-client/cwd/lib.rs:2
+== snap gr-list grid=100x25 cursor=2,9
+|6: +Search 1/3 Del
+|7: Refs
+|8: lib.rs
+|9: lib.rs:2:8 pub fn add(a: i32, b: i32) -> i32 {
+|10: main.rs
+|11: main.rs:4:13 let x = add(1, 2);
+|12: main.rs:5:13 let y = add(3, 4);
+|15: /tmp/pardes-snap/lsp-client/cwd/+Preview Del
+|16: 1
+|24: /tmp/pardes-snap/lsp-client/cwd/+Search:3
+== snap gr-opened grid=100x25 cursor=21,19
+|6: +Search 2/3 Save Undock Del
+|15: /tmp/pardes-snap/lsp-client/cwd/main.rs Keep Save Term Collapse Follow TreeContext Def Refs Del
+|16: 1 mod lib;
+|17: 2
+|18: 3 fn main() {
+|19: 4 let x = add(1, 2);
+|20: 5 let y = add(3, 4);
+|21: 6 let _ = x + y;
+|22: 7 }
+|23: ~
+|24: /tmp/pardes-snap/lsp-client/cwd/main.rs:4
+== snap gr-back grid=100x25 cursor=21,20
+|24: /tmp/pardes-snap/lsp-client/cwd/main.rs:5
diff --git a/test/snapshots/lsp-rename-files.golden b/test/snapshots/lsp-rename-files.golden
index 7d984b41..6c6c899b 100644
--- a/test/snapshots/lsp-rename-files.golden
+++ b/test/snapshots/lsp-rename-files.golden
@@ -15,8 +15,16 @@
| 6 let _ = x + y;
| 7 }
| ~
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/lsp-rename-files/cwd/main.rs:1
== snap previewed grid=100x25 cursor=14,4
-|3: 1 // main.rs Rename: 3 edit(s) across files, previewed, not applied
|15: /tmp/pardes-snap/lsp-rename-files/cwd/+Search Save Term Collapse Follow LocationsConfig Del
|16: 1 lib.rs:2:8-10
|17: 2 sum
@@ -25,3 +33,4 @@
|20: 5 main.rs:5:13-15
|21: 6 sum
|22: ~
+|24: · /tmp/pardes-snap/lsp-rename-files/cwd/lib.rs Rename: 3 edit(s) across file 2 messages · SPC h m
diff --git a/test/snapshots/lsp-rename.golden b/test/snapshots/lsp-rename.golden
index aa44d7a2..1b0e2d7e 100644
--- a/test/snapshots/lsp-rename.golden
+++ b/test/snapshots/lsp-rename.golden
@@ -1,8 +1,8 @@
== snap renamed grid=110x25 cursor=17,10
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
-| */tmp/pardes-snap/lsp-rename/cwd/rename.zig Save Term Collapse Follow TreeContext Def Refs Del
-| 1 const std = @import("std"); renamed 2 range(s)
+| */tmp/pardes-snap/lsp-rename/cwd/rename.zig Keep Save Term Collapse Follow TreeContext Def Refs Del
+| 1 const std = @import("std");
| 2
| 3 fn renamed_helper(x: u32) u32 {
| 4 return x + 1;
@@ -17,12 +17,18 @@
| 13 _ = helper;
| 14 }
| ~
+|
+|
+|
+|
+|
+|
+| · /tmp/pardes-snap/lsp-rename/cwd/rename.zig renamed 2 range(s) 2 messages · SPC h m
== snap undone grid=110x25 cursor=17,10
-|2: /tmp/pardes-snap/lsp-rename/cwd/rename.zig Save Term Collapse Follow TreeContext Def Refs Del
-|3: 1 const std = @import("std");
+|2: /tmp/pardes-snap/lsp-rename/cwd/rename.zig Keep Save Term Collapse Follow TreeContext Def Refs Del
|5: 3 fn helper(x: u32) u32 {
|10: 8 _ = helper(41);
== snap redone grid=110x25 cursor=17,10
-|2: */tmp/pardes-snap/lsp-rename/cwd/rename.zig Save Term Collapse Follow TreeContext Def Refs Del
+|2: */tmp/pardes-snap/lsp-rename/cwd/rename.zig Keep Save Term Collapse Follow TreeContext Def Refs Del
|5: 3 fn renamed_helper(x: u32) u32 {
|10: 8 _ = renamed_helper(41);
diff --git a/test/snapshots/lsp.golden b/test/snapshots/lsp.golden
index 58452eb8..5937d8b8 100644
--- a/test/snapshots/lsp.golden
+++ b/test/snapshots/lsp.golden
@@ -1,7 +1,7 @@
== snap opened grid=120x41 cursor=7,3
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/lsp/cwd/a.zig Save Term Collapse Follow TreeContext Def Refs Del
+| /tmp/pardes-snap/lsp/cwd/a.zig Keep Save Term Collapse Follow TreeContext Def Refs Del
| 1 const std = @import("std");
| 2
| 3 fn helper(x: u32) u32 {
@@ -12,26 +12,61 @@
| 8 _ = helper(41);
| 9 }
| ~
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/lsp/cwd/a.zig:1
== snap cursor grid=120x41 cursor=17,10
+|40: /tmp/pardes-snap/lsp/cwd/a.zig:8
== snap definition grid=120x41 cursor=15,5
-|3: 1 const std = @import("std"); --:--:-- lsp zls ready — /tmp/pardes-snap/lsp/cwd
+|2: a.zig:8 › /tmp/pardes-snap/lsp/cwd/a.zig Keep Save Term Collapse Follow TreeContext Def Refs Del
+|40: /tmp/pardes-snap/lsp/cwd/a.zig:3
== snap hover grid=120x41 cursor=15,5
-|3: 1 const std = @import("std"); Hover
|12: /tmp/pardes-snap/lsp/cwd/+Hover Save Term Collapse Follow Del
|13: 1 fn helper(x: u32) u32
|14: 2 (fn (u32) u32)
|15: ~
-== snap symbols grid=120x41 cursor=15,5
-|3: 1 const std = @import("std"); Symbols
-|15: /tmp/pardes-snap/lsp/cwd/+Search Save Term Collapse Follow LocationsConfig Del
-|16: 1 a.zig:1:7-9
-|17: 2 std
-|18: 3 a.zig:3:4-9
-|19: 4 helper
-|20: 5 a.zig:7:8-11
-|21: 6 main
-|22: ~
-== snap step grid=120x41 cursor=15,3
-|3: 1 const std = @import("std");
-== snap nothing grid=120x41 cursor=7,5
-|3: 1 const std = @import("std"); Def: not found
+|40: ✓ /tmp/pardes-snap/lsp/cwd/a.zig Hover 1 message · SPC h m
+== snap symbols grid=120x41 cursor=60,2
+|2: ^ a.zig:8 › /tmp/pardes-snap/lsp/cwd/a.zig Keep ␣ l Symbols 1/3
+|3: │ │ Walk Look Split Newcol Grep Edit Copy Keep Drop | Find Grep Recent P
+|4: anes Symbols All Jumplist
+|5: ▶ a.zig:1:7-9 std
+|6: a.zig:3:4-9 helper
+|7: a.zig:7:8-11 main
+|8: 1 const std = @import("std");
+|9: 2
+|10: 3 fn helper(x: u32) u32 {
+|11: 4 return x + 1;
+|40: ✓ /tmp/pardes-snap/lsp/cwd/a.zig Symbols 2 messages · SPC h m
+== snap step grid=120x41 cursor=63,2
+|2: ^ a.zig:8 › /tmp/pardes-snap/lsp/cwd/a.zig Keep ␣ l Symbols jn 0/0
+|5: nothing matches
+|6:
+|7:
+== snap nothing grid=120x41 cursor=65,2
+|2: ^ a.zig:8 › /tmp/pardes-snap/lsp/cwd/a.zig Keep ␣ l Symbols jngd 0/0
diff --git a/test/snapshots/lspcomplete.golden b/test/snapshots/lspcomplete.golden
index 72b413cf..da700171 100644
--- a/test/snapshots/lspcomplete.golden
+++ b/test/snapshots/lspcomplete.golden
@@ -1,7 +1,7 @@
== snap opened grid=120x41 cursor=7,3
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/lspcomplete/cwd/a.zig Save Term Collapse Follow TreeContext Def Refs Del
+| /tmp/pardes-snap/lspcomplete/cwd/a.zig Keep Save Term Collapse Follow TreeContext Def Refs Del
| 1 const Shade = enum {
| 2 verdigris,
| 3 cinnabar,
@@ -15,15 +15,41 @@
| 11
| 12 // note. see below
| ~
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/lspcomplete/cwd/a.zig:1
== snap indent grid=120x41 cursor=11,12
|2: ^*/tmp/pardes-snap/lspcomplete/cwd/a.zig Save Term Collapse Follow TreeContext Def Refs Del
|12: 10 }
+|40: /tmp/pardes-snap/lspcomplete/cwd/a.zig:10
== snap commentindent grid=120x41 cursor=19,14
-|3: 1 const Shade = enum { --:--:-- lsp zls ready — /tmp/pardes-snap/lspcomplete/cwd
|14: 12 // note. see below
+|40: /tmp/pardes-snap/lspcomplete/cwd/a.zig:12
== snap athedot grid=120x41 cursor=16,10
-|3: 1 const Shade = enum {
|10: 8 .
+|40: /tmp/pardes-snap/lspcomplete/cwd/a.zig:8
== snap completion grid=120x41 cursor=16,10
|15: /tmp/pardes-snap/lspcomplete/cwd/+Search Save Term Collapse Follow Del
|16: 1 a.zig:8:10 verdigris
@@ -38,27 +64,67 @@
|^*/tmp/pardes-snap/lspcomplete/cwd/notes.txt Save Term Collapse Follow Del
| 1 abc. def ghi
| ~
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/lspcomplete/cwd/notes.txt:1
== snap nosemi grid=100x19 cursor=29,9
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
|^*/tmp/pardes-snap/lspcomplete/cwd/c.zig Save Term Collapse Follow TreeContext Def Refs Del
-| 1 const Shade = enum { --:--:-- lsp zls ready — /tmp/pardes-snap/lspcomplete/cwd
+| 1 const Shade = enum {
| 2 verdigris,
| 3 cinnabar,
| 4 };
| 5
| 6 pub fn nosemi() void {
| 7 const z: Shade = .
-| 8 }
| /tmp/pardes-snap/lspcomplete/cwd/+Search Save Term Collapse Follow Del
| 1 c.zig:7:23 verdigris Shade
| 2 c.zig:7:23 cinnabar Shade
| ~
+|
+|
+|
+|
+| /tmp/pardes-snap/lspcomplete/cwd/c.zig:7
== snap nobrace grid=100x19 cursor=hidden
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
|^*/tmp/pardes-snap/lspcomplete/cwd/d.zig Save Term Collapse Follow TreeContext Def Refs Del
-| 1 const Shade = enum { --:--:-- lsp zls ready — /tmp/pardes-snap/lspcomplete/cwd
+| 1 const Shade = enum {
| 2 verdigris,
| 3 cinnabar,
| 4 };
@@ -69,3 +135,8 @@
| 1 d.zig:8:10 verdigris
| 2 d.zig:8:10 cinnabar
| ~
+|
+|
+|
+|
+| /tmp/pardes-snap/lspcomplete/cwd/d.zig:8
diff --git a/test/snapshots/lspcompletemoved.golden b/test/snapshots/lspcompletemoved.golden
index 4971ad94..00f0ee0f 100644
--- a/test/snapshots/lspcompletemoved.golden
+++ b/test/snapshots/lspcompletemoved.golden
@@ -2,7 +2,7 @@
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
|^*/tmp/pardes-snap/lspcompletemoved/cwd/a.zig Save Term Collapse Follow TreeContext Def Refs Del
-| 1 const Shade = enum { --:--:-- lsp zls ready — /tmp/pardes-snap/lspcompletemoved/cwd
+| 1 const Shade = enum {
| 2 verdigris,
| 3 cinnabar,
| 4 };
@@ -15,6 +15,11 @@
| 11
| 12 // note.x see below
| ~
+|
+|
+|
+|
+| /tmp/pardes-snap/lspcompletemoved/cwd/a.zig:12
== file buffer
const Shade = enum {
verdigris,
diff --git a/test/snapshots/lspdebug.golden b/test/snapshots/lspdebug.golden
index b3e2f2a5..3d297c71 100644
--- a/test/snapshots/lspdebug.golden
+++ b/test/snapshots/lspdebug.golden
@@ -1,7 +1,7 @@
== snap opened grid=120x45 cursor=7,3
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/lspdebug/cwd/z.zig Save Term Collapse Follow TreeContext Def Refs Del
+| /tmp/pardes-snap/lspdebug/cwd/z.zig Keep Save Term Collapse Follow TreeContext Def Refs Del
| 1 const std = @import("std");
| 2
| 3 fn helper() u32 {
@@ -13,9 +13,42 @@
| 9 _ = v;
| 10 }
| ~
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/lspdebug/cwd/z.zig:1
== snap ctrlclick grid=120x45 cursor=15,5
-|3: 1 const std = @import("std"); --:--:-- lsp zls ready — /tmp/pardes-snap/lspdebug/cwd
+|2: z.zig:8 › /tmp/pardes-snap/lspdebug/cwd/z.zig Keep Save Term Collapse Follow TreeContext Def Refs Del
+|44: /tmp/pardes-snap/lspdebug/cwd/z.zig:3
== snap plainclick grid=120x45 cursor=21,10
-|3: 1 const std = @import("std");
+|44: /tmp/pardes-snap/lspdebug/cwd/z.zig:8
== snap why-closed grid=120x45 cursor=7,5
+|44: /tmp/pardes-snap/lspdebug/cwd/z.zig:3
== snap report-closed grid=120x45 cursor=7,5
diff --git a/test/snapshots/lsprelpath.golden b/test/snapshots/lsprelpath.golden
index 964f0286..bd2dc172 100644
--- a/test/snapshots/lsprelpath.golden
+++ b/test/snapshots/lsprelpath.golden
@@ -1,8 +1,8 @@
-== snap absrow grid=100x35 cursor=2,21
+== snap absrow grid=100x35 cursor=2,20
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
| /tmp/pardes-snap/lsprelpath/cwd/sub/parent.zig Save Term Collapse Follow TreeContext Def Refs Del
-| 1 const shade = @import("../shad --:--:-- lsp zls ready — /tmp/pardes-snap/lsprelpath/cwd/sub
+| 1 const shade = @import("../shade.zig");
| 2
| 3 pub fn pick(s: shade.Shade) u8 {
| 4 return switch (s) {
@@ -14,7 +14,6 @@
|
|
|
-|
| +Search 2/2 Del
| Refs
| ../shade.zig
@@ -27,15 +26,23 @@
|
| /tmp/pardes-snap/lsprelpath/cwd/sub/+Preview Del
| 1
-== snap abslook grid=100x35 cursor=21,27
-|3: 1 const shade = @import("../shade.zig");
-|16: +Search 1/2 Save Undock Del
-|26: /tmp/pardes-snap/lsprelpath/cwd/shade.zig Save Term Collapse Follow TreeContext Def Refs Del
-|27: 1 pub const Shade = enum {
-|28: 2 verdigris,
-|29: 3 cinnabar,
-|30: 4 };
-|31: ~
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/lsprelpath/cwd/sub/+Search:5
+== snap abslook grid=100x35 cursor=21,26
+|15: +Search 1/2 Save Undock Del
+|25: /tmp/pardes-snap/lsprelpath/cwd/shade.zig Save Term Collapse Follow TreeContext Def Refs Del
+|26: 1 pub const Shade = enum {
+|27: 2 verdigris,
+|28: 3 cinnabar,
+|29: 4 };
+|30: ~
+|34: /tmp/pardes-snap/lsprelpath/cwd/shade.zig:1
== style abslook grid=100x35
|0: 0-1 d,#1d2824, 2-99 #b2c3b8,#1d2824,
|1: 0-1 d,#887455, 2-99 #becfc4,#314738,
@@ -52,31 +59,31 @@
|12: 0-0 d,#608269, 1-99 d,#0d1410,
|13: 0-0 d,#608269, 1-99 d,#0d1410,
|14: 0-0 d,#608269, 1-99 d,#0d1410,
-|15: 0-0 d,#608269, 1-99 d,#0d1410,
-|16: 0-1 d,#496656, 2-99 #b2c3b8,#1d2824,
+|15: 0-1 d,#496656, 2-99 #b2c3b8,#1d2824,
+|16: 0-0 d,#608269, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
|17: 0-0 d,#608269, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|18: 0-0 d,#608269, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|19: 0-0 d,#608269, 1-1 d,#0d1410, 2-21 #59675c,#243a2d, 22-31 #e5eee5,#243a2d, 32-36 #f7e4a5,#5e4923, 37-37 #f7e4a5,#243a2d, 38-39 #e5eee5,#243a2d, 40-44 #c9a7ed,#243a2d, 45-99 #e5eee5,#243a2d,
-|20: 0-0 d,#608269, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|21: 0-0 d,#608269, 1-1 d,#0d1410, 2-19 #59675c,#0d1410, 20-23 #e5eee5,#0d1410, 24-26 #c9a7ed,#0d1410, 27-40 #e5eee5,#0d1410, 41-45 #f7e4a5,#5e4923, 46-99 #e5eee5,#0d1410,
+|18: 0-0 d,#608269, 1-1 d,#0d1410, 2-21 #59675c,#243a2d, 22-31 #e5eee5,#243a2d, 32-36 #f7e4a5,#5e4923, 37-37 #f7e4a5,#243a2d, 38-39 #e5eee5,#243a2d, 40-44 #c9a7ed,#243a2d, 45-99 #e5eee5,#243a2d,
+|19: 0-0 d,#608269, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
+|20: 0-0 d,#608269, 1-1 d,#0d1410, 2-19 #59675c,#0d1410, 20-23 #e5eee5,#0d1410, 24-26 #c9a7ed,#0d1410, 27-40 #e5eee5,#0d1410, 41-45 #f7e4a5,#5e4923, 46-99 #e5eee5,#0d1410,
+|21: 0-0 d,#608269, 1-99 d,#0d1410,
|22: 0-0 d,#608269, 1-99 d,#0d1410,
|23: 0-0 d,#608269, 1-99 d,#0d1410,
|24: 0-0 d,#608269, 1-99 d,#0d1410,
-|25: 0-0 d,#608269, 1-99 d,#0d1410,
-|26: 0-1 d,#add38a, 2-33 #becfc4,#314738, 34-43 #dfbce5,#314738, 44-99 #becfc4,#314738,
-|27: 0-0 d,#e5eee5, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-16 #e5eee5,#0d1410, 17-21 #f5f7ee,#3c614a, 22-22 #f5f7ee,#0d1410, 23-24 #e5eee5,#0d1410, 25-29 #c9a7ed,#0d1410, 30-99 #e5eee5,#0d1410,
+|25: 0-1 d,#add38a, 2-33 #becfc4,#314738, 34-43 #dfbce5,#314738, 44-99 #becfc4,#314738,
+|26: 0-0 d,#e5eee5, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-16 #e5eee5,#0d1410, 17-21 #f5f7ee,#3c614a, 22-22 #f5f7ee,#0d1410, 23-24 #e5eee5,#0d1410, 25-29 #c9a7ed,#0d1410, 30-99 #e5eee5,#0d1410,
+|27: 0-0 d,#608269, 1-4 d,#0d1410, 5-10 #59675c,#0d1410, 11-99 #e5eee5,#0d1410,
|28: 0-0 d,#608269, 1-4 d,#0d1410, 5-10 #59675c,#0d1410, 11-99 #e5eee5,#0d1410,
-|29: 0-0 d,#608269, 1-4 d,#0d1410, 5-10 #59675c,#0d1410, 11-99 #e5eee5,#0d1410,
-|30: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-99 #e5eee5,#0d1410,
-|31: 0-0 d,#608269, 1-4 d,#0d1410, 5-99 #59675c,#0d1410,
+|29: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-99 #e5eee5,#0d1410,
+|30: 0-0 d,#608269, 1-4 d,#0d1410, 5-99 #59675c,#0d1410,
+|31: 0-0 d,#608269, 1-99 d,#0d1410,
|32: 0-0 d,#608269, 1-99 d,#0d1410,
|33: 0-0 d,#608269, 1-99 d,#0d1410,
-|34: 0-0 d,#608269, 1-99 d,#0d1410,
-== snap subrow grid=100x35 cursor=2,21
+|34: 0-1 d,#1d2824, 2-99 #b2c3b8,#1d2824,
+== snap subrow grid=100x35 cursor=2,20
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
| /tmp/pardes-snap/lsprelpath/cwd/sub/subdir.zig Save Term Collapse Follow TreeContext Def Refs Del
-| 1 const tint = @import("inner/ti --:--:-- lsp zls ready — /tmp/pardes-snap/lsprelpath/cwd/sub
+| 1 const tint = @import("inner/tint.zig");
| 2
| 3 pub fn hue(t: tint.Tint) u8 {
| 4 return switch (t) {
@@ -88,7 +95,6 @@
|
|
|
-|
| +Search 2/2 Del
| Refs
| inner/tint.zig
@@ -101,16 +107,24 @@
|
| /tmp/pardes-snap/lsprelpath/cwd/sub/+Preview Del
| 1
-== snap sublook grid=100x35 cursor=20,28
-|3: 1 const tint = @import("inner/tint.zig");
-|16: +Search 1/2 Save Undock Del
-|26: /tmp/pardes-snap/lsprelpath/cwd/sub/inner/tint.zig Save Term Collapse Follow TreeContext Def Refs
-|27: Del
-|28: 1 pub const Tint = enum {
-|29: 2 ochre,
-|30: 3 indigo,
-|31: 4 };
-|32: ~
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/lsprelpath/cwd/sub/+Search:5
+== snap sublook grid=100x35 cursor=20,27
+|15: +Search 1/2 Save Undock Del
+|25: /tmp/pardes-snap/lsprelpath/cwd/sub/inner/tint.zig Save Term Collapse Follow TreeContext Def Refs
+|26: Del
+|27: 1 pub const Tint = enum {
+|28: 2 ochre,
+|29: 3 indigo,
+|30: 4 };
+|31: ~
+|34: /tmp/pardes-snap/lsprelpath/cwd/sub/inner/tint.zig:1
== style sublook grid=100x35
|0: 0-1 d,#1d2824, 2-99 #b2c3b8,#1d2824,
|1: 0-1 d,#887455, 2-99 #becfc4,#314738,
@@ -127,24 +141,25 @@
|12: 0-0 d,#608269, 1-99 d,#0d1410,
|13: 0-0 d,#608269, 1-99 d,#0d1410,
|14: 0-0 d,#608269, 1-99 d,#0d1410,
-|15: 0-0 d,#608269, 1-99 d,#0d1410,
-|16: 0-1 d,#496656, 2-99 #b2c3b8,#1d2824,
+|15: 0-1 d,#496656, 2-99 #b2c3b8,#1d2824,
+|16: 0-0 d,#608269, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
|17: 0-0 d,#608269, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|18: 0-0 d,#608269, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|19: 0-0 d,#608269, 1-1 d,#0d1410, 2-23 #59675c,#243a2d, 24-33 #e5eee5,#243a2d, 34-37 #f7e4a5,#5e4923, 38-38 #f7e4a5,#243a2d, 39-40 #e5eee5,#243a2d, 41-45 #c9a7ed,#243a2d, 46-99 #e5eee5,#243a2d,
-|20: 0-0 d,#608269, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|21: 0-0 d,#608269, 1-1 d,#0d1410, 2-19 #59675c,#0d1410, 20-23 #e5eee5,#0d1410, 24-26 #c9a7ed,#0d1410, 27-38 #e5eee5,#0d1410, 39-42 #f7e4a5,#5e4923, 43-99 #e5eee5,#0d1410,
+|18: 0-0 d,#608269, 1-1 d,#0d1410, 2-23 #59675c,#243a2d, 24-33 #e5eee5,#243a2d, 34-37 #f7e4a5,#5e4923, 38-38 #f7e4a5,#243a2d, 39-40 #e5eee5,#243a2d, 41-45 #c9a7ed,#243a2d, 46-99 #e5eee5,#243a2d,
+|19: 0-0 d,#608269, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
+|20: 0-0 d,#608269, 1-1 d,#0d1410, 2-19 #59675c,#0d1410, 20-23 #e5eee5,#0d1410, 24-26 #c9a7ed,#0d1410, 27-38 #e5eee5,#0d1410, 39-42 #f7e4a5,#5e4923, 43-99 #e5eee5,#0d1410,
+|21: 0-0 d,#608269, 1-99 d,#0d1410,
|22: 0-0 d,#608269, 1-99 d,#0d1410,
|23: 0-0 d,#608269, 1-99 d,#0d1410,
|24: 0-0 d,#608269, 1-99 d,#0d1410,
-|25: 0-0 d,#608269, 1-99 d,#0d1410,
-|26: 0-1 d,#add38a, 2-43 #becfc4,#314738, 44-52 #dfbce5,#314738, 53-99 #becfc4,#314738,
-|27: 0-1 d,#314738, 2-99 #becfc4,#314738,
-|28: 0-0 d,#e5eee5, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-16 #e5eee5,#0d1410, 17-20 #f5f7ee,#3c614a, 21-21 #f5f7ee,#0d1410, 22-23 #e5eee5,#0d1410, 24-28 #c9a7ed,#0d1410, 29-99 #e5eee5,#0d1410,
+|25: 0-1 d,#add38a, 2-43 #becfc4,#314738, 44-52 #dfbce5,#314738, 53-99 #becfc4,#314738,
+|26: 0-1 d,#314738, 2-99 #becfc4,#314738,
+|27: 0-0 d,#e5eee5, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-16 #e5eee5,#0d1410, 17-20 #f5f7ee,#3c614a, 21-21 #f5f7ee,#0d1410, 22-23 #e5eee5,#0d1410, 24-28 #c9a7ed,#0d1410, 29-99 #e5eee5,#0d1410,
+|28: 0-0 d,#608269, 1-4 d,#0d1410, 5-10 #59675c,#0d1410, 11-99 #e5eee5,#0d1410,
|29: 0-0 d,#608269, 1-4 d,#0d1410, 5-10 #59675c,#0d1410, 11-99 #e5eee5,#0d1410,
-|30: 0-0 d,#608269, 1-4 d,#0d1410, 5-10 #59675c,#0d1410, 11-99 #e5eee5,#0d1410,
-|31: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-99 #e5eee5,#0d1410,
-|32: 0-0 d,#608269, 1-4 d,#0d1410, 5-99 #59675c,#0d1410,
+|30: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-99 #e5eee5,#0d1410,
+|31: 0-0 d,#608269, 1-4 d,#0d1410, 5-99 #59675c,#0d1410,
+|32: 0-0 d,#608269, 1-99 d,#0d1410,
|33: 0-0 d,#608269, 1-99 d,#0d1410,
-|34: 0-0 d,#608269, 1-99 d,#0d1410,
+|34: 0-1 d,#1d2824, 2-99 #b2c3b8,#1d2824,
== snap clicked grid=100x35 cursor=29,5
+|34: /tmp/pardes-snap/lsprelpath/cwd/sub/subdir.zig:3
diff --git a/test/snapshots/markup.golden b/test/snapshots/markup.golden
index d4c1cc5b..f3793951 100644
--- a/test/snapshots/markup.golden
+++ b/test/snapshots/markup.golden
@@ -1,7 +1,7 @@
== snap typst grid=92x25 cursor=7,3
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/markup/cwd/paper.typ Save Term Collapse Follow TreeContext Del
+| /tmp/pardes-snap/markup/cwd/paper.typ Keep Save Term Collapse Follow TreeContext Del
| 1 = Typst heading
| 2
| 3 Prose with *bold* and _italic_ words, a `raw` span,
@@ -11,10 +11,23 @@
| 7 fn widget() u8 { return 99; }
| 8 ```
| ~
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/markup/cwd/paper.typ:1
== style typst grid=92x25
|0: 0-1 d,#1d2824, 2-91 #b2c3b8,#1d2824,
|1: 0-1 d,#887455, 2-91 #becfc4,#314738,
-|2: 0-1 d,#add38a, 2-29 #becfc4,#314738, 30-39 #dfbce5,#314738, 40-91 #becfc4,#314738,
+|2: 0-1 d,#add38a, 2-29 #becfc4,#2c2819, 30-39 #dfbce5,#2c2819, 40-91 #becfc4,#2c2819,
|3: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-91 #c9a7ed,#0d1410,
|4: 0-0 d,#608269, 1-4 d,#0d1410, 5-91 #59675c,#0d1410,
|5: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-17 #e5eee5,#0d1410, 18-24 #b9f480,#0d1410, 25-28 #e5eee5,#0d1410, 29-37 #f8c082,#0d1410, 38-46 #e5eee5,#0d1410, 47-52 #b8d88a,#0d1410, 53-91 #e5eee5,#0d1410,
@@ -36,11 +49,11 @@
|21: 0-0 d,#608269, 1-91 d,#0d1410,
|22: 0-0 d,#608269, 1-91 d,#0d1410,
|23: 0-0 d,#608269, 1-91 d,#0d1410,
-|24: 0-0 d,#608269, 1-91 d,#0d1410,
+|24: 0-1 d,#1d2824, 2-91 #b2c3b8,#1d2824,
== snap markdown grid=92x25 cursor=7,3
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/markup/cwd/notes.md Save Term Collapse Follow TreeContext Del
+| /tmp/pardes-snap/markup/cwd/notes.md Keep Save Term Collapse Follow TreeContext Del
| 1 # Markdown heading with *italic*
| 2
| 3 Prose with **bold**, *italic* and an `inline` span.
@@ -49,10 +62,24 @@
| 6 fn gadget() u8 { return 77; }
| 7 ```
| ~
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/markup/cwd/notes.md:1
== style markdown grid=92x25
|0: 0-1 d,#1d2824, 2-91 #b2c3b8,#1d2824,
|1: 0-1 d,#887455, 2-91 #becfc4,#314738,
-|2: 0-1 d,#add38a, 2-29 #becfc4,#314738, 30-38 #dfbce5,#314738, 39-91 #becfc4,#314738,
+|2: 0-1 d,#add38a, 2-29 #becfc4,#2c2819, 30-38 #dfbce5,#2c2819, 39-91 #becfc4,#2c2819,
|3: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-8 #e5eee5,#0d1410, 9-30 #c9a7ed,#0d1410, 31-91 #f8c082,#0d1410,
|4: 0-0 d,#608269, 1-4 d,#0d1410, 5-91 #59675c,#0d1410,
|5: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-17 #e5eee5,#0d1410, 18-25 #b9f480,#0d1410, 26-27 #e5eee5,#0d1410, 28-36 #f8c082,#0d1410, 37-43 #e5eee5,#0d1410, 44-52 #b8d88a,#0d1410, 53-91 #e5eee5,#0d1410,
@@ -74,4 +101,4 @@
|21: 0-0 d,#608269, 1-91 d,#0d1410,
|22: 0-0 d,#608269, 1-91 d,#0d1410,
|23: 0-0 d,#608269, 1-91 d,#0d1410,
-|24: 0-0 d,#608269, 1-91 d,#0d1410,
+|24: 0-1 d,#1d2824, 2-91 #b2c3b8,#1d2824,
diff --git a/test/snapshots/mini.golden b/test/snapshots/mini.golden
index 105d329c..178c81ee 100644
--- a/test/snapshots/mini.golden
+++ b/test/snapshots/mini.golden
@@ -1,19 +1,32 @@
== snap opened grid=90x23 cursor=7,6
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/mini/cwd/commands.txt Save Term Collapse Follow Del
-| 1 @`Mini demo.zig` Mini
+| /tmp/pardes-snap/mini/cwd/commands.txt Keep Save Term Collapse Follow Del
+| 1 @`Mini demo.zig`
|
| /tmp/pardes-snap/mini/cwd/Mini demo.zig Save Term Collapse Follow Del
| 1 ⠭⠍⣥⢩⣭⡭⣭⣬⣌⢭⣭⠌⠬⠅⠍⠁
| 2 ⣂⢀⣉⣉⢉⣈⢁⣀⣀⢀⣀⣀⣀⢀⣀⣀⣀⣀⣀
| 3 ⠉⠉⠁⠉⠉⠉⠈⠈⠉⠉⠉⠉⠉⠉
| ~
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| ✓ /tmp/pardes-snap/mini/cwd/commands.txt Mini 2 messages · SPC h m
== style opened grid=90x23
|0: 0-1 d,#1d2824, 2-89 #b2c3b8,#1d2824,
|1: 0-1 d,#887455, 2-89 #becfc4,#314738,
-|2: 0-1 d,#496656, 2-27 #b2c3b8,#1d2824, 28-40 #d3b0d9,#1d2824, 41-89 #b2c3b8,#1d2824,
-|3: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-83 #e5eee5,#0d1410, 84-84 #e5eee5,#1d2824, 85-89 #b2c3b8,#1d2824,
+|2: 0-1 d,#496656, 2-27 #b2c3b8,#2c2819, 28-40 #d3b0d9,#2c2819, 41-89 #b2c3b8,#2c2819,
+|3: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-89 #e5eee5,#0d1410,
|4: 0-0 d,#608269, 1-89 d,#0d1410,
|5: 0-1 d,#add38a, 2-27 #becfc4,#314738, 28-41 #dfbce5,#314738, 42-89 #becfc4,#314738,
|6: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-8 #e5eee5,#0d1410, 9-9 #c9a7ed,#0d1410, 10-12 #e5eee5,#0d1410, 13-15 #c9a7ed,#0d1410, 16-21 #b8d88a,#0d1410, 22-89 #e5eee5,#0d1410,
@@ -32,16 +45,16 @@
|19: 0-0 d,#608269, 1-89 d,#0d1410,
|20: 0-0 d,#608269, 1-89 d,#0d1410,
|21: 0-0 d,#608269, 1-89 d,#0d1410,
-|22: 0-0 d,#608269, 1-89 d,#0d1410,
+|22: 0-1 d,#1d2824, 2-89 #67756e,#1d2824,
== 9p opened grid=90x23 cursor=7,6,block
|0: Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
@0: 0-84 #b2c3b8,#1d2824,,tagline 85-89 d,#1d2824,,tagline
|1: New Term Find Grep Joincol Delcol
@1: 0-1 #ffffff,#887455,,tagline 2-34 #becfc4,#314738,,tagline 35-89 d,#314738,,tagline
-|2: /tmp/pardes-snap/mini/cwd/commands.txt Save Term Collapse Follow Del
-@2: 0-1 #ffffff,#496656,,tagline 2-27 #b2c3b8,#1d2824,,tagline 28-39 #d3b0d9,#1d2824,,tagline 40-69 #b2c3b8,#1d2824,,tagline 70-89 d,#1d2824,,tagline
-|3: 1 @`Mini demo.zig` Mini
-@3: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-22 #e5eee5,#0d1410,,body 23-83 d,#0d1410,,body 84-84 d,#1d2824,,tagline 85-88 #b2c3b8,#1d2824,,tagline 89-89 d,#1d2824,,tagline
+|2: /tmp/pardes-snap/mini/cwd/commands.txt Keep Save Term Collapse Follow Del
+@2: 0-1 #ffffff,#496656,,tagline 2-27 #b2c3b8,#2c2819,,tagline 28-39 #d3b0d9,#2c2819,,tagline 40-74 #b2c3b8,#2c2819,,tagline 75-89 d,#2c2819,,tagline
+|3: 1 @`Mini demo.zig`
+@3: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-22 #e5eee5,#0d1410,,body 23-89 d,#0d1410,,body
|4:
@4: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
|5: /tmp/pardes-snap/mini/cwd/Mini demo.zig Save Term Collapse Follow Del
@@ -81,13 +94,14 @@
@20: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
|21:
@21: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
-|22:
-@22: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
+|22: ✓ /tmp/pardes-snap/mini/cwd/commands.txt Mini 2 messages · SPC h m
++22: 2="✓" 80="·"
+@22: 0-1 d,#1d2824,,tagline 2-46 #67756e,#1d2824,,tagline 47-68 #b2c3b8,#1d2824,,tagline 69-88 #67756e,#1d2824,,tagline 89-89 d,#1d2824,,tagline
== snap resized grid=105x27 cursor=7,7
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/mini/cwd/commands.txt Save Term Collapse Follow Del
-| 1 @`Mini demo.zig` Mini
+| /tmp/pardes-snap/mini/cwd/commands.txt Keep Save Term Collapse Follow Del
+| 1 @`Mini demo.zig`
|
|
| /tmp/pardes-snap/mini/cwd/Mini demo.zig Save Term Collapse Follow Del
@@ -95,15 +109,31 @@
| 2 ⣂⢀⣉⣉⢉⣈⢁⣀⣀⢀⣀⣀⣀⢀⣀⣀⣀⣀⣀
| 3 ⠉⠉⠁⠉⠉⠉⠈⠈⠉⠉⠉⠉⠉⠉
| ~
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| ✓ /tmp/pardes-snap/mini/cwd/commands.txt Mini 2 messages · SPC h m
== 9p resized grid=105x27 cursor=7,7,block
|0: Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
@0: 0-84 #b2c3b8,#1d2824,,tagline 85-104 d,#1d2824,,tagline
|1: New Term Find Grep Joincol Delcol
@1: 0-1 #ffffff,#887455,,tagline 2-34 #becfc4,#314738,,tagline 35-104 d,#314738,,tagline
-|2: /tmp/pardes-snap/mini/cwd/commands.txt Save Term Collapse Follow Del
-@2: 0-1 #ffffff,#496656,,tagline 2-27 #b2c3b8,#1d2824,,tagline 28-39 #d3b0d9,#1d2824,,tagline 40-69 #b2c3b8,#1d2824,,tagline 70-104 d,#1d2824,,tagline
-|3: 1 @`Mini demo.zig` Mini
-@3: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-22 #e5eee5,#0d1410,,body 23-98 d,#0d1410,,body 99-99 d,#1d2824,,tagline 100-103 #b2c3b8,#1d2824,,tagline 104-104 d,#1d2824,,tagline
+|2: /tmp/pardes-snap/mini/cwd/commands.txt Keep Save Term Collapse Follow Del
+@2: 0-1 #ffffff,#496656,,tagline 2-27 #b2c3b8,#2c2819,,tagline 28-39 #d3b0d9,#2c2819,,tagline 40-74 #b2c3b8,#2c2819,,tagline 75-104 d,#2c2819,,tagline
+|3: 1 @`Mini demo.zig`
+@3: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-22 #e5eee5,#0d1410,,body 23-104 d,#0d1410,,body
|4:
@4: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
|5:
@@ -151,5 +181,6 @@
@24: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
|25:
@25: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
-|26:
-@26: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
+|26: ✓ /tmp/pardes-snap/mini/cwd/commands.txt Mini 2 messages · SPC h m
++26: 2="✓" 95="·"
+@26: 0-1 d,#1d2824,,tagline 2-46 #67756e,#1d2824,,tagline 47-83 #b2c3b8,#1d2824,,tagline 84-103 #67756e,#1d2824,,tagline 104-104 d,#1d2824,,tagline
diff --git a/test/snapshots/modal.golden b/test/snapshots/modal.golden
index ef146f1e..2994def1 100644
--- a/test/snapshots/modal.golden
+++ b/test/snapshots/modal.golden
@@ -15,11 +15,21 @@
|
|
|
-|
| /tmp/pardes-snap/modal/cwd Term+bash Save Mode F
| ilter Collapse Del
| ls
| words.txt
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/modal/cwd
== snap moved grid=100x31 cursor=8,6
== snap xsel grid=100x31 cursor=48,6
== style xsel grid=100x31
@@ -39,11 +49,11 @@
|13: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
|14: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
|15: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
-|16: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
-|17: 0-1 d,#496656, 2-28 #b2c3b8,#1d2824, 29-38 #d3b0d9,#1d2824, 39-49 #b2c3b8,#1d2824, 50-50 #b2c3b8,#608269, 51-99 #b2c3b8,#0d1410,
-|18: 0-1 d,#1d2824, 2-49 #b2c3b8,#1d2824, 50-50 #b2c3b8,#608269, 51-99 #b2c3b8,#0d1410,
+|16: 0-1 d,#496656, 2-28 #b2c3b8,#1d2824, 29-38 #d3b0d9,#1d2824, 39-49 #b2c3b8,#1d2824, 50-50 #b2c3b8,#608269, 51-99 #b2c3b8,#0d1410,
+|17: 0-1 d,#1d2824, 2-49 #b2c3b8,#1d2824, 50-50 #b2c3b8,#608269, 51-99 #b2c3b8,#0d1410,
+|18: 0-0 d,#608269, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
|19: 0-0 d,#608269, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
-|20: 0-0 d,#608269, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
+|20: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
|21: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
|22: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
|23: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
@@ -53,7 +63,7 @@
|27: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
|28: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
|29: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
-|30: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
+|30: 0-1 d,#1d2824, 2-99 #b2c3b8,#1d2824,
== snap xsel2 grid=100x31 cursor=13,7
== snap yanked grid=100x31 cursor=13,7
== snap vsel grid=100x31 cursor=14,8
@@ -61,10 +71,11 @@
|6: 0-0 d,#608269, 1-1 d,#0d1410, 2-49 #f5f7ee,#3c614a, 50-50 #f5f7ee,#608269, 51-99 #f5f7ee,#0d1410,
|7: 0-0 d,#608269, 1-1 d,#0d1410, 2-49 #f5f7ee,#3c614a, 50-50 #f5f7ee,#608269, 51-99 #f5f7ee,#0d1410,
|8: 0-0 d,#608269, 1-1 d,#0d1410, 2-14 #f5f7ee,#3c614a, 15-49 #f5f7ee,#0d1410, 50-50 #f5f7ee,#608269, 51-99 #f5f7ee,#0d1410,
-== snap typed grid=100x31 cursor=9,21
-|21: TYPED
-== snap undone grid=100x31 cursor=4,21
-|21:
-== snap redone grid=100x31 cursor=9,21
-|21: TYPED
-== snap bottom grid=100x31 cursor=2,21
+== snap typed grid=100x31 cursor=9,20
+|20: TYPED
+|30: · @p2 a copy of the terminal's text: Tab or B2 runs it; what the program dra 2 messages · SPC h m
+== snap undone grid=100x31 cursor=4,20
+|20:
+== snap redone grid=100x31 cursor=9,20
+|20: TYPED
+== snap bottom grid=100x31 cursor=2,20
diff --git a/test/snapshots/msg.golden b/test/snapshots/msg.golden
index 7f83cacf..01dbf380 100644
--- a/test/snapshots/msg.golden
+++ b/test/snapshots/msg.golden
@@ -1,7 +1,7 @@
== snap opened grid=70x15 cursor=7,3
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config His
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/msg/cwd/a.txt Save Term Collapse Follow Del
+| /tmp/pardes-snap/msg/cwd/a.txt Keep Save Term Collapse Follow Del
| 1 line 1
| 2 line 2
| 3 line 3
@@ -9,47 +9,63 @@
| 5 line 5
| 6 line 6
| ~
+|
+|
+|
+|
+| /tmp/pardes-snap/msg/cwd/a.txt:1
== snap saved grid=70x15 cursor=7,3
-|3: 1 line 1 --:--:-- saved /tmp/pardes-snap/msg/cwd/a.txt
+|14: · saved /tmp/pardes-snap/msg/cwd/a.txt 2 messages · SPC h m
== snap repainted grid=70x17 cursor=7,3
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config His
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/msg/cwd/a.txt Save Term Collapse Follow Del
-| 1 line 1 --:--:-- saved /tmp/pardes-snap/msg/cwd/a.txt
+| /tmp/pardes-snap/msg/cwd/a.txt Keep Save Term Collapse Follow Del
+| 1 line 1
| 2 line 2
| 3 line 3
| 4 line 4
| 5 line 5
| 6 line 6
| ~
+|
+|
+|
+|
+|
+|
+| · saved /tmp/pardes-snap/msg/cwd/a.txt 2 messages · SPC h m
== snap keycleared grid=70x17 cursor=7,4
-|3: 1 line 1
== snap saved-again grid=70x17 cursor=7,4
-|3: 1 line 1 --:--:-- saved /tmp/pardes-snap/msg/cwd/a.txt
+|16: · saved /tmp/pardes-snap/msg/cwd/a.txt 4 messages · SPC h m
== snap mousecleared grid=70x17 cursor=7,4
-|3: 1 line 1
== snap reloaded grid=70x17 cursor=7,4
-|3: 1 EXTERNAL --:--:-- reloaded /tmp/pardes-snap/msg/cwd/a.txt
+|3: 1 EXTERNAL
|4: ~
|5:
|6:
|7:
|8:
|9:
-== snap prompt grid=70x17 cursor=69,3
-|3: 1 EXTERNAL Select /EXT
-== snap prompt-wins grid=70x17 cursor=69,4
-|3: 1 AGAIN --:--:-- reloaded /tmp/pardes-snap/msg/cwd/a.txt
-|4: ~ Select /EXT
+|16: · reloaded /tmp/pardes-snap/msg/cwd/a.txt 5 messages · SPC h m
+== snap prompt grid=70x17 cursor=43,2
+|2: ^ /tmp/pardes-snap/msg/cwd/a.txt Keep s EXT = Exec Edit x/EXT/ 0
+|3: ⏎ select · C-r history · esc
+|4: 1 EXTERNAL
+|5: ~
+== snap prompt-wins grid=70x17 cursor=43,2
+|4: 1 AGAIN
+|16: · reloaded /tmp/pardes-snap/msg/cwd/a.txt ×2 5 messages · SPC h m
== snap esc grid=70x17 cursor=7,4
+|2: /tmp/pardes-snap/msg/cwd/a.txt Keep Save Term Collapse Follow Del
|3: 1 AGAIN
|4: ~
+|5:
== snap msgbuiltin grid=70x17 cursor=29,5
|2: */tmp/pardes-snap/msg/cwd/a.txt Save Term Collapse Follow Del
-|3: 1 AGAIN hand-written report
|4: 2
|5: 3 Msg hand-written report
+|16: · /tmp/pardes-snap/msg/cwd/a.txt hand-written 7 messages · SPC h m
== snap msgtail grid=70x17 cursor=32,7
-|3: 6789 0123456789 0123456789 0123456789 0123456789 0123456789 THE-END
|6: 4 Msg 0123456789 0123456789 0123456789 0123456789 0123456789 012↩
|7: 3456789 0123456789 THE-END
+|16: · /tmp/pardes-snap/msg/cwd/a.txt 0123456789 01 9 messages · SPC h m
diff --git a/test/snapshots/multicursor.golden b/test/snapshots/multicursor.golden
index b73f9c4e..cba867d2 100644
--- a/test/snapshots/multicursor.golden
+++ b/test/snapshots/multicursor.golden
@@ -1,68 +1,92 @@
-== snap three-cursors grid=150x31 cursor=7,9
+== snap three-cursors grid=150x31 cursor=82,20
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
| /tmp/pardes-snap/multicursor/cwd Term+bash Save Mode Filter Collapse Del /tmp/pardes-snap/multicursor/cwd Term+bash Save Mode Filter Collapse Del
| ls ls
| f.txt f.txt
|
-| /tmp/pardes-snap/multicursor/cwd/f.txt Save Term Collapse Follow Del
-| 1 line 1
-| 2 line 2
-| 3 line 3
-| 4 line 4
-| 5 line 5
-| 6 line 6
-| 7 line 7
-| 8 line 8
-| 9 line 9
-| 10 line 10
-| /tmp/pardes-snap/multicursor/cwd Term+bash Save Mode Filter Collapse Del
-| ls
-| f.txt
+|
+|
+| f.txt
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/multicursor/cwd Term+bash Save Mode Filter Collapse Del ‹@p1 › /tmp/pardes-snap/multicursor/cwd/f.txt Keep Save Term Collapse Fol
+| ls low Del
+| f.txt 1 line 1
+| 2 line 2
+| 3 line 3
+| 4 line 4
+| 5 line 5
+| 6 line 6
+| 7 line 7
+| 8 line 8
+| 9 line 9
+| 10 line 10
+| 11 line 11
+| 12 line 12
+| · @p1 a copy of the terminal's text: Tab or B2 runs it; what the program draws next replaces it (Ctrl-b types to the program) 1 message · SPC h m
== style three-cursors grid=150x31
|0: 0-1 d,#1d2824, 2-149 #b2c3b8,#1d2824,
-|1: 0-1 d,#887455, 2-74 #becfc4,#314738, 75-76 #becfc4,#887455, 77-149 #b2c3b8,#1d2824,
+|1: 0-1 d,#887455, 2-74 #b2c3b8,#1d2824, 75-76 #b2c3b8,#887455, 77-149 #becfc4,#314738,
|2: 0-1 d,#496656, 2-34 #b2c3b8,#1d2824, 35-44 #d3b0d9,#1d2824, 45-74 #b2c3b8,#1d2824, 75-76 #b2c3b8,#496656, 77-109 #b2c3b8,#1d2824, 110-119 #d3b0d9,#1d2824, 120-149 #b2c3b8,#1d2824,
|3: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
|4: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
|5: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|6: 0-1 d,#add38a, 2-34 #becfc4,#314738, 35-40 #dfbce5,#314738, 41-74 #becfc4,#314738, 75-75 #becfc4,#608269, 76-149 #becfc4,#0d1410,
-|7: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-7 #3c614a,#f5f7ee, 8-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|8: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-7 #3c614a,#f5f7ee, 8-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|9: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|10: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|11: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|12: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|13: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|14: 0-0 d,#152019, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|15: 0-0 d,#152019, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|16: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|17: 0-1 d,#496656, 2-34 #b2c3b8,#1d2824, 35-44 #d3b0d9,#1d2824, 45-74 #b2c3b8,#1d2824, 75-75 #b2c3b8,#608269, 76-149 #b2c3b8,#0d1410,
-|18: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|19: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|20: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|21: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|22: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|23: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|24: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|25: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|26: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|27: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|28: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|29: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|30: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-== snap edited-at-three grid=150x31 cursor=9,9
-|6: */tmp/pardes-snap/multicursor/cwd/f.txt Save Term Collapse Follow Del
-|7: 1 >>line 1
-|8: 2 >>line 2
-|9: 3 >>line 3
-== snap three-selections grid=150x31 cursor=8,9
+|6: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
+|7: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
+|8: 0-0 d,#608269, 1-3 d,#0d1410, 4-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
+|9: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
+|10: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
+|11: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
+|12: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
+|13: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
+|14: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
+|15: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
+|16: 0-1 d,#496656, 2-34 #b2c3b8,#1d2824, 35-44 #d3b0d9,#1d2824, 45-74 #b2c3b8,#1d2824, 75-76 #b2c3b8,#add38a, 77-116 #becfc4,#2c2819, 117-122 #dfbce5,#2c2819, 123-149 #becfc4,#2c2819,
+|17: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-76 #e5eee5,#2c2819, 77-149 #becfc4,#2c2819,
+|18: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-79 #e5eee5,#0d1410, 80-81 #59675c,#0d1410, 82-82 #3c614a,#f5f7ee, 83-149 #e5eee5,#0d1410,
+|19: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-79 d,#0d1410, 80-81 #59675c,#0d1410, 82-82 #3c614a,#f5f7ee, 83-149 #e5eee5,#0d1410,
+|20: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-76 d,#0d1410, 77-79 d,#0d1410,b 80-81 #616f64,#0d1410,b 82-149 #e5eee5,#0d1410,
+|21: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-79 d,#0d1410, 80-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410,
+|22: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-79 d,#0d1410, 80-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410,
+|23: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-79 d,#0d1410, 80-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410,
+|24: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-79 d,#0d1410, 80-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410,
+|25: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-79 d,#0d1410, 80-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410,
+|26: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-79 d,#0d1410, 80-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410,
+|27: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-78 d,#0d1410, 79-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410,
+|28: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-78 d,#0d1410, 79-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410,
+|29: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#152019, 76-78 d,#0d1410, 79-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410,
+|30: 0-1 d,#1d2824, 2-149 #67756e,#1d2824,
+== snap edited-at-three grid=150x31 cursor=84,19
+|16: /tmp/pardes-snap/multicursor/cwd Term+bash Save Mode Filter Collapse Del */tmp/pardes-snap/multicursor/cwd/f.txt Save Term Collapse Follow Del
+|17: ls 1 >>line 1
+|18: f.txt 2 >>line 2
+|19: 3 >>line 3
+|20: 4 line 4
+|21: 5 line 5
+|22: 6 line 6
+|23: 7 line 7
+|24: 8 line 8
+|25: 9 line 9
+|26: 10 line 10
+|27: 11 line 11
+|28: 12 line 12
+|29: ~
+== snap three-selections grid=150x31 cursor=83,19
== style three-selections grid=150x31
-|6: 0-0 d,#add38a, 1-1 #000000,#f9cb70,b 2-34 #becfc4,#314738, 35-40 #dfbce5,#314738, 41-74 #becfc4,#314738, 75-75 #becfc4,#608269, 76-149 #becfc4,#0d1410,
-|7: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-7 #f5f7ee,#243a2d, 8-8 #3c614a,#f5f7ee, 9-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|8: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-7 #f5f7ee,#243a2d, 8-8 #3c614a,#f5f7ee, 9-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|9: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-8 #f5f7ee,#3c614a, 9-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-== snap keep-primary grid=150x31 cursor=8,9
+|16: 0-1 d,#496656, 2-34 #b2c3b8,#1d2824, 35-44 #d3b0d9,#1d2824, 45-74 #b2c3b8,#1d2824, 75-75 #b2c3b8,#add38a, 76-76 #000000,#f9cb70,b 77-109 #becfc4,#314738, 110-115 #dfbce5,#314738, 116-149 #becfc4,#314738,
+|17: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-79 #e5eee5,#0d1410, 80-81 #59675c,#0d1410, 82-82 #f5f7ee,#243a2d, 83-83 #3c614a,#f5f7ee, 84-149 #e5eee5,#0d1410,
+|18: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-79 #e5eee5,#0d1410, 80-81 #59675c,#0d1410, 82-82 #f5f7ee,#243a2d, 83-83 #3c614a,#f5f7ee, 84-149 #e5eee5,#0d1410,
+|19: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-76 d,#0d1410, 77-79 d,#0d1410,b 80-81 #616f64,#0d1410,b 82-83 #f5f7ee,#3c614a, 84-149 #e5eee5,#0d1410,
+|20: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-79 d,#0d1410, 80-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410,
+|26: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-78 d,#0d1410, 79-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410,
+|29: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-79 d,#0d1410, 80-149 #59675c,#0d1410,
+== snap keep-primary grid=150x31 cursor=83,19
== style keep-primary grid=150x31
-|7: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|8: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
+|17: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-79 #e5eee5,#0d1410, 80-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410,
+|18: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-79 #e5eee5,#0d1410, 80-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410,
diff --git a/test/snapshots/nested-optout.golden b/test/snapshots/nested-optout.golden
index 914c400d..a2f0a444 100644
--- a/test/snapshots/nested-optout.golden
+++ b/test/snapshots/nested-optout.golden
@@ -4,7 +4,7 @@
|$ /tmp/pardes-snap/nested-optout/cwd Term+bash Save Mode Filter Collapse Del
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/nested-optout/cwd/nested.txt Save Term Collapse Follow Del
+| /tmp/pardes-snap/nested-optout/cwd/nested.txt Keep Save Term Collapse Follow Del
| 1 optout-marker
| 2 second-optout-line
| ~
@@ -19,9 +19,17 @@
|
|
|
-|
+| /tmp/pardes-snap/nested-optout/cwd/nested.txt:1
| /tmp/pardes-snap/nested-optout/cwd/+New Save Term Collapse Follow Del
| 1
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/nested-optout/cwd
== snap inner-shell grid=100x31 cursor=6,6
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
@@ -38,17 +46,26 @@
|
|
|
-|
| /tmp/pardes-snap/nested-optout/cwd/innerdir/+New Save Term Collapse Follow Del
| 1
|
|
|
+| /tmp/pardes-snap/nested-optout/cwd/innerdir
| /tmp/pardes-snap/nested-optout/cwd/+New Save Term Collapse Follow Del
| 1
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/nested-optout/cwd
== snap inner-launch grid=100x31 cursor=11,9
|6: Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
|7: New Term Find Grep Joincol Delcol
-|8: /tmp/pardes-snap/nested-optout/cwd/innerdir/deeper.txt Save Term Collapse Follow Del
+|8: /tmp/pardes-snap/nested-optout/cwd/innerdir/deeper.txt Keep Save Term Collapse Follow Del
|9: 1 deepest-marker
|10: ~
+|14: /tmp/pardes-snap/nested-optout/cwd/innerdir/deeper.txt:1
diff --git a/test/snapshots/nested.golden b/test/snapshots/nested.golden
index ec0fcf1f..5a62e122 100644
--- a/test/snapshots/nested.golden
+++ b/test/snapshots/nested.golden
@@ -1,10 +1,16 @@
-== snap file-arg grid=100x31 cursor=7,6
+== snap file-arg grid=100x31 cursor=7,12
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
|$ /tmp/pardes-snap/nested/cwd Term+bash Save Mode Filter Collapse Del
| $ $(readlink /proc/$PPID/exe) nested.txt
| $
-| /tmp/pardes-snap/nested/cwd/nested.txt Save Term Collapse Follow Del
+|
+|
+|
+|
+|
+|
+| ‹@p1 › /tmp/pardes-snap/nested/cwd/nested.txt Keep Save Term Collapse Follow Del
| 1 hello-from-nested
| 2 second-nested-line
| ~
@@ -14,14 +20,16 @@
|
|
|
+| /tmp/pardes-snap/nested/cwd/+New Save Term Collapse Follow Del
+| 1
|
|
|
|
|
|
-| /tmp/pardes-snap/nested/cwd/+New Save Term Collapse Follow Del
-| 1
+|
+| /tmp/pardes-snap/nested/cwd/nested.txt:1
== snap no-arg grid=100x31 cursor=4,7
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
@@ -46,6 +54,14 @@
|
| /tmp/pardes-snap/nested/cwd/+New Save Term Collapse Follow Del
| 1
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/nested/cwd
== snap dir-arg grid=100x31 cursor=7,6
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
@@ -70,3 +86,11 @@
|
| /tmp/pardes-snap/nested/cwd/+New Save Term Collapse Follow Del
| 1
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/nested/cwd/nestdir/:1
diff --git a/test/snapshots/ninep.golden b/test/snapshots/ninep.golden
index 66a36c9f..26aa6a29 100644
--- a/test/snapshots/ninep.golden
+++ b/test/snapshots/ninep.golden
@@ -1,7 +1,8 @@
-== snap opened grid=90x15 cursor=7,3
+== snap opened grid=90x15 cursor=7,4
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/ninep/cwd/demo.zig Save Term Collapse Follow TreeContext Def Refs Del
+| /tmp/pardes-snap/ninep/cwd/demo.zig Keep Save Term Collapse Follow TreeContext Def Refs
+| Del
| 1 const greeting = "café λ 界 é";
| 2
| 3 pub fn choose(ok: bool) u32 {
@@ -9,45 +10,49 @@
| 5 return 7;
| 6 }
| ~
+|
+|
+|
+| /tmp/pardes-snap/ninep/cwd/demo.zig:1
== style opened grid=90x15
|0: 0-1 d,#1d2824, 2-89 #b2c3b8,#1d2824,
|1: 0-1 d,#887455, 2-89 #becfc4,#314738,
-|2: 0-1 d,#add38a, 2-28 #becfc4,#314738, 29-37 #dfbce5,#314738, 38-89 #becfc4,#314738,
-|3: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-23 #e5eee5,#0d1410, 24-32 #b8d88a,#0d1410, 33-33 d,d, 34-34 d,#0d1410, 35-36 #b8d88a,#0d1410, 37-89 #e5eee5,#0d1410,
-|4: 0-0 d,#608269, 1-4 d,#0d1410, 5-89 #59675c,#0d1410,
-|5: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-13 #c9a7ed,#0d1410, 14-89 #e5eee5,#0d1410,
-|6: 0-0 d,#608269, 1-4 d,#0d1410, 5-10 #59675c,#0d1410, 11-13 #c9a7ed,#0d1410, 14-18 #e5eee5,#0d1410, 19-25 #c9a7ed,#0d1410, 26-27 #f8c082,#0d1410, 28-89 #e5eee5,#0d1410,
-|7: 0-0 d,#608269, 1-4 d,#0d1410, 5-10 #59675c,#0d1410, 11-17 #c9a7ed,#0d1410, 18-18 #f8c082,#0d1410, 19-89 #e5eee5,#0d1410,
-|8: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-89 #e5eee5,#0d1410,
-|9: 0-0 d,#608269, 1-4 d,#0d1410, 5-89 #59675c,#0d1410,
-|10: 0-0 d,#608269, 1-89 d,#0d1410,
+|2: 0-1 d,#add38a, 2-28 #becfc4,#2c2819, 29-37 #dfbce5,#2c2819, 38-89 #becfc4,#2c2819,
+|3: 0-1 d,#2c2819, 2-89 #becfc4,#2c2819,
+|4: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-23 #e5eee5,#0d1410, 24-32 #b8d88a,#0d1410, 33-33 d,d, 34-34 d,#0d1410, 35-36 #b8d88a,#0d1410, 37-89 #e5eee5,#0d1410,
+|5: 0-0 d,#608269, 1-4 d,#0d1410, 5-89 #59675c,#0d1410,
+|6: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-13 #c9a7ed,#0d1410, 14-89 #e5eee5,#0d1410,
+|7: 0-0 d,#608269, 1-4 d,#0d1410, 5-10 #59675c,#0d1410, 11-13 #c9a7ed,#0d1410, 14-18 #e5eee5,#0d1410, 19-25 #c9a7ed,#0d1410, 26-27 #f8c082,#0d1410, 28-89 #e5eee5,#0d1410,
+|8: 0-0 d,#608269, 1-4 d,#0d1410, 5-10 #59675c,#0d1410, 11-17 #c9a7ed,#0d1410, 18-18 #f8c082,#0d1410, 19-89 #e5eee5,#0d1410,
+|9: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-89 #e5eee5,#0d1410,
+|10: 0-0 d,#608269, 1-4 d,#0d1410, 5-89 #59675c,#0d1410,
|11: 0-0 d,#608269, 1-89 d,#0d1410,
|12: 0-0 d,#608269, 1-89 d,#0d1410,
|13: 0-0 d,#608269, 1-89 d,#0d1410,
-|14: 0-0 d,#608269, 1-89 d,#0d1410,
-== 9p opened grid=90x15 cursor=7,3,block
+|14: 0-1 d,#1d2824, 2-89 #b2c3b8,#1d2824,
+== 9p opened grid=90x15 cursor=7,4,block
|0: Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
@0: 0-84 #b2c3b8,#1d2824,,tagline 85-89 d,#1d2824,,tagline
|1: New Term Find Grep Joincol Delcol
@1: 0-1 #ffffff,#887455,,tagline 2-34 #becfc4,#314738,,tagline 35-89 d,#314738,,tagline
-|2: /tmp/pardes-snap/ninep/cwd/demo.zig Save Term Collapse Follow TreeContext Def Refs Del
-@2: 0-1 #000000,#add38a,,tagline 2-28 #becfc4,#314738,,tagline 29-36 #dfbce5,#314738,,tagline 37-87 #becfc4,#314738,,tagline 88-89 d,#314738,,tagline
-|3: 1 const greeting = "café λ 界 é";
-+3: 28="é" 30="λ" 32="界" 33="" 35="é"
-@3: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #616f64,#0d1410,b,body 7-23 #e5eee5,#0d1410,,body 24-36 #b8d88a,#0d1410,,body 37-37 #e5eee5,#0d1410,,body 38-89 d,#0d1410,,body
-|4: 2
-@4: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
-|5: 3 pub fn choose(ok: bool) u32 {
-@5: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-10 #e5eee5,#0d1410,,body 11-12 #c9a7ed,#0d1410,,body 13-35 #e5eee5,#0d1410,,body 36-89 d,#0d1410,,body
-|6: 4 if (ok) return 42;
-@6: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-10 #e5eee5,#0d1410,,body 11-12 #c9a7ed,#0d1410,,body 13-18 #e5eee5,#0d1410,,body 19-24 #c9a7ed,#0d1410,,body 25-25 #e5eee5,#0d1410,,body 26-27 #f8c082,#0d1410,,body 28-28 #e5eee5,#0d1410,,body 29-89 d,#0d1410,,body
-|7: 5 return 7;
-@7: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-10 #e5eee5,#0d1410,,body 11-16 #c9a7ed,#0d1410,,body 17-17 #e5eee5,#0d1410,,body 18-18 #f8c082,#0d1410,,body 19-19 #e5eee5,#0d1410,,body 20-89 d,#0d1410,,body
-|8: 6 }
-@8: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-7 #e5eee5,#0d1410,,body 8-89 d,#0d1410,,body
-|9: ~
-@9: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
-|10:
+|2: /tmp/pardes-snap/ninep/cwd/demo.zig Keep Save Term Collapse Follow TreeContext Def Refs
+@2: 0-1 #000000,#add38a,,tagline 2-28 #becfc4,#2c2819,,tagline 29-36 #dfbce5,#2c2819,,tagline 37-89 #becfc4,#2c2819,,tagline
+|3: Del
+@3: 0-1 d,#2c2819,,tagline 2-4 #becfc4,#2c2819,,tagline 5-89 d,#2c2819,,tagline
+|4: 1 const greeting = "café λ 界 é";
++4: 28="é" 30="λ" 32="界" 33="" 35="é"
+@4: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #616f64,#0d1410,b,body 7-23 #e5eee5,#0d1410,,body 24-36 #b8d88a,#0d1410,,body 37-37 #e5eee5,#0d1410,,body 38-89 d,#0d1410,,body
+|5: 2
+@5: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
+|6: 3 pub fn choose(ok: bool) u32 {
+@6: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-10 #e5eee5,#0d1410,,body 11-12 #c9a7ed,#0d1410,,body 13-35 #e5eee5,#0d1410,,body 36-89 d,#0d1410,,body
+|7: 4 if (ok) return 42;
+@7: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-10 #e5eee5,#0d1410,,body 11-12 #c9a7ed,#0d1410,,body 13-18 #e5eee5,#0d1410,,body 19-24 #c9a7ed,#0d1410,,body 25-25 #e5eee5,#0d1410,,body 26-27 #f8c082,#0d1410,,body 28-28 #e5eee5,#0d1410,,body 29-89 d,#0d1410,,body
+|8: 5 return 7;
+@8: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-10 #e5eee5,#0d1410,,body 11-16 #c9a7ed,#0d1410,,body 17-17 #e5eee5,#0d1410,,body 18-18 #f8c082,#0d1410,,body 19-19 #e5eee5,#0d1410,,body 20-89 d,#0d1410,,body
+|9: 6 }
+@9: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-7 #e5eee5,#0d1410,,body 8-89 d,#0d1410,,body
+|10: ~
@10: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
|11:
@11: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
@@ -55,8 +60,8 @@
@12: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
|13:
@13: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
-|14:
-@14: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
+|14: /tmp/pardes-snap/ninep/cwd/demo.zig:1
+@14: 0-1 d,#1d2824,,tagline 2-88 #b2c3b8,#1d2824,,tagline 89-89 d,#1d2824,,tagline
== snap edited grid=90x15 cursor=7,4
|2: */tmp/pardes-snap/ninep/cwd/demo.zig Save Term Collapse Follow TreeContext Def Refs Del
|3: 1 // café λ 界
@@ -66,7 +71,7 @@
|7: 5 if (ok) return 42;
|8: 6 return 7;
|9: 7 }
-|10: ~
+|14: /tmp/pardes-snap/ninep/cwd/demo.zig:2
== 9p edited grid=90x15 cursor=7,4,block
|2: */tmp/pardes-snap/ninep/cwd/demo.zig Save Term Collapse Follow TreeContext Def Refs Del
@2: 0-0 #000000,#add38a,,tagline 1-1 #000000,#f9cb70,b,tagline 2-28 #becfc4,#314738,,tagline 29-36 #dfbce5,#314738,,tagline 37-87 #becfc4,#314738,,tagline 88-89 d,#314738,,tagline
@@ -86,18 +91,11 @@
@8: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-10 #e5eee5,#0d1410,,body 11-16 #c9a7ed,#0d1410,,body 17-17 #e5eee5,#0d1410,,body 18-18 #f8c082,#0d1410,,body 19-19 #e5eee5,#0d1410,,body 20-89 d,#0d1410,,body
|9: 7 }
@9: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-7 #e5eee5,#0d1410,,body 8-89 d,#0d1410,,body
-|10: ~
-@10: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
+|14: /tmp/pardes-snap/ninep/cwd/demo.zig:2
+@14: 0-1 d,#1d2824,,tagline 2-88 #b2c3b8,#1d2824,,tagline 89-89 d,#1d2824,,tagline
== style edited grid=90x15
|2: 0-0 d,#add38a, 1-1 #000000,#f9cb70,b 2-28 #becfc4,#314738, 29-37 #dfbce5,#314738, 38-89 #becfc4,#314738,
|3: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-17 #b9f480,#0d1410, 18-18 d,d, 19-89 d,#0d1410,
-|4: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-23 #e5eee5,#0d1410, 24-32 #b8d88a,#0d1410, 33-33 d,d, 34-34 d,#0d1410, 35-36 #b8d88a,#0d1410, 37-89 #e5eee5,#0d1410,
-|5: 0-0 d,#608269, 1-4 d,#0d1410, 5-89 #59675c,#0d1410,
-|6: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-13 #c9a7ed,#0d1410, 14-89 #e5eee5,#0d1410,
-|7: 0-0 d,#608269, 1-4 d,#0d1410, 5-10 #59675c,#0d1410, 11-13 #c9a7ed,#0d1410, 14-18 #e5eee5,#0d1410, 19-25 #c9a7ed,#0d1410, 26-27 #f8c082,#0d1410, 28-89 #e5eee5,#0d1410,
-|8: 0-0 d,#608269, 1-4 d,#0d1410, 5-10 #59675c,#0d1410, 11-17 #c9a7ed,#0d1410, 18-18 #f8c082,#0d1410, 19-89 #e5eee5,#0d1410,
-|9: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-89 #e5eee5,#0d1410,
-|10: 0-0 d,#608269, 1-4 d,#0d1410, 5-89 #59675c,#0d1410,
== style resized grid=105x20
|0: 0-1 d,#1d2824, 2-104 #b2c3b8,#1d2824,
|1: 0-1 d,#887455, 2-104 #becfc4,#314738,
@@ -118,7 +116,7 @@
|16: 0-0 d,#608269, 1-104 d,#0d1410,
|17: 0-0 d,#608269, 1-104 d,#0d1410,
|18: 0-0 d,#608269, 1-104 d,#0d1410,
-|19: 0-0 d,#608269, 1-104 d,#0d1410,
+|19: 0-1 d,#1d2824, 2-104 #b2c3b8,#1d2824,
== 9p resized grid=105x20 cursor=7,4,block
|0: Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
@0: 0-84 #b2c3b8,#1d2824,,tagline 85-104 d,#1d2824,,tagline
@@ -160,8 +158,8 @@
@17: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
|18:
@18: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
-|19:
-@19: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
+|19: /tmp/pardes-snap/ninep/cwd/demo.zig:2
+@19: 0-1 d,#1d2824,,tagline 2-103 #b2c3b8,#1d2824,,tagline 104-104 d,#1d2824,,tagline
== snap resized grid=105x20 cursor=7,4
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
@@ -174,4 +172,13 @@
| 6 return 7;
| 7 }
| ~
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/ninep/cwd/demo.zig:2
== 9p unchanged grid=105x20 cursor=7,4,block
diff --git a/test/snapshots/pagercolor.golden b/test/snapshots/pagercolor.golden
index 4db82eea..d15c680d 100644
--- a/test/snapshots/pagercolor.golden
+++ b/test/snapshots/pagercolor.golden
@@ -32,7 +32,6 @@
|
|
|
-|
| /tmp/pardes-snap/pagercolor/cwd/+New Save Term Collapse Follow Del
| 1
|
@@ -43,6 +42,13 @@
|
| /tmp/pardes-snap/pagercolor/cwd/+Pager Save Term Filter Collapse Del
| red bold green rgb ul NAME us plain
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/pagercolor/cwd
== style pager-colours grid=100x50
|0: 0-1 d,#1d2824, 2-99 #b2c3b8,#1d2824,
|1: 0-1 d,#887455, 2-99 #becfc4,#314738,
@@ -77,23 +83,23 @@
|30: 0-0 d,#608269, 1-99 d,#0d1410,
|31: 0-0 d,#608269, 1-99 d,#0d1410,
|32: 0-0 d,#608269, 1-99 d,#0d1410,
-|33: 0-0 d,#608269, 1-99 d,#0d1410,
-|34: 0-1 d,#496656, 2-33 #b2c3b8,#1d2824, 34-38 #d3b0d9,#1d2824, 39-99 #b2c3b8,#1d2824,
-|35: 0-0 d,#608269, 1-4 d,#0d1410, 5-99 #59675c,#0d1410,
+|33: 0-1 d,#496656, 2-33 #b2c3b8,#1d2824, 34-38 #d3b0d9,#1d2824, 39-99 #b2c3b8,#1d2824,
+|34: 0-0 d,#608269, 1-4 d,#0d1410, 5-99 #59675c,#0d1410,
+|35: 0-0 d,#608269, 1-99 d,#0d1410,
|36: 0-0 d,#608269, 1-99 d,#0d1410,
|37: 0-0 d,#608269, 1-99 d,#0d1410,
|38: 0-0 d,#608269, 1-99 d,#0d1410,
|39: 0-0 d,#608269, 1-99 d,#0d1410,
|40: 0-0 d,#608269, 1-99 d,#0d1410,
-|41: 0-0 d,#608269, 1-99 d,#0d1410,
-|42: 0-1 d,#496656, 2-33 #b2c3b8,#1d2824, 34-40 #d3b0d9,#1d2824, 41-99 #b2c3b8,#1d2824,
-|43: 0-0 d,#608269, 1-1 d,#0d1410, 2-5 #f1a39b,#0d1410, 6-15 #b6ce94,#0d1410,b 16-16 #b6ce94,#0d1410, 17-20 #c5917e,#0d1410, 21-22 #e5eee5,#0d1410,u 23-23 #e5eee5,#0d1410, 24-27 #e5eee5,#0d1410,b 28-28 #e5eee5,#0d1410, 29-30 #e5eee5,#0d1410,u 31-99 #e5eee5,#0d1410,
+|41: 0-1 d,#496656, 2-33 #b2c3b8,#1d2824, 34-40 #d3b0d9,#1d2824, 41-99 #b2c3b8,#1d2824,
+|42: 0-0 d,#608269, 1-1 d,#0d1410, 2-5 #f1a39b,#0d1410, 6-15 #b6ce94,#0d1410,b 16-16 #b6ce94,#0d1410, 17-20 #c5917e,#0d1410, 21-22 #e5eee5,#0d1410,u 23-23 #e5eee5,#0d1410, 24-27 #e5eee5,#0d1410,b 28-28 #e5eee5,#0d1410, 29-30 #e5eee5,#0d1410,u 31-99 #e5eee5,#0d1410,
+|43: 0-0 d,#608269, 1-99 d,#0d1410,
|44: 0-0 d,#608269, 1-99 d,#0d1410,
|45: 0-0 d,#608269, 1-99 d,#0d1410,
|46: 0-0 d,#608269, 1-99 d,#0d1410,
|47: 0-0 d,#608269, 1-99 d,#0d1410,
|48: 0-0 d,#608269, 1-99 d,#0d1410,
-|49: 0-0 d,#608269, 1-99 d,#0d1410,
+|49: 0-1 d,#1d2824, 2-99 #b2c3b8,#1d2824,
== snap pager-diff grid=100x50 cursor=4,8
|5: $ printf '\033[33mcommit 0123\033[33mabc\033[m\n\033[1mdiff --git a/x b/x\033[m\n\033[1m--- a/x\03
|6: 3[m\n\033[1m+++ b/x\033[m\n\033[36m@@ -1 +1 @@\033[m\n\033[31m-old\033[m\n\033[32m+new\033[m\n' |
@@ -104,14 +110,14 @@
|11: x:1
|12: -old
|13: +new
+|33:
|34:
-|35:
-|38: /tmp/pardes-snap/pagercolor/cwd/+New Save Term Collapse Follow Del
-|39: 1
+|37: /tmp/pardes-snap/pagercolor/cwd/+New Save Term Collapse Follow Del
+|38: 1
+|41:
|42:
-|43:
-|46: /tmp/pardes-snap/pagercolor/cwd/+Pager Save Term Filter Collapse Del
-|47: red bold green rgb ul NAME us plain
+|45: /tmp/pardes-snap/pagercolor/cwd/+Pager Save Term Filter Collapse Del
+|46: red bold green rgb ul NAME us plain
== style pager-diff-colours grid=100x50
|6: 0-0 d,#608269, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
|7: 0-0 d,#608269, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
@@ -121,11 +127,11 @@
|11: 0-0 d,#608269, 1-1 d,#0d1410, 2-99 #59675c,#0d1410,
|12: 0-0 d,#608269, 1-1 d,#0d1410, 2-2 #f1a39b,#1a1d18,b 3-99 #f8c082,#1a1d18,
|13: 0-0 d,#608269, 1-1 d,#0d1410, 2-2 #b6ce94,#171f18,b 3-99 #b8d88a,#171f18,
+|33: 0-0 d,#608269, 1-99 d,#0d1410,
|34: 0-0 d,#608269, 1-99 d,#0d1410,
-|35: 0-0 d,#608269, 1-99 d,#0d1410,
-|38: 0-1 d,#496656, 2-33 #b2c3b8,#1d2824, 34-38 #d3b0d9,#1d2824, 39-99 #b2c3b8,#1d2824,
-|39: 0-0 d,#608269, 1-4 d,#0d1410, 5-99 #59675c,#0d1410,
+|37: 0-1 d,#496656, 2-33 #b2c3b8,#1d2824, 34-38 #d3b0d9,#1d2824, 39-99 #b2c3b8,#1d2824,
+|38: 0-0 d,#608269, 1-4 d,#0d1410, 5-99 #59675c,#0d1410,
+|41: 0-0 d,#608269, 1-99 d,#0d1410,
|42: 0-0 d,#608269, 1-99 d,#0d1410,
-|43: 0-0 d,#608269, 1-99 d,#0d1410,
-|46: 0-1 d,#496656, 2-33 #b2c3b8,#1d2824, 34-40 #d3b0d9,#1d2824, 41-99 #b2c3b8,#1d2824,
-|47: 0-0 d,#608269, 1-1 d,#0d1410, 2-5 #f1a39b,#0d1410, 6-15 #b6ce94,#0d1410,b 16-16 #b6ce94,#0d1410, 17-20 #c5917e,#0d1410, 21-22 #e5eee5,#0d1410,u 23-23 #e5eee5,#0d1410, 24-27 #e5eee5,#0d1410,b 28-28 #e5eee5,#0d1410, 29-30 #e5eee5,#0d1410,u 31-99 #e5eee5,#0d1410,
+|45: 0-1 d,#496656, 2-33 #b2c3b8,#1d2824, 34-40 #d3b0d9,#1d2824, 41-99 #b2c3b8,#1d2824,
+|46: 0-0 d,#608269, 1-1 d,#0d1410, 2-5 #f1a39b,#0d1410, 6-15 #b6ce94,#0d1410,b 16-16 #b6ce94,#0d1410, 17-20 #c5917e,#0d1410, 21-22 #e5eee5,#0d1410,u 23-23 #e5eee5,#0d1410, 24-27 #e5eee5,#0d1410,b 28-28 #e5eee5,#0d1410, 29-30 #e5eee5,#0d1410,u 31-99 #e5eee5,#0d1410,
diff --git a/test/snapshots/pipe.golden b/test/snapshots/pipe.golden
index 618a3019..faa16bc3 100644
--- a/test/snapshots/pipe.golden
+++ b/test/snapshots/pipe.golden
@@ -1,12 +1,22 @@
-== snap prompt grid=180x13 cursor=179,3
+== snap prompt grid=180x13 cursor=54,2
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/pipe/cwd/pipe.txt Save Term Collapse Follow Del
-| 1 alpha beta |tr a-z A-Z
+|^ /tmp/pardes-snap/pipe/cwd/pipe.txt Keep | tr a-z A-Z = Exec Edit |tr a-z A-Z 1 line → 1 · exit 0 ⏎ replace · C-r history · esc
+| 1 alpha beta
+| ALPHA BETA
| 2 gamma delta
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/pipe/cwd/pipe.txt:1
== snap filtered grid=180x13 cursor=17,3
-|2: */tmp/pardes-snap/pipe/cwd/pipe.txt Save Term Collapse Follow Del
+|2: *Edit |tr a-z A-Z › /tmp/pardes-snap/pipe/cwd/pipe.txt Save Term Collapse Follow Del
|3: 1 ALPHA BETA
+|4: 2 gamma delta
+|5:
== snap undone grid=180x13 cursor=17,3
-|2: /tmp/pardes-snap/pipe/cwd/pipe.txt Save Term Collapse Follow Del
+|2: Edit |tr a-z A-Z › /tmp/pardes-snap/pipe/cwd/pipe.txt Save Term Collapse Follow Del
|3: 1 alpha beta
diff --git a/test/snapshots/psearch.golden b/test/snapshots/psearch.golden
index 380324d5..d7ca8a95 100644
--- a/test/snapshots/psearch.golden
+++ b/test/snapshots/psearch.golden
@@ -22,6 +22,14 @@
|
| /tmp/pardes-snap/psearch/cwd/+New Save Term Collapse Follow Del
| 1
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/psearch/cwd
== snap typing grid=140x31 cursor=139,3
|3: printf 'x MA''RK a\nzz\nx MA''RK b\nzz\nx MA''RK c\n' /MARK
== snap results grid=140x31 cursor=7,4
@@ -65,16 +73,18 @@
|27: 0-0 d,#608269, 1-139 d,#0d1410,
|28: 0-0 d,#608269, 1-139 d,#0d1410,
|29: 0-0 d,#608269, 1-139 d,#0d1410,
-|30: 0-0 d,#608269, 1-139 d,#0d1410,
+|30: 0-1 d,#1d2824, 2-139 #b2c3b8,#1d2824,
== snap second grid=140x31 cursor=7,6
== snap back grid=140x31 cursor=7,4
== snap nomatch grid=140x31 cursor=7,13
|24: /tmp/pardes-snap/psearch/cwd/+Search Save Term Collapse Follow LocationsConfig Del
|25: 1
+|30: /tmp/pardes-snap/psearch/cwd/+Search:3
== snap ttyinert grid=140x31 cursor=4,9
|2: $ /tmp/pardes-snap/psearch/cwd Term+bash Save Mode Filter Collapse Del
|3: $ printf 'x MA''RK a\nzz\nx MA''RK b\nzz\nx MA''RK c\n'
|9: $
+|30: /tmp/pardes-snap/psearch/cwd
== snap rightsearch grid=140x31 cursor=7,6
|2: /tmp/pardes-snap/psearch/cwd Term+bash Save Mode Filter Collapse Del
|3: printf 'x MA''RK a\nzz\nx MA''RK b\nzz\nx MA''RK c\n'
diff --git a/test/snapshots/reflow.golden b/test/snapshots/reflow.golden
index 869ee73c..6d2945d2 100644
--- a/test/snapshots/reflow.golden
+++ b/test/snapshots/reflow.golden
@@ -18,3 +18,9 @@
| $
| /tmp/pardes-snap/reflow/cwd/+New Save Term Collapse Follow Del
| 1
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/reflow/cwd
diff --git a/test/snapshots/respawn.golden b/test/snapshots/respawn.golden
index c693fcbd..51c7d820 100644
--- a/test/snapshots/respawn.golden
+++ b/test/snapshots/respawn.golden
@@ -1,4 +1,4 @@
-== snap respawn grid=140x31 cursor=4,9
+== snap respawn grid=140x32 cursor=4,9
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
| /tmp/pardes-snap/respawn/cwd Term+bash Save Mode Filter Collapse Del /tmp/pardes-snap/respawn/cwd Term+bash Save Mode Filter Collapse Del
@@ -9,3 +9,25 @@
| $ echo RESP''AWNOK
| RESPAWNOK
| $
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| ✓ @p2 Del 2 messages · SPC h m
diff --git a/test/snapshots/restore.golden b/test/snapshots/restore.golden
index 9623edf8..ce49c4ee 100644
--- a/test/snapshots/restore.golden
+++ b/test/snapshots/restore.golden
@@ -2,10 +2,34 @@
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit Restore /tmp/p
| New Term Find Grep Joincol Delcol
|$ /tmp/pardes-snap/restore/cwd Term+bash Save Mode Filter Collapse Del
-| $ ls Dump
+| $ ls
| $ echo KEEP''ME
| KEEPME
| $
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| ✓ @p1 Dump 1 message · SPC h m
== snap restored grid=100x31 cursor=4,8
|7: ── restored history ──
|8: $
diff --git a/test/snapshots/savepane.golden b/test/snapshots/savepane.golden
index bb9df3a9..04b902e1 100644
--- a/test/snapshots/savepane.golden
+++ b/test/snapshots/savepane.golden
@@ -1,4 +1,4 @@
-== snap scratch grid=100x31 cursor=20,18
+== snap scratch grid=100x31 cursor=20,17
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
| /tmp/pardes-snap/savepane/cwd Term+bash Save Mode Filter Collapse Del
@@ -15,16 +15,28 @@
|
|
|
-|
| */tmp/pardes-snap/savepane/cwd/+New Save Term Collapse Follow Del
| 1 scratch bytes
-== snap prompt grid=100x31 cursor=99,19
-|18: 1 scratch bytes Save
-|19: Save /tmp/pardes-snap/savepane/cwd/
-== snap saved grid=100x31 cursor=20,18
-|17: /tmp/pardes-snap/savepane/cwd/saved.txt Save Term Collapse Follow Del
-|18: 1 scratch bytes --:--:-- saved /tmp/pardes-snap/savepane/cwd/saved.txt
-|19:
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| ✓ @p1 New 1 message · SPC h m
+== snap prompt grid=100x31 cursor=99,17
+|17: 1 scratch bytes Save /tmp/pardes-snap/savepane/cwd/
+|30: ✓ /tmp/pardes-snap/savepane/cwd/+New Save 2 messages · SPC h m
+== snap saved grid=100x31 cursor=20,17
+|16: /tmp/pardes-snap/savepane/cwd/saved.txt Keep Save Term Collapse Follow Del
+|17: 1 scratch bytes
+|30: · /tmp/pardes-snap/savepane/cwd/+New saved /tmp/pardes-snap/savepane/cwd/sav 3 messages · SPC h m
== file bytes
scratch bytes
== end file
diff --git a/test/snapshots/scroll.golden b/test/snapshots/scroll.golden
index 242c7fc4..2125f0e9 100644
--- a/test/snapshots/scroll.golden
+++ b/test/snapshots/scroll.golden
@@ -1,11 +1,10 @@
-== snap bottom grid=100x31 cursor=4,16
+== snap bottom grid=100x31 cursor=4,15
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
| /tmp/pardes-snap/scroll/cwd Term+bash Save Mode /tmp/pardes-snap/scroll/cwd Term+bash Save Mode
| Filter Collapse Del Filter Collapse Del
-| 189 ls
-| 190 s.txt
-| 191
+| 190 ls
+| 191 s.txt
| 192
| 193
| 194
@@ -20,49 +19,44 @@
| Filter Collapse Del
| ls
| s.txt
-== snap wheel3 grid=100x31 cursor=4,16
-|4: 186 ls
-|5: 187 s.txt
-|6: 188
-|7: 189
-|8: 190
-|9: 191
-|10: 192
-|11: 193
-|12: 194
-|13: 195
-|14: 196
-|15: 197
-|16: 198
-== snap gutter-up grid=100x31 cursor=4,16
-|4: 179 ls
-|5: 180 s.txt
-|6: 181
-|7: 182
-|8: 183
-|9: 184
-|10: 185
-|11: 186
-|12: 187
-|13: 188
-|14: 189
-|15: 190
-|16: 191
-== snap gutter-down grid=100x31 cursor=4,16
-|4: 181 ls
-|5: 182 s.txt
-|6: 183
-|7: 184
-|8: 185
-|9: 186
-|10: 187
-|11: 188
-|12: 189
-|13: 190
-|14: 191
-|15: 192
-|16: 193
-== snap wheel-down grid=100x31 cursor=4,16
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/scroll/cwd
+== snap wheel3 grid=100x31 cursor=4,15
+|4: 187 ls
+|5: 188 s.txt
+|6: 189
+|7: 190
+|8: 191
+|9: 192
+|10: 193
+|11: 194
+|12: 195
+|13: 196
+|14: 197
+|15: 198
+== snap gutter-up grid=100x31 cursor=4,15
+|4: 180 ls
+|5: 181 s.txt
+|6: 182
+|7: 183
+|8: 184
+|9: 185
+|10: 186
+|11: 187
+|12: 188
+|13: 189
+|14: 190
+|15: 191
+== snap gutter-down grid=100x31 cursor=4,15
|4: 182 ls
|5: 183 s.txt
|6: 184
@@ -75,7 +69,19 @@
|13: 191
|14: 192
|15: 193
-|16: 194
+== snap wheel-down grid=100x31 cursor=4,15
+|4: 183 ls
+|5: 184 s.txt
+|6: 185
+|7: 186
+|8: 187
+|9: 188
+|10: 189
+|11: 190
+|12: 191
+|13: 192
+|14: 193
+|15: 194
== style wheel-down grid=100x31
|0: 0-1 d,#1d2824, 2-99 #b2c3b8,#1d2824,
|1: 0-1 d,#887455, 2-49 #becfc4,#314738, 50-51 #becfc4,#887455, 52-99 #b2c3b8,#1d2824,
@@ -91,13 +97,13 @@
|11: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
|12: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
|13: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
-|14: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
-|15: 0-0 d,#608269, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
-|16: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
-|17: 0-1 d,#496656, 2-29 #b2c3b8,#1d2824, 30-39 #d3b0d9,#1d2824, 40-49 #b2c3b8,#1d2824, 50-50 #b2c3b8,#608269, 51-99 #b2c3b8,#0d1410,
-|18: 0-1 d,#1d2824, 2-49 #b2c3b8,#1d2824, 50-50 #b2c3b8,#608269, 51-99 #b2c3b8,#0d1410,
+|14: 0-0 d,#608269, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
+|15: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
+|16: 0-1 d,#496656, 2-29 #b2c3b8,#1d2824, 30-39 #d3b0d9,#1d2824, 40-49 #b2c3b8,#1d2824, 50-50 #b2c3b8,#608269, 51-99 #b2c3b8,#0d1410,
+|17: 0-1 d,#1d2824, 2-49 #b2c3b8,#1d2824, 50-50 #b2c3b8,#608269, 51-99 #b2c3b8,#0d1410,
+|18: 0-0 d,#608269, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
|19: 0-0 d,#608269, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
-|20: 0-0 d,#608269, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
+|20: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
|21: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
|22: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
|23: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
@@ -107,4 +113,4 @@
|27: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
|28: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
|29: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
-|30: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
+|30: 0-1 d,#1d2824, 2-99 #b2c3b8,#1d2824,
diff --git a/test/snapshots/scrolloff.golden b/test/snapshots/scrolloff.golden
index 3482065a..bacaf1a3 100644
--- a/test/snapshots/scrolloff.golden
+++ b/test/snapshots/scrolloff.golden
@@ -1,68 +1,23 @@
-== snap top grid=210x16 cursor=7,7
+== snap top grid=210x16 cursor=2,3
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
| /tmp/pardes-snap/scrolloff/cwd Term+bash Save Mode Filter Collapse Del
| ls
| g.txt
|
-| /tmp/pardes-snap/scrolloff/cwd/g.txt Save Term Collapse Follow Del
+|
+|
+|
+| ‹@p1 › /tmp/pardes-snap/scrolloff/cwd/g.txt Keep Save Term Collapse Follow Del
| 1 line 1
| 2 line 2
| 3 line 3
| 4 line 4
| 5 line 5
-| 6 line 6
-| 7 line 7
-| 8 line 8
-| 9 line 9
-== snap edge grid=210x16 cursor=7,12
-== snap scrolled1 grid=210x16 cursor=7,12
-|7: 2 line 2
-|8: 3 line 3
-|9: 4 line 4
-|10: 5 line 5
-|11: 6 line 6
-|12: 7 line 7
-|13: 8 line 8
-|14: 9 line 9
-|15: 10 line 10
-== snap jdown grid=210x16 cursor=7,12
-|7: 6 line 6
-|8: 7 line 7
-|9: 8 line 8
-|10: 9 line 9
-|11: 10 line 10
-|12: 11 line 11
-|13: 12 line 12
-|14: 13 line 13
-|15: 14 line 14
-== snap end grid=210x16 cursor=7,14
-|7: 33 line 33
-|8: 34 line 34
-|9: 35 line 35
-|10: 36 line 36
-|11: 37 line 37
-|12: 38 line 38
-|13: 39 line 39
-|14: 40 line 40
-|15: ~
-== snap kup grid=210x16 cursor=7,10
-|7: 29 line 29
-|8: 30 line 30
-|9: 31 line 31
-|10: 32 line 32
-|11: 33 line 33
-|12: 34 line 34
-|13: 35 line 35
-|14: 36 line 36
-|15: 37 line 37
-== snap top2 grid=210x16 cursor=7,7
-|7: 1 line 1
-|8: 2 line 2
-|9: 3 line 3
-|10: 4 line 4
-|11: 5 line 5
-|12: 6 line 6
-|13: 7 line 7
-|14: 8 line 8
-|15: 9 line 9
+| /tmp/pardes-snap/scrolloff/cwd
+== snap edge grid=210x16 cursor=2,6
+== snap scrolled1 grid=210x16 cursor=2,6
+== snap jdown grid=210x16 cursor=2,6
+== snap end grid=210x16 cursor=2,5
+== snap kup grid=210x16 cursor=2,3
+== snap top2 grid=210x16 cursor=2,3
diff --git a/test/snapshots/selarg.golden b/test/snapshots/selarg.golden
index 54e363ba..16b13303 100644
--- a/test/snapshots/selarg.golden
+++ b/test/snapshots/selarg.golden
@@ -15,14 +15,26 @@
|
|
|
-|
| /tmp/pardes-snap/selarg/cwd Term+bash Save Mode
| Filter Collapse Del
| ls
| s.txt
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/selarg/cwd
== snap crosspane grid=100x31 cursor=6,4
|5: ./c.sh ZZARG
|6: CHORDARG:ZZARG
+|30: ✓ @p3 Exec 1 message · SPC h m
== snap vselarg grid=100x31 cursor=12,4
|7: ./c.sh ZZVEE
|8: CHORDARG:ZZVEE
+|30: ✓ @p3 Exec ×2 1 message · SPC h m
diff --git a/test/snapshots/selregex.golden b/test/snapshots/selregex.golden
index 4e456d99..1cfd5844 100644
--- a/test/snapshots/selregex.golden
+++ b/test/snapshots/selregex.golden
@@ -1,20 +1,39 @@
-== snap prompt-armed grid=160x25 cursor=159,3
+== snap prompt-armed grid=160x25 cursor=45,2
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/selregex/cwd/m.zig Save Term Collapse Follow TreeContext Def Refs Del
-| 1 const one = 1; Select /
-| 2 const two = 2;
-| 3 const three = 3;
+|^ /tmp/pardes-snap/selregex/cwd/m.zig Keep s ⏎ select · C-r history · esc
+| 1┃const one = 1;
+| 2┃const two = 2;
+| 3┃const three = 3;
| ~
-== snap preview grid=160x25 cursor=159,3
-|3: 1 const one = 1; Select /const
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/selregex/cwd/m.zig:3
+== snap preview grid=160x25 cursor=50,2
+|2: ^ /tmp/pardes-snap/selregex/cwd/m.zig Keep s const = Exec Edit x/const/ 3 selections in 3 lines ⏎ select · C-r history · esc
+|24: /tmp/pardes-snap/selregex/cwd/m.zig:1
== style preview grid=160x25
|0: 0-1 d,#1d2824, 2-159 #b2c3b8,#1d2824,
|1: 0-1 d,#887455, 2-159 #becfc4,#314738,
-|2: 0-1 d,#add38a, 2-31 #becfc4,#314738, 32-37 #dfbce5,#314738, 38-159 #becfc4,#314738,
-|3: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-10 #f5f7ee,#3c614a, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-18 #e5eee5,#0d1410, 19-19 #f8c082,#0d1410, 20-143 #e5eee5,#0d1410, 144-145 #e5eee5,#1d2824, 146-159 #b2c3b8,#1d2824,
-|4: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-10 #f5f7ee,#243a2d, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-18 #e5eee5,#0d1410, 19-19 #f8c082,#0d1410, 20-159 #e5eee5,#0d1410,
-|5: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-10 #f5f7ee,#243a2d, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-20 #e5eee5,#0d1410, 21-21 #f8c082,#0d1410, 22-159 #e5eee5,#0d1410,
+|2: 0-1 #000000,#add38a, 2-31 #becfc4,#2c2819, 32-37 #dfbce5,#2c2819, 38-42 #becfc4,#2c2819, 43-43 #add38a,#2c2819,b 44-44 #add38a,#2c2819, 45-49 #becfc4,#2c2819, 50-57 #becfc4,#2c2819,f 58-100 #becfc4,#2c2819, 101-128 #becfc4,#2c2819,f 129-159 #becfc4,#2c2819,
+|3: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-5 #616f64,#0d1410,b 6-6 #add38a,#0d1410,b 7-10 #f5f7ee,#3c614a, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-18 #e5eee5,#0d1410, 19-19 #f8c082,#0d1410, 20-159 #e5eee5,#0d1410,
+|4: 0-0 d,#608269, 1-4 d,#0d1410, 5-5 #59675c,#0d1410, 6-6 #add38a,#0d1410, 7-10 #f5f7ee,#243a2d, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-18 #e5eee5,#0d1410, 19-19 #f8c082,#0d1410, 20-159 #e5eee5,#0d1410,
+|5: 0-0 d,#608269, 1-4 d,#0d1410, 5-5 #59675c,#0d1410, 6-6 #add38a,#0d1410, 7-10 #f5f7ee,#243a2d, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-20 #e5eee5,#0d1410, 21-21 #f8c082,#0d1410, 22-159 #e5eee5,#0d1410,
|6: 0-0 d,#608269, 1-4 d,#0d1410, 5-159 #59675c,#0d1410,
|7: 0-0 d,#608269, 1-159 d,#0d1410,
|8: 0-0 d,#608269, 1-159 d,#0d1410,
@@ -33,30 +52,44 @@
|21: 0-0 d,#608269, 1-159 d,#0d1410,
|22: 0-0 d,#608269, 1-159 d,#0d1410,
|23: 0-0 d,#608269, 1-159 d,#0d1410,
-|24: 0-0 d,#608269, 1-159 d,#0d1410,
+|24: 0-1 d,#1d2824, 2-159 #b2c3b8,#1d2824,
== snap three-selected grid=160x25 cursor=11,3
+|2: Edit x/const/ › /tmp/pardes-snap/selregex/cwd/m.zig Keep Save Term Collapse Follow TreeContext Def Refs Del
|3: 1 const one = 1;
+|4: 2 const two = 2;
+|5: 3 const three = 3;
== style three-selected grid=160x25
+|2: 0-1 d,#add38a, 2-47 #becfc4,#2c2819, 48-53 #dfbce5,#2c2819, 54-159 #becfc4,#2c2819,
|3: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-11 #f5f7ee,#3c614a, 12-12 #f5f7ee,#0d1410, 13-18 #e5eee5,#0d1410, 19-19 #f8c082,#0d1410, 20-159 #e5eee5,#0d1410,
-== snap narrowed grid=160x25 cursor=159,3
-|3: 1 const one = 1; Select /t
+|4: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-10 #f5f7ee,#243a2d, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-18 #e5eee5,#0d1410, 19-19 #f8c082,#0d1410, 20-159 #e5eee5,#0d1410,
+|5: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-10 #f5f7ee,#243a2d, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-20 #e5eee5,#0d1410, 21-21 #f8c082,#0d1410, 22-159 #e5eee5,#0d1410,
+== snap narrowed grid=160x25 cursor=62,2
+|2: ^ Edit x/const/ › /tmp/pardes-snap/selregex/cwd/m.zig Keep s t = Exec Edit x/t/ 3 selections in 3 lines ⏎ select · C-r history · esc
+|3: 1┃const one = 1;
+|4: 2┃const two = 2;
+|5: 3┃const three = 3;
== style narrowed grid=160x25
-|3: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-18 #e5eee5,#0d1410, 19-19 #f8c082,#0d1410, 20-147 #e5eee5,#0d1410, 148-149 #e5eee5,#1d2824, 150-159 #b2c3b8,#1d2824,
-|4: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-18 #e5eee5,#0d1410, 19-19 #f8c082,#0d1410, 20-159 #e5eee5,#0d1410,
-|5: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-20 #e5eee5,#0d1410, 21-21 #f8c082,#0d1410, 22-159 #e5eee5,#0d1410,
+|2: 0-1 #000000,#add38a, 2-47 #becfc4,#2c2819, 48-53 #dfbce5,#2c2819, 54-58 #becfc4,#2c2819, 59-59 #add38a,#2c2819,b 60-60 #add38a,#2c2819, 61-61 #becfc4,#2c2819, 62-69 #becfc4,#2c2819,f 70-108 #becfc4,#2c2819, 109-136 #becfc4,#2c2819,f 137-159 #becfc4,#2c2819,
+|3: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-5 #616f64,#0d1410,b 6-6 #add38a,#0d1410,b 7-10 #e5eee5,#0d1410, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-18 #e5eee5,#0d1410, 19-19 #f8c082,#0d1410, 20-159 #e5eee5,#0d1410,
+|4: 0-0 d,#608269, 1-4 d,#0d1410, 5-5 #59675c,#0d1410, 6-6 #add38a,#0d1410, 7-10 #e5eee5,#0d1410, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-18 #e5eee5,#0d1410, 19-19 #f8c082,#0d1410, 20-159 #e5eee5,#0d1410,
+|5: 0-0 d,#608269, 1-4 d,#0d1410, 5-5 #59675c,#0d1410, 6-6 #add38a,#0d1410, 7-10 #e5eee5,#0d1410, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-20 #e5eee5,#0d1410, 21-21 #f8c082,#0d1410, 22-159 #e5eee5,#0d1410,
== snap esc-restores grid=160x25 cursor=11,3
+|2: Edit x/const/ › /tmp/pardes-snap/selregex/cwd/m.zig Keep Save Term Collapse Follow TreeContext Def Refs Del
|3: 1 const one = 1;
+|4: 2 const two = 2;
+|5: 3 const three = 3;
== style esc-restores grid=160x25
+|2: 0-1 d,#add38a, 2-47 #becfc4,#2c2819, 48-53 #dfbce5,#2c2819, 54-159 #becfc4,#2c2819,
|3: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-11 #f5f7ee,#3c614a, 12-12 #f5f7ee,#0d1410, 13-18 #e5eee5,#0d1410, 19-19 #f8c082,#0d1410, 20-159 #e5eee5,#0d1410,
|4: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-10 #f5f7ee,#243a2d, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-18 #e5eee5,#0d1410, 19-19 #f8c082,#0d1410, 20-159 #e5eee5,#0d1410,
|5: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-10 #f5f7ee,#243a2d, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-20 #e5eee5,#0d1410, 21-21 #f8c082,#0d1410, 22-159 #e5eee5,#0d1410,
== snap commented grid=160x25 cursor=14,3
-|2: */tmp/pardes-snap/selregex/cwd/m.zig Save Term Collapse Follow TreeContext Def Refs Del
+|2: *Edit x/const/ › /tmp/pardes-snap/selregex/cwd/m.zig Save Term Collapse Follow TreeContext Def Refs Del
|3: 1 // const one = 1;
|4: 2 // const two = 2;
|5: 3 // const three = 3;
== snap uncommented grid=160x25 cursor=11,3
-|2: /tmp/pardes-snap/selregex/cwd/m.zig Save Term Collapse Follow TreeContext Def Refs Del
+|2: Edit x/const/ › /tmp/pardes-snap/selregex/cwd/m.zig Save Term Collapse Follow TreeContext Def Refs Del
|3: 1 const one = 1;
|4: 2 const two = 2;
|5: 3 const three = 3;
diff --git a/test/snapshots/shellset.golden b/test/snapshots/shellset.golden
index e4b233a5..af349c29 100644
--- a/test/snapshots/shellset.golden
+++ b/test/snapshots/shellset.golden
@@ -1,13 +1,31 @@
== snap boot grid=90x21 cursor=7,3
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/shellset/cwd/cmd.txt Save Term Collapse Follow Del
+| /tmp/pardes-snap/shellset/cwd/cmd.txt Keep Save Term Collapse Follow Del
| 1 Shell zznosuchshell
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/shellset/cwd/cmd.txt:1
== snap builtin-ran grid=90x21 cursor=25,3
-|3: Shell: shell "zznosuchshell" not found (a name on the usual paths, or a path to one)
+|2: ✗/tmp/pardes-snap/shellset/cwd/cmd.txt Keep Save Term Collapse Follow Del
+|20: ✗ /tmp/pardes-snap/shellset/cwd/cmd.txt Shell: shell "zznosuchshel 3 messages · SPC h m
== snap fallback-shell grid=90x21 cursor=49,6
|1: New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
-|2: /tmp/pardes-snap/shellset/cwd/cmd.txt Save /tmp/pardes-snap/shellset/cwd Term+bash Sav
-|3: Term Collapse Follow Del e Mode Filter Collapse Del
+|2: ✗/tmp/pardes-snap/shellset/cwd/cmd.txt Keep /tmp/pardes-snap/shellset/cwd Term+bash Sav
+|3: Save Term Collapse Follow Del e Mode Filter Collapse Del
|4: 1 Shell zznosuchshell ls
|5: cmd.txt zmarkfile.txt
diff --git a/test/snapshots/shrinktag.golden b/test/snapshots/shrinktag.golden
index c8ef1a13..7d57d2b3 100644
--- a/test/snapshots/shrinktag.golden
+++ b/test/snapshots/shrinktag.golden
@@ -15,11 +15,21 @@
|
|
|
-|
| /tmp/pardes-snap/shrinktag/cwd Term+bash Save Mo
| de Filter Collapse Del
| ls
| w.txt
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| · @p1 a copy of the terminal's text: Tab or B2 runs it; what the program draw 1 message · SPC h m
== snap shrunk grid=100x31 cursor=hidden
|4: w.txt ls
|5: w.txt
@@ -27,10 +37,10 @@
|7: de Filter Collapse Del
|8: ls
|9: w.txt
+|16:
|17:
|18:
|19:
-|20:
== snap move-preview grid=100x31 cursor=hidden
== snap restored grid=100x31 cursor=4,9
|4: ls ls
@@ -48,6 +58,6 @@
|18:
|19:
|20:
-|27: /tmp/pardes-snap/shrinktag/cwd Term+bash Save Mo
-|28: de Filter Collapse Del
-|29: w.txt
+|26: /tmp/pardes-snap/shrinktag/cwd Term+bash Save Mo
+|27: de Filter Collapse Del
+|28: w.txt
diff --git a/test/snapshots/stepgrain.golden b/test/snapshots/stepgrain.golden
index 9af17689..cfcfd27c 100644
--- a/test/snapshots/stepgrain.golden
+++ b/test/snapshots/stepgrain.golden
@@ -1,7 +1,19 @@
-== snap results grid=150x31 cursor=13,13
+== snap results grid=150x31 cursor=59,2
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/stepgrain/cwd/a.txt Save Term Collapse Follow Del
+|^ /tmp/pardes-snap/stepgrain/cwd/a.txt Keep ␣ f Grep ZQMARK 1/3
+| │ │ Walk Look Split Newcol Grep Edit Copy Keep Drop | Find Recent Panes Symbols All Jumplist
+| │ │ ▶ a.txt:1 hello ZQMARK one
+| │ │ a.txt:2 see also sub/b.txt for ZQMARK two
+| │ │ sub/b.txt:1 ZQMARK inside sub
+| │ │
+| │ │
+| │ │
+| │ │
+| │ │
+| │ │
+| │ │
+| │ │
| 1 hello ZQMARK one
| 2 see also sub/b.txt for ZQMARK two
|
@@ -11,78 +23,102 @@
|
|
|
-|^ +Search 1/3 Del
-| Grep ZQMARK
-| a.txt
-| a.txt:1:7 hello ZQMARK one
-| a.txt:2:24 see also sub/b.txt for ZQMARK two
-| sub/b.txt
-| sub/b.txt:1:1 ZQMARK inside sub
|
|
|
-| /tmp/pardes-snap/stepgrain/cwd/+Preview Del
-| 1
-== snap step-row2 grid=150x31 cursor=13,13
-|12: ^ +Search 2/3 Del
+|
+|
+|
+| ✓ /tmp/pardes-snap/stepgrain/cwd/a.txt Grep 1 message · SPC h m
+== snap step-row2 grid=150x31 cursor=59,2
+|2: ^ /tmp/pardes-snap/stepgrain/cwd/a.txt Keep ␣ f Grep ZQMARK 2/3
+|4: │ │ a.txt:1 hello ZQMARK one
+|5: │ │ ▶ a.txt:2 see also sub/b.txt for ZQMARK two
== style step-row2 grid=150x31
|0: 0-1 d,#1d2824, 2-149 #b2c3b8,#1d2824,
|1: 0-1 d,#887455, 2-149 #becfc4,#314738,
-|2: 0-1 d,#496656, 2-32 #b2c3b8,#1d2824, 33-38 #d3b0d9,#1d2824, 39-149 #b2c3b8,#1d2824,
-|3: 0-0 d,#5e4923, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-18 #e5eee5,#352e19, 19-149 #e5eee5,#0d1410,
-|4: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-29 #e5eee5,#0d1410, 30-35 #f5f7ee,#3c614a, 36-36 #f5f7ee,#0d1410, 37-149 #e5eee5,#0d1410,
-|5: 0-0 d,#608269, 1-149 d,#0d1410,
-|6: 0-0 d,#608269, 1-149 d,#0d1410,
-|7: 0-0 d,#e5eee5, 1-149 d,#0d1410,
-|8: 0-0 d,#608269, 1-149 d,#0d1410,
-|9: 0-0 d,#608269, 1-149 d,#0d1410,
-|10: 0-0 d,#608269, 1-149 d,#0d1410,
-|11: 0-0 d,#608269, 1-149 d,#0d1410,
-|12: 0-1 #000000,#add38a, 2-149 #becfc4,#314738,
-|13: 0-0 d,#608269, 1-1 d,#0d1410, 2-149 #e5eee5,#0d1410,
-|14: 0-0 d,#608269, 1-1 d,#0d1410, 2-149 #e5eee5,#0d1410,
-|15: 0-0 d,#608269, 1-1 d,#0d1410, 2-14 #59675c,#0d1410, 15-20 #e5eee5,#0d1410, 21-26 #f7e4a5,#5e4923, 27-27 #f7e4a5,#0d1410, 28-149 #e5eee5,#0d1410,
-|16: 0-0 d,#608269, 1-1 d,#0d1410, 2-14 #59675c,#243a2d, 15-37 #e5eee5,#243a2d, 38-43 #f7e4a5,#5e4923, 44-44 #f7e4a5,#243a2d, 45-149 #e5eee5,#243a2d,
-|17: 0-0 d,#608269, 1-1 d,#0d1410, 2-149 #e5eee5,#0d1410,
-|18: 0-0 d,#608269, 1-1 d,#0d1410, 2-18 #59675c,#0d1410, 19-24 #f7e4a5,#5e4923, 25-25 #f7e4a5,#0d1410, 26-149 #e5eee5,#0d1410,
+|2: 0-1 #000000,#add38a, 2-32 #becfc4,#2c2819, 33-38 #dfbce5,#2c2819, 39-43 #becfc4,#2c2819, 44-44 #add38a,#2c2819,b 45-45 #add38a,#2c2819, 46-46 #add38a,#2c2819,b 47-47 #add38a,#2c2819, 48-149 #becfc4,#2c2819,
+|3: 0-43 d,#2c2819, 44-44 #add38a,#2c2819,b 45-45 #add38a,#2c2819, 46-46 #add38a,#2c2819,b 47-47 #add38a,#2c2819, 48-149 #becfc4,#2c2819,
+|4: 0-43 d,#2c2819, 44-49 #add38a,#2c2819, 50-57 #dfbce5,#2c2819, 58-63 #becfc4,#2c2819, 64-69 #becfc4,#5e4923, 70-149 #becfc4,#2c2819,
+|5: 0-43 d,#2c2819, 44-49 #add38a,#2c2819, 50-57 #dfbce5,#3c614a, 58-80 #f5f7ee,#3c614a, 81-86 #f5f7ee,#5e4923, 87-90 #f5f7ee,#3c614a, 91-149 #f5f7ee,#2c2819,
+|6: 0-43 d,#2c2819, 44-49 #add38a,#2c2819, 50-61 #dfbce5,#2c2819, 62-67 #becfc4,#5e4923, 68-149 #becfc4,#2c2819,
+|7: 0-43 d,#2c2819, 44-149 #add38a,#2c2819,
+|8: 0-43 d,#2c2819, 44-149 #add38a,#2c2819,
+|9: 0-43 d,#2c2819, 44-149 #add38a,#2c2819,
+|10: 0-43 d,#2c2819, 44-149 #add38a,#2c2819,
+|11: 0-43 d,#2c2819, 44-149 #add38a,#2c2819,
+|12: 0-43 d,#2c2819, 44-149 #add38a,#2c2819,
+|13: 0-43 d,#2c2819, 44-149 #add38a,#2c2819,
+|14: 0-43 d,#2c2819, 44-149 #add38a,#2c2819,
+|15: 0-0 d,#5e4923, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-18 #e5eee5,#352e19, 19-149 #e5eee5,#0d1410,
+|16: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-29 #e5eee5,#0d1410, 30-35 #e5eee5,#352e19, 36-149 #e5eee5,#0d1410,
+|17: 0-0 d,#608269, 1-149 d,#0d1410,
+|18: 0-0 d,#608269, 1-149 d,#0d1410,
|19: 0-0 d,#608269, 1-149 d,#0d1410,
|20: 0-0 d,#608269, 1-149 d,#0d1410,
|21: 0-0 d,#608269, 1-149 d,#0d1410,
-|22: 0-1 d,#496656, 2-32 #b2c3b8,#1d2824, 33-41 #d3b0d9,#1d2824, 42-149 #b2c3b8,#1d2824,
-|23: 0-0 d,#608269, 1-4 d,#0d1410, 5-149 #59675c,#0d1410,
+|22: 0-0 d,#5e4923, 1-149 d,#0d1410,
+|23: 0-0 d,#608269, 1-149 d,#0d1410,
|24: 0-0 d,#608269, 1-149 d,#0d1410,
|25: 0-0 d,#608269, 1-149 d,#0d1410,
|26: 0-0 d,#608269, 1-149 d,#0d1410,
|27: 0-0 d,#608269, 1-149 d,#0d1410,
|28: 0-0 d,#608269, 1-149 d,#0d1410,
|29: 0-0 d,#608269, 1-149 d,#0d1410,
-|30: 0-0 d,#608269, 1-149 d,#0d1410,
-== snap step-row3 grid=150x31 cursor=13,13
-|12: ^ +Search 3/3 Del
-|22: /tmp/pardes-snap/stepgrain/cwd/sub/b.txt Del
-|23: 1 ZQMARK inside sub
-== snap step-wrap grid=150x31 cursor=13,13
-|12: ^ +Search 1/3 Del
-== snap blank-in-path grid=150x31 cursor=12,13
-|12: ^ +Search 1/1 Del
-|13: Find words
-|14: two words.txt
-|15:
+|30: 0-1 d,#1d2824, 2-149 #67756e,#1d2824,
+== snap step-row3 grid=150x31 cursor=58,2
+|2: ^ /tmp/pardes-snap/stepgrain/cwd/sub/b.txt ␣ f Grep ZQMARK 3/3
+|3: │ │ Walk Look Split Newcol Grep Edit Copy Keep Drop | Find Recent Panes Symbols All Jumplist
+|4: │ │ a.txt:1 hello ZQMARK one
+|5: │ │ a.txt:2 see also sub/b.txt for ZQMARK two
+|6: │ │ ▶ sub/b.txt:1 ZQMARK inside sub
+|7: │ │
+|8: │ │
+|9: │ │
+|10: │ │
+|11: │ │
+|12: │ │
+|13: │ │
+|14: │ │
+|15: 1 ZQMARK inside sub
|16:
-|17:
-|18:
-|22: /tmp/pardes-snap/stepgrain/cwd/two words.txt Del
-|23: 1
+== snap step-wrap grid=150x31 cursor=58,2
+== snap blank-in-path grid=150x31 cursor=58,2
+|2: ^ /tmp/pardes-snap/stepgrain/cwd/a.txt Keep ␣ f Find words 1/1
+|3: │ │ Walk Look Split Newcol Grep Edit Copy Keep Drop | Grep Recent Panes Symbols All Jumplist
+|4: │ │ ▶ two words.txt
+|5: │ │
+|6: │ │
+|7: 1 hello ZQMARK one
+|8: 2 see also sub/b.txt for ZQMARK two
+|9:
+|10:
+|11:
+|12:
+|13:
+|14:
+|15:
+|30: ✓ /tmp/pardes-snap/stepgrain/cwd/a.txt Find 2 messages · SPC h m
== style blank-in-path grid=150x31
-|3: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-149 #e5eee5,#0d1410,
-|4: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-149 #e5eee5,#0d1410,
-|7: 0-0 d,#608269, 1-149 d,#0d1410,
-|14: 0-0 d,#608269, 1-1 d,#0d1410, 2-5 #e5eee5,#243a2d, 6-10 #f7e4a5,#5e4923,b 11-149 #e5eee5,#243a2d,
+|4: 0-43 d,#2c2819, 44-49 #add38a,#2c2819, 50-53 #f5f7ee,#3c614a, 54-58 #f5f7ee,#5e4923, 59-62 #f5f7ee,#3c614a, 63-149 #f5f7ee,#2c2819,
+|5: 0-43 d,#2c2819, 44-149 #add38a,#2c2819,
+|6: 0-43 d,#2c2819, 44-149 #add38a,#2c2819,
+|7: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-149 #e5eee5,#0d1410,
+|8: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-149 #e5eee5,#0d1410,
+|9: 0-0 d,#608269, 1-149 d,#0d1410,
+|10: 0-0 d,#608269, 1-149 d,#0d1410,
+|11: 0-0 d,#608269, 1-149 d,#0d1410,
+|12: 0-0 d,#608269, 1-149 d,#0d1410,
+|13: 0-0 d,#608269, 1-149 d,#0d1410,
+|14: 0-0 d,#608269, 1-149 d,#0d1410,
|15: 0-0 d,#608269, 1-149 d,#0d1410,
|16: 0-0 d,#608269, 1-149 d,#0d1410,
-|17: 0-0 d,#608269, 1-149 d,#0d1410,
-|18: 0-0 d,#608269, 1-149 d,#0d1410,
-|22: 0-1 d,#496656, 2-32 #b2c3b8,#1d2824, 33-46 #d3b0d9,#1d2824, 47-149 #b2c3b8,#1d2824,
-== snap blank-opened grid=150x31 cursor=7,23
-|12: +Search 1/1 Save Undock Del
-|22: /tmp/pardes-snap/stepgrain/cwd/two words.txt Save Term Collapse Follow Del
+|22: 0-0 d,#608269, 1-149 d,#0d1410,
+== snap blank-opened grid=150x31 cursor=7,3
+|2: a.txt:1 › Find words 1/1 › /tmp/pardes-snap/stepgrain/cwd/two words.txt Keep Save Term Collapse Follow Del
+|3: 1
+|4:
+|5:
+|6:
+|7:
+|8:
diff --git a/test/snapshots/syntax.golden b/test/snapshots/syntax.golden
index 2cdda6d4..58865398 100644
--- a/test/snapshots/syntax.golden
+++ b/test/snapshots/syntax.golden
@@ -1,48 +1,59 @@
-== snap zig-open grid=150x31 cursor=7,8
+== snap zig-open grid=150x31 cursor=82,18
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
| /tmp/pardes-snap/syntax/cwd Term+bash Save Mode Filter Collapse Del /tmp/pardes-snap/syntax/cwd Term+bash Save Mode Filter Collapse Del
| ls ls
| demo.zig demo.zig
|
-| /tmp/pardes-snap/syntax/cwd/demo.zig Save Term Collapse Follow TreeContex
-| t Def Refs Del
-| 1 const std = @import("std"); // greet
-| 2 pub fn main() void {
-| 3 var x: u32 = 42;
-| 4 _ = x;
-| 5 }
|
|
+| demo.zig
|
|
-| /tmp/pardes-snap/syntax/cwd Term+bash Save Mode Filter Collapse Del
-| ls
-| demo.zig
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/syntax/cwd Term+bash Save Mode Filter Collapse Del ‹@p1 › /tmp/pardes-snap/syntax/cwd/demo.zig Keep Save Term Collapse Follo
+| ls w TreeContext Def Refs Del
+| demo.zig 1 const std = @import("std"); // greet
+| 2 pub fn main() void {
+| 3 var x: u32 = 42;
+| 4 _ = x;
+| 5 }
+|
+|
+|
+|
+|
+|
+|
+| · @p1 a copy of the terminal's text: Tab or B2 runs it; what the program draws next replaces it (Ctrl-b types to the program) 1 message · SPC h m
== style zig-open grid=150x31
|0: 0-1 d,#1d2824, 2-149 #b2c3b8,#1d2824,
-|1: 0-1 d,#887455, 2-74 #becfc4,#314738, 75-76 #becfc4,#887455, 77-149 #b2c3b8,#1d2824,
+|1: 0-1 d,#887455, 2-74 #b2c3b8,#1d2824, 75-76 #b2c3b8,#887455, 77-149 #becfc4,#314738,
|2: 0-1 d,#496656, 2-29 #b2c3b8,#1d2824, 30-39 #d3b0d9,#1d2824, 40-74 #b2c3b8,#1d2824, 75-76 #b2c3b8,#496656, 77-104 #b2c3b8,#1d2824, 105-114 #d3b0d9,#1d2824, 115-149 #b2c3b8,#1d2824,
|3: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
|4: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
|5: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|6: 0-1 d,#add38a, 2-29 #becfc4,#314738, 30-38 #dfbce5,#314738, 39-74 #becfc4,#314738, 75-75 #becfc4,#608269, 76-149 #becfc4,#0d1410,
-|7: 0-1 d,#314738, 2-74 #becfc4,#314738, 75-75 #becfc4,#608269, 76-149 #becfc4,#0d1410,
-|8: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-18 #e5eee5,#0d1410, 19-25 #c9a7ed,#0d1410, 26-26 #e5eee5,#0d1410, 27-31 #b8d88a,#0d1410, 32-34 #e5eee5,#0d1410, 35-74 #b9f480,#0d1410, 75-75 #b9f480,#608269, 76-149 #b9f480,#0d1410,
-|9: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-13 #c9a7ed,#0d1410, 14-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|10: 0-0 d,#608269, 1-4 d,#0d1410, 5-10 #59675c,#0d1410, 11-23 #e5eee5,#0d1410, 24-25 #f8c082,#0d1410, 26-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|11: 0-0 d,#608269, 1-4 d,#0d1410, 5-10 #59675c,#0d1410, 11-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|12: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
+|6: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
+|7: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
+|8: 0-0 d,#608269, 1-3 d,#0d1410, 4-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
+|9: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
+|10: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
+|11: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
+|12: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
|13: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
|14: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
|15: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|16: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|17: 0-1 d,#496656, 2-29 #b2c3b8,#1d2824, 30-39 #d3b0d9,#1d2824, 40-74 #b2c3b8,#1d2824, 75-75 #b2c3b8,#608269, 76-149 #b2c3b8,#0d1410,
-|18: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|19: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
-|20: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|21: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|22: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
+|16: 0-1 d,#496656, 2-29 #b2c3b8,#1d2824, 30-39 #d3b0d9,#1d2824, 40-74 #b2c3b8,#1d2824, 75-76 #b2c3b8,#add38a, 77-111 #becfc4,#2c2819, 112-120 #dfbce5,#2c2819, 121-149 #becfc4,#2c2819,
+|17: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-76 #e5eee5,#2c2819, 77-149 #becfc4,#2c2819,
+|18: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-76 #e5eee5,#0d1410, 77-79 #e5eee5,#0d1410,b 80-81 #616f64,#0d1410,b 82-93 #e5eee5,#0d1410, 94-100 #c9a7ed,#0d1410, 101-101 #e5eee5,#0d1410, 102-106 #b8d88a,#0d1410, 107-109 #e5eee5,#0d1410, 110-149 #b9f480,#0d1410,
+|19: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-79 d,#0d1410, 80-81 #59675c,#0d1410, 82-85 #e5eee5,#0d1410, 86-88 #c9a7ed,#0d1410, 89-149 #e5eee5,#0d1410,
+|20: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-79 d,#0d1410, 80-85 #59675c,#0d1410, 86-98 #e5eee5,#0d1410, 99-100 #f8c082,#0d1410, 101-149 #e5eee5,#0d1410,
+|21: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-79 d,#0d1410, 80-85 #59675c,#0d1410, 86-149 #e5eee5,#0d1410,
+|22: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-79 d,#0d1410, 80-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410,
|23: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
|24: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
|25: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
@@ -50,4 +61,4 @@
|27: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
|28: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
|29: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
-|30: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410,
+|30: 0-1 d,#1d2824, 2-149 #67756e,#1d2824,
diff --git a/test/snapshots/tag.golden b/test/snapshots/tag.golden
index c14c41b0..df7c1890 100644
--- a/test/snapshots/tag.golden
+++ b/test/snapshots/tag.golden
@@ -15,16 +15,28 @@
|
|
|
-|
| /tmp/pardes-snap/tag/cwd Term+bash Save Mode Filter Collapse Del
| ls
| t.txt
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/tag/cwd
== snap tag-typed grid=150x31 cursor=42,2
|2: /tmp/pardes-snap/tag/cwd Term+bash t.txt Save Mode Filter Collapse Del /tmp/pardes-snap/tag/cwd Term+bash Save Mode Filter Collapse Del
== snap tag-del grid=150x31 cursor=38,2
|2: /tmp/pardes-snap/tag/cwd Term+bash t Save Mode Filter Collapse Del /tmp/pardes-snap/tag/cwd Term+bash Save Mode Filter Collapse Del
== snap tag-exit grid=150x31 cursor=4,5
|2: /tmp/pardes-snap/tag/cwd Term+bash t.txt Save Mode Filter Collapse Del /tmp/pardes-snap/tag/cwd Term+bash Save Mode Filter Collapse Del
-== snap tag-look grid=150x31 cursor=7,7
-|6: /tmp/pardes-snap/tag/cwd/t.txt Save Term Collapse Follow Del
-|7: 1 ZZLOOKED
+== snap tag-look grid=150x31 cursor=82,17
+|16: /tmp/pardes-snap/tag/cwd Term+bash Save Mode Filter Collapse Del ‹@p1 › /tmp/pardes-snap/tag/cwd/t.txt Keep Save Term Collapse Follow Del
+|17: ls 1 ZZLOOKED
+|30: /tmp/pardes-snap/tag/cwd/t.txt:1
diff --git a/test/snapshots/tagalign.golden b/test/snapshots/tagalign.golden
index b4353a14..1241b920 100644
--- a/test/snapshots/tagalign.golden
+++ b/test/snapshots/tagalign.golden
@@ -1,52 +1,136 @@
== snap aligned grid=100x31 cursor=4,10
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/tagalign/cwd/deep/nested-project-directory/document.txt Save Term Collapse Follow
-| Del
+| /tmp/pardes-snap/tagalign/cwd/deep/nested-project-directory/document.txt Keep Save Term Collapse F
+| ollow Del
| 1 alpha
| 2 beta
| 3 gamma
| /tmp/pardes-snap/tagalign/cwd Term+bash Save Mode Filter Collapse Del
| ls
| deep
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/tagalign/cwd
== snap fits grid=87x31 cursor=4,10
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/tagalign/cwd/deep/nested-project-directory/document.txt Save Term Co
-| llapse Follow Del
+| /tmp/pardes-snap/tagalign/cwd/deep/nested-project-directory/document.txt Keep Save Te
+| rm Collapse Follow Del
| 1 alpha
| 2 beta
| 3 gamma
| /tmp/pardes-snap/tagalign/cwd Term+bash Save Mode Filter Collapse Del
| ls
| deep
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/tagalign/cwd
== snap overby1 grid=86x31 cursor=4,10
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/tagalign/cwd/deep/nested-project-directory/document.txt Save Term C
-| ollapse Follow Del
+| /tmp/pardes-snap/tagalign/cwd/deep/nested-project-directory/document.txt Keep Save T
+| erm Collapse Follow Del
| 1 alpha
| 2 beta
| 3 gamma
| /tmp/pardes-snap/tagalign/cwd Term+bash Save Mode Filter Collapse Del
| ls
| deep
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/tagalign/cwd
== snap clicked grid=100x31 cursor=11,2
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/tagalign/cwd/deep/nested-project-directory/document.txt Save Term Collapse Follow
-| Del
+| /tmp/pardes-snap/tagalign/cwd/deep/nested-project-directory/document.txt Keep Save Term Collapse F
+| ollow Del
| 1 alpha
| 2 beta
| 3 gamma
| /tmp/pardes-snap/tagalign/cwd Term+bash Save Mode Filter Collapse Del
| ls
| deep
-== snap revealed grid=70x31 cursor=36,3
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/tagalign/cwd/deep/nested-project-directory/document.txt:1
+== snap revealed grid=70x31 cursor=41,3
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config His
| New Term Find Grep Joincol Delcol
| /tmp/pardes-snap/tagalign/cwd/deep/nested-project-directory/document
-| .txt Save Term Collapse Follow Del
+| .txt Keep Save Term Collapse Follow Del
| 1 alpha
| 2 beta
| 3 gamma
@@ -54,6 +138,26 @@
| l
| ls
| deep
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| · /tmp/pardes-snap/tagalign/cwd/deep/nested-pro 1 message · SPC h m
== snap alone grid=70x31 cursor=4,6
|2: /tmp/pardes-snap/tagalign/cwd Term+bash Save Mode Filter Collapse De
|3: l
@@ -64,3 +168,4 @@
|8:
|9:
|10:
+|30: ✓ /tmp/pardes-snap/tagalign/cwd/deep/nested-pr 3 messages · SPC h m
diff --git a/test/snapshots/tagalign2col.golden b/test/snapshots/tagalign2col.golden
index 7492797a..a7c8d251 100644
--- a/test/snapshots/tagalign2col.golden
+++ b/test/snapshots/tagalign2col.golden
@@ -1,18 +1,42 @@
== snap onecol grid=160x31 cursor=7,4
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/tagalign2col/cwd/deep/proj/document.txt Save Term Collapse Fo /tmp/pardes-snap/tagalign2col/cwd Term+bash Save Mode Filter Collapse Del
-| llow Del ls
+| /tmp/pardes-snap/tagalign2col/cwd/deep/proj/document.txt Keep Save Term Collap /tmp/pardes-snap/tagalign2col/cwd Term+bash Save Mode Filter Collapse Del
+| se Follow Del ls
| 1 alpha deep
| 2 beta
| 3 gamma
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| ✓ @p2 Window 1 message · SPC h m
== snap aligned grid=160x31 cursor=4,10
|7: /tmp/pardes-snap/tagalign2col/cwd Term+bash Save Mode Filter Collapse Del
|8: ls
|9: deep
== snap widened grid=160x31 cursor=4,10
|1: New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
-|2: /tmp/pardes-snap/tagalign2col/cwd/deep/proj/document.txt Save Term Collapse Follow Del /tmp/pardes-snap/tagalign2col/cwd Term+bash Save Mode Filt
+|2: /tmp/pardes-snap/tagalign2col/cwd/deep/proj/document.txt Keep Save Term Collapse Follow Del /tmp/pardes-snap/tagalign2col/cwd Term+bash Save Mode Filt
|3: 1 alpha er Collapse Del
|4: 2 beta ls
|5: 3 gamma deep
diff --git a/test/snapshots/tagcmd.golden b/test/snapshots/tagcmd.golden
index 0b71f106..2a4af522 100644
--- a/test/snapshots/tagcmd.golden
+++ b/test/snapshots/tagcmd.golden
@@ -9,11 +9,32 @@
| 5 line 5
| 6 line 6
| ~
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/tagcmd/cwd/c.txt:1
== snap colon grid=100x31 cursor=36,2
== snap word grid=100x31 cursor=40,2
== snap saved grid=100x31 cursor=13,3
|2: /tmp/pardes-snap/tagcmd/cwd/c.txt Save Term Collapse Follow Del
-|3: 1 ZZEDITline 1 --:--:-- saved /tmp/pardes-snap/tagcmd/cwd/c.txt
+|30: · saved /tmp/pardes-snap/tagcmd/cwd/c.txt 3 messages · SPC h m
== file written
ZZEDITline 1
line 2
@@ -24,4 +45,3 @@ line 6
== end file
== snap escaped grid=100x31 cursor=13,3
-|3: 1 ZZEDITline 1
diff --git a/test/snapshots/tagnav.golden b/test/snapshots/tagnav.golden
index 748330fd..e8cea3e9 100644
--- a/test/snapshots/tagnav.golden
+++ b/test/snapshots/tagnav.golden
@@ -1,8 +1,8 @@
== snap start grid=100x31 cursor=7,4
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/tagnav/cwd/w.txt Save Term Coll /tmp/pardes-snap/tagnav/cwd Term+bash Save Mode
-| apse Follow Del Filter Collapse Del
+| /tmp/pardes-snap/tagnav/cwd/w.txt Keep Save Term /tmp/pardes-snap/tagnav/cwd Term+bash Save Mode
+| Collapse Follow Del Filter Collapse Del
| 1 alpha ls
| 2 beta w.txt
| 3 gamma
@@ -10,32 +10,53 @@
| Filter Collapse Del
| ls
| w.txt
-== snap colon grid=100x31 cursor=36,2
-== snap word grid=100x31 cursor=40,2
-== snap in-tag grid=100x31 cursor=42,2
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| ✓ @p3 Window 2 messages · SPC h m
+== snap colon grid=100x31 cursor=41,2
+== snap word grid=100x31 cursor=45,2
+== snap in-tag grid=100x31 cursor=47,2
== snap right grid=100x31 cursor=54,6
+|30: ✓ /tmp/pardes-snap/tagnav/cwd/w.txt Window 3 messages · SPC h m
== snap right-tag grid=100x31 cursor=90,2
-== snap left-tag grid=100x31 cursor=42,2
+== snap left-tag grid=100x31 cursor=47,2
+|30: ✓ @p2 Window 4 messages · SPC h m
== snap back-to-body grid=100x31 cursor=7,4
== snap tty-on grid=100x31 cursor=54,6
-|2: /tmp/pardes-snap/tagnav/cwd/w.txt Save Term Coll$ /tmp/pardes-snap/tagnav/cwd Term+bash Save Mode
+|2: /tmp/pardes-snap/tagnav/cwd/w.txt Keep Save Term$ /tmp/pardes-snap/tagnav/cwd Term+bash Save Mode
|4: 1 alpha $ ls
|6: 3 gamma $
+|30: ✓ /tmp/pardes-snap/tagnav/cwd/w.txt Window 5 messages · SPC h m
== snap tty-tag grid=100x31 cursor=95,2
== snap tty-restored grid=100x31 cursor=54,6
== snap column-tag grid=100x31 cursor=2,1
-|2: /tmp/pardes-snap/tagnav/cwd/w.txt Save Term Coll /tmp/pardes-snap/tagnav/cwd Term+bash Save Mode
-|4: 1 alpha Up ls
+|2: /tmp/pardes-snap/tagnav/cwd/w.txt Keep Save Term /tmp/pardes-snap/tagnav/cwd Term+bash Save Mode
+|4: 1 alpha ls
|6: 3 gamma
+|30: ✓ /tmp/pardes-snap/tagnav/cwd/w.txt Up 8 messages · SPC h m
== snap column-word grid=100x31 cursor=5,1
-|4: 1 alpha ls
== snap workspace-tag grid=100x31 cursor=2,0
-|4: 1 alpha Up ls
+|30: ✓ /tmp/pardes-snap/tagnav/cwd/w.txt Up ×2 8 messages · SPC h m
== snap topbar-dollar grid=100x31 cursor=84,0
-|4: 1 alpha ls
== snap topbar-dump-word grid=100x31 cursor=53,0
== snap topbar-exec grid=100x31 cursor=7,4
-|4: 1 alpha Themes ls
|12: /tmp/pardes-snap/tagnav/cwd/+Themes Save Term Co
|13: llapse Follow Del
|14: 1 # Pardes themes
@@ -54,14 +75,14 @@
|27: 14 Theme forge_black
|28: 15 Theme forge_soft
|29: 16 Theme orchard_black
-|30: 17 Theme acme
+|30: ✓ /tmp/pardes-snap/tagnav/cwd/w.txt Themes 10 messages · SPC h m
== snap topbar-restore-word grid=100x31 cursor=75,0
-|4: 1 alpha ls
+|30: ✓ /tmp/pardes-snap/tagnav/cwd/w.txt Up ×2 12 messages · SPC h m
== snap topbar-restored grid=100x31 cursor=7,4
|1: New Term Find Grep Joincol Delcol New Term F╭────────────────────────────────────╮
-|2: /tmp/pardes-snap/tagnav/cwd/w.txt Save Term Coll /tmp/parde│pardes resizes=1 │
-|3: apse Follow Del Filter Col│theme orchard │
-|4: 1 alpha Debug ls │font default │
+|2: /tmp/pardes-snap/tagnav/cwd/w.txt Keep Save Term /tmp/parde│pardes resizes=1 │
+|3: Collapse Follow Del Filter Col│theme orchard │
+|4: 1 alpha ls │font default │
|5: 2 beta w.txt │terms 4 cols 2 │
|6: 3 gamma │active #0 48x3 │
|7: /tmp/pardes-snap/tagnav/cwd Term+bash Save Mode │scroll 0/3 │
@@ -71,3 +92,4 @@
|11: │ │
|12: /tmp/pardes-snap/tagnav/cwd/+Themes Save Term Co │ │
|13: llapse Follow Del ╰────────────────────────────────────╯
+|30: ✓ /tmp/pardes-snap/tagnav/cwd/w.txt Debug 14 messages · SPC h m
diff --git a/test/snapshots/tagpath.golden b/test/snapshots/tagpath.golden
index e9a6234f..a62212bb 100644
--- a/test/snapshots/tagpath.golden
+++ b/test/snapshots/tagpath.golden
@@ -1,19 +1,42 @@
== snap start grid=100x31 cursor=7,3
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/tagpath/cwd/c.txt Save Term Collapse Follow Del
+| /tmp/pardes-snap/tagpath/cwd/c.txt Keep Save Term Collapse Follow Del
| 1 line 1
| 2 line 2
| 3 line 3
| 4 line 4
| ~
-== snap colon grid=100x31 cursor=37,2
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/tagpath/cwd/c.txt:1
+== snap colon grid=100x31 cursor=42,2
== snap col0 grid=100x31 cursor=2,2
== snap sel-path grid=100x31 cursor=35,2
== style sel-path grid=100x31
|0: 0-1 d,#1d2824, 2-99 #b2c3b8,#1d2824,
|1: 0-1 d,#887455, 2-99 #becfc4,#314738,
-|2: 0-1 d,#add38a, 2-35 #f5f7ee,#3c614a, 36-36 #f5f7ee,#314738, 37-99 #becfc4,#314738,
+|2: 0-1 d,#add38a, 2-35 #f5f7ee,#3c614a, 36-36 #f5f7ee,#2c2819, 37-99 #becfc4,#2c2819,
|3: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-99 #e5eee5,#0d1410,
|4: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-99 #e5eee5,#0d1410,
|5: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-99 #e5eee5,#0d1410,
@@ -41,7 +64,7 @@
|27: 0-0 d,#608269, 1-99 d,#0d1410,
|28: 0-0 d,#608269, 1-99 d,#0d1410,
|29: 0-0 d,#608269, 1-99 d,#0d1410,
-|30: 0-0 d,#608269, 1-99 d,#0d1410,
+|30: 0-1 d,#1d2824, 2-99 #b2c3b8,#1d2824,
== snap yanked-path grid=100x31 cursor=41,3
|2: */tmp/pardes-snap/tagpath/cwd/c.txt Save Term Collapse Follow Del
|3: 1 l/tmp/pardes-snap/tagpath/cwd/c.txtine 1
@@ -51,7 +74,9 @@
|3: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-7 #e5eee5,#0d1410, 8-41 #f5f7ee,#3c614a, 42-99 #e5eee5,#0d1410,
== snap name-draft grid=100x31 cursor=10,2
|2: */renamed/tmp/pardes-snap/tagpath/cwd/c.txt Save Term Collapse Follow Del
+|30: ✓ /tmp/pardes-snap/tagpath/cwd/c.txt Last 1 message · SPC h m
== snap name-cancelled grid=100x31 cursor=41,3
|2: */tmp/pardes-snap/tagpath/cwd/c.txt Save Term Collapse Follow Del
+|30: · /tmp/pardes-snap/tagpath/cwd/c.txt name drafted: Enter renames the buffer, 2 messages · SPC h m
== snap name-committed grid=100x31 cursor=41,3
|2: */renamed/tmp/pardes-snap/tagpath/cwd/c.txt Save Term Collapse Follow Del
diff --git a/test/snapshots/theme.golden b/test/snapshots/theme.golden
index e293dc19..0722d2e6 100644
--- a/test/snapshots/theme.golden
+++ b/test/snapshots/theme.golden
@@ -15,11 +15,21 @@
|
|
|
-|
| /tmp/pardes-snap/theme/cwd Term+bash Save Mode F
| ilter Collapse Del
| ls
| t.txt
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/theme/cwd
== style orchard grid=100x31
|0: 0-1 d,#1d2824, 2-99 #b2c3b8,#1d2824,
|1: 0-1 d,#887455, 2-49 #becfc4,#314738, 50-51 #becfc4,#887455, 52-99 #b2c3b8,#1d2824,
@@ -37,11 +47,11 @@
|13: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
|14: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
|15: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
-|16: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
-|17: 0-1 d,#496656, 2-28 #b2c3b8,#1d2824, 29-38 #d3b0d9,#1d2824, 39-49 #b2c3b8,#1d2824, 50-50 #b2c3b8,#608269, 51-99 #b2c3b8,#0d1410,
-|18: 0-1 d,#1d2824, 2-49 #b2c3b8,#1d2824, 50-50 #b2c3b8,#608269, 51-99 #b2c3b8,#0d1410,
+|16: 0-1 d,#496656, 2-28 #b2c3b8,#1d2824, 29-38 #d3b0d9,#1d2824, 39-49 #b2c3b8,#1d2824, 50-50 #b2c3b8,#608269, 51-99 #b2c3b8,#0d1410,
+|17: 0-1 d,#1d2824, 2-49 #b2c3b8,#1d2824, 50-50 #b2c3b8,#608269, 51-99 #b2c3b8,#0d1410,
+|18: 0-0 d,#608269, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
|19: 0-0 d,#608269, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
-|20: 0-0 d,#608269, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
+|20: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
|21: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
|22: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
|23: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
@@ -51,15 +61,15 @@
|27: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
|28: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
|29: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
-|30: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
+|30: 0-1 d,#1d2824, 2-99 #b2c3b8,#1d2824,
== snap dusk grid=100x31 cursor=4,6
-|4: ls NextColor ls
+|30: ✓ @p1 NextColor 1 message · SPC h m
== style dusk grid=100x31
|0: 0-1 d,#2c2630, 2-85 #c6b6c5,#2c2630, 86-94 #fff0eb,#654053, 95-99 #fff0eb,#2c2630,
|1: 0-1 d,#757a5f, 2-49 #d2c2d1,#533d4d, 50-51 #d2c2d1,#757a5f, 52-99 #c6b6c5,#2c2630,
|2: 0-1 d,#edb092, 2-28 #d2c2d1,#533d4d, 29-38 #a1d5c4,#533d4d, 39-49 #d2c2d1,#533d4d, 50-51 #d2c2d1,#745469, 52-78 #c6b6c5,#2c2630, 79-88 #96c9b8,#2c2630, 89-99 #c6b6c5,#2c2630,
|3: 0-1 d,#533d4d, 2-49 #d2c2d1,#533d4d, 50-51 #d2c2d1,#2c2630, 52-99 #c6b6c5,#2c2630,
-|4: 0-0 d,#8e667c, 1-1 d,#39323b, 2-38 #c3b6c1,#39323b, 39-39 #c3b6c1,#2c2630, 40-49 #c6b6c5,#2c2630, 50-50 #c6b6c5,#8e667c, 51-51 #c6b6c5,#39323b, 52-99 #c3b6c1,#39323b,
+|4: 0-0 d,#8e667c, 1-1 d,#39323b, 2-49 #c3b6c1,#39323b, 50-50 #c3b6c1,#8e667c, 51-99 #c3b6c1,#39323b,
|5: 0-0 d,#8e667c, 1-1 d,#39323b, 2-49 #c3b6c1,#39323b, 50-50 #c3b6c1,#8e667c, 51-99 #c3b6c1,#39323b,
|6: 0-0 d,#8e667c, 1-49 d,#39323b, 50-50 d,#8e667c, 51-99 d,#39323b,
|7: 0-0 d,#8e667c, 1-49 d,#39323b, 50-50 d,#8e667c, 51-99 d,#39323b,
@@ -71,11 +81,11 @@
|13: 0-0 d,#8e667c, 1-49 d,#39323b, 50-50 d,#8e667c, 51-99 d,#39323b,
|14: 0-0 d,#8e667c, 1-49 d,#39323b, 50-50 d,#8e667c, 51-99 d,#39323b,
|15: 0-0 d,#8e667c, 1-49 d,#39323b, 50-50 d,#8e667c, 51-99 d,#39323b,
-|16: 0-0 d,#8e667c, 1-49 d,#39323b, 50-50 d,#8e667c, 51-99 d,#39323b,
-|17: 0-1 d,#745469, 2-28 #c6b6c5,#2c2630, 29-38 #96c9b8,#2c2630, 39-49 #c6b6c5,#2c2630, 50-50 #c6b6c5,#8e667c, 51-99 #c6b6c5,#39323b,
-|18: 0-1 d,#2c2630, 2-49 #c6b6c5,#2c2630, 50-50 #c6b6c5,#8e667c, 51-99 #c6b6c5,#39323b,
+|16: 0-1 d,#745469, 2-28 #c6b6c5,#2c2630, 29-38 #96c9b8,#2c2630, 39-49 #c6b6c5,#2c2630, 50-50 #c6b6c5,#8e667c, 51-99 #c6b6c5,#39323b,
+|17: 0-1 d,#2c2630, 2-49 #c6b6c5,#2c2630, 50-50 #c6b6c5,#8e667c, 51-99 #c6b6c5,#39323b,
+|18: 0-0 d,#8e667c, 1-1 d,#39323b, 2-49 #c3b6c1,#39323b, 50-50 #c3b6c1,#8e667c, 51-99 #c3b6c1,#39323b,
|19: 0-0 d,#8e667c, 1-1 d,#39323b, 2-49 #c3b6c1,#39323b, 50-50 #c3b6c1,#8e667c, 51-99 #c3b6c1,#39323b,
-|20: 0-0 d,#8e667c, 1-1 d,#39323b, 2-49 #c3b6c1,#39323b, 50-50 #c3b6c1,#8e667c, 51-99 #c3b6c1,#39323b,
+|20: 0-0 d,#8e667c, 1-49 d,#39323b, 50-50 d,#8e667c, 51-99 d,#39323b,
|21: 0-0 d,#8e667c, 1-49 d,#39323b, 50-50 d,#8e667c, 51-99 d,#39323b,
|22: 0-0 d,#8e667c, 1-49 d,#39323b, 50-50 d,#8e667c, 51-99 d,#39323b,
|23: 0-0 d,#8e667c, 1-49 d,#39323b, 50-50 d,#8e667c, 51-99 d,#39323b,
@@ -85,14 +95,15 @@
|27: 0-0 d,#8e667c, 1-49 d,#39323b, 50-50 d,#8e667c, 51-99 d,#39323b,
|28: 0-0 d,#8e667c, 1-49 d,#39323b, 50-50 d,#8e667c, 51-99 d,#39323b,
|29: 0-0 d,#8e667c, 1-49 d,#39323b, 50-50 d,#8e667c, 51-99 d,#39323b,
-|30: 0-0 d,#8e667c, 1-49 d,#39323b, 50-50 d,#8e667c, 51-99 d,#39323b,
+|30: 0-1 d,#2c2630, 2-99 #796e7a,#2c2630,
== snap ink grid=100x31 cursor=4,6
+|30: ✓ @p1 NextColor ×2 1 message · SPC h m
== style ink grid=100x31
|0: 0-1 d,#15212c, 2-85 #d5e4f1,#15212c, 86-94 #ffffff,#1b547c, 95-99 #ffffff,#15212c,
|1: 0-1 d,#8f7d5b, 2-49 #e1eef9,#2b4051, 50-51 #e1eef9,#8f7d5b, 52-99 #d5e4f1,#15212c,
|2: 0-1 d,#86d8ff, 2-28 #e1eef9,#2b4051, 29-38 #ffeab8,#2b4051, 39-49 #e1eef9,#2b4051, 50-51 #e1eef9,#5f7990, 52-78 #d5e4f1,#15212c, 79-88 #f5e0ac,#15212c, 89-99 #d5e4f1,#15212c,
|3: 0-1 d,#2b4051, 2-49 #e1eef9,#2b4051, 50-51 #e1eef9,#15212c, 52-99 #d5e4f1,#15212c,
-|4: 0-0 d,#86a8c2, 1-1 d,#000000, 2-38 #f3f7fc,#000000, 39-39 #f3f7fc,#15212c, 40-49 #d5e4f1,#15212c, 50-50 #d5e4f1,#86a8c2, 51-51 #d5e4f1,#000000, 52-99 #f3f7fc,#000000,
+|4: 0-0 d,#86a8c2, 1-1 d,#000000, 2-49 #f3f7fc,#000000, 50-50 #f3f7fc,#86a8c2, 51-99 #f3f7fc,#000000,
|5: 0-0 d,#86a8c2, 1-1 d,#000000, 2-49 #f3f7fc,#000000, 50-50 #f3f7fc,#86a8c2, 51-99 #f3f7fc,#000000,
|6: 0-0 d,#86a8c2, 1-49 d,#000000, 50-50 d,#86a8c2, 51-99 d,#000000,
|7: 0-0 d,#86a8c2, 1-49 d,#000000, 50-50 d,#86a8c2, 51-99 d,#000000,
@@ -104,11 +115,11 @@
|13: 0-0 d,#86a8c2, 1-49 d,#000000, 50-50 d,#86a8c2, 51-99 d,#000000,
|14: 0-0 d,#86a8c2, 1-49 d,#000000, 50-50 d,#86a8c2, 51-99 d,#000000,
|15: 0-0 d,#86a8c2, 1-49 d,#000000, 50-50 d,#86a8c2, 51-99 d,#000000,
-|16: 0-0 d,#86a8c2, 1-49 d,#000000, 50-50 d,#86a8c2, 51-99 d,#000000,
-|17: 0-1 d,#5f7990, 2-28 #d5e4f1,#15212c, 29-38 #f5e0ac,#15212c, 39-49 #d5e4f1,#15212c, 50-50 #d5e4f1,#86a8c2, 51-99 #d5e4f1,#000000,
-|18: 0-1 d,#15212c, 2-49 #d5e4f1,#15212c, 50-50 #d5e4f1,#86a8c2, 51-99 #d5e4f1,#000000,
+|16: 0-1 d,#5f7990, 2-28 #d5e4f1,#15212c, 29-38 #f5e0ac,#15212c, 39-49 #d5e4f1,#15212c, 50-50 #d5e4f1,#86a8c2, 51-99 #d5e4f1,#000000,
+|17: 0-1 d,#15212c, 2-49 #d5e4f1,#15212c, 50-50 #d5e4f1,#86a8c2, 51-99 #d5e4f1,#000000,
+|18: 0-0 d,#86a8c2, 1-1 d,#000000, 2-49 #f3f7fc,#000000, 50-50 #f3f7fc,#86a8c2, 51-99 #f3f7fc,#000000,
|19: 0-0 d,#86a8c2, 1-1 d,#000000, 2-49 #f3f7fc,#000000, 50-50 #f3f7fc,#86a8c2, 51-99 #f3f7fc,#000000,
-|20: 0-0 d,#86a8c2, 1-1 d,#000000, 2-49 #f3f7fc,#000000, 50-50 #f3f7fc,#86a8c2, 51-99 #f3f7fc,#000000,
+|20: 0-0 d,#86a8c2, 1-49 d,#000000, 50-50 d,#86a8c2, 51-99 d,#000000,
|21: 0-0 d,#86a8c2, 1-49 d,#000000, 50-50 d,#86a8c2, 51-99 d,#000000,
|22: 0-0 d,#86a8c2, 1-49 d,#000000, 50-50 d,#86a8c2, 51-99 d,#000000,
|23: 0-0 d,#86a8c2, 1-49 d,#000000, 50-50 d,#86a8c2, 51-99 d,#000000,
@@ -118,14 +129,15 @@
|27: 0-0 d,#86a8c2, 1-49 d,#000000, 50-50 d,#86a8c2, 51-99 d,#000000,
|28: 0-0 d,#86a8c2, 1-49 d,#000000, 50-50 d,#86a8c2, 51-99 d,#000000,
|29: 0-0 d,#86a8c2, 1-49 d,#000000, 50-50 d,#86a8c2, 51-99 d,#000000,
-|30: 0-0 d,#86a8c2, 1-49 d,#000000, 50-50 d,#86a8c2, 51-99 d,#000000,
+|30: 0-1 d,#15212c, 2-99 #75828e,#15212c,
== snap paper grid=100x31 cursor=4,6
+|30: ✓ @p1 NextColor ×3 1 message · SPC h m
== style paper grid=100x31
|0: 0-1 d,#e8eae3, 2-85 #52625a,#e8eae3, 86-94 #203e31,#c5e2d0, 95-99 #203e31,#e8eae3,
|1: 0-1 d,#bda27e, 2-49 #4a5a52,#bdd8ca, 50-51 #4a5a52,#bda27e, 52-99 #52625a,#e8eae3,
|2: 0-1 d,#367157, 2-28 #4a5a52,#bdd8ca, 29-38 #69447a,#bdd8ca, 39-49 #4a5a52,#bdd8ca, 50-51 #4a5a52,#8fa594, 52-78 #52625a,#e8eae3, 79-88 #724c83,#e8eae3, 89-99 #52625a,#e8eae3,
|3: 0-1 d,#bdd8ca, 2-49 #4a5a52,#bdd8ca, 50-51 #4a5a52,#e8eae3, 52-99 #52625a,#e8eae3,
-|4: 0-0 d,#869d8a, 1-1 d,#f5f3ed, 2-38 #303b3b,#f5f3ed, 39-39 #303b3b,#e8eae3, 40-49 #52625a,#e8eae3, 50-50 #52625a,#869d8a, 51-51 #52625a,#f5f3ed, 52-99 #303b3b,#f5f3ed,
+|4: 0-0 d,#869d8a, 1-1 d,#f5f3ed, 2-49 #303b3b,#f5f3ed, 50-50 #303b3b,#869d8a, 51-99 #303b3b,#f5f3ed,
|5: 0-0 d,#869d8a, 1-1 d,#f5f3ed, 2-49 #303b3b,#f5f3ed, 50-50 #303b3b,#869d8a, 51-99 #303b3b,#f5f3ed,
|6: 0-0 d,#869d8a, 1-49 d,#f5f3ed, 50-50 d,#869d8a, 51-99 d,#f5f3ed,
|7: 0-0 d,#869d8a, 1-49 d,#f5f3ed, 50-50 d,#869d8a, 51-99 d,#f5f3ed,
@@ -137,11 +149,11 @@
|13: 0-0 d,#869d8a, 1-49 d,#f5f3ed, 50-50 d,#869d8a, 51-99 d,#f5f3ed,
|14: 0-0 d,#869d8a, 1-49 d,#f5f3ed, 50-50 d,#869d8a, 51-99 d,#f5f3ed,
|15: 0-0 d,#869d8a, 1-49 d,#f5f3ed, 50-50 d,#869d8a, 51-99 d,#f5f3ed,
-|16: 0-0 d,#869d8a, 1-49 d,#f5f3ed, 50-50 d,#869d8a, 51-99 d,#f5f3ed,
-|17: 0-1 d,#8fa594, 2-28 #52625a,#e8eae3, 29-38 #724c83,#e8eae3, 39-49 #52625a,#e8eae3, 50-50 #52625a,#869d8a, 51-99 #52625a,#f5f3ed,
-|18: 0-1 d,#e8eae3, 2-49 #52625a,#e8eae3, 50-50 #52625a,#869d8a, 51-99 #52625a,#f5f3ed,
+|16: 0-1 d,#8fa594, 2-28 #52625a,#e8eae3, 29-38 #724c83,#e8eae3, 39-49 #52625a,#e8eae3, 50-50 #52625a,#869d8a, 51-99 #52625a,#f5f3ed,
+|17: 0-1 d,#e8eae3, 2-49 #52625a,#e8eae3, 50-50 #52625a,#869d8a, 51-99 #52625a,#f5f3ed,
+|18: 0-0 d,#869d8a, 1-1 d,#f5f3ed, 2-49 #303b3b,#f5f3ed, 50-50 #303b3b,#869d8a, 51-99 #303b3b,#f5f3ed,
|19: 0-0 d,#869d8a, 1-1 d,#f5f3ed, 2-49 #303b3b,#f5f3ed, 50-50 #303b3b,#869d8a, 51-99 #303b3b,#f5f3ed,
-|20: 0-0 d,#869d8a, 1-1 d,#f5f3ed, 2-49 #303b3b,#f5f3ed, 50-50 #303b3b,#869d8a, 51-99 #303b3b,#f5f3ed,
+|20: 0-0 d,#869d8a, 1-49 d,#f5f3ed, 50-50 d,#869d8a, 51-99 d,#f5f3ed,
|21: 0-0 d,#869d8a, 1-49 d,#f5f3ed, 50-50 d,#869d8a, 51-99 d,#f5f3ed,
|22: 0-0 d,#869d8a, 1-49 d,#f5f3ed, 50-50 d,#869d8a, 51-99 d,#f5f3ed,
|23: 0-0 d,#869d8a, 1-49 d,#f5f3ed, 50-50 d,#869d8a, 51-99 d,#f5f3ed,
@@ -151,14 +163,15 @@
|27: 0-0 d,#869d8a, 1-49 d,#f5f3ed, 50-50 d,#869d8a, 51-99 d,#f5f3ed,
|28: 0-0 d,#869d8a, 1-49 d,#f5f3ed, 50-50 d,#869d8a, 51-99 d,#f5f3ed,
|29: 0-0 d,#869d8a, 1-49 d,#f5f3ed, 50-50 d,#869d8a, 51-99 d,#f5f3ed,
-|30: 0-0 d,#869d8a, 1-49 d,#f5f3ed, 50-50 d,#869d8a, 51-99 d,#f5f3ed,
+|30: 0-1 d,#e8eae3, 2-99 #9da69e,#e8eae3,
== snap daybreak grid=100x31 cursor=4,6
+|30: ✓ @p1 NextColor ×4 1 message · SPC h m
== style daybreak grid=100x31
|0: 0-1 d,#edf2f7, 2-85 #29465e,#edf2f7, 86-94 #10364f,#b9dffb, 95-99 #10364f,#edf2f7,
|1: 0-1 d,#b79a7a, 2-49 #213e56,#c7dcec, 50-51 #213e56,#b79a7a, 52-99 #29465e,#edf2f7,
|2: 0-1 d,#006198, 2-28 #213e56,#c7dcec, 29-38 #52255f,#c7dcec, 39-49 #213e56,#c7dcec, 50-51 #213e56,#7b9eb7, 52-78 #29465e,#edf2f7, 79-88 #5a2d67,#edf2f7, 89-99 #29465e,#edf2f7,
|3: 0-1 d,#c7dcec, 2-49 #213e56,#c7dcec, 50-51 #213e56,#edf2f7, 52-99 #29465e,#edf2f7,
-|4: 0-0 d,#6685a0, 1-1 d,#ffffff, 2-38 #142d40,#ffffff, 39-39 #142d40,#edf2f7, 40-49 #29465e,#edf2f7, 50-50 #29465e,#6685a0, 51-51 #29465e,#ffffff, 52-99 #142d40,#ffffff,
+|4: 0-0 d,#6685a0, 1-1 d,#ffffff, 2-49 #142d40,#ffffff, 50-50 #142d40,#6685a0, 51-99 #142d40,#ffffff,
|5: 0-0 d,#6685a0, 1-1 d,#ffffff, 2-49 #142d40,#ffffff, 50-50 #142d40,#6685a0, 51-99 #142d40,#ffffff,
|6: 0-0 d,#6685a0, 1-49 d,#ffffff, 50-50 d,#6685a0, 51-99 d,#ffffff,
|7: 0-0 d,#6685a0, 1-49 d,#ffffff, 50-50 d,#6685a0, 51-99 d,#ffffff,
@@ -170,11 +183,11 @@
|13: 0-0 d,#6685a0, 1-49 d,#ffffff, 50-50 d,#6685a0, 51-99 d,#ffffff,
|14: 0-0 d,#6685a0, 1-49 d,#ffffff, 50-50 d,#6685a0, 51-99 d,#ffffff,
|15: 0-0 d,#6685a0, 1-49 d,#ffffff, 50-50 d,#6685a0, 51-99 d,#ffffff,
-|16: 0-0 d,#6685a0, 1-49 d,#ffffff, 50-50 d,#6685a0, 51-99 d,#ffffff,
-|17: 0-1 d,#7b9eb7, 2-28 #29465e,#edf2f7, 29-38 #5a2d67,#edf2f7, 39-49 #29465e,#edf2f7, 50-50 #29465e,#6685a0, 51-99 #29465e,#ffffff,
-|18: 0-1 d,#edf2f7, 2-49 #29465e,#edf2f7, 50-50 #29465e,#6685a0, 51-99 #29465e,#ffffff,
+|16: 0-1 d,#7b9eb7, 2-28 #29465e,#edf2f7, 29-38 #5a2d67,#edf2f7, 39-49 #29465e,#edf2f7, 50-50 #29465e,#6685a0, 51-99 #29465e,#ffffff,
+|17: 0-1 d,#edf2f7, 2-49 #29465e,#edf2f7, 50-50 #29465e,#6685a0, 51-99 #29465e,#ffffff,
+|18: 0-0 d,#6685a0, 1-1 d,#ffffff, 2-49 #142d40,#ffffff, 50-50 #142d40,#6685a0, 51-99 #142d40,#ffffff,
|19: 0-0 d,#6685a0, 1-1 d,#ffffff, 2-49 #142d40,#ffffff, 50-50 #142d40,#6685a0, 51-99 #142d40,#ffffff,
-|20: 0-0 d,#6685a0, 1-1 d,#ffffff, 2-49 #142d40,#ffffff, 50-50 #142d40,#6685a0, 51-99 #142d40,#ffffff,
+|20: 0-0 d,#6685a0, 1-49 d,#ffffff, 50-50 d,#6685a0, 51-99 d,#ffffff,
|21: 0-0 d,#6685a0, 1-49 d,#ffffff, 50-50 d,#6685a0, 51-99 d,#ffffff,
|22: 0-0 d,#6685a0, 1-49 d,#ffffff, 50-50 d,#6685a0, 51-99 d,#ffffff,
|23: 0-0 d,#6685a0, 1-49 d,#ffffff, 50-50 d,#6685a0, 51-99 d,#ffffff,
@@ -184,14 +197,15 @@
|27: 0-0 d,#6685a0, 1-49 d,#ffffff, 50-50 d,#6685a0, 51-99 d,#ffffff,
|28: 0-0 d,#6685a0, 1-49 d,#ffffff, 50-50 d,#6685a0, 51-99 d,#ffffff,
|29: 0-0 d,#6685a0, 1-49 d,#ffffff, 50-50 d,#6685a0, 51-99 d,#ffffff,
-|30: 0-0 d,#6685a0, 1-49 d,#ffffff, 50-50 d,#6685a0, 51-99 d,#ffffff,
+|30: 0-1 d,#edf2f7, 2-99 #8b9caa,#edf2f7,
== snap atelier grid=100x31 cursor=4,6
+|30: ✓ @p1 NextColor ×5 1 message · SPC h m
== style atelier grid=100x31
|0: 0-1 d,#e4f0ed, 2-85 #3d6055,#e4f0ed, 86-94 #35492d,#edf2a5, 95-99 #35492d,#e4f0ed,
|1: 0-1 d,#bca481, 2-49 #35584d,#bfdcce, 50-51 #35584d,#bca481, 52-99 #3d6055,#e4f0ed,
|2: 0-1 d,#36826b, 2-28 #35584d,#bfdcce, 29-38 #653f6b,#bfdcce, 39-49 #35584d,#bfdcce, 50-51 #35584d,#95baa2, 52-78 #3d6055,#e4f0ed, 79-88 #6e4774,#e4f0ed, 89-99 #3d6055,#e4f0ed,
|3: 0-1 d,#bfdcce, 2-49 #35584d,#bfdcce, 50-51 #35584d,#e4f0ed, 52-99 #3d6055,#e4f0ed,
-|4: 0-0 d,#9fae76, 1-1 d,#fffdeb, 2-38 #293f35,#fffdeb, 39-39 #293f35,#e4f0ed, 40-49 #3d6055,#e4f0ed, 50-50 #3d6055,#9fae76, 51-51 #3d6055,#fffdeb, 52-99 #293f35,#fffdeb,
+|4: 0-0 d,#9fae76, 1-1 d,#fffdeb, 2-49 #293f35,#fffdeb, 50-50 #293f35,#9fae76, 51-99 #293f35,#fffdeb,
|5: 0-0 d,#9fae76, 1-1 d,#fffdeb, 2-49 #293f35,#fffdeb, 50-50 #293f35,#9fae76, 51-99 #293f35,#fffdeb,
|6: 0-0 d,#9fae76, 1-49 d,#fffdeb, 50-50 d,#9fae76, 51-99 d,#fffdeb,
|7: 0-0 d,#9fae76, 1-49 d,#fffdeb, 50-50 d,#9fae76, 51-99 d,#fffdeb,
@@ -203,11 +217,11 @@
|13: 0-0 d,#9fae76, 1-49 d,#fffdeb, 50-50 d,#9fae76, 51-99 d,#fffdeb,
|14: 0-0 d,#9fae76, 1-49 d,#fffdeb, 50-50 d,#9fae76, 51-99 d,#fffdeb,
|15: 0-0 d,#9fae76, 1-49 d,#fffdeb, 50-50 d,#9fae76, 51-99 d,#fffdeb,
-|16: 0-0 d,#9fae76, 1-49 d,#fffdeb, 50-50 d,#9fae76, 51-99 d,#fffdeb,
-|17: 0-1 d,#95baa2, 2-28 #3d6055,#e4f0ed, 29-38 #6e4774,#e4f0ed, 39-49 #3d6055,#e4f0ed, 50-50 #3d6055,#9fae76, 51-99 #3d6055,#fffdeb,
-|18: 0-1 d,#e4f0ed, 2-49 #3d6055,#e4f0ed, 50-50 #3d6055,#9fae76, 51-99 #3d6055,#fffdeb,
+|16: 0-1 d,#95baa2, 2-28 #3d6055,#e4f0ed, 29-38 #6e4774,#e4f0ed, 39-49 #3d6055,#e4f0ed, 50-50 #3d6055,#9fae76, 51-99 #3d6055,#fffdeb,
+|17: 0-1 d,#e4f0ed, 2-49 #3d6055,#e4f0ed, 50-50 #3d6055,#9fae76, 51-99 #3d6055,#fffdeb,
+|18: 0-0 d,#9fae76, 1-1 d,#fffdeb, 2-49 #293f35,#fffdeb, 50-50 #293f35,#9fae76, 51-99 #293f35,#fffdeb,
|19: 0-0 d,#9fae76, 1-1 d,#fffdeb, 2-49 #293f35,#fffdeb, 50-50 #293f35,#9fae76, 51-99 #293f35,#fffdeb,
-|20: 0-0 d,#9fae76, 1-1 d,#fffdeb, 2-49 #293f35,#fffdeb, 50-50 #293f35,#9fae76, 51-99 #293f35,#fffdeb,
+|20: 0-0 d,#9fae76, 1-49 d,#fffdeb, 50-50 d,#9fae76, 51-99 d,#fffdeb,
|21: 0-0 d,#9fae76, 1-49 d,#fffdeb, 50-50 d,#9fae76, 51-99 d,#fffdeb,
|22: 0-0 d,#9fae76, 1-49 d,#fffdeb, 50-50 d,#9fae76, 51-99 d,#fffdeb,
|23: 0-0 d,#9fae76, 1-49 d,#fffdeb, 50-50 d,#9fae76, 51-99 d,#fffdeb,
@@ -217,14 +231,15 @@
|27: 0-0 d,#9fae76, 1-49 d,#fffdeb, 50-50 d,#9fae76, 51-99 d,#fffdeb,
|28: 0-0 d,#9fae76, 1-49 d,#fffdeb, 50-50 d,#9fae76, 51-99 d,#fffdeb,
|29: 0-0 d,#9fae76, 1-49 d,#fffdeb, 50-50 d,#9fae76, 51-99 d,#fffdeb,
-|30: 0-0 d,#9fae76, 1-49 d,#fffdeb, 50-50 d,#9fae76, 51-99 d,#fffdeb,
+|30: 0-1 d,#e4f0ed, 2-99 #90a8a1,#e4f0ed,
== snap forge grid=100x31 cursor=4,6
+|30: ✓ @p1 NextColor ×6 1 message · SPC h m
== style forge grid=100x31
|0: 0-1 d,#22252b, 2-85 #c5c9d2,#22252b, 86-94 #e2eef4,#1c5172, 95-99 #e2eef4,#22252b,
|1: 0-1 d,#6a7b67, 2-49 #d1d5de,#374253, 50-51 #d1d5de,#6a7b67, 52-99 #c5c9d2,#22252b,
|2: 0-1 d,#9cc3f7, 2-28 #d1d5de,#374253, 29-38 #f8cba7,#374253, 39-49 #d1d5de,#374253, 50-51 #d1d5de,#55647b, 52-78 #c5c9d2,#22252b, 79-88 #ecbf9b,#22252b, 89-99 #c5c9d2,#22252b,
|3: 0-1 d,#374253, 2-49 #d1d5de,#374253, 50-51 #d1d5de,#22252b, 52-99 #c5c9d2,#22252b,
-|4: 0-0 d,#708095, 1-1 d,#0c0c0e, 2-38 #e5e5e5,#0c0c0e, 39-39 #e5e5e5,#22252b, 40-49 #c5c9d2,#22252b, 50-50 #c5c9d2,#708095, 51-51 #c5c9d2,#0c0c0e, 52-99 #e5e5e5,#0c0c0e,
+|4: 0-0 d,#708095, 1-1 d,#0c0c0e, 2-49 #e5e5e5,#0c0c0e, 50-50 #e5e5e5,#708095, 51-99 #e5e5e5,#0c0c0e,
|5: 0-0 d,#708095, 1-1 d,#0c0c0e, 2-49 #e5e5e5,#0c0c0e, 50-50 #e5e5e5,#708095, 51-99 #e5e5e5,#0c0c0e,
|6: 0-0 d,#708095, 1-49 d,#0c0c0e, 50-50 d,#708095, 51-99 d,#0c0c0e,
|7: 0-0 d,#708095, 1-49 d,#0c0c0e, 50-50 d,#708095, 51-99 d,#0c0c0e,
@@ -236,11 +251,11 @@
|13: 0-0 d,#708095, 1-49 d,#0c0c0e, 50-50 d,#708095, 51-99 d,#0c0c0e,
|14: 0-0 d,#708095, 1-49 d,#0c0c0e, 50-50 d,#708095, 51-99 d,#0c0c0e,
|15: 0-0 d,#708095, 1-49 d,#0c0c0e, 50-50 d,#708095, 51-99 d,#0c0c0e,
-|16: 0-0 d,#708095, 1-49 d,#0c0c0e, 50-50 d,#708095, 51-99 d,#0c0c0e,
-|17: 0-1 d,#55647b, 2-28 #c5c9d2,#22252b, 29-38 #ecbf9b,#22252b, 39-49 #c5c9d2,#22252b, 50-50 #c5c9d2,#708095, 51-99 #c5c9d2,#0c0c0e,
-|18: 0-1 d,#22252b, 2-49 #c5c9d2,#22252b, 50-50 #c5c9d2,#708095, 51-99 #c5c9d2,#0c0c0e,
+|16: 0-1 d,#55647b, 2-28 #c5c9d2,#22252b, 29-38 #ecbf9b,#22252b, 39-49 #c5c9d2,#22252b, 50-50 #c5c9d2,#708095, 51-99 #c5c9d2,#0c0c0e,
+|17: 0-1 d,#22252b, 2-49 #c5c9d2,#22252b, 50-50 #c5c9d2,#708095, 51-99 #c5c9d2,#0c0c0e,
+|18: 0-0 d,#708095, 1-1 d,#0c0c0e, 2-49 #e5e5e5,#0c0c0e, 50-50 #e5e5e5,#708095, 51-99 #e5e5e5,#0c0c0e,
|19: 0-0 d,#708095, 1-1 d,#0c0c0e, 2-49 #e5e5e5,#0c0c0e, 50-50 #e5e5e5,#708095, 51-99 #e5e5e5,#0c0c0e,
-|20: 0-0 d,#708095, 1-1 d,#0c0c0e, 2-49 #e5e5e5,#0c0c0e, 50-50 #e5e5e5,#708095, 51-99 #e5e5e5,#0c0c0e,
+|20: 0-0 d,#708095, 1-49 d,#0c0c0e, 50-50 d,#708095, 51-99 d,#0c0c0e,
|21: 0-0 d,#708095, 1-49 d,#0c0c0e, 50-50 d,#708095, 51-99 d,#0c0c0e,
|22: 0-0 d,#708095, 1-49 d,#0c0c0e, 50-50 d,#708095, 51-99 d,#0c0c0e,
|23: 0-0 d,#708095, 1-49 d,#0c0c0e, 50-50 d,#708095, 51-99 d,#0c0c0e,
@@ -250,14 +265,15 @@
|27: 0-0 d,#708095, 1-49 d,#0c0c0e, 50-50 d,#708095, 51-99 d,#0c0c0e,
|28: 0-0 d,#708095, 1-49 d,#0c0c0e, 50-50 d,#708095, 51-99 d,#0c0c0e,
|29: 0-0 d,#708095, 1-49 d,#0c0c0e, 50-50 d,#708095, 51-99 d,#0c0c0e,
-|30: 0-0 d,#708095, 1-49 d,#0c0c0e, 50-50 d,#708095, 51-99 d,#0c0c0e,
+|30: 0-1 d,#22252b, 2-99 #73777e,#22252b,
== snap lagoon grid=100x31 cursor=4,6
+|30: ✓ @p1 NextColor ×7 1 message · SPC h m
== style lagoon grid=100x31
|0: 0-1 d,#29443f, 2-85 #bbd7cb,#29443f, 86-94 #e6f2f3,#325f6c, 95-99 #e6f2f3,#29443f,
|1: 0-1 d,#9a7662, 2-49 #c7e3d7,#3a6154, 50-51 #c7e3d7,#9a7662, 52-99 #bbd7cb,#29443f,
|2: 0-1 d,#81cfb7, 2-28 #c7e3d7,#3a6154, 29-38 #f0cef8,#3a6154, 39-49 #c7e3d7,#3a6154, 50-51 #c7e3d7,#548372, 52-78 #bbd7cb,#29443f, 79-88 #e4c2ec,#29443f, 89-99 #bbd7cb,#29443f,
|3: 0-1 d,#3a6154, 2-49 #c7e3d7,#3a6154, 50-51 #c7e3d7,#29443f, 52-99 #bbd7cb,#29443f,
-|4: 0-0 d,#6e9b8b, 1-1 d,#34464c, 2-38 #bac9ce,#34464c, 39-39 #bac9ce,#29443f, 40-49 #bbd7cb,#29443f, 50-50 #bbd7cb,#6e9b8b, 51-51 #bbd7cb,#34464c, 52-99 #bac9ce,#34464c,
+|4: 0-0 d,#6e9b8b, 1-1 d,#34464c, 2-49 #bac9ce,#34464c, 50-50 #bac9ce,#6e9b8b, 51-99 #bac9ce,#34464c,
|5: 0-0 d,#6e9b8b, 1-1 d,#34464c, 2-49 #bac9ce,#34464c, 50-50 #bac9ce,#6e9b8b, 51-99 #bac9ce,#34464c,
|6: 0-0 d,#6e9b8b, 1-49 d,#34464c, 50-50 d,#6e9b8b, 51-99 d,#34464c,
|7: 0-0 d,#6e9b8b, 1-49 d,#34464c, 50-50 d,#6e9b8b, 51-99 d,#34464c,
@@ -269,11 +285,11 @@
|13: 0-0 d,#6e9b8b, 1-49 d,#34464c, 50-50 d,#6e9b8b, 51-99 d,#34464c,
|14: 0-0 d,#6e9b8b, 1-49 d,#34464c, 50-50 d,#6e9b8b, 51-99 d,#34464c,
|15: 0-0 d,#6e9b8b, 1-49 d,#34464c, 50-50 d,#6e9b8b, 51-99 d,#34464c,
-|16: 0-0 d,#6e9b8b, 1-49 d,#34464c, 50-50 d,#6e9b8b, 51-99 d,#34464c,
-|17: 0-1 d,#548372, 2-28 #bbd7cb,#29443f, 29-38 #e4c2ec,#29443f, 39-49 #bbd7cb,#29443f, 50-50 #bbd7cb,#6e9b8b, 51-99 #bbd7cb,#34464c,
-|18: 0-1 d,#29443f, 2-49 #bbd7cb,#29443f, 50-50 #bbd7cb,#6e9b8b, 51-99 #bbd7cb,#34464c,
+|16: 0-1 d,#548372, 2-28 #bbd7cb,#29443f, 29-38 #e4c2ec,#29443f, 39-49 #bbd7cb,#29443f, 50-50 #bbd7cb,#6e9b8b, 51-99 #bbd7cb,#34464c,
+|17: 0-1 d,#29443f, 2-49 #bbd7cb,#29443f, 50-50 #bbd7cb,#6e9b8b, 51-99 #bbd7cb,#34464c,
+|18: 0-0 d,#6e9b8b, 1-1 d,#34464c, 2-49 #bac9ce,#34464c, 50-50 #bac9ce,#6e9b8b, 51-99 #bac9ce,#34464c,
|19: 0-0 d,#6e9b8b, 1-1 d,#34464c, 2-49 #bac9ce,#34464c, 50-50 #bac9ce,#6e9b8b, 51-99 #bac9ce,#34464c,
-|20: 0-0 d,#6e9b8b, 1-1 d,#34464c, 2-49 #bac9ce,#34464c, 50-50 #bac9ce,#6e9b8b, 51-99 #bac9ce,#34464c,
+|20: 0-0 d,#6e9b8b, 1-49 d,#34464c, 50-50 d,#6e9b8b, 51-99 d,#34464c,
|21: 0-0 d,#6e9b8b, 1-49 d,#34464c, 50-50 d,#6e9b8b, 51-99 d,#34464c,
|22: 0-0 d,#6e9b8b, 1-49 d,#34464c, 50-50 d,#6e9b8b, 51-99 d,#34464c,
|23: 0-0 d,#6e9b8b, 1-49 d,#34464c, 50-50 d,#6e9b8b, 51-99 d,#34464c,
@@ -283,14 +299,15 @@
|27: 0-0 d,#6e9b8b, 1-49 d,#34464c, 50-50 d,#6e9b8b, 51-99 d,#34464c,
|28: 0-0 d,#6e9b8b, 1-49 d,#34464c, 50-50 d,#6e9b8b, 51-99 d,#34464c,
|29: 0-0 d,#6e9b8b, 1-49 d,#34464c, 50-50 d,#6e9b8b, 51-99 d,#34464c,
-|30: 0-0 d,#6e9b8b, 1-49 d,#34464c, 50-50 d,#6e9b8b, 51-99 d,#34464c,
+|30: 0-1 d,#29443f, 2-99 #728d85,#29443f,
== snap solarium grid=100x31 cursor=4,6
+|30: ✓ @p1 NextColor ×8 1 message · SPC h m
== style solarium grid=100x31
|0: 0-1 d,#123f43, 2-85 #c7d4bd,#123f43, 86-94 #eee8d5,#1f5c64, 95-99 #eee8d5,#123f43,
|1: 0-1 d,#347a9a, 2-49 #d3e0c9,#2f5c5c, 50-51 #d3e0c9,#347a9a, 52-99 #c7d4bd,#123f43,
|2: 0-1 d,#e1c266, 2-28 #d3e0c9,#2f5c5c, 29-38 #f5cdec,#2f5c5c, 39-49 #d3e0c9,#2f5c5c, 50-51 #d3e0c9,#467f76, 52-78 #c7d4bd,#123f43, 79-88 #e9c1e0,#123f43, 89-99 #c7d4bd,#123f43,
|3: 0-1 d,#2f5c5c, 2-49 #d3e0c9,#2f5c5c, 50-51 #d3e0c9,#123f43, 52-99 #c7d4bd,#123f43,
-|4: 0-0 d,#65978c, 1-1 d,#173e45, 2-38 #a7b7ae,#173e45, 39-39 #a7b7ae,#123f43, 40-49 #c7d4bd,#123f43, 50-50 #c7d4bd,#65978c, 51-51 #c7d4bd,#173e45, 52-99 #a7b7ae,#173e45,
+|4: 0-0 d,#65978c, 1-1 d,#173e45, 2-49 #a7b7ae,#173e45, 50-50 #a7b7ae,#65978c, 51-99 #a7b7ae,#173e45,
|5: 0-0 d,#65978c, 1-1 d,#173e45, 2-49 #a7b7ae,#173e45, 50-50 #a7b7ae,#65978c, 51-99 #a7b7ae,#173e45,
|6: 0-0 d,#65978c, 1-49 d,#173e45, 50-50 d,#65978c, 51-99 d,#173e45,
|7: 0-0 d,#65978c, 1-49 d,#173e45, 50-50 d,#65978c, 51-99 d,#173e45,
@@ -302,11 +319,11 @@
|13: 0-0 d,#65978c, 1-49 d,#173e45, 50-50 d,#65978c, 51-99 d,#173e45,
|14: 0-0 d,#65978c, 1-49 d,#173e45, 50-50 d,#65978c, 51-99 d,#173e45,
|15: 0-0 d,#65978c, 1-49 d,#173e45, 50-50 d,#65978c, 51-99 d,#173e45,
-|16: 0-0 d,#65978c, 1-49 d,#173e45, 50-50 d,#65978c, 51-99 d,#173e45,
-|17: 0-1 d,#467f76, 2-28 #c7d4bd,#123f43, 29-38 #e9c1e0,#123f43, 39-49 #c7d4bd,#123f43, 50-50 #c7d4bd,#65978c, 51-99 #c7d4bd,#173e45,
-|18: 0-1 d,#123f43, 2-49 #c7d4bd,#123f43, 50-50 #c7d4bd,#65978c, 51-99 #c7d4bd,#173e45,
+|16: 0-1 d,#467f76, 2-28 #c7d4bd,#123f43, 29-38 #e9c1e0,#123f43, 39-49 #c7d4bd,#123f43, 50-50 #c7d4bd,#65978c, 51-99 #c7d4bd,#173e45,
+|17: 0-1 d,#123f43, 2-49 #c7d4bd,#123f43, 50-50 #c7d4bd,#65978c, 51-99 #c7d4bd,#173e45,
+|18: 0-0 d,#65978c, 1-1 d,#173e45, 2-49 #a7b7ae,#173e45, 50-50 #a7b7ae,#65978c, 51-99 #a7b7ae,#173e45,
|19: 0-0 d,#65978c, 1-1 d,#173e45, 2-49 #a7b7ae,#173e45, 50-50 #a7b7ae,#65978c, 51-99 #a7b7ae,#173e45,
-|20: 0-0 d,#65978c, 1-1 d,#173e45, 2-49 #a7b7ae,#173e45, 50-50 #a7b7ae,#65978c, 51-99 #a7b7ae,#173e45,
+|20: 0-0 d,#65978c, 1-49 d,#173e45, 50-50 d,#65978c, 51-99 d,#173e45,
|21: 0-0 d,#65978c, 1-49 d,#173e45, 50-50 d,#65978c, 51-99 d,#173e45,
|22: 0-0 d,#65978c, 1-49 d,#173e45, 50-50 d,#65978c, 51-99 d,#173e45,
|23: 0-0 d,#65978c, 1-49 d,#173e45, 50-50 d,#65978c, 51-99 d,#173e45,
@@ -316,14 +333,15 @@
|27: 0-0 d,#65978c, 1-49 d,#173e45, 50-50 d,#65978c, 51-99 d,#173e45,
|28: 0-0 d,#65978c, 1-49 d,#173e45, 50-50 d,#65978c, 51-99 d,#173e45,
|29: 0-0 d,#65978c, 1-49 d,#173e45, 50-50 d,#65978c, 51-99 d,#173e45,
-|30: 0-0 d,#65978c, 1-49 d,#173e45, 50-50 d,#65978c, 51-99 d,#173e45,
+|30: 0-1 d,#123f43, 2-99 #6c8980,#123f43,
== snap spectrum grid=100x31 cursor=4,6
+|30: ✓ @p1 NextColor ×9 1 message · SPC h m
== style spectrum grid=100x31
|0: 0-1 d,#3b3830, 2-85 #ddd8bb,#3b3830, 86-94 #fcfcfa,#513f60, 95-99 #fcfcfa,#3b3830,
|1: 0-1 d,#706596, 2-49 #e9e4c7,#5a523a, 50-51 #e9e4c7,#706596, 52-99 #ddd8bb,#3b3830,
|2: 0-1 d,#ffd866, 2-28 #e9e4c7,#5a523a, 29-38 #d7e3ff,#5a523a, 39-49 #e9e4c7,#5a523a, 50-51 #e9e4c7,#92844f, 52-78 #ddd8bb,#3b3830, 79-88 #c5d7ff,#3b3830, 89-99 #ddd8bb,#3b3830,
|3: 0-1 d,#5a523a, 2-49 #e9e4c7,#5a523a, 50-51 #e9e4c7,#3b3830, 52-99 #ddd8bb,#3b3830,
-|4: 0-0 d,#948d6f, 1-1 d,#100e11, 2-38 #fcfcfa,#100e11, 39-39 #fcfcfa,#3b3830, 40-49 #ddd8bb,#3b3830, 50-50 #ddd8bb,#948d6f, 51-51 #ddd8bb,#100e11, 52-99 #fcfcfa,#100e11,
+|4: 0-0 d,#948d6f, 1-1 d,#100e11, 2-49 #fcfcfa,#100e11, 50-50 #fcfcfa,#948d6f, 51-99 #fcfcfa,#100e11,
|5: 0-0 d,#948d6f, 1-1 d,#100e11, 2-49 #fcfcfa,#100e11, 50-50 #fcfcfa,#948d6f, 51-99 #fcfcfa,#100e11,
|6: 0-0 d,#948d6f, 1-49 d,#100e11, 50-50 d,#948d6f, 51-99 d,#100e11,
|7: 0-0 d,#948d6f, 1-49 d,#100e11, 50-50 d,#948d6f, 51-99 d,#100e11,
@@ -335,11 +353,11 @@
|13: 0-0 d,#948d6f, 1-49 d,#100e11, 50-50 d,#948d6f, 51-99 d,#100e11,
|14: 0-0 d,#948d6f, 1-49 d,#100e11, 50-50 d,#948d6f, 51-99 d,#100e11,
|15: 0-0 d,#948d6f, 1-49 d,#100e11, 50-50 d,#948d6f, 51-99 d,#100e11,
-|16: 0-0 d,#948d6f, 1-49 d,#100e11, 50-50 d,#948d6f, 51-99 d,#100e11,
-|17: 0-1 d,#92844f, 2-28 #ddd8bb,#3b3830, 29-38 #c5d7ff,#3b3830, 39-49 #ddd8bb,#3b3830, 50-50 #ddd8bb,#948d6f, 51-99 #ddd8bb,#100e11,
-|18: 0-1 d,#3b3830, 2-49 #ddd8bb,#3b3830, 50-50 #ddd8bb,#948d6f, 51-99 #ddd8bb,#100e11,
+|16: 0-1 d,#92844f, 2-28 #ddd8bb,#3b3830, 29-38 #c5d7ff,#3b3830, 39-49 #ddd8bb,#3b3830, 50-50 #ddd8bb,#948d6f, 51-99 #ddd8bb,#100e11,
+|17: 0-1 d,#3b3830, 2-49 #ddd8bb,#3b3830, 50-50 #ddd8bb,#948d6f, 51-99 #ddd8bb,#100e11,
+|18: 0-0 d,#948d6f, 1-1 d,#100e11, 2-49 #fcfcfa,#100e11, 50-50 #fcfcfa,#948d6f, 51-99 #fcfcfa,#100e11,
|19: 0-0 d,#948d6f, 1-1 d,#100e11, 2-49 #fcfcfa,#100e11, 50-50 #fcfcfa,#948d6f, 51-99 #fcfcfa,#100e11,
-|20: 0-0 d,#948d6f, 1-1 d,#100e11, 2-49 #fcfcfa,#100e11, 50-50 #fcfcfa,#948d6f, 51-99 #fcfcfa,#100e11,
+|20: 0-0 d,#948d6f, 1-49 d,#100e11, 50-50 d,#948d6f, 51-99 d,#100e11,
|21: 0-0 d,#948d6f, 1-49 d,#100e11, 50-50 d,#948d6f, 51-99 d,#100e11,
|22: 0-0 d,#948d6f, 1-49 d,#100e11, 50-50 d,#948d6f, 51-99 d,#100e11,
|23: 0-0 d,#948d6f, 1-49 d,#100e11, 50-50 d,#948d6f, 51-99 d,#100e11,
@@ -349,14 +367,15 @@
|27: 0-0 d,#948d6f, 1-49 d,#100e11, 50-50 d,#948d6f, 51-99 d,#100e11,
|28: 0-0 d,#948d6f, 1-49 d,#100e11, 50-50 d,#948d6f, 51-99 d,#100e11,
|29: 0-0 d,#948d6f, 1-49 d,#100e11, 50-50 d,#948d6f, 51-99 d,#100e11,
-|30: 0-0 d,#948d6f, 1-49 d,#100e11, 50-50 d,#948d6f, 51-99 d,#100e11,
+|30: 0-1 d,#3b3830, 2-99 #8c8875,#3b3830,
== snap harvest grid=100x31 cursor=4,6
+|30: ✓ @p1 NextColor ×10 1 message · SPC h m
== style harvest grid=100x31
|0: 0-1 d,#343b2e, 2-85 #d5d8b8,#343b2e, 86-94 #f3f2cc,#4f5834, 95-99 #f3f2cc,#343b2e,
|1: 0-1 d,#9b583f, 2-49 #e1e4c4,#4a583e, 50-51 #e1e4c4,#9b583f, 52-99 #d5d8b8,#343b2e,
|2: 0-1 d,#d8bd83, 2-28 #e1e4c4,#4a583e, 29-38 #c5e7f7,#4a583e, 39-49 #e1e4c4,#4a583e, 50-51 #e1e4c4,#7b7e4e, 52-78 #d5d8b8,#343b2e, 79-88 #badbeb,#343b2e, 89-99 #d5d8b8,#343b2e,
|3: 0-1 d,#4a583e, 2-49 #e1e4c4,#4a583e, 50-51 #e1e4c4,#343b2e, 52-99 #d5d8b8,#343b2e,
-|4: 0-0 d,#888e5e, 1-1 d,#100e0b, 2-38 #f3f2cc,#100e0b, 39-39 #f3f2cc,#343b2e, 40-49 #d5d8b8,#343b2e, 50-50 #d5d8b8,#888e5e, 51-51 #d5d8b8,#100e0b, 52-99 #f3f2cc,#100e0b,
+|4: 0-0 d,#888e5e, 1-1 d,#100e0b, 2-49 #f3f2cc,#100e0b, 50-50 #f3f2cc,#888e5e, 51-99 #f3f2cc,#100e0b,
|5: 0-0 d,#888e5e, 1-1 d,#100e0b, 2-49 #f3f2cc,#100e0b, 50-50 #f3f2cc,#888e5e, 51-99 #f3f2cc,#100e0b,
|6: 0-0 d,#888e5e, 1-49 d,#100e0b, 50-50 d,#888e5e, 51-99 d,#100e0b,
|7: 0-0 d,#888e5e, 1-49 d,#100e0b, 50-50 d,#888e5e, 51-99 d,#100e0b,
@@ -368,11 +387,11 @@
|13: 0-0 d,#888e5e, 1-49 d,#100e0b, 50-50 d,#888e5e, 51-99 d,#100e0b,
|14: 0-0 d,#888e5e, 1-49 d,#100e0b, 50-50 d,#888e5e, 51-99 d,#100e0b,
|15: 0-0 d,#888e5e, 1-49 d,#100e0b, 50-50 d,#888e5e, 51-99 d,#100e0b,
-|16: 0-0 d,#888e5e, 1-49 d,#100e0b, 50-50 d,#888e5e, 51-99 d,#100e0b,
-|17: 0-1 d,#7b7e4e, 2-28 #d5d8b8,#343b2e, 29-38 #badbeb,#343b2e, 39-49 #d5d8b8,#343b2e, 50-50 #d5d8b8,#888e5e, 51-99 #d5d8b8,#100e0b,
-|18: 0-1 d,#343b2e, 2-49 #d5d8b8,#343b2e, 50-50 #d5d8b8,#888e5e, 51-99 #d5d8b8,#100e0b,
+|16: 0-1 d,#7b7e4e, 2-28 #d5d8b8,#343b2e, 29-38 #badbeb,#343b2e, 39-49 #d5d8b8,#343b2e, 50-50 #d5d8b8,#888e5e, 51-99 #d5d8b8,#100e0b,
+|17: 0-1 d,#343b2e, 2-49 #d5d8b8,#343b2e, 50-50 #d5d8b8,#888e5e, 51-99 #d5d8b8,#100e0b,
+|18: 0-0 d,#888e5e, 1-1 d,#100e0b, 2-49 #f3f2cc,#100e0b, 50-50 #f3f2cc,#888e5e, 51-99 #f3f2cc,#100e0b,
|19: 0-0 d,#888e5e, 1-1 d,#100e0b, 2-49 #f3f2cc,#100e0b, 50-50 #f3f2cc,#888e5e, 51-99 #f3f2cc,#100e0b,
-|20: 0-0 d,#888e5e, 1-1 d,#100e0b, 2-49 #f3f2cc,#100e0b, 50-50 #f3f2cc,#888e5e, 51-99 #f3f2cc,#100e0b,
+|20: 0-0 d,#888e5e, 1-49 d,#100e0b, 50-50 d,#888e5e, 51-99 d,#100e0b,
|21: 0-0 d,#888e5e, 1-49 d,#100e0b, 50-50 d,#888e5e, 51-99 d,#100e0b,
|22: 0-0 d,#888e5e, 1-49 d,#100e0b, 50-50 d,#888e5e, 51-99 d,#100e0b,
|23: 0-0 d,#888e5e, 1-49 d,#100e0b, 50-50 d,#888e5e, 51-99 d,#100e0b,
@@ -382,14 +401,15 @@
|27: 0-0 d,#888e5e, 1-49 d,#100e0b, 50-50 d,#888e5e, 51-99 d,#100e0b,
|28: 0-0 d,#888e5e, 1-49 d,#100e0b, 50-50 d,#888e5e, 51-99 d,#100e0b,
|29: 0-0 d,#888e5e, 1-49 d,#100e0b, 50-50 d,#888e5e, 51-99 d,#100e0b,
-|30: 0-0 d,#888e5e, 1-49 d,#100e0b, 50-50 d,#888e5e, 51-99 d,#100e0b,
+|30: 0-1 d,#343b2e, 2-99 #848973,#343b2e,
== snap clay grid=100x31 cursor=4,6
+|30: ✓ @p1 NextColor ×11 1 message · SPC h m
== style clay grid=100x31
|0: 0-1 d,#343f36, 2-85 #d7d6b6,#343f36, 86-94 #fbf1c7,#505c38, 95-99 #fbf1c7,#343f36,
|1: 0-1 d,#875e65, 2-49 #e3e2c2,#4d5c48, 50-51 #e3e2c2,#875e65, 52-99 #d7d6b6,#343f36,
|2: 0-1 d,#8ac874, 2-28 #e3e2c2,#4d5c48, 29-38 #b5ecec,#4d5c48, 39-49 #e3e2c2,#4d5c48, 50-51 #e3e2c2,#687c4d, 52-78 #d7d6b6,#343f36, 79-88 #aae0e0,#343f36, 89-99 #d7d6b6,#343f36,
|3: 0-1 d,#4d5c48, 2-49 #e3e2c2,#4d5c48, 50-51 #e3e2c2,#343f36, 52-99 #d7d6b6,#343f36,
-|4: 0-0 d,#8c9467, 1-1 d,#10100e, 2-38 #f3e5bc,#10100e, 39-39 #f3e5bc,#343f36, 40-49 #d7d6b6,#343f36, 50-50 #d7d6b6,#8c9467, 51-51 #d7d6b6,#10100e, 52-99 #f3e5bc,#10100e,
+|4: 0-0 d,#8c9467, 1-1 d,#10100e, 2-49 #f3e5bc,#10100e, 50-50 #f3e5bc,#8c9467, 51-99 #f3e5bc,#10100e,
|5: 0-0 d,#8c9467, 1-1 d,#10100e, 2-49 #f3e5bc,#10100e, 50-50 #f3e5bc,#8c9467, 51-99 #f3e5bc,#10100e,
|6: 0-0 d,#8c9467, 1-49 d,#10100e, 50-50 d,#8c9467, 51-99 d,#10100e,
|7: 0-0 d,#8c9467, 1-49 d,#10100e, 50-50 d,#8c9467, 51-99 d,#10100e,
@@ -401,11 +421,11 @@
|13: 0-0 d,#8c9467, 1-49 d,#10100e, 50-50 d,#8c9467, 51-99 d,#10100e,
|14: 0-0 d,#8c9467, 1-49 d,#10100e, 50-50 d,#8c9467, 51-99 d,#10100e,
|15: 0-0 d,#8c9467, 1-49 d,#10100e, 50-50 d,#8c9467, 51-99 d,#10100e,
-|16: 0-0 d,#8c9467, 1-49 d,#10100e, 50-50 d,#8c9467, 51-99 d,#10100e,
-|17: 0-1 d,#687c4d, 2-28 #d7d6b6,#343f36, 29-38 #aae0e0,#343f36, 39-49 #d7d6b6,#343f36, 50-50 #d7d6b6,#8c9467, 51-99 #d7d6b6,#10100e,
-|18: 0-1 d,#343f36, 2-49 #d7d6b6,#343f36, 50-50 #d7d6b6,#8c9467, 51-99 #d7d6b6,#10100e,
+|16: 0-1 d,#687c4d, 2-28 #d7d6b6,#343f36, 29-38 #aae0e0,#343f36, 39-49 #d7d6b6,#343f36, 50-50 #d7d6b6,#8c9467, 51-99 #d7d6b6,#10100e,
+|17: 0-1 d,#343f36, 2-49 #d7d6b6,#343f36, 50-50 #d7d6b6,#8c9467, 51-99 #d7d6b6,#10100e,
+|18: 0-0 d,#8c9467, 1-1 d,#10100e, 2-49 #f3e5bc,#10100e, 50-50 #f3e5bc,#8c9467, 51-99 #f3e5bc,#10100e,
|19: 0-0 d,#8c9467, 1-1 d,#10100e, 2-49 #f3e5bc,#10100e, 50-50 #f3e5bc,#8c9467, 51-99 #f3e5bc,#10100e,
-|20: 0-0 d,#8c9467, 1-1 d,#10100e, 2-49 #f3e5bc,#10100e, 50-50 #f3e5bc,#8c9467, 51-99 #f3e5bc,#10100e,
+|20: 0-0 d,#8c9467, 1-49 d,#10100e, 50-50 d,#8c9467, 51-99 d,#10100e,
|21: 0-0 d,#8c9467, 1-49 d,#10100e, 50-50 d,#8c9467, 51-99 d,#10100e,
|22: 0-0 d,#8c9467, 1-49 d,#10100e, 50-50 d,#8c9467, 51-99 d,#10100e,
|23: 0-0 d,#8c9467, 1-49 d,#10100e, 50-50 d,#8c9467, 51-99 d,#10100e,
@@ -415,14 +435,15 @@
|27: 0-0 d,#8c9467, 1-49 d,#10100e, 50-50 d,#8c9467, 51-99 d,#10100e,
|28: 0-0 d,#8c9467, 1-49 d,#10100e, 50-50 d,#8c9467, 51-99 d,#10100e,
|29: 0-0 d,#8c9467, 1-49 d,#10100e, 50-50 d,#8c9467, 51-99 d,#10100e,
-|30: 0-0 d,#8c9467, 1-49 d,#10100e, 50-50 d,#8c9467, 51-99 d,#10100e,
+|30: 0-1 d,#343f36, 2-99 #858a76,#343f36,
== snap forge-black grid=100x31 cursor=4,6
+|30: ✓ @p1 NextColor ×12 1 message · SPC h m
== style forge-black grid=100x31
|0: 0-1 d,#22252b, 2-85 #c5c9d2,#22252b, 86-94 #e2eef4,#1c5172, 95-99 #e2eef4,#22252b,
|1: 0-1 d,#6a7b67, 2-49 #d1d5de,#374253, 50-51 #d1d5de,#6a7b67, 52-99 #c5c9d2,#22252b,
|2: 0-1 d,#9cc3f7, 2-28 #d1d5de,#374253, 29-38 #f8cba7,#374253, 39-49 #d1d5de,#374253, 50-51 #d1d5de,#55647b, 52-78 #c5c9d2,#22252b, 79-88 #ecbf9b,#22252b, 89-99 #c5c9d2,#22252b,
|3: 0-1 d,#374253, 2-49 #d1d5de,#374253, 50-51 #d1d5de,#22252b, 52-99 #c5c9d2,#22252b,
-|4: 0-0 d,#708095, 1-1 d,#000000, 2-38 #f6f6f6,#000000, 39-39 #f6f6f6,#22252b, 40-49 #c5c9d2,#22252b, 50-50 #c5c9d2,#708095, 51-51 #c5c9d2,#000000, 52-99 #f6f6f6,#000000,
+|4: 0-0 d,#708095, 1-1 d,#000000, 2-49 #f6f6f6,#000000, 50-50 #f6f6f6,#708095, 51-99 #f6f6f6,#000000,
|5: 0-0 d,#708095, 1-1 d,#000000, 2-49 #f6f6f6,#000000, 50-50 #f6f6f6,#708095, 51-99 #f6f6f6,#000000,
|6: 0-0 d,#708095, 1-49 d,#000000, 50-50 d,#708095, 51-99 d,#000000,
|7: 0-0 d,#708095, 1-49 d,#000000, 50-50 d,#708095, 51-99 d,#000000,
@@ -434,11 +455,11 @@
|13: 0-0 d,#708095, 1-49 d,#000000, 50-50 d,#708095, 51-99 d,#000000,
|14: 0-0 d,#708095, 1-49 d,#000000, 50-50 d,#708095, 51-99 d,#000000,
|15: 0-0 d,#708095, 1-49 d,#000000, 50-50 d,#708095, 51-99 d,#000000,
-|16: 0-0 d,#708095, 1-49 d,#000000, 50-50 d,#708095, 51-99 d,#000000,
-|17: 0-1 d,#55647b, 2-28 #c5c9d2,#22252b, 29-38 #ecbf9b,#22252b, 39-49 #c5c9d2,#22252b, 50-50 #c5c9d2,#708095, 51-99 #c5c9d2,#000000,
-|18: 0-1 d,#22252b, 2-49 #c5c9d2,#22252b, 50-50 #c5c9d2,#708095, 51-99 #c5c9d2,#000000,
+|16: 0-1 d,#55647b, 2-28 #c5c9d2,#22252b, 29-38 #ecbf9b,#22252b, 39-49 #c5c9d2,#22252b, 50-50 #c5c9d2,#708095, 51-99 #c5c9d2,#000000,
+|17: 0-1 d,#22252b, 2-49 #c5c9d2,#22252b, 50-50 #c5c9d2,#708095, 51-99 #c5c9d2,#000000,
+|18: 0-0 d,#708095, 1-1 d,#000000, 2-49 #f6f6f6,#000000, 50-50 #f6f6f6,#708095, 51-99 #f6f6f6,#000000,
|19: 0-0 d,#708095, 1-1 d,#000000, 2-49 #f6f6f6,#000000, 50-50 #f6f6f6,#708095, 51-99 #f6f6f6,#000000,
-|20: 0-0 d,#708095, 1-1 d,#000000, 2-49 #f6f6f6,#000000, 50-50 #f6f6f6,#708095, 51-99 #f6f6f6,#000000,
+|20: 0-0 d,#708095, 1-49 d,#000000, 50-50 d,#708095, 51-99 d,#000000,
|21: 0-0 d,#708095, 1-49 d,#000000, 50-50 d,#708095, 51-99 d,#000000,
|22: 0-0 d,#708095, 1-49 d,#000000, 50-50 d,#708095, 51-99 d,#000000,
|23: 0-0 d,#708095, 1-49 d,#000000, 50-50 d,#708095, 51-99 d,#000000,
@@ -448,14 +469,15 @@
|27: 0-0 d,#708095, 1-49 d,#000000, 50-50 d,#708095, 51-99 d,#000000,
|28: 0-0 d,#708095, 1-49 d,#000000, 50-50 d,#708095, 51-99 d,#000000,
|29: 0-0 d,#708095, 1-49 d,#000000, 50-50 d,#708095, 51-99 d,#000000,
-|30: 0-0 d,#708095, 1-49 d,#000000, 50-50 d,#708095, 51-99 d,#000000,
+|30: 0-1 d,#22252b, 2-99 #73777e,#22252b,
== snap forge-soft grid=100x31 cursor=4,6
+|30: ✓ @p1 NextColor ×13 1 message · SPC h m
== style forge-soft grid=100x31
|0: 0-1 d,#2a2d34, 2-85 #c5c9d2,#2a2d34, 86-94 #e2eef4,#1c5172, 95-99 #e2eef4,#2a2d34,
|1: 0-1 d,#6d7f6c, 2-49 #d1d5de,#404a58, 50-51 #d1d5de,#6d7f6c, 52-99 #c5c9d2,#2a2d34,
|2: 0-1 d,#9cc3f7, 2-28 #d1d5de,#404a58, 29-38 #f8cba7,#404a58, 39-49 #d1d5de,#404a58, 50-51 #d1d5de,#55647b, 52-78 #c5c9d2,#2a2d34, 79-88 #ecbf9b,#2a2d34, 89-99 #c5c9d2,#2a2d34,
|3: 0-1 d,#404a58, 2-49 #d1d5de,#404a58, 50-51 #d1d5de,#2a2d34, 52-99 #c5c9d2,#2a2d34,
-|4: 0-0 d,#708095, 1-1 d,#35383e, 2-38 #bfc3cc,#35383e, 39-39 #bfc3cc,#2a2d34, 40-49 #c5c9d2,#2a2d34, 50-50 #c5c9d2,#708095, 51-51 #c5c9d2,#35383e, 52-99 #bfc3cc,#35383e,
+|4: 0-0 d,#708095, 1-1 d,#35383e, 2-49 #bfc3cc,#35383e, 50-50 #bfc3cc,#708095, 51-99 #bfc3cc,#35383e,
|5: 0-0 d,#708095, 1-1 d,#35383e, 2-49 #bfc3cc,#35383e, 50-50 #bfc3cc,#708095, 51-99 #bfc3cc,#35383e,
|6: 0-0 d,#708095, 1-49 d,#35383e, 50-50 d,#708095, 51-99 d,#35383e,
|7: 0-0 d,#708095, 1-49 d,#35383e, 50-50 d,#708095, 51-99 d,#35383e,
@@ -467,11 +489,11 @@
|13: 0-0 d,#708095, 1-49 d,#35383e, 50-50 d,#708095, 51-99 d,#35383e,
|14: 0-0 d,#708095, 1-49 d,#35383e, 50-50 d,#708095, 51-99 d,#35383e,
|15: 0-0 d,#708095, 1-49 d,#35383e, 50-50 d,#708095, 51-99 d,#35383e,
-|16: 0-0 d,#708095, 1-49 d,#35383e, 50-50 d,#708095, 51-99 d,#35383e,
-|17: 0-1 d,#55647b, 2-28 #c5c9d2,#2a2d34, 29-38 #ecbf9b,#2a2d34, 39-49 #c5c9d2,#2a2d34, 50-50 #c5c9d2,#708095, 51-99 #c5c9d2,#35383e,
-|18: 0-1 d,#2a2d34, 2-49 #c5c9d2,#2a2d34, 50-50 #c5c9d2,#708095, 51-99 #c5c9d2,#35383e,
+|16: 0-1 d,#55647b, 2-28 #c5c9d2,#2a2d34, 29-38 #ecbf9b,#2a2d34, 39-49 #c5c9d2,#2a2d34, 50-50 #c5c9d2,#708095, 51-99 #c5c9d2,#35383e,
+|17: 0-1 d,#2a2d34, 2-49 #c5c9d2,#2a2d34, 50-50 #c5c9d2,#708095, 51-99 #c5c9d2,#35383e,
+|18: 0-0 d,#708095, 1-1 d,#35383e, 2-49 #bfc3cc,#35383e, 50-50 #bfc3cc,#708095, 51-99 #bfc3cc,#35383e,
|19: 0-0 d,#708095, 1-1 d,#35383e, 2-49 #bfc3cc,#35383e, 50-50 #bfc3cc,#708095, 51-99 #bfc3cc,#35383e,
-|20: 0-0 d,#708095, 1-1 d,#35383e, 2-49 #bfc3cc,#35383e, 50-50 #bfc3cc,#708095, 51-99 #bfc3cc,#35383e,
+|20: 0-0 d,#708095, 1-49 d,#35383e, 50-50 d,#708095, 51-99 d,#35383e,
|21: 0-0 d,#708095, 1-49 d,#35383e, 50-50 d,#708095, 51-99 d,#35383e,
|22: 0-0 d,#708095, 1-49 d,#35383e, 50-50 d,#708095, 51-99 d,#35383e,
|23: 0-0 d,#708095, 1-49 d,#35383e, 50-50 d,#708095, 51-99 d,#35383e,
@@ -481,14 +503,15 @@
|27: 0-0 d,#708095, 1-49 d,#35383e, 50-50 d,#708095, 51-99 d,#35383e,
|28: 0-0 d,#708095, 1-49 d,#35383e, 50-50 d,#708095, 51-99 d,#35383e,
|29: 0-0 d,#708095, 1-49 d,#35383e, 50-50 d,#708095, 51-99 d,#35383e,
-|30: 0-0 d,#708095, 1-49 d,#35383e, 50-50 d,#708095, 51-99 d,#35383e,
+|30: 0-1 d,#2a2d34, 2-99 #777b83,#2a2d34,
== snap orchard-black grid=100x31 cursor=4,6
+|30: ✓ @p1 NextColor ×14 1 message · SPC h m
== style orchard-black grid=100x31
|0: 0-1 d,#1d2824, 2-85 #b2c3b8,#1d2824, 86-94 #f5f7ee,#3c614a, 95-99 #f5f7ee,#1d2824,
|1: 0-1 d,#887455, 2-49 #becfc4,#314738, 50-51 #becfc4,#887455, 52-99 #b2c3b8,#1d2824,
|2: 0-1 d,#add38a, 2-28 #becfc4,#314738, 29-38 #dfbce5,#314738, 39-49 #becfc4,#314738, 50-51 #becfc4,#496656, 52-78 #b2c3b8,#1d2824, 79-88 #d3b0d9,#1d2824, 89-99 #b2c3b8,#1d2824,
|3: 0-1 d,#314738, 2-49 #becfc4,#314738, 50-51 #becfc4,#1d2824, 52-99 #b2c3b8,#1d2824,
-|4: 0-0 d,#608269, 1-1 d,#000000, 2-38 #f2f8ef,#000000, 39-39 #f2f8ef,#1d2824, 40-49 #b2c3b8,#1d2824, 50-50 #b2c3b8,#608269, 51-51 #b2c3b8,#000000, 52-99 #f2f8ef,#000000,
+|4: 0-0 d,#608269, 1-1 d,#000000, 2-49 #f2f8ef,#000000, 50-50 #f2f8ef,#608269, 51-99 #f2f8ef,#000000,
|5: 0-0 d,#608269, 1-1 d,#000000, 2-49 #f2f8ef,#000000, 50-50 #f2f8ef,#608269, 51-99 #f2f8ef,#000000,
|6: 0-0 d,#608269, 1-49 d,#000000, 50-50 d,#608269, 51-99 d,#000000,
|7: 0-0 d,#608269, 1-49 d,#000000, 50-50 d,#608269, 51-99 d,#000000,
@@ -500,11 +523,11 @@
|13: 0-0 d,#608269, 1-49 d,#000000, 50-50 d,#608269, 51-99 d,#000000,
|14: 0-0 d,#608269, 1-49 d,#000000, 50-50 d,#608269, 51-99 d,#000000,
|15: 0-0 d,#608269, 1-49 d,#000000, 50-50 d,#608269, 51-99 d,#000000,
-|16: 0-0 d,#608269, 1-49 d,#000000, 50-50 d,#608269, 51-99 d,#000000,
-|17: 0-1 d,#496656, 2-28 #b2c3b8,#1d2824, 29-38 #d3b0d9,#1d2824, 39-49 #b2c3b8,#1d2824, 50-50 #b2c3b8,#608269, 51-99 #b2c3b8,#000000,
-|18: 0-1 d,#1d2824, 2-49 #b2c3b8,#1d2824, 50-50 #b2c3b8,#608269, 51-99 #b2c3b8,#000000,
+|16: 0-1 d,#496656, 2-28 #b2c3b8,#1d2824, 29-38 #d3b0d9,#1d2824, 39-49 #b2c3b8,#1d2824, 50-50 #b2c3b8,#608269, 51-99 #b2c3b8,#000000,
+|17: 0-1 d,#1d2824, 2-49 #b2c3b8,#1d2824, 50-50 #b2c3b8,#608269, 51-99 #b2c3b8,#000000,
+|18: 0-0 d,#608269, 1-1 d,#000000, 2-49 #f2f8ef,#000000, 50-50 #f2f8ef,#608269, 51-99 #f2f8ef,#000000,
|19: 0-0 d,#608269, 1-1 d,#000000, 2-49 #f2f8ef,#000000, 50-50 #f2f8ef,#608269, 51-99 #f2f8ef,#000000,
-|20: 0-0 d,#608269, 1-1 d,#000000, 2-49 #f2f8ef,#000000, 50-50 #f2f8ef,#608269, 51-99 #f2f8ef,#000000,
+|20: 0-0 d,#608269, 1-49 d,#000000, 50-50 d,#608269, 51-99 d,#000000,
|21: 0-0 d,#608269, 1-49 d,#000000, 50-50 d,#608269, 51-99 d,#000000,
|22: 0-0 d,#608269, 1-49 d,#000000, 50-50 d,#608269, 51-99 d,#000000,
|23: 0-0 d,#608269, 1-49 d,#000000, 50-50 d,#608269, 51-99 d,#000000,
@@ -514,14 +537,15 @@
|27: 0-0 d,#608269, 1-49 d,#000000, 50-50 d,#608269, 51-99 d,#000000,
|28: 0-0 d,#608269, 1-49 d,#000000, 50-50 d,#608269, 51-99 d,#000000,
|29: 0-0 d,#608269, 1-49 d,#000000, 50-50 d,#608269, 51-99 d,#000000,
-|30: 0-0 d,#608269, 1-49 d,#000000, 50-50 d,#608269, 51-99 d,#000000,
+|30: 0-1 d,#1d2824, 2-99 #67756e,#1d2824,
== snap acme grid=100x31 cursor=4,6
+|30: ✓ @p1 NextColor ×15 1 message · SPC h m
== style acme grid=100x31
|0: 0-1 d,#eaffff, 2-85 #000000,#eaffff, 86-94 #000000,#9eeeee, 95-99 #000000,#eaffff,
|1: 0-1 d,#8888cc, 2-49 #000000,#eaffff, 50-51 #000000,#8888cc, 52-99 #000000,#eaffff,
|2: 0-1 d,#8888cc, 2-28 #000000,#eaffff, 29-38 #000099,#eaffff, 39-49 #000000,#eaffff, 50-51 #000000,#b9c3e5, 52-78 #000000,#eaffff, 79-88 #000099,#eaffff, 89-99 #000000,#eaffff,
|3: 0-1 d,#eaffff, 2-99 #000000,#eaffff,
-|4: 0-1 d,#ffffea, 2-38 #000000,#ffffea, 39-49 #000000,#eaffff, 50-99 #000000,#ffffea,
+|4: 0-1 d,#ffffea, 2-99 #000000,#ffffea,
|5: 0-1 d,#ffffea, 2-99 #000000,#ffffea,
|6: 0-99 d,#ffffea,
|7: 0-99 d,#ffffea,
@@ -533,11 +557,11 @@
|13: 0-99 d,#ffffea,
|14: 0-99 d,#ffffea,
|15: 0-99 d,#ffffea,
-|16: 0-99 d,#ffffea,
-|17: 0-1 d,#b9c3e5, 2-28 #000000,#eaffff, 29-38 #000099,#eaffff, 39-49 #000000,#eaffff, 50-99 #000000,#ffffea,
-|18: 0-1 d,#eaffff, 2-49 #000000,#eaffff, 50-99 #000000,#ffffea,
+|16: 0-1 d,#b9c3e5, 2-28 #000000,#eaffff, 29-38 #000099,#eaffff, 39-49 #000000,#eaffff, 50-99 #000000,#ffffea,
+|17: 0-1 d,#eaffff, 2-49 #000000,#eaffff, 50-99 #000000,#ffffea,
+|18: 0-1 d,#ffffea, 2-99 #000000,#ffffea,
|19: 0-1 d,#ffffea, 2-99 #000000,#ffffea,
-|20: 0-1 d,#ffffea, 2-99 #000000,#ffffea,
+|20: 0-99 d,#ffffea,
|21: 0-99 d,#ffffea,
|22: 0-99 d,#ffffea,
|23: 0-99 d,#ffffea,
@@ -547,14 +571,15 @@
|27: 0-99 d,#ffffea,
|28: 0-99 d,#ffffea,
|29: 0-99 d,#ffffea,
-|30: 0-99 d,#ffffea,
+|30: 0-1 d,#eaffff, 2-99 #757f7f,#eaffff,
== snap lapis grid=100x31 cursor=4,6
+|30: ✓ @p1 NextColor ×16 1 message · SPC h m
== style lapis grid=100x31
|0: 0-1 d,#0f1a4a, 2-85 #9aa6d9,#0f1a4a, 86-94 #0f1a4a,#e8c46a, 95-99 #0f1a4a,#0f1a4a,
|1: 0-1 d,#8a3a3a, 2-49 #eee6d2,#25397d, 50-51 #eee6d2,#8a3a3a, 52-99 #9aa6d9,#0f1a4a,
|2: 0-1 d,#e8c46a, 2-28 #eee6d2,#25397d, 29-38 #f2d280,#25397d, 39-49 #eee6d2,#25397d, 50-51 #eee6d2,#6a78b1, 52-78 #9aa6d9,#0f1a4a, 79-88 #e8c46a,#0f1a4a, 89-99 #9aa6d9,#0f1a4a,
|3: 0-1 d,#25397d, 2-49 #eee6d2,#25397d, 50-51 #eee6d2,#0f1a4a, 52-99 #9aa6d9,#0f1a4a,
-|4: 0-0 d,#e8c46a, 1-1 d,#0a1030, 2-38 #eee6d2,#0a1030, 39-39 #eee6d2,#0f1a4a, 40-49 #9aa6d9,#0f1a4a, 50-50 #9aa6d9,#e8c46a, 51-51 #9aa6d9,#0a1030, 52-99 #eee6d2,#0a1030,
+|4: 0-0 d,#e8c46a, 1-1 d,#0a1030, 2-49 #eee6d2,#0a1030, 50-50 #eee6d2,#e8c46a, 51-99 #eee6d2,#0a1030,
|5: 0-0 d,#e8c46a, 1-1 d,#0a1030, 2-49 #eee6d2,#0a1030, 50-50 #eee6d2,#e8c46a, 51-99 #eee6d2,#0a1030,
|6: 0-0 d,#e8c46a, 1-49 d,#0a1030, 50-50 d,#e8c46a, 51-99 d,#0a1030,
|7: 0-0 d,#e8c46a, 1-49 d,#0a1030, 50-50 d,#e8c46a, 51-99 d,#0a1030,
@@ -566,11 +591,11 @@
|13: 0-0 d,#e8c46a, 1-49 d,#0a1030, 50-50 d,#e8c46a, 51-99 d,#0a1030,
|14: 0-0 d,#e8c46a, 1-49 d,#0a1030, 50-50 d,#e8c46a, 51-99 d,#0a1030,
|15: 0-0 d,#e8c46a, 1-49 d,#0a1030, 50-50 d,#e8c46a, 51-99 d,#0a1030,
-|16: 0-0 d,#e8c46a, 1-49 d,#0a1030, 50-50 d,#e8c46a, 51-99 d,#0a1030,
-|17: 0-1 d,#6a78b1, 2-28 #9aa6d9,#0f1a4a, 29-38 #e8c46a,#0f1a4a, 39-49 #9aa6d9,#0f1a4a, 50-50 #9aa6d9,#e8c46a, 51-99 #9aa6d9,#0a1030,
-|18: 0-1 d,#0f1a4a, 2-49 #9aa6d9,#0f1a4a, 50-50 #9aa6d9,#e8c46a, 51-99 #9aa6d9,#0a1030,
+|16: 0-1 d,#6a78b1, 2-28 #9aa6d9,#0f1a4a, 29-38 #e8c46a,#0f1a4a, 39-49 #9aa6d9,#0f1a4a, 50-50 #9aa6d9,#e8c46a, 51-99 #9aa6d9,#0a1030,
+|17: 0-1 d,#0f1a4a, 2-49 #9aa6d9,#0f1a4a, 50-50 #9aa6d9,#e8c46a, 51-99 #9aa6d9,#0a1030,
+|18: 0-0 d,#e8c46a, 1-1 d,#0a1030, 2-49 #eee6d2,#0a1030, 50-50 #eee6d2,#e8c46a, 51-99 #eee6d2,#0a1030,
|19: 0-0 d,#e8c46a, 1-1 d,#0a1030, 2-49 #eee6d2,#0a1030, 50-50 #eee6d2,#e8c46a, 51-99 #eee6d2,#0a1030,
-|20: 0-0 d,#e8c46a, 1-1 d,#0a1030, 2-49 #eee6d2,#0a1030, 50-50 #eee6d2,#e8c46a, 51-99 #eee6d2,#0a1030,
+|20: 0-0 d,#e8c46a, 1-49 d,#0a1030, 50-50 d,#e8c46a, 51-99 d,#0a1030,
|21: 0-0 d,#e8c46a, 1-49 d,#0a1030, 50-50 d,#e8c46a, 51-99 d,#0a1030,
|22: 0-0 d,#e8c46a, 1-49 d,#0a1030, 50-50 d,#e8c46a, 51-99 d,#0a1030,
|23: 0-0 d,#e8c46a, 1-49 d,#0a1030, 50-50 d,#e8c46a, 51-99 d,#0a1030,
@@ -580,14 +605,15 @@
|27: 0-0 d,#e8c46a, 1-49 d,#0a1030, 50-50 d,#e8c46a, 51-99 d,#0a1030,
|28: 0-0 d,#e8c46a, 1-49 d,#0a1030, 50-50 d,#e8c46a, 51-99 d,#0a1030,
|29: 0-0 d,#e8c46a, 1-49 d,#0a1030, 50-50 d,#e8c46a, 51-99 d,#0a1030,
-|30: 0-0 d,#e8c46a, 1-49 d,#0a1030, 50-50 d,#e8c46a, 51-99 d,#0a1030,
+|30: 0-1 d,#0f1a4a, 2-99 #546091,#0f1a4a,
== snap dark-plus grid=100x31 cursor=4,6
+|30: ✓ @p1 NextColor ×17 1 message · SPC h m
== style dark-plus grid=100x31
|0: 0-1 d,#007acc, 2-85 #ffffff,#007acc, 86-94 #d4d4d4,#264f78, 95-99 #d4d4d4,#007acc,
|1: 0-1 d,#458276, 2-49 #ffffff,#1e1e1e, 50-51 #ffffff,#458276, 52-99 #a7a7a7,#3c3c3c,
|2: 0-1 d,#007fd4, 2-28 #ffffff,#1e1e1e, 29-38 #cbe5fc,#1e1e1e, 39-49 #ffffff,#1e1e1e, 50-51 #ffffff,#1c608e, 52-78 #a7a7a7,#3c3c3c, 79-88 #68aee9,#3c3c3c, 89-99 #a7a7a7,#3c3c3c,
|3: 0-1 d,#1e1e1e, 2-49 #ffffff,#1e1e1e, 50-51 #ffffff,#3c3c3c, 52-99 #a7a7a7,#3c3c3c,
-|4: 0-0 d,#424242, 1-1 d,#1e1e1e, 2-38 #d4d4d4,#1e1e1e, 39-39 #d4d4d4,#3c3c3c, 40-49 #a7a7a7,#3c3c3c, 50-50 #a7a7a7,#424242, 51-51 #a7a7a7,#1e1e1e, 52-99 #d4d4d4,#1e1e1e,
+|4: 0-0 d,#424242, 1-1 d,#1e1e1e, 2-49 #d4d4d4,#1e1e1e, 50-50 #d4d4d4,#424242, 51-99 #d4d4d4,#1e1e1e,
|5: 0-0 d,#424242, 1-1 d,#1e1e1e, 2-49 #d4d4d4,#1e1e1e, 50-50 #d4d4d4,#424242, 51-99 #d4d4d4,#1e1e1e,
|6: 0-0 d,#424242, 1-49 d,#1e1e1e, 50-50 d,#424242, 51-99 d,#1e1e1e,
|7: 0-0 d,#424242, 1-49 d,#1e1e1e, 50-50 d,#424242, 51-99 d,#1e1e1e,
@@ -599,11 +625,11 @@
|13: 0-0 d,#424242, 1-49 d,#1e1e1e, 50-50 d,#424242, 51-99 d,#1e1e1e,
|14: 0-0 d,#424242, 1-49 d,#1e1e1e, 50-50 d,#424242, 51-99 d,#1e1e1e,
|15: 0-0 d,#424242, 1-49 d,#1e1e1e, 50-50 d,#424242, 51-99 d,#1e1e1e,
-|16: 0-0 d,#424242, 1-49 d,#1e1e1e, 50-50 d,#424242, 51-99 d,#1e1e1e,
-|17: 0-1 d,#1c608e, 2-28 #a7a7a7,#3c3c3c, 29-38 #68aee9,#3c3c3c, 39-49 #a7a7a7,#3c3c3c, 50-50 #a7a7a7,#424242, 51-99 #a7a7a7,#1e1e1e,
-|18: 0-1 d,#3c3c3c, 2-49 #a7a7a7,#3c3c3c, 50-50 #a7a7a7,#424242, 51-99 #a7a7a7,#1e1e1e,
+|16: 0-1 d,#1c608e, 2-28 #a7a7a7,#3c3c3c, 29-38 #68aee9,#3c3c3c, 39-49 #a7a7a7,#3c3c3c, 50-50 #a7a7a7,#424242, 51-99 #a7a7a7,#1e1e1e,
+|17: 0-1 d,#3c3c3c, 2-49 #a7a7a7,#3c3c3c, 50-50 #a7a7a7,#424242, 51-99 #a7a7a7,#1e1e1e,
+|18: 0-0 d,#424242, 1-1 d,#1e1e1e, 2-49 #d4d4d4,#1e1e1e, 50-50 #d4d4d4,#424242, 51-99 #d4d4d4,#1e1e1e,
|19: 0-0 d,#424242, 1-1 d,#1e1e1e, 2-49 #d4d4d4,#1e1e1e, 50-50 #d4d4d4,#424242, 51-99 #d4d4d4,#1e1e1e,
-|20: 0-0 d,#424242, 1-1 d,#1e1e1e, 2-49 #d4d4d4,#1e1e1e, 50-50 #d4d4d4,#424242, 51-99 #d4d4d4,#1e1e1e,
+|20: 0-0 d,#424242, 1-49 d,#1e1e1e, 50-50 d,#424242, 51-99 d,#1e1e1e,
|21: 0-0 d,#424242, 1-49 d,#1e1e1e, 50-50 d,#424242, 51-99 d,#1e1e1e,
|22: 0-0 d,#424242, 1-49 d,#1e1e1e, 50-50 d,#424242, 51-99 d,#1e1e1e,
|23: 0-0 d,#424242, 1-49 d,#1e1e1e, 50-50 d,#424242, 51-99 d,#1e1e1e,
@@ -613,14 +639,15 @@
|27: 0-0 d,#424242, 1-49 d,#1e1e1e, 50-50 d,#424242, 51-99 d,#1e1e1e,
|28: 0-0 d,#424242, 1-49 d,#1e1e1e, 50-50 d,#424242, 51-99 d,#1e1e1e,
|29: 0-0 d,#424242, 1-49 d,#1e1e1e, 50-50 d,#424242, 51-99 d,#1e1e1e,
-|30: 0-0 d,#424242, 1-49 d,#1e1e1e, 50-50 d,#424242, 51-99 d,#1e1e1e,
+|30: 0-1 d,#007acc, 2-99 #7fbce5,#007acc,
== snap solarized-dark grid=100x31 cursor=4,6
+|30: ✓ @p1 NextColor ×18 1 message · SPC h m
== style solarized-dark grid=100x31
|0: 0-1 d,#657b83, 2-85 #01090b,#657b83, 86-94 #002b36,#586e75, 95-99 #002b36,#657b83,
|1: 0-1 d,#758a41, 2-49 #073642,#93a1a1, 50-51 #073642,#758a41, 52-99 #01090b,#657b83,
|2: 0-1 d,#2483c5, 2-28 #073642,#93a1a1, 29-38 #2d3502,#93a1a1, 39-49 #073642,#93a1a1, 50-51 #073642,#185986, 52-78 #01090b,#657b83, 79-88 #121600,#657b83, 89-99 #01090b,#657b83,
|3: 0-1 d,#93a1a1, 2-49 #073642,#93a1a1, 50-51 #073642,#657b83, 52-99 #01090b,#657b83,
-|4: 0-0 d,#839496, 1-1 d,#002b36, 2-38 #839496,#002b36, 39-39 #839496,#657b83, 40-49 #01090b,#657b83, 50-50 #01090b,#839496, 51-51 #01090b,#002b36, 52-99 #839496,#002b36,
+|4: 0-0 d,#839496, 1-1 d,#002b36, 2-49 #839496,#002b36, 50-50 #839496,#839496, 51-99 #839496,#002b36,
|5: 0-0 d,#839496, 1-1 d,#002b36, 2-49 #839496,#002b36, 50-50 #839496,#839496, 51-99 #839496,#002b36,
|6: 0-0 d,#839496, 1-49 d,#002b36, 50-50 d,#839496, 51-99 d,#002b36,
|7: 0-0 d,#839496, 1-49 d,#002b36, 50-50 d,#839496, 51-99 d,#002b36,
@@ -632,11 +659,11 @@
|13: 0-0 d,#839496, 1-49 d,#002b36, 50-50 d,#839496, 51-99 d,#002b36,
|14: 0-0 d,#839496, 1-49 d,#002b36, 50-50 d,#839496, 51-99 d,#002b36,
|15: 0-0 d,#839496, 1-49 d,#002b36, 50-50 d,#839496, 51-99 d,#002b36,
-|16: 0-0 d,#839496, 1-49 d,#002b36, 50-50 d,#839496, 51-99 d,#002b36,
-|17: 0-1 d,#185986, 2-28 #01090b,#657b83, 29-38 #121600,#657b83, 39-49 #01090b,#657b83, 50-50 #01090b,#839496, 51-99 #01090b,#002b36,
-|18: 0-1 d,#657b83, 2-49 #01090b,#657b83, 50-50 #01090b,#839496, 51-99 #01090b,#002b36,
+|16: 0-1 d,#185986, 2-28 #01090b,#657b83, 29-38 #121600,#657b83, 39-49 #01090b,#657b83, 50-50 #01090b,#839496, 51-99 #01090b,#002b36,
+|17: 0-1 d,#657b83, 2-49 #01090b,#657b83, 50-50 #01090b,#839496, 51-99 #01090b,#002b36,
+|18: 0-0 d,#839496, 1-1 d,#002b36, 2-49 #839496,#002b36, 50-50 #839496,#839496, 51-99 #839496,#002b36,
|19: 0-0 d,#839496, 1-1 d,#002b36, 2-49 #839496,#002b36, 50-50 #839496,#839496, 51-99 #839496,#002b36,
-|20: 0-0 d,#839496, 1-1 d,#002b36, 2-49 #839496,#002b36, 50-50 #839496,#839496, 51-99 #839496,#002b36,
+|20: 0-0 d,#839496, 1-49 d,#002b36, 50-50 d,#839496, 51-99 d,#002b36,
|21: 0-0 d,#839496, 1-49 d,#002b36, 50-50 d,#839496, 51-99 d,#002b36,
|22: 0-0 d,#839496, 1-49 d,#002b36, 50-50 d,#839496, 51-99 d,#002b36,
|23: 0-0 d,#839496, 1-49 d,#002b36, 50-50 d,#839496, 51-99 d,#002b36,
@@ -646,4 +673,4 @@
|27: 0-0 d,#839496, 1-49 d,#002b36, 50-50 d,#839496, 51-99 d,#002b36,
|28: 0-0 d,#839496, 1-49 d,#002b36, 50-50 d,#839496, 51-99 d,#002b36,
|29: 0-0 d,#839496, 1-49 d,#002b36, 50-50 d,#839496, 51-99 d,#002b36,
-|30: 0-0 d,#839496, 1-49 d,#002b36, 50-50 d,#839496, 51-99 d,#002b36,
+|30: 0-1 d,#657b83, 2-99 #334247,#657b83,
diff --git a/test/snapshots/themesel.golden b/test/snapshots/themesel.golden
index a1d5e10a..f51dda64 100644
--- a/test/snapshots/themesel.golden
+++ b/test/snapshots/themesel.golden
@@ -1,7 +1,7 @@
== snap boot grid=100x31 cursor=7,3
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/themesel/cwd/t.txt Save Term Collapse Follow Del
+| /tmp/pardes-snap/themesel/cwd/t.txt Keep Save Term Collapse Follow Del
| 1 line 1
| 2 line 2
| 3 line 3
@@ -29,9 +29,8 @@
| 25 line 25
| 26 line 26
| 27 line 27
-| 28 line 28
+| /tmp/pardes-snap/themesel/cwd/t.txt:1
== snap list grid=100x31 cursor=7,3
-|3: 1 line 1 Themes
|16: /tmp/pardes-snap/themesel/cwd/+Themes Save Term Collapse Follow Del
|17: 1 # Pardes themes
|18: 2 Theme orchard
@@ -46,14 +45,13 @@
|27: 11 Theme spectrum
|28: 12 Theme harvest
|29: 13 Theme clay
-|30: 14 Theme forge_black
+|30: ✓ /tmp/pardes-snap/themesel/cwd/t.txt Themes 1 message · SPC h m
== snap step-orchard grid=100x31 cursor=7,18
-|3: 1 line 1
-|17: 1 # Pardes themes Theme
+|30: ✓ /tmp/pardes-snap/themesel/cwd/+Themes Theme 3 messages · SPC h m
== style step-orchard grid=100x31
|0: 0-1 d,#1d2824, 2-99 #b2c3b8,#1d2824,
|1: 0-1 d,#887455, 2-99 #becfc4,#314738,
-|2: 0-1 d,#496656, 2-31 #b2c3b8,#1d2824, 32-37 #d3b0d9,#1d2824, 38-99 #b2c3b8,#1d2824,
+|2: 0-1 d,#496656, 2-31 #b2c3b8,#2c2819, 32-37 #d3b0d9,#2c2819, 38-99 #b2c3b8,#2c2819,
|3: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-99 #e5eee5,#0d1410,
|4: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-99 #e5eee5,#0d1410,
|5: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-99 #e5eee5,#0d1410,
@@ -68,7 +66,7 @@
|14: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-99 #e5eee5,#0d1410,
|15: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-99 #e5eee5,#0d1410,
|16: 0-1 d,#add38a, 2-31 #becfc4,#314738, 32-39 #dfbce5,#314738, 40-99 #becfc4,#314738,
-|17: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-92 #e5eee5,#0d1410, 93-93 #e5eee5,#1d2824, 94-99 #b2c3b8,#1d2824,
+|17: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-99 #e5eee5,#0d1410,
|18: 0-0 d,#152019, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-99 #e5eee5,#0d1410,
|19: 0-0 d,#152019, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-99 #e5eee5,#0d1410,
|20: 0-0 d,#152019, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-99 #e5eee5,#0d1410,
@@ -81,12 +79,13 @@
|27: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-99 #e5eee5,#0d1410,
|28: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-99 #e5eee5,#0d1410,
|29: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-99 #e5eee5,#0d1410,
-|30: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-99 #e5eee5,#0d1410,
+|30: 0-1 d,#1d2824, 2-99 #67756e,#1d2824,
== snap step-dusk grid=100x31 cursor=7,19
+|30: ✓ /tmp/pardes-snap/themesel/cwd/+Themes Theme 5 messages · SPC h m
== style step-dusk grid=100x31
|0: 0-1 d,#2c2630, 2-99 #c6b6c5,#2c2630,
|1: 0-1 d,#757a5f, 2-99 #d2c2d1,#533d4d,
-|2: 0-1 d,#745469, 2-31 #c6b6c5,#2c2630, 32-37 #96c9b8,#2c2630, 38-99 #c6b6c5,#2c2630,
+|2: 0-1 d,#745469, 2-31 #c6b6c5,#4a3c35, 32-37 #96c9b8,#4a3c35, 38-99 #c6b6c5,#4a3c35,
|3: 0-0 d,#8e667c, 1-4 d,#39323b, 5-6 #82717e,#39323b, 7-99 #c3b6c1,#39323b,
|4: 0-0 d,#8e667c, 1-4 d,#39323b, 5-6 #82717e,#39323b, 7-99 #c3b6c1,#39323b,
|5: 0-0 d,#8e667c, 1-4 d,#39323b, 5-6 #82717e,#39323b, 7-99 #c3b6c1,#39323b,
@@ -101,7 +100,7 @@
|14: 0-0 d,#3d3540, 1-3 d,#39323b, 4-6 #82717e,#39323b, 7-99 #c3b6c1,#39323b,
|15: 0-0 d,#3d3540, 1-3 d,#39323b, 4-6 #82717e,#39323b, 7-99 #c3b6c1,#39323b,
|16: 0-1 d,#edb092, 2-31 #d2c2d1,#533d4d, 32-39 #a1d5c4,#533d4d, 40-99 #d2c2d1,#533d4d,
-|17: 0-0 d,#8e667c, 1-4 d,#39323b, 5-6 #82717e,#39323b, 7-92 #c3b6c1,#39323b, 93-93 #c3b6c1,#2c2630, 94-99 #c6b6c5,#2c2630,
+|17: 0-0 d,#8e667c, 1-4 d,#39323b, 5-6 #82717e,#39323b, 7-99 #c3b6c1,#39323b,
|18: 0-0 d,#3d3540, 1-4 d,#39323b, 5-6 #82717e,#39323b, 7-99 #c3b6c1,#39323b,
|19: 0-0 d,#3d3540, 1-1 d,#39323b, 2-4 d,#39323b,b 5-6 #8a7986,#39323b,b 7-99 #c3b6c1,#39323b,
|20: 0-0 d,#3d3540, 1-4 d,#39323b, 5-6 #82717e,#39323b, 7-99 #c3b6c1,#39323b,
@@ -114,12 +113,13 @@
|27: 0-0 d,#3d3540, 1-3 d,#39323b, 4-6 #82717e,#39323b, 7-99 #c3b6c1,#39323b,
|28: 0-0 d,#3d3540, 1-3 d,#39323b, 4-6 #82717e,#39323b, 7-99 #c3b6c1,#39323b,
|29: 0-0 d,#3d3540, 1-3 d,#39323b, 4-6 #82717e,#39323b, 7-99 #c3b6c1,#39323b,
-|30: 0-0 d,#3d3540, 1-3 d,#39323b, 4-6 #82717e,#39323b, 7-99 #c3b6c1,#39323b,
+|30: 0-1 d,#2c2630, 2-99 #796e7a,#2c2630,
== snap step-atelier grid=100x31 cursor=7,23
+|30: ✓ /tmp/pardes-snap/themesel/cwd/+Themes Theme 7 messages · SPC h m
== style step-atelier grid=100x31
|0: 0-1 d,#e4f0ed, 2-99 #3d6055,#e4f0ed,
|1: 0-1 d,#bca481, 2-99 #35584d,#bfdcce,
-|2: 0-1 d,#95baa2, 2-31 #3d6055,#e4f0ed, 32-37 #6e4774,#e4f0ed, 38-99 #3d6055,#e4f0ed,
+|2: 0-1 d,#95baa2, 2-31 #3d6055,#fff1c4, 32-37 #6e4774,#fff1c4, 38-99 #3d6055,#fff1c4,
|3: 0-0 d,#9fae76, 1-4 d,#fffdeb, 5-6 #909880,#fffdeb, 7-99 #293f35,#fffdeb,
|4: 0-0 d,#9fae76, 1-4 d,#fffdeb, 5-6 #909880,#fffdeb, 7-99 #293f35,#fffdeb,
|5: 0-0 d,#9fae76, 1-4 d,#fffdeb, 5-6 #909880,#fffdeb, 7-99 #293f35,#fffdeb,
@@ -134,7 +134,7 @@
|14: 0-0 d,#eeeccf, 1-3 d,#fffdeb, 4-6 #909880,#fffdeb, 7-99 #293f35,#fffdeb,
|15: 0-0 d,#eeeccf, 1-3 d,#fffdeb, 4-6 #909880,#fffdeb, 7-99 #293f35,#fffdeb,
|16: 0-1 d,#36826b, 2-31 #35584d,#bfdcce, 32-39 #653f6b,#bfdcce, 40-99 #35584d,#bfdcce,
-|17: 0-0 d,#9fae76, 1-4 d,#fffdeb, 5-6 #909880,#fffdeb, 7-92 #293f35,#fffdeb, 93-93 #293f35,#e4f0ed, 94-99 #3d6055,#e4f0ed,
+|17: 0-0 d,#9fae76, 1-4 d,#fffdeb, 5-6 #909880,#fffdeb, 7-99 #293f35,#fffdeb,
|18: 0-0 d,#eeeccf, 1-4 d,#fffdeb, 5-6 #909880,#fffdeb, 7-99 #293f35,#fffdeb,
|19: 0-0 d,#eeeccf, 1-4 d,#fffdeb, 5-6 #909880,#fffdeb, 7-99 #293f35,#fffdeb,
|20: 0-0 d,#eeeccf, 1-4 d,#fffdeb, 5-6 #909880,#fffdeb, 7-99 #293f35,#fffdeb,
@@ -147,12 +147,13 @@
|27: 0-0 d,#eeeccf, 1-3 d,#fffdeb, 4-6 #909880,#fffdeb, 7-99 #293f35,#fffdeb,
|28: 0-0 d,#eeeccf, 1-3 d,#fffdeb, 4-6 #909880,#fffdeb, 7-99 #293f35,#fffdeb,
|29: 0-0 d,#eeeccf, 1-3 d,#fffdeb, 4-6 #909880,#fffdeb, 7-99 #293f35,#fffdeb,
-|30: 0-0 d,#eeeccf, 1-3 d,#fffdeb, 4-6 #909880,#fffdeb, 7-99 #293f35,#fffdeb,
+|30: 0-1 d,#e4f0ed, 2-99 #90a8a1,#e4f0ed,
== snap step-forge grid=100x31 cursor=7,24
+|30: ✓ /tmp/pardes-snap/themesel/cwd/+Themes Theme 9 messages · SPC h m
== style step-forge grid=100x31
|0: 0-1 d,#22252b, 2-99 #c5c9d2,#22252b,
|1: 0-1 d,#6a7b67, 2-99 #d1d5de,#374253,
-|2: 0-1 d,#55647b, 2-31 #c5c9d2,#22252b, 32-37 #ecbf9b,#22252b, 38-99 #c5c9d2,#22252b,
+|2: 0-1 d,#55647b, 2-31 #c5c9d2,#2b2417, 32-37 #ecbf9b,#2b2417, 38-99 #c5c9d2,#2b2417,
|3: 0-0 d,#708095, 1-4 d,#0c0c0e, 5-6 #62656c,#0c0c0e, 7-99 #e5e5e5,#0c0c0e,
|4: 0-0 d,#708095, 1-4 d,#0c0c0e, 5-6 #62656c,#0c0c0e, 7-99 #e5e5e5,#0c0c0e,
|5: 0-0 d,#708095, 1-4 d,#0c0c0e, 5-6 #62656c,#0c0c0e, 7-99 #e5e5e5,#0c0c0e,
@@ -167,7 +168,7 @@
|14: 0-0 d,#1a1c21, 1-3 d,#0c0c0e, 4-6 #62656c,#0c0c0e, 7-99 #e5e5e5,#0c0c0e,
|15: 0-0 d,#1a1c21, 1-3 d,#0c0c0e, 4-6 #62656c,#0c0c0e, 7-99 #e5e5e5,#0c0c0e,
|16: 0-1 d,#9cc3f7, 2-31 #d1d5de,#374253, 32-39 #f8cba7,#374253, 40-99 #d1d5de,#374253,
-|17: 0-0 d,#708095, 1-4 d,#0c0c0e, 5-6 #62656c,#0c0c0e, 7-92 #e5e5e5,#0c0c0e, 93-93 #e5e5e5,#22252b, 94-99 #c5c9d2,#22252b,
+|17: 0-0 d,#708095, 1-4 d,#0c0c0e, 5-6 #62656c,#0c0c0e, 7-99 #e5e5e5,#0c0c0e,
|18: 0-0 d,#1a1c21, 1-4 d,#0c0c0e, 5-6 #62656c,#0c0c0e, 7-99 #e5e5e5,#0c0c0e,
|19: 0-0 d,#1a1c21, 1-4 d,#0c0c0e, 5-6 #62656c,#0c0c0e, 7-99 #e5e5e5,#0c0c0e,
|20: 0-0 d,#1a1c21, 1-4 d,#0c0c0e, 5-6 #62656c,#0c0c0e, 7-99 #e5e5e5,#0c0c0e,
@@ -180,12 +181,13 @@
|27: 0-0 d,#1a1c21, 1-3 d,#0c0c0e, 4-6 #62656c,#0c0c0e, 7-99 #e5e5e5,#0c0c0e,
|28: 0-0 d,#1a1c21, 1-3 d,#0c0c0e, 4-6 #62656c,#0c0c0e, 7-99 #e5e5e5,#0c0c0e,
|29: 0-0 d,#1a1c21, 1-3 d,#0c0c0e, 4-6 #62656c,#0c0c0e, 7-99 #e5e5e5,#0c0c0e,
-|30: 0-0 d,#1a1c21, 1-3 d,#0c0c0e, 4-6 #62656c,#0c0c0e, 7-99 #e5e5e5,#0c0c0e,
+|30: 0-1 d,#22252b, 2-99 #73777e,#22252b,
== snap step-lagoon grid=100x31 cursor=7,25
+|30: ✓ /tmp/pardes-snap/themesel/cwd/+Themes Theme 11 messages · SPC h m
== style step-lagoon grid=100x31
|0: 0-1 d,#29443f, 2-99 #bbd7cb,#29443f,
|1: 0-1 d,#9a7662, 2-99 #c7e3d7,#3a6154,
-|2: 0-1 d,#548372, 2-31 #bbd7cb,#29443f, 32-37 #e4c2ec,#29443f, 38-99 #bbd7cb,#29443f,
+|2: 0-1 d,#548372, 2-31 #bbd7cb,#4a4e3f, 32-37 #e4c2ec,#4a4e3f, 38-99 #bbd7cb,#4a4e3f,
|3: 0-0 d,#6e9b8b, 1-4 d,#34464c, 5-6 #7b9194,#34464c, 7-99 #bac9ce,#34464c,
|4: 0-0 d,#6e9b8b, 1-4 d,#34464c, 5-6 #7b9194,#34464c, 7-99 #bac9ce,#34464c,
|5: 0-0 d,#6e9b8b, 1-4 d,#34464c, 5-6 #7b9194,#34464c, 7-99 #bac9ce,#34464c,
@@ -200,7 +202,7 @@
|14: 0-0 d,#3a4c50, 1-3 d,#34464c, 4-6 #7b9194,#34464c, 7-99 #bac9ce,#34464c,
|15: 0-0 d,#3a4c50, 1-3 d,#34464c, 4-6 #7b9194,#34464c, 7-99 #bac9ce,#34464c,
|16: 0-1 d,#81cfb7, 2-31 #c7e3d7,#3a6154, 32-39 #f0cef8,#3a6154, 40-99 #c7e3d7,#3a6154,
-|17: 0-0 d,#6e9b8b, 1-4 d,#34464c, 5-6 #7b9194,#34464c, 7-92 #bac9ce,#34464c, 93-93 #bac9ce,#29443f, 94-99 #bbd7cb,#29443f,
+|17: 0-0 d,#6e9b8b, 1-4 d,#34464c, 5-6 #7b9194,#34464c, 7-99 #bac9ce,#34464c,
|18: 0-0 d,#3a4c50, 1-4 d,#34464c, 5-6 #7b9194,#34464c, 7-99 #bac9ce,#34464c,
|19: 0-0 d,#3a4c50, 1-4 d,#34464c, 5-6 #7b9194,#34464c, 7-99 #bac9ce,#34464c,
|20: 0-0 d,#3a4c50, 1-4 d,#34464c, 5-6 #7b9194,#34464c, 7-99 #bac9ce,#34464c,
@@ -213,12 +215,13 @@
|27: 0-0 d,#3a4c50, 1-3 d,#34464c, 4-6 #7b9194,#34464c, 7-99 #bac9ce,#34464c,
|28: 0-0 d,#3a4c50, 1-3 d,#34464c, 4-6 #7b9194,#34464c, 7-99 #bac9ce,#34464c,
|29: 0-0 d,#3a4c50, 1-3 d,#34464c, 4-6 #7b9194,#34464c, 7-99 #bac9ce,#34464c,
-|30: 0-0 d,#3a4c50, 1-3 d,#34464c, 4-6 #7b9194,#34464c, 7-99 #bac9ce,#34464c,
+|30: 0-1 d,#29443f, 2-99 #728d85,#29443f,
== snap step-solarium grid=100x31 cursor=7,26
+|30: ✓ /tmp/pardes-snap/themesel/cwd/+Themes Theme 13 messages · SPC h m
== style step-solarium grid=100x31
|0: 0-1 d,#123f43, 2-99 #c7d4bd,#123f43,
|1: 0-1 d,#347a9a, 2-99 #d3e0c9,#2f5c5c,
-|2: 0-1 d,#467f76, 2-31 #c7d4bd,#123f43, 32-37 #e9c1e0,#123f43, 38-99 #c7d4bd,#123f43,
+|2: 0-1 d,#467f76, 2-31 #c7d4bd,#3d493b, 32-37 #e9c1e0,#3d493b, 38-99 #c7d4bd,#3d493b,
|3: 0-0 d,#65978c, 1-4 d,#173e45, 5-6 #647e7c,#173e45, 7-99 #a7b7ae,#173e45,
|4: 0-0 d,#65978c, 1-4 d,#173e45, 5-6 #647e7c,#173e45, 7-99 #a7b7ae,#173e45,
|5: 0-0 d,#65978c, 1-4 d,#173e45, 5-6 #647e7c,#173e45, 7-99 #a7b7ae,#173e45,
@@ -233,7 +236,7 @@
|14: 0-0 d,#1c454c, 1-3 d,#173e45, 4-6 #647e7c,#173e45, 7-99 #a7b7ae,#173e45,
|15: 0-0 d,#1c454c, 1-3 d,#173e45, 4-6 #647e7c,#173e45, 7-99 #a7b7ae,#173e45,
|16: 0-1 d,#e1c266, 2-31 #d3e0c9,#2f5c5c, 32-39 #f5cdec,#2f5c5c, 40-99 #d3e0c9,#2f5c5c,
-|17: 0-0 d,#65978c, 1-4 d,#173e45, 5-6 #647e7c,#173e45, 7-92 #a7b7ae,#173e45, 93-93 #a7b7ae,#123f43, 94-99 #c7d4bd,#123f43,
+|17: 0-0 d,#65978c, 1-4 d,#173e45, 5-6 #647e7c,#173e45, 7-99 #a7b7ae,#173e45,
|18: 0-0 d,#1c454c, 1-4 d,#173e45, 5-6 #647e7c,#173e45, 7-99 #a7b7ae,#173e45,
|19: 0-0 d,#1c454c, 1-4 d,#173e45, 5-6 #647e7c,#173e45, 7-99 #a7b7ae,#173e45,
|20: 0-0 d,#1c454c, 1-4 d,#173e45, 5-6 #647e7c,#173e45, 7-99 #a7b7ae,#173e45,
@@ -246,12 +249,26 @@
|27: 0-0 d,#1c454c, 1-3 d,#173e45, 4-6 #647e7c,#173e45, 7-99 #a7b7ae,#173e45,
|28: 0-0 d,#1c454c, 1-3 d,#173e45, 4-6 #647e7c,#173e45, 7-99 #a7b7ae,#173e45,
|29: 0-0 d,#1c454c, 1-3 d,#173e45, 4-6 #647e7c,#173e45, 7-99 #a7b7ae,#173e45,
-|30: 0-0 d,#1c454c, 1-3 d,#173e45, 4-6 #647e7c,#173e45, 7-99 #a7b7ae,#173e45,
-== snap step-spectrum grid=100x31 cursor=7,27
+|30: 0-1 d,#123f43, 2-99 #6c8980,#123f43,
+== snap step-spectrum grid=100x31 cursor=7,26
+|17: 2 Theme orchard
+|18: 3 Theme dusk
+|19: 4 Theme ink
+|20: 5 Theme paper
+|21: 6 Theme daybreak
+|22: 7 Theme atelier
+|23: 8 Theme forge
+|24: 9 Theme lagoon
+|25: 10 Theme solarium
+|26: 11 Theme spectrum
+|27: 12 Theme harvest
+|28: 13 Theme clay
+|29: 14 Theme forge_black
+|30: ✓ /tmp/pardes-snap/themesel/cwd/+Themes Theme 15 messages · SPC h m
== style step-spectrum grid=100x31
|0: 0-1 d,#3b3830, 2-99 #ddd8bb,#3b3830,
|1: 0-1 d,#706596, 2-99 #e9e4c7,#5a523a,
-|2: 0-1 d,#92844f, 2-31 #ddd8bb,#3b3830, 32-37 #c5d7ff,#3b3830, 38-99 #ddd8bb,#3b3830,
+|2: 0-1 d,#92844f, 2-31 #ddd8bb,#332b1a, 32-37 #c5d7ff,#332b1a, 38-99 #ddd8bb,#332b1a,
|3: 0-0 d,#948d6f, 1-4 d,#100e11, 5-6 #68616b,#100e11, 7-99 #fcfcfa,#100e11,
|4: 0-0 d,#948d6f, 1-4 d,#100e11, 5-6 #68616b,#100e11, 7-99 #fcfcfa,#100e11,
|5: 0-0 d,#948d6f, 1-4 d,#100e11, 5-6 #68616b,#100e11, 7-99 #fcfcfa,#100e11,
@@ -266,7 +283,7 @@
|14: 0-0 d,#211d23, 1-3 d,#100e11, 4-6 #68616b,#100e11, 7-99 #fcfcfa,#100e11,
|15: 0-0 d,#211d23, 1-3 d,#100e11, 4-6 #68616b,#100e11, 7-99 #fcfcfa,#100e11,
|16: 0-1 d,#ffd866, 2-31 #e9e4c7,#5a523a, 32-39 #d7e3ff,#5a523a, 40-99 #e9e4c7,#5a523a,
-|17: 0-0 d,#948d6f, 1-4 d,#100e11, 5-6 #68616b,#100e11, 7-92 #fcfcfa,#100e11, 93-93 #fcfcfa,#3b3830, 94-99 #ddd8bb,#3b3830,
+|17: 0-0 d,#948d6f, 1-4 d,#100e11, 5-6 #68616b,#100e11, 7-99 #fcfcfa,#100e11,
|18: 0-0 d,#211d23, 1-4 d,#100e11, 5-6 #68616b,#100e11, 7-99 #fcfcfa,#100e11,
|19: 0-0 d,#211d23, 1-4 d,#100e11, 5-6 #68616b,#100e11, 7-99 #fcfcfa,#100e11,
|20: 0-0 d,#211d23, 1-4 d,#100e11, 5-6 #68616b,#100e11, 7-99 #fcfcfa,#100e11,
@@ -274,31 +291,31 @@
|22: 0-0 d,#211d23, 1-4 d,#100e11, 5-6 #68616b,#100e11, 7-99 #fcfcfa,#100e11,
|23: 0-0 d,#211d23, 1-4 d,#100e11, 5-6 #68616b,#100e11, 7-99 #fcfcfa,#100e11,
|24: 0-0 d,#211d23, 1-4 d,#100e11, 5-6 #68616b,#100e11, 7-99 #fcfcfa,#100e11,
-|25: 0-0 d,#211d23, 1-4 d,#100e11, 5-6 #68616b,#100e11, 7-99 #fcfcfa,#100e11,
-|26: 0-0 d,#211d23, 1-3 d,#100e11, 4-6 #68616b,#100e11, 7-99 #fcfcfa,#100e11,
-|27: 0-0 d,#211d23, 1-1 d,#100e11, 2-3 d,#100e11,b 4-6 #706973,#100e11,b 7-99 #fcfcfa,#100e11,
+|25: 0-0 d,#211d23, 1-3 d,#100e11, 4-6 #68616b,#100e11, 7-99 #fcfcfa,#100e11,
+|26: 0-0 d,#211d23, 1-1 d,#100e11, 2-3 d,#100e11,b 4-6 #706973,#100e11,b 7-99 #fcfcfa,#100e11,
+|27: 0-0 d,#211d23, 1-3 d,#100e11, 4-6 #68616b,#100e11, 7-99 #fcfcfa,#100e11,
|28: 0-0 d,#211d23, 1-3 d,#100e11, 4-6 #68616b,#100e11, 7-99 #fcfcfa,#100e11,
|29: 0-0 d,#211d23, 1-3 d,#100e11, 4-6 #68616b,#100e11, 7-99 #fcfcfa,#100e11,
-|30: 0-0 d,#211d23, 1-3 d,#100e11, 4-6 #68616b,#100e11, 7-99 #fcfcfa,#100e11,
-== snap step-harvest grid=100x31 cursor=7,27
-|17: 2 Theme orchard Theme
-|18: 3 Theme dusk
-|19: 4 Theme ink
-|20: 5 Theme paper
-|21: 6 Theme daybreak
-|22: 7 Theme atelier
-|23: 8 Theme forge
-|24: 9 Theme lagoon
-|25: 10 Theme solarium
-|26: 11 Theme spectrum
-|27: 12 Theme harvest
-|28: 13 Theme clay
-|29: 14 Theme forge_black
-|30: 15 Theme forge_soft
+|30: 0-1 d,#3b3830, 2-99 #8c8875,#3b3830,
+== snap step-harvest grid=100x31 cursor=7,26
+|17: 3 Theme dusk
+|18: 4 Theme ink
+|19: 5 Theme paper
+|20: 6 Theme daybreak
+|21: 7 Theme atelier
+|22: 8 Theme forge
+|23: 9 Theme lagoon
+|24: 10 Theme solarium
+|25: 11 Theme spectrum
+|26: 12 Theme harvest
+|27: 13 Theme clay
+|28: 14 Theme forge_black
+|29: 15 Theme forge_soft
+|30: ✓ /tmp/pardes-snap/themesel/cwd/+Themes Theme 17 messages · SPC h m
== style step-harvest grid=100x31
|0: 0-1 d,#343b2e, 2-99 #d5d8b8,#343b2e,
|1: 0-1 d,#9b583f, 2-99 #e1e4c4,#4a583e,
-|2: 0-1 d,#7b7e4e, 2-31 #d5d8b8,#343b2e, 32-37 #badbeb,#343b2e, 38-99 #d5d8b8,#343b2e,
+|2: 0-1 d,#7b7e4e, 2-31 #d5d8b8,#332316, 32-37 #badbeb,#332316, 38-99 #d5d8b8,#332316,
|3: 0-0 d,#888e5e, 1-4 d,#100e0b, 5-6 #6a6456,#100e0b, 7-99 #f3f2cc,#100e0b,
|4: 0-0 d,#888e5e, 1-4 d,#100e0b, 5-6 #6a6456,#100e0b, 7-99 #f3f2cc,#100e0b,
|5: 0-0 d,#888e5e, 1-4 d,#100e0b, 5-6 #6a6456,#100e0b, 7-99 #f3f2cc,#100e0b,
@@ -313,39 +330,39 @@
|14: 0-0 d,#201d17, 1-3 d,#100e0b, 4-6 #6a6456,#100e0b, 7-99 #f3f2cc,#100e0b,
|15: 0-0 d,#201d17, 1-3 d,#100e0b, 4-6 #6a6456,#100e0b, 7-99 #f3f2cc,#100e0b,
|16: 0-1 d,#d8bd83, 2-31 #e1e4c4,#4a583e, 32-39 #c5e7f7,#4a583e, 40-99 #e1e4c4,#4a583e,
-|17: 0-0 d,#888e5e, 1-4 d,#100e0b, 5-6 #6a6456,#100e0b, 7-92 #f3f2cc,#100e0b, 93-93 #f3f2cc,#343b2e, 94-99 #d5d8b8,#343b2e,
+|17: 0-0 d,#888e5e, 1-4 d,#100e0b, 5-6 #6a6456,#100e0b, 7-99 #f3f2cc,#100e0b,
|18: 0-0 d,#201d17, 1-4 d,#100e0b, 5-6 #6a6456,#100e0b, 7-99 #f3f2cc,#100e0b,
|19: 0-0 d,#201d17, 1-4 d,#100e0b, 5-6 #6a6456,#100e0b, 7-99 #f3f2cc,#100e0b,
|20: 0-0 d,#201d17, 1-4 d,#100e0b, 5-6 #6a6456,#100e0b, 7-99 #f3f2cc,#100e0b,
|21: 0-0 d,#201d17, 1-4 d,#100e0b, 5-6 #6a6456,#100e0b, 7-99 #f3f2cc,#100e0b,
|22: 0-0 d,#201d17, 1-4 d,#100e0b, 5-6 #6a6456,#100e0b, 7-99 #f3f2cc,#100e0b,
|23: 0-0 d,#201d17, 1-4 d,#100e0b, 5-6 #6a6456,#100e0b, 7-99 #f3f2cc,#100e0b,
-|24: 0-0 d,#201d17, 1-4 d,#100e0b, 5-6 #6a6456,#100e0b, 7-99 #f3f2cc,#100e0b,
+|24: 0-0 d,#201d17, 1-3 d,#100e0b, 4-6 #6a6456,#100e0b, 7-99 #f3f2cc,#100e0b,
|25: 0-0 d,#201d17, 1-3 d,#100e0b, 4-6 #6a6456,#100e0b, 7-99 #f3f2cc,#100e0b,
-|26: 0-0 d,#201d17, 1-3 d,#100e0b, 4-6 #6a6456,#100e0b, 7-99 #f3f2cc,#100e0b,
-|27: 0-0 d,#201d17, 1-1 d,#100e0b, 2-3 d,#100e0b,b 4-6 #726c5e,#100e0b,b 7-99 #f3f2cc,#100e0b,
+|26: 0-0 d,#201d17, 1-1 d,#100e0b, 2-3 d,#100e0b,b 4-6 #726c5e,#100e0b,b 7-99 #f3f2cc,#100e0b,
+|27: 0-0 d,#201d17, 1-3 d,#100e0b, 4-6 #6a6456,#100e0b, 7-99 #f3f2cc,#100e0b,
|28: 0-0 d,#201d17, 1-3 d,#100e0b, 4-6 #6a6456,#100e0b, 7-99 #f3f2cc,#100e0b,
|29: 0-0 d,#201d17, 1-3 d,#100e0b, 4-6 #6a6456,#100e0b, 7-99 #f3f2cc,#100e0b,
-|30: 0-0 d,#201d17, 1-3 d,#100e0b, 4-6 #6a6456,#100e0b, 7-99 #f3f2cc,#100e0b,
-== snap step-clay grid=100x31 cursor=7,27
-|17: 3 Theme dusk Theme
-|18: 4 Theme ink
-|19: 5 Theme paper
-|20: 6 Theme daybreak
-|21: 7 Theme atelier
-|22: 8 Theme forge
-|23: 9 Theme lagoon
-|24: 10 Theme solarium
-|25: 11 Theme spectrum
-|26: 12 Theme harvest
-|27: 13 Theme clay
-|28: 14 Theme forge_black
-|29: 15 Theme forge_soft
-|30: 16 Theme orchard_black
+|30: 0-1 d,#343b2e, 2-99 #848973,#343b2e,
+== snap step-clay grid=100x31 cursor=7,26
+|17: 4 Theme ink
+|18: 5 Theme paper
+|19: 6 Theme daybreak
+|20: 7 Theme atelier
+|21: 8 Theme forge
+|22: 9 Theme lagoon
+|23: 10 Theme solarium
+|24: 11 Theme spectrum
+|25: 12 Theme harvest
+|26: 13 Theme clay
+|27: 14 Theme forge_black
+|28: 15 Theme forge_soft
+|29: 16 Theme orchard_black
+|30: ✓ /tmp/pardes-snap/themesel/cwd/+Themes Theme 19 messages · SPC h m
== style step-clay grid=100x31
|0: 0-1 d,#343f36, 2-99 #d7d6b6,#343f36,
|1: 0-1 d,#875e65, 2-99 #e3e2c2,#4d5c48,
-|2: 0-1 d,#687c4d, 2-31 #d7d6b6,#343f36, 32-37 #aae0e0,#343f36, 38-99 #d7d6b6,#343f36,
+|2: 0-1 d,#687c4d, 2-31 #d7d6b6,#332a17, 32-37 #aae0e0,#332a17, 38-99 #d7d6b6,#332a17,
|3: 0-0 d,#8c9467, 1-4 d,#10100e, 5-6 #696455,#10100e, 7-99 #f3e5bc,#10100e,
|4: 0-0 d,#8c9467, 1-4 d,#10100e, 5-6 #696455,#10100e, 7-99 #f3e5bc,#10100e,
|5: 0-0 d,#8c9467, 1-4 d,#10100e, 5-6 #696455,#10100e, 7-99 #f3e5bc,#10100e,
@@ -360,39 +377,39 @@
|14: 0-0 d,#222119, 1-3 d,#10100e, 4-6 #696455,#10100e, 7-99 #f3e5bc,#10100e,
|15: 0-0 d,#222119, 1-3 d,#10100e, 4-6 #696455,#10100e, 7-99 #f3e5bc,#10100e,
|16: 0-1 d,#8ac874, 2-31 #e3e2c2,#4d5c48, 32-39 #b5ecec,#4d5c48, 40-99 #e3e2c2,#4d5c48,
-|17: 0-0 d,#8c9467, 1-4 d,#10100e, 5-6 #696455,#10100e, 7-92 #f3e5bc,#10100e, 93-93 #f3e5bc,#343f36, 94-99 #d7d6b6,#343f36,
+|17: 0-0 d,#8c9467, 1-4 d,#10100e, 5-6 #696455,#10100e, 7-99 #f3e5bc,#10100e,
|18: 0-0 d,#222119, 1-4 d,#10100e, 5-6 #696455,#10100e, 7-99 #f3e5bc,#10100e,
|19: 0-0 d,#222119, 1-4 d,#10100e, 5-6 #696455,#10100e, 7-99 #f3e5bc,#10100e,
|20: 0-0 d,#222119, 1-4 d,#10100e, 5-6 #696455,#10100e, 7-99 #f3e5bc,#10100e,
|21: 0-0 d,#222119, 1-4 d,#10100e, 5-6 #696455,#10100e, 7-99 #f3e5bc,#10100e,
|22: 0-0 d,#222119, 1-4 d,#10100e, 5-6 #696455,#10100e, 7-99 #f3e5bc,#10100e,
-|23: 0-0 d,#222119, 1-4 d,#10100e, 5-6 #696455,#10100e, 7-99 #f3e5bc,#10100e,
+|23: 0-0 d,#222119, 1-3 d,#10100e, 4-6 #696455,#10100e, 7-99 #f3e5bc,#10100e,
|24: 0-0 d,#222119, 1-3 d,#10100e, 4-6 #696455,#10100e, 7-99 #f3e5bc,#10100e,
|25: 0-0 d,#222119, 1-3 d,#10100e, 4-6 #696455,#10100e, 7-99 #f3e5bc,#10100e,
-|26: 0-0 d,#222119, 1-3 d,#10100e, 4-6 #696455,#10100e, 7-99 #f3e5bc,#10100e,
-|27: 0-0 d,#222119, 1-1 d,#10100e, 2-3 d,#10100e,b 4-6 #716c5d,#10100e,b 7-99 #f3e5bc,#10100e,
+|26: 0-0 d,#222119, 1-1 d,#10100e, 2-3 d,#10100e,b 4-6 #716c5d,#10100e,b 7-99 #f3e5bc,#10100e,
+|27: 0-0 d,#222119, 1-3 d,#10100e, 4-6 #696455,#10100e, 7-99 #f3e5bc,#10100e,
|28: 0-0 d,#222119, 1-3 d,#10100e, 4-6 #696455,#10100e, 7-99 #f3e5bc,#10100e,
|29: 0-0 d,#222119, 1-3 d,#10100e, 4-6 #696455,#10100e, 7-99 #f3e5bc,#10100e,
-|30: 0-0 d,#222119, 1-3 d,#10100e, 4-6 #696455,#10100e, 7-99 #f3e5bc,#10100e,
-== snap step-forge-black grid=100x31 cursor=7,27
-|17: 4 Theme ink Theme
-|18: 5 Theme paper
-|19: 6 Theme daybreak
-|20: 7 Theme atelier
-|21: 8 Theme forge
-|22: 9 Theme lagoon
-|23: 10 Theme solarium
-|24: 11 Theme spectrum
-|25: 12 Theme harvest
-|26: 13 Theme clay
-|27: 14 Theme forge_black
-|28: 15 Theme forge_soft
-|29: 16 Theme orchard_black
-|30: 17 Theme acme
+|30: 0-1 d,#343f36, 2-99 #858a76,#343f36,
+== snap step-forge-black grid=100x31 cursor=7,26
+|17: 5 Theme paper
+|18: 6 Theme daybreak
+|19: 7 Theme atelier
+|20: 8 Theme forge
+|21: 9 Theme lagoon
+|22: 10 Theme solarium
+|23: 11 Theme spectrum
+|24: 12 Theme harvest
+|25: 13 Theme clay
+|26: 14 Theme forge_black
+|27: 15 Theme forge_soft
+|28: 16 Theme orchard_black
+|29: 17 Theme acme
+|30: ✓ /tmp/pardes-snap/themesel/cwd/+Themes Theme 21 messages · SPC h m
== style step-forge-black grid=100x31
|0: 0-1 d,#22252b, 2-99 #c5c9d2,#22252b,
|1: 0-1 d,#6a7b67, 2-99 #d1d5de,#374253,
-|2: 0-1 d,#55647b, 2-31 #c5c9d2,#22252b, 32-37 #ecbf9b,#22252b, 38-99 #c5c9d2,#22252b,
+|2: 0-1 d,#55647b, 2-31 #c5c9d2,#150f03, 32-37 #ecbf9b,#150f03, 38-99 #c5c9d2,#150f03,
|3: 0-0 d,#708095, 1-4 d,#000000, 5-6 #62656c,#000000, 7-99 #f6f6f6,#000000,
|4: 0-0 d,#708095, 1-4 d,#000000, 5-6 #62656c,#000000, 7-99 #f6f6f6,#000000,
|5: 0-0 d,#708095, 1-4 d,#000000, 5-6 #62656c,#000000, 7-99 #f6f6f6,#000000,
@@ -407,39 +424,39 @@
|14: 0-0 d,#14161a, 1-3 d,#000000, 4-6 #62656c,#000000, 7-99 #f6f6f6,#000000,
|15: 0-0 d,#14161a, 1-3 d,#000000, 4-6 #62656c,#000000, 7-99 #f6f6f6,#000000,
|16: 0-1 d,#9cc3f7, 2-31 #d1d5de,#374253, 32-39 #f8cba7,#374253, 40-99 #d1d5de,#374253,
-|17: 0-0 d,#708095, 1-4 d,#000000, 5-6 #62656c,#000000, 7-92 #f6f6f6,#000000, 93-93 #f6f6f6,#22252b, 94-99 #c5c9d2,#22252b,
+|17: 0-0 d,#708095, 1-4 d,#000000, 5-6 #62656c,#000000, 7-99 #f6f6f6,#000000,
|18: 0-0 d,#14161a, 1-4 d,#000000, 5-6 #62656c,#000000, 7-99 #f6f6f6,#000000,
|19: 0-0 d,#14161a, 1-4 d,#000000, 5-6 #62656c,#000000, 7-99 #f6f6f6,#000000,
|20: 0-0 d,#14161a, 1-4 d,#000000, 5-6 #62656c,#000000, 7-99 #f6f6f6,#000000,
|21: 0-0 d,#14161a, 1-4 d,#000000, 5-6 #62656c,#000000, 7-99 #f6f6f6,#000000,
-|22: 0-0 d,#14161a, 1-4 d,#000000, 5-6 #62656c,#000000, 7-99 #f6f6f6,#000000,
+|22: 0-0 d,#14161a, 1-3 d,#000000, 4-6 #62656c,#000000, 7-99 #f6f6f6,#000000,
|23: 0-0 d,#14161a, 1-3 d,#000000, 4-6 #62656c,#000000, 7-99 #f6f6f6,#000000,
|24: 0-0 d,#14161a, 1-3 d,#000000, 4-6 #62656c,#000000, 7-99 #f6f6f6,#000000,
|25: 0-0 d,#14161a, 1-3 d,#000000, 4-6 #62656c,#000000, 7-99 #f6f6f6,#000000,
-|26: 0-0 d,#14161a, 1-3 d,#000000, 4-6 #62656c,#000000, 7-99 #f6f6f6,#000000,
-|27: 0-0 d,#14161a, 1-1 d,#000000, 2-3 d,#000000,b 4-6 #6a6d74,#000000,b 7-99 #f6f6f6,#000000,
+|26: 0-0 d,#14161a, 1-1 d,#000000, 2-3 d,#000000,b 4-6 #6a6d74,#000000,b 7-99 #f6f6f6,#000000,
+|27: 0-0 d,#14161a, 1-3 d,#000000, 4-6 #62656c,#000000, 7-99 #f6f6f6,#000000,
|28: 0-0 d,#14161a, 1-3 d,#000000, 4-6 #62656c,#000000, 7-99 #f6f6f6,#000000,
|29: 0-0 d,#14161a, 1-3 d,#000000, 4-6 #62656c,#000000, 7-99 #f6f6f6,#000000,
-|30: 0-0 d,#14161a, 1-3 d,#000000, 4-6 #62656c,#000000, 7-99 #f6f6f6,#000000,
-== snap step-forge-soft grid=100x31 cursor=7,27
-|17: 5 Theme paper Theme
-|18: 6 Theme daybreak
-|19: 7 Theme atelier
-|20: 8 Theme forge
-|21: 9 Theme lagoon
-|22: 10 Theme solarium
-|23: 11 Theme spectrum
-|24: 12 Theme harvest
-|25: 13 Theme clay
-|26: 14 Theme forge_black
-|27: 15 Theme forge_soft
-|28: 16 Theme orchard_black
-|29: 17 Theme acme
-|30: 18 Theme lapis
+|30: 0-1 d,#22252b, 2-99 #73777e,#22252b,
+== snap step-forge-soft grid=100x31 cursor=7,26
+|17: 6 Theme daybreak
+|18: 7 Theme atelier
+|19: 8 Theme forge
+|20: 9 Theme lagoon
+|21: 10 Theme solarium
+|22: 11 Theme spectrum
+|23: 12 Theme harvest
+|24: 13 Theme clay
+|25: 14 Theme forge_black
+|26: 15 Theme forge_soft
+|27: 16 Theme orchard_black
+|28: 17 Theme acme
+|29: 18 Theme lapis
+|30: ✓ /tmp/pardes-snap/themesel/cwd/+Themes Theme 23 messages · SPC h m
== style step-forge-soft grid=100x31
|0: 0-1 d,#2a2d34, 2-99 #c5c9d2,#2a2d34,
|1: 0-1 d,#6d7f6c, 2-99 #d1d5de,#404a58,
-|2: 0-1 d,#55647b, 2-31 #c5c9d2,#2a2d34, 32-37 #ecbf9b,#2a2d34, 38-99 #c5c9d2,#2a2d34,
+|2: 0-1 d,#55647b, 2-31 #c5c9d2,#464135, 32-37 #ecbf9b,#464135, 38-99 #c5c9d2,#464135,
|3: 0-0 d,#708095, 1-4 d,#35383e, 5-6 #868991,#35383e, 7-99 #bfc3cc,#35383e,
|4: 0-0 d,#708095, 1-4 d,#35383e, 5-6 #868991,#35383e, 7-99 #bfc3cc,#35383e,
|5: 0-0 d,#708095, 1-4 d,#35383e, 5-6 #868991,#35383e, 7-99 #bfc3cc,#35383e,
@@ -454,39 +471,39 @@
|14: 0-0 d,#3d4047, 1-3 d,#35383e, 4-6 #868991,#35383e, 7-99 #bfc3cc,#35383e,
|15: 0-0 d,#3d4047, 1-3 d,#35383e, 4-6 #868991,#35383e, 7-99 #bfc3cc,#35383e,
|16: 0-1 d,#9cc3f7, 2-31 #d1d5de,#404a58, 32-39 #f8cba7,#404a58, 40-99 #d1d5de,#404a58,
-|17: 0-0 d,#708095, 1-4 d,#35383e, 5-6 #868991,#35383e, 7-92 #bfc3cc,#35383e, 93-93 #bfc3cc,#2a2d34, 94-99 #c5c9d2,#2a2d34,
+|17: 0-0 d,#708095, 1-4 d,#35383e, 5-6 #868991,#35383e, 7-99 #bfc3cc,#35383e,
|18: 0-0 d,#3d4047, 1-4 d,#35383e, 5-6 #868991,#35383e, 7-99 #bfc3cc,#35383e,
|19: 0-0 d,#3d4047, 1-4 d,#35383e, 5-6 #868991,#35383e, 7-99 #bfc3cc,#35383e,
|20: 0-0 d,#3d4047, 1-4 d,#35383e, 5-6 #868991,#35383e, 7-99 #bfc3cc,#35383e,
-|21: 0-0 d,#3d4047, 1-4 d,#35383e, 5-6 #868991,#35383e, 7-99 #bfc3cc,#35383e,
+|21: 0-0 d,#3d4047, 1-3 d,#35383e, 4-6 #868991,#35383e, 7-99 #bfc3cc,#35383e,
|22: 0-0 d,#3d4047, 1-3 d,#35383e, 4-6 #868991,#35383e, 7-99 #bfc3cc,#35383e,
|23: 0-0 d,#3d4047, 1-3 d,#35383e, 4-6 #868991,#35383e, 7-99 #bfc3cc,#35383e,
|24: 0-0 d,#3d4047, 1-3 d,#35383e, 4-6 #868991,#35383e, 7-99 #bfc3cc,#35383e,
|25: 0-0 d,#3d4047, 1-3 d,#35383e, 4-6 #868991,#35383e, 7-99 #bfc3cc,#35383e,
-|26: 0-0 d,#3d4047, 1-3 d,#35383e, 4-6 #868991,#35383e, 7-99 #bfc3cc,#35383e,
-|27: 0-0 d,#3d4047, 1-1 d,#35383e, 2-3 d,#35383e,b 4-6 #8e9199,#35383e,b 7-99 #bfc3cc,#35383e,
+|26: 0-0 d,#3d4047, 1-1 d,#35383e, 2-3 d,#35383e,b 4-6 #8e9199,#35383e,b 7-99 #bfc3cc,#35383e,
+|27: 0-0 d,#3d4047, 1-3 d,#35383e, 4-6 #868991,#35383e, 7-99 #bfc3cc,#35383e,
|28: 0-0 d,#3d4047, 1-3 d,#35383e, 4-6 #868991,#35383e, 7-99 #bfc3cc,#35383e,
|29: 0-0 d,#3d4047, 1-3 d,#35383e, 4-6 #868991,#35383e, 7-99 #bfc3cc,#35383e,
-|30: 0-0 d,#3d4047, 1-3 d,#35383e, 4-6 #868991,#35383e, 7-99 #bfc3cc,#35383e,
-== snap step-orchard-black grid=100x31 cursor=7,27
-|17: 6 Theme daybreak Theme
-|18: 7 Theme atelier
-|19: 8 Theme forge
-|20: 9 Theme lagoon
-|21: 10 Theme solarium
-|22: 11 Theme spectrum
-|23: 12 Theme harvest
-|24: 13 Theme clay
-|25: 14 Theme forge_black
-|26: 15 Theme forge_soft
-|27: 16 Theme orchard_black
-|28: 17 Theme acme
-|29: 18 Theme lapis
-|30: 19
+|30: 0-1 d,#2a2d34, 2-99 #777b83,#2a2d34,
+== snap step-orchard-black grid=100x31 cursor=7,26
+|17: 7 Theme atelier
+|18: 8 Theme forge
+|19: 9 Theme lagoon
+|20: 10 Theme solarium
+|21: 11 Theme spectrum
+|22: 12 Theme harvest
+|23: 13 Theme clay
+|24: 14 Theme forge_black
+|25: 15 Theme forge_soft
+|26: 16 Theme orchard_black
+|27: 17 Theme acme
+|28: 18 Theme lapis
+|29: 19
+|30: ✓ /tmp/pardes-snap/themesel/cwd/+Themes Theme 25 messages · SPC h m
== style step-orchard-black grid=100x31
|0: 0-1 d,#1d2824, 2-99 #b2c3b8,#1d2824,
|1: 0-1 d,#887455, 2-99 #becfc4,#314738,
-|2: 0-1 d,#496656, 2-31 #b2c3b8,#1d2824, 32-37 #d3b0d9,#1d2824, 38-99 #b2c3b8,#1d2824,
+|2: 0-1 d,#496656, 2-31 #b2c3b8,#140e04, 32-37 #d3b0d9,#140e04, 38-99 #b2c3b8,#140e04,
|3: 0-0 d,#608269, 1-4 d,#000000, 5-6 #59675c,#000000, 7-99 #f2f8ef,#000000,
|4: 0-0 d,#608269, 1-4 d,#000000, 5-6 #59675c,#000000, 7-99 #f2f8ef,#000000,
|5: 0-0 d,#608269, 1-4 d,#000000, 5-6 #59675c,#000000, 7-99 #f2f8ef,#000000,
@@ -501,39 +518,39 @@
|14: 0-0 d,#111813, 1-3 d,#000000, 4-6 #59675c,#000000, 7-99 #f2f8ef,#000000,
|15: 0-0 d,#111813, 1-3 d,#000000, 4-6 #59675c,#000000, 7-99 #f2f8ef,#000000,
|16: 0-1 d,#add38a, 2-31 #becfc4,#314738, 32-39 #dfbce5,#314738, 40-99 #becfc4,#314738,
-|17: 0-0 d,#608269, 1-4 d,#000000, 5-6 #59675c,#000000, 7-92 #f2f8ef,#000000, 93-93 #f2f8ef,#1d2824, 94-99 #b2c3b8,#1d2824,
+|17: 0-0 d,#608269, 1-4 d,#000000, 5-6 #59675c,#000000, 7-99 #f2f8ef,#000000,
|18: 0-0 d,#111813, 1-4 d,#000000, 5-6 #59675c,#000000, 7-99 #f2f8ef,#000000,
|19: 0-0 d,#111813, 1-4 d,#000000, 5-6 #59675c,#000000, 7-99 #f2f8ef,#000000,
-|20: 0-0 d,#111813, 1-4 d,#000000, 5-6 #59675c,#000000, 7-99 #f2f8ef,#000000,
+|20: 0-0 d,#111813, 1-3 d,#000000, 4-6 #59675c,#000000, 7-99 #f2f8ef,#000000,
|21: 0-0 d,#111813, 1-3 d,#000000, 4-6 #59675c,#000000, 7-99 #f2f8ef,#000000,
|22: 0-0 d,#111813, 1-3 d,#000000, 4-6 #59675c,#000000, 7-99 #f2f8ef,#000000,
|23: 0-0 d,#111813, 1-3 d,#000000, 4-6 #59675c,#000000, 7-99 #f2f8ef,#000000,
|24: 0-0 d,#111813, 1-3 d,#000000, 4-6 #59675c,#000000, 7-99 #f2f8ef,#000000,
|25: 0-0 d,#111813, 1-3 d,#000000, 4-6 #59675c,#000000, 7-99 #f2f8ef,#000000,
-|26: 0-0 d,#111813, 1-3 d,#000000, 4-6 #59675c,#000000, 7-99 #f2f8ef,#000000,
-|27: 0-0 d,#111813, 1-1 d,#000000, 2-3 d,#000000,b 4-6 #616f64,#000000,b 7-99 #f2f8ef,#000000,
+|26: 0-0 d,#111813, 1-1 d,#000000, 2-3 d,#000000,b 4-6 #616f64,#000000,b 7-99 #f2f8ef,#000000,
+|27: 0-0 d,#111813, 1-3 d,#000000, 4-6 #59675c,#000000, 7-99 #f2f8ef,#000000,
|28: 0-0 d,#111813, 1-3 d,#000000, 4-6 #59675c,#000000, 7-99 #f2f8ef,#000000,
-|29: 0-0 d,#111813, 1-3 d,#000000, 4-6 #59675c,#000000, 7-99 #f2f8ef,#000000,
-|30: 0-0 d,#111813, 1-3 d,#000000, 4-99 #59675c,#000000,
-== snap step-acme grid=100x31 cursor=7,27
-|17: 7 Theme atelier Theme
-|18: 8 Theme forge
-|19: 9 Theme lagoon
-|20: 10 Theme solarium
-|21: 11 Theme spectrum
-|22: 12 Theme harvest
-|23: 13 Theme clay
-|24: 14 Theme forge_black
-|25: 15 Theme forge_soft
-|26: 16 Theme orchard_black
-|27: 17 Theme acme
-|28: 18 Theme lapis
-|29: 19
-|30: 20 # Visual Studio Code
+|29: 0-0 d,#111813, 1-3 d,#000000, 4-99 #59675c,#000000,
+|30: 0-1 d,#1d2824, 2-99 #67756e,#1d2824,
+== snap step-acme grid=100x31 cursor=7,26
+|17: 8 Theme forge
+|18: 9 Theme lagoon
+|19: 10 Theme solarium
+|20: 11 Theme spectrum
+|21: 12 Theme harvest
+|22: 13 Theme clay
+|23: 14 Theme forge_black
+|24: 15 Theme forge_soft
+|25: 16 Theme orchard_black
+|26: 17 Theme acme
+|27: 18 Theme lapis
+|28: 19
+|29: 20 # Visual Studio Code
+|30: ✓ /tmp/pardes-snap/themesel/cwd/+Themes Theme 27 messages · SPC h m
== style step-acme grid=100x31
|0: 0-1 d,#eaffff, 2-99 #000000,#eaffff,
|1: 0-1 d,#8888cc, 2-99 #000000,#eaffff,
-|2: 0-1 d,#b9c3e5, 2-31 #000000,#eaffff, 32-37 #000099,#eaffff, 38-99 #000000,#eaffff,
+|2: 0-1 d,#b9c3e5, 2-31 #000000,#f3f0cc, 32-37 #000099,#f3f0cc, 38-99 #000000,#f3f0cc,
|3: 0-4 d,#ffffea, 5-6 #999980,#ffffea, 7-99 #000000,#ffffea,
|4: 0-4 d,#ffffea, 5-6 #999980,#ffffea, 7-99 #000000,#ffffea,
|5: 0-4 d,#ffffea, 5-6 #999980,#ffffea, 7-99 #000000,#ffffea,
@@ -548,39 +565,39 @@
|14: 0-0 d,#99994c, 1-3 d,#ffffea, 4-6 #999980,#ffffea, 7-99 #000000,#ffffea,
|15: 0-0 d,#99994c, 1-3 d,#ffffea, 4-6 #999980,#ffffea, 7-99 #000000,#ffffea,
|16: 0-1 d,#8888cc, 2-31 #000000,#eaffff, 32-39 #000099,#eaffff, 40-99 #000000,#eaffff,
-|17: 0-4 d,#ffffea, 5-6 #999980,#ffffea, 7-92 #000000,#ffffea, 93-99 #000000,#eaffff,
+|17: 0-4 d,#ffffea, 5-6 #999980,#ffffea, 7-99 #000000,#ffffea,
|18: 0-0 d,#99994c, 1-4 d,#ffffea, 5-6 #999980,#ffffea, 7-99 #000000,#ffffea,
-|19: 0-0 d,#99994c, 1-4 d,#ffffea, 5-6 #999980,#ffffea, 7-99 #000000,#ffffea,
+|19: 0-0 d,#99994c, 1-3 d,#ffffea, 4-6 #999980,#ffffea, 7-99 #000000,#ffffea,
|20: 0-0 d,#99994c, 1-3 d,#ffffea, 4-6 #999980,#ffffea, 7-99 #000000,#ffffea,
|21: 0-0 d,#99994c, 1-3 d,#ffffea, 4-6 #999980,#ffffea, 7-99 #000000,#ffffea,
|22: 0-0 d,#99994c, 1-3 d,#ffffea, 4-6 #999980,#ffffea, 7-99 #000000,#ffffea,
|23: 0-0 d,#99994c, 1-3 d,#ffffea, 4-6 #999980,#ffffea, 7-99 #000000,#ffffea,
|24: 0-0 d,#99994c, 1-3 d,#ffffea, 4-6 #999980,#ffffea, 7-99 #000000,#ffffea,
|25: 0-0 d,#99994c, 1-3 d,#ffffea, 4-6 #999980,#ffffea, 7-99 #000000,#ffffea,
-|26: 0-0 d,#99994c, 1-3 d,#ffffea, 4-6 #999980,#ffffea, 7-99 #000000,#ffffea,
-|27: 0-0 d,#99994c, 1-1 d,#ffffea, 2-3 d,#ffffea,b 4-6 #999980,#ffffea,b 7-99 #000000,#ffffea,
-|28: 0-0 d,#99994c, 1-3 d,#ffffea, 4-6 #999980,#ffffea, 7-99 #000000,#ffffea,
-|29: 0-0 d,#99994c, 1-3 d,#ffffea, 4-99 #999980,#ffffea,
-|30: 0-0 d,#99994c, 1-3 d,#ffffea, 4-6 #999980,#ffffea, 7-99 #000000,#ffffea,
-== snap step-lapis grid=100x31 cursor=7,27
-|17: 8 Theme forge Theme
-|18: 9 Theme lagoon
-|19: 10 Theme solarium
-|20: 11 Theme spectrum
-|21: 12 Theme harvest
-|22: 13 Theme clay
-|23: 14 Theme forge_black
-|24: 15 Theme forge_soft
-|25: 16 Theme orchard_black
-|26: 17 Theme acme
-|27: 18 Theme lapis
-|28: 19
-|29: 20 # Visual Studio Code
-|30: 21 Theme dark_plus
+|26: 0-0 d,#99994c, 1-1 d,#ffffea, 2-3 d,#ffffea,b 4-6 #999980,#ffffea,b 7-99 #000000,#ffffea,
+|27: 0-0 d,#99994c, 1-3 d,#ffffea, 4-6 #999980,#ffffea, 7-99 #000000,#ffffea,
+|28: 0-0 d,#99994c, 1-3 d,#ffffea, 4-99 #999980,#ffffea,
+|29: 0-0 d,#99994c, 1-3 d,#ffffea, 4-6 #999980,#ffffea, 7-99 #000000,#ffffea,
+|30: 0-1 d,#eaffff, 2-99 #757f7f,#eaffff,
+== snap step-lapis grid=100x31 cursor=7,26
+|17: 9 Theme lagoon
+|18: 10 Theme solarium
+|19: 11 Theme spectrum
+|20: 12 Theme harvest
+|21: 13 Theme clay
+|22: 14 Theme forge_black
+|23: 15 Theme forge_soft
+|24: 16 Theme orchard_black
+|25: 17 Theme acme
+|26: 18 Theme lapis
+|27: 19
+|28: 20 # Visual Studio Code
+|29: 21 Theme dark_plus
+|30: ✓ /tmp/pardes-snap/themesel/cwd/+Themes Theme 29 messages · SPC h m
== style step-lapis grid=100x31
|0: 0-1 d,#0f1a4a, 2-99 #9aa6d9,#0f1a4a,
|1: 0-1 d,#8a3a3a, 2-99 #eee6d2,#25397d,
-|2: 0-1 d,#6a78b1, 2-31 #9aa6d9,#0f1a4a, 32-37 #e8c46a,#0f1a4a, 38-99 #9aa6d9,#0f1a4a,
+|2: 0-1 d,#6a78b1, 2-31 #9aa6d9,#2f1e2d, 32-37 #e8c46a,#2f1e2d, 38-99 #9aa6d9,#2f1e2d,
|3: 0-0 d,#e8c46a, 1-4 d,#0a1030, 5-6 #5a6aa8,#0a1030, 7-99 #eee6d2,#0a1030,
|4: 0-0 d,#e8c46a, 1-4 d,#0a1030, 5-6 #5a6aa8,#0a1030, 7-99 #eee6d2,#0a1030,
|5: 0-0 d,#e8c46a, 1-4 d,#0a1030, 5-6 #5a6aa8,#0a1030, 7-99 #eee6d2,#0a1030,
@@ -595,8 +612,8 @@
|14: 0-0 d,#050a24, 1-3 d,#0a1030, 4-6 #5a6aa8,#0a1030, 7-99 #eee6d2,#0a1030,
|15: 0-0 d,#050a24, 1-3 d,#0a1030, 4-6 #5a6aa8,#0a1030, 7-99 #eee6d2,#0a1030,
|16: 0-1 d,#e8c46a, 2-31 #eee6d2,#25397d, 32-39 #f2d280,#25397d, 40-99 #eee6d2,#25397d,
-|17: 0-0 d,#e8c46a, 1-4 d,#0a1030, 5-6 #5a6aa8,#0a1030, 7-92 #eee6d2,#0a1030, 93-93 #eee6d2,#0f1a4a, 94-99 #9aa6d9,#0f1a4a,
-|18: 0-0 d,#050a24, 1-4 d,#0a1030, 5-6 #5a6aa8,#0a1030, 7-99 #eee6d2,#0a1030,
+|17: 0-0 d,#e8c46a, 1-4 d,#0a1030, 5-6 #5a6aa8,#0a1030, 7-99 #eee6d2,#0a1030,
+|18: 0-0 d,#050a24, 1-3 d,#0a1030, 4-6 #5a6aa8,#0a1030, 7-99 #eee6d2,#0a1030,
|19: 0-0 d,#050a24, 1-3 d,#0a1030, 4-6 #5a6aa8,#0a1030, 7-99 #eee6d2,#0a1030,
|20: 0-0 d,#050a24, 1-3 d,#0a1030, 4-6 #5a6aa8,#0a1030, 7-99 #eee6d2,#0a1030,
|21: 0-0 d,#050a24, 1-3 d,#0a1030, 4-6 #5a6aa8,#0a1030, 7-99 #eee6d2,#0a1030,
@@ -604,30 +621,30 @@
|23: 0-0 d,#050a24, 1-3 d,#0a1030, 4-6 #5a6aa8,#0a1030, 7-99 #eee6d2,#0a1030,
|24: 0-0 d,#050a24, 1-3 d,#0a1030, 4-6 #5a6aa8,#0a1030, 7-99 #eee6d2,#0a1030,
|25: 0-0 d,#050a24, 1-3 d,#0a1030, 4-6 #5a6aa8,#0a1030, 7-99 #eee6d2,#0a1030,
-|26: 0-0 d,#050a24, 1-3 d,#0a1030, 4-6 #5a6aa8,#0a1030, 7-99 #eee6d2,#0a1030,
-|27: 0-0 d,#050a24, 1-1 d,#0a1030, 2-3 d,#0a1030,b 4-6 #6a7ab8,#0a1030,b 7-99 #eee6d2,#0a1030,
-|28: 0-0 d,#050a24, 1-3 d,#0a1030, 4-99 #5a6aa8,#0a1030,
+|26: 0-0 d,#050a24, 1-1 d,#0a1030, 2-3 d,#0a1030,b 4-6 #6a7ab8,#0a1030,b 7-99 #eee6d2,#0a1030,
+|27: 0-0 d,#050a24, 1-3 d,#0a1030, 4-99 #5a6aa8,#0a1030,
+|28: 0-0 d,#050a24, 1-3 d,#0a1030, 4-6 #5a6aa8,#0a1030, 7-99 #eee6d2,#0a1030,
|29: 0-0 d,#050a24, 1-3 d,#0a1030, 4-6 #5a6aa8,#0a1030, 7-99 #eee6d2,#0a1030,
-|30: 0-0 d,#050a24, 1-3 d,#0a1030, 4-6 #5a6aa8,#0a1030, 7-99 #eee6d2,#0a1030,
-== snap step-dark-plus grid=100x31 cursor=7,27
-|17: 11 Theme spectrum Theme
-|18: 12 Theme harvest
-|19: 13 Theme clay
-|20: 14 Theme forge_black
-|21: 15 Theme forge_soft
-|22: 16 Theme orchard_black
-|23: 17 Theme acme
-|24: 18 Theme lapis
-|25: 19
-|26: 20 # Visual Studio Code
-|27: 21 Theme dark_plus
-|28: 22
-|29: 23 # Solarized
-|30: 24 Theme solarized_dark
+|30: 0-1 d,#0f1a4a, 2-99 #546091,#0f1a4a,
+== snap step-dark-plus grid=100x31 cursor=7,26
+|17: 12 Theme harvest
+|18: 13 Theme clay
+|19: 14 Theme forge_black
+|20: 15 Theme forge_soft
+|21: 16 Theme orchard_black
+|22: 17 Theme acme
+|23: 18 Theme lapis
+|24: 19
+|25: 20 # Visual Studio Code
+|26: 21 Theme dark_plus
+|27: 22
+|28: 23 # Solarized
+|29: 24 Theme solarized_dark
+|30: ✓ /tmp/pardes-snap/themesel/cwd/+Themes Theme 31 messages · SPC h m
== style step-dark-plus grid=100x31
|0: 0-1 d,#007acc, 2-99 #ffffff,#007acc,
|1: 0-1 d,#458276, 2-99 #ffffff,#1e1e1e,
-|2: 0-1 d,#1c608e, 2-31 #a7a7a7,#3c3c3c, 32-37 #68aee9,#3c3c3c, 38-99 #a7a7a7,#3c3c3c,
+|2: 0-1 d,#1c608e, 2-31 #a7a7a7,#32363b, 32-37 #68aee9,#32363b, 38-99 #a7a7a7,#32363b,
|3: 0-0 d,#424242, 1-4 d,#1e1e1e, 5-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
|4: 0-0 d,#424242, 1-4 d,#1e1e1e, 5-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
|5: 0-0 d,#424242, 1-4 d,#1e1e1e, 5-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
@@ -642,39 +659,39 @@
|14: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
|15: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
|16: 0-1 d,#007fd4, 2-31 #ffffff,#1e1e1e, 32-39 #cbe5fc,#1e1e1e, 40-99 #ffffff,#1e1e1e,
-|17: 0-0 d,#424242, 1-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-92 #d4d4d4,#1e1e1e, 93-93 #d4d4d4,#3c3c3c, 94-99 #a7a7a7,#3c3c3c,
+|17: 0-0 d,#424242, 1-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
|18: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
|19: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
|20: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
|21: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
|22: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
|23: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
-|24: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
-|25: 0-3 d,#1e1e1e, 4-99 #858585,#1e1e1e,
-|26: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
-|27: 0-1 d,#1e1e1e, 2-3 d,#1e1e1e,b 4-6 #c6c6c6,#1e1e1e,b 7-99 #d4d4d4,#1e1e1e,
-|28: 0-3 d,#1e1e1e, 4-99 #858585,#1e1e1e,
+|24: 0-3 d,#1e1e1e, 4-99 #858585,#1e1e1e,
+|25: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
+|26: 0-1 d,#1e1e1e, 2-3 d,#1e1e1e,b 4-6 #c6c6c6,#1e1e1e,b 7-99 #d4d4d4,#1e1e1e,
+|27: 0-3 d,#1e1e1e, 4-99 #858585,#1e1e1e,
+|28: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
|29: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
-|30: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
-== snap step-solarized-dark grid=100x31 cursor=7,27
-|17: 14 Theme forge_black Theme
-|18: 15 Theme forge_soft
-|19: 16 Theme orchard_black
-|20: 17 Theme acme
-|21: 18 Theme lapis
-|22: 19
-|23: 20 # Visual Studio Code
-|24: 21 Theme dark_plus
-|25: 22
-|26: 23 # Solarized
-|27: 24 Theme solarized_dark
-|28: 25 Theme solarized_light
-|29: 26
-|30: 27 # Dracula
+|30: 0-1 d,#007acc, 2-99 #7fbce5,#007acc,
+== snap step-solarized-dark grid=100x31 cursor=7,26
+|17: 15 Theme forge_soft
+|18: 16 Theme orchard_black
+|19: 17 Theme acme
+|20: 18 Theme lapis
+|21: 19
+|22: 20 # Visual Studio Code
+|23: 21 Theme dark_plus
+|24: 22
+|25: 23 # Solarized
+|26: 24 Theme solarized_dark
+|27: 25 Theme solarized_light
+|28: 26
+|29: 27 # Dracula
+|30: ✓ /tmp/pardes-snap/themesel/cwd/+Themes Theme 33 messages · SPC h m
== style step-solarized-dark grid=100x31
|0: 0-1 d,#657b83, 2-99 #01090b,#657b83,
|1: 0-1 d,#758a41, 2-99 #073642,#93a1a1,
-|2: 0-1 d,#185986, 2-31 #01090b,#657b83, 32-37 #121600,#657b83, 38-99 #01090b,#657b83,
+|2: 0-1 d,#185986, 2-31 #01090b,#4c5138, 32-37 #121600,#4c5138, 38-99 #01090b,#4c5138,
|3: 0-0 d,#839496, 1-4 d,#002b36, 5-6 #586e75,#002b36, 7-99 #839496,#002b36,
|4: 0-0 d,#839496, 1-4 d,#002b36, 5-6 #586e75,#002b36, 7-99 #839496,#002b36,
|5: 0-0 d,#839496, 1-4 d,#002b36, 5-6 #586e75,#002b36, 7-99 #839496,#002b36,
@@ -689,25 +706,26 @@
|14: 0-0 d,#eee8d5, 1-3 d,#002b36, 4-6 #586e75,#002b36, 7-99 #839496,#002b36,
|15: 0-0 d,#eee8d5, 1-3 d,#002b36, 4-6 #586e75,#002b36, 7-99 #839496,#002b36,
|16: 0-1 d,#2483c5, 2-31 #073642,#93a1a1, 32-39 #2d3502,#93a1a1, 40-99 #073642,#93a1a1,
-|17: 0-0 d,#839496, 1-3 d,#002b36, 4-6 #586e75,#002b36, 7-92 #839496,#002b36, 93-93 #839496,#657b83, 94-99 #01090b,#657b83,
+|17: 0-0 d,#839496, 1-3 d,#002b36, 4-6 #586e75,#002b36, 7-99 #839496,#002b36,
|18: 0-0 d,#eee8d5, 1-3 d,#002b36, 4-6 #586e75,#002b36, 7-99 #839496,#002b36,
|19: 0-0 d,#eee8d5, 1-3 d,#002b36, 4-6 #586e75,#002b36, 7-99 #839496,#002b36,
|20: 0-0 d,#eee8d5, 1-3 d,#002b36, 4-6 #586e75,#002b36, 7-99 #839496,#002b36,
-|21: 0-0 d,#eee8d5, 1-3 d,#002b36, 4-6 #586e75,#002b36, 7-99 #839496,#002b36,
-|22: 0-0 d,#eee8d5, 1-3 d,#002b36, 4-99 #586e75,#002b36,
+|21: 0-0 d,#eee8d5, 1-3 d,#002b36, 4-99 #586e75,#002b36,
+|22: 0-0 d,#eee8d5, 1-3 d,#002b36, 4-6 #586e75,#002b36, 7-99 #839496,#002b36,
|23: 0-0 d,#eee8d5, 1-3 d,#002b36, 4-6 #586e75,#002b36, 7-99 #839496,#002b36,
-|24: 0-0 d,#eee8d5, 1-3 d,#002b36, 4-6 #586e75,#002b36, 7-99 #839496,#002b36,
-|25: 0-0 d,#eee8d5, 1-3 d,#002b36, 4-99 #586e75,#002b36,
-|26: 0-0 d,#eee8d5, 1-3 d,#002b36, 4-6 #586e75,#002b36, 7-99 #839496,#002b36,
-|27: 0-0 d,#eee8d5, 1-1 d,#002b36, 2-3 d,#002b36,b 4-6 #586e75,#002b36,b 7-99 #839496,#002b36,
-|28: 0-0 d,#eee8d5, 1-3 d,#002b36, 4-6 #586e75,#002b36, 7-99 #839496,#002b36,
-|29: 0-0 d,#eee8d5, 1-3 d,#002b36, 4-99 #586e75,#002b36,
-|30: 0-0 d,#eee8d5, 1-3 d,#002b36, 4-6 #586e75,#002b36, 7-99 #839496,#002b36,
-== snap step-back grid=100x31 cursor=7,24
+|24: 0-0 d,#eee8d5, 1-3 d,#002b36, 4-99 #586e75,#002b36,
+|25: 0-0 d,#eee8d5, 1-3 d,#002b36, 4-6 #586e75,#002b36, 7-99 #839496,#002b36,
+|26: 0-0 d,#eee8d5, 1-1 d,#002b36, 2-3 d,#002b36,b 4-6 #586e75,#002b36,b 7-99 #839496,#002b36,
+|27: 0-0 d,#eee8d5, 1-3 d,#002b36, 4-6 #586e75,#002b36, 7-99 #839496,#002b36,
+|28: 0-0 d,#eee8d5, 1-3 d,#002b36, 4-99 #586e75,#002b36,
+|29: 0-0 d,#eee8d5, 1-3 d,#002b36, 4-6 #586e75,#002b36, 7-99 #839496,#002b36,
+|30: 0-1 d,#657b83, 2-99 #334247,#657b83,
+== snap step-back grid=100x31 cursor=7,23
+|30: ✓ /tmp/pardes-snap/themesel/cwd/+Themes Theme 35 messages · SPC h m
== style step-back grid=100x31
|0: 0-1 d,#007acc, 2-99 #ffffff,#007acc,
|1: 0-1 d,#458276, 2-99 #ffffff,#1e1e1e,
-|2: 0-1 d,#1c608e, 2-31 #a7a7a7,#3c3c3c, 32-37 #68aee9,#3c3c3c, 38-99 #a7a7a7,#3c3c3c,
+|2: 0-1 d,#1c608e, 2-31 #a7a7a7,#32363b, 32-37 #68aee9,#32363b, 38-99 #a7a7a7,#32363b,
|3: 0-0 d,#424242, 1-4 d,#1e1e1e, 5-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
|4: 0-0 d,#424242, 1-4 d,#1e1e1e, 5-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
|5: 0-0 d,#424242, 1-4 d,#1e1e1e, 5-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
@@ -722,35 +740,34 @@
|14: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
|15: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
|16: 0-1 d,#007fd4, 2-31 #ffffff,#1e1e1e, 32-39 #cbe5fc,#1e1e1e, 40-99 #ffffff,#1e1e1e,
-|17: 0-0 d,#424242, 1-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-92 #d4d4d4,#1e1e1e, 93-93 #d4d4d4,#3c3c3c, 94-99 #a7a7a7,#3c3c3c,
+|17: 0-0 d,#424242, 1-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
|18: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
|19: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
|20: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
-|21: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
-|22: 0-3 d,#1e1e1e, 4-99 #858585,#1e1e1e,
-|23: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
-|24: 0-1 d,#1e1e1e, 2-3 d,#1e1e1e,b 4-6 #c6c6c6,#1e1e1e,b 7-99 #d4d4d4,#1e1e1e,
-|25: 0-3 d,#1e1e1e, 4-99 #858585,#1e1e1e,
+|21: 0-3 d,#1e1e1e, 4-99 #858585,#1e1e1e,
+|22: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
+|23: 0-1 d,#1e1e1e, 2-3 d,#1e1e1e,b 4-6 #c6c6c6,#1e1e1e,b 7-99 #d4d4d4,#1e1e1e,
+|24: 0-3 d,#1e1e1e, 4-99 #858585,#1e1e1e,
+|25: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
|26: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
|27: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
-|28: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
-|29: 0-3 d,#1e1e1e, 4-99 #858585,#1e1e1e,
-|30: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
-== snap tail grid=100x31 cursor=7,29
-|17: 304 Theme wolf_alabaster_dark
-|18: 305 Theme wolf_alabaster_dark_bg
-|19: 306 Theme wolf_alabaster_dark_mono
-|20: 307 Theme wolf_alabaster_light
-|21: 308 Theme wolf_alabaster_light_bg
-|22: 309 Theme wolf_alabaster_light_mono
-|23: 310 Theme yellowed
-|24: 311 Theme yo
-|25: 312 Theme yo_berry
-|26: 313 Theme yo_light
-|27: 314 Theme zed_onedark
-|28: 315 Theme zed_onelight
-|29: 316 Theme zenburn
-|30: ~
+|28: 0-3 d,#1e1e1e, 4-99 #858585,#1e1e1e,
+|29: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
+|30: 0-1 d,#007acc, 2-99 #7fbce5,#007acc,
+== snap tail grid=100x31 cursor=7,28
+|17: 305 Theme wolf_alabaster_dark_bg
+|18: 306 Theme wolf_alabaster_dark_mono
+|19: 307 Theme wolf_alabaster_light
+|20: 308 Theme wolf_alabaster_light_bg
+|21: 309 Theme wolf_alabaster_light_mono
+|22: 310 Theme yellowed
+|23: 311 Theme yo
+|24: 312 Theme yo_berry
+|25: 313 Theme yo_light
+|26: 314 Theme zed_onedark
+|27: 315 Theme zed_onelight
+|28: 316 Theme zenburn
+|29: ~
== snap picked grid=100x31 cursor=7,3
|16: 14 line 14
|17: 15 line 15
@@ -766,9 +783,9 @@
|27: 25 line 25
|28: 26 line 26
|29: 27 line 27
-|30: 28 line 28
+|30: ✓ /tmp/pardes-snap/themesel/cwd/+Themes Del 36 messages · SPC h m
== style picked grid=100x31
-|2: 0-1 d,#007fd4, 2-31 #ffffff,#1e1e1e, 32-37 #cbe5fc,#1e1e1e, 38-99 #ffffff,#1e1e1e,
+|2: 0-1 d,#007fd4, 2-31 #ffffff,#32363b, 32-37 #cbe5fc,#32363b, 38-99 #ffffff,#32363b,
|3: 0-0 d,#424242, 1-1 d,#1e1e1e, 2-4 d,#1e1e1e,b 5-6 #c6c6c6,#1e1e1e,b 7-99 #d4d4d4,#1e1e1e,
|7: 0-0 d,#424242, 1-4 d,#1e1e1e, 5-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
|8: 0-0 d,#424242, 1-4 d,#1e1e1e, 5-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
@@ -780,12 +797,9 @@
|14: 0-0 d,#424242, 1-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
|15: 0-0 d,#424242, 1-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
|16: 0-0 d,#424242, 1-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
-|17: 0-0 d,#424242, 1-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
|18: 0-0 d,#424242, 1-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
|19: 0-0 d,#424242, 1-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
-|20: 0-0 d,#424242, 1-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
-|21: 0-0 d,#424242, 1-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
-|22: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
+|21: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
+|23: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
|24: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
-|25: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
-|29: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
+|28: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
diff --git a/test/snapshots/topbarexec.golden b/test/snapshots/topbarexec.golden
index 971761d8..5a6ebf64 100644
--- a/test/snapshots/topbarexec.golden
+++ b/test/snapshots/topbarexec.golden
@@ -10,30 +10,36 @@
|
|
|
-|
| /tmp/pardes-snap/topbarexec/cwd Term+bash S
| ave Mode Filter Collapse Del
| ls
| zmarkfile.txt
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/topbarexec/cwd
== snap noarg-runs grid=90x21 cursor=14,5
|1: New Term Find Grep Joincol Delcol New T╭────────────────────────────────────╮
|2: /tmp/pardes-snap/topbarexec/cwd Term+bash S /tmp/│pardes resizes=1 │
|3: ave Mode Filter Collapse Del ave M│theme orchard │
-|4: ls Debug ls │font default │
+|4: ls ls │font default │
|5: zmarkfile.txt zmark│terms 3 cols 2 │
-|6: │active #0 43x8 │
-|7: │scroll 0/8 │
+|6: │active #0 43x7 │
+|7: │scroll 0/7 │
|8: │frame virtual clock │
|9: │ │
|10: │ │
-|11: │ │
-|12: /tmp/pardes-snap/topbarexec/cwd Term+bash S │ │
-|13: ave Mode Filter Collapse Del ╰────────────────────────────────────╯
+|11: /tmp/pardes-snap/topbarexec/cwd Term+bash S │ │
+|12: ave Mode Filter Collapse Del │ │
+|13: ls ╰────────────────────────────────────╯
+|20: ✓ @p1 Debug 1 message · SPC h m
== snap arg-still-spliced grid=90x21 cursor=14,4
|1: New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
|2: /tmp/pardes-snap/topbarexec/cwd Term+bash S /tmp/pardes-snap/topbarexec/cwd Term+bash S
|3: ave Mode Filter Collapse Del ave Mode Filter Collapse Del
-|4: zmarkfile.txt Find ls
+|4: zmarkfile.txt ls
|5: zmarkfile.txt
|6: +Search 1/1 Del
|7: Find zmarkfile.txt
@@ -46,3 +52,4 @@
|14: ave Mode Filter Collapse Del
|15: ls
|16: zmarkfile.txt
+|20: ✓ @p1 Find 2 messages · SPC h m
diff --git a/test/snapshots/tty.golden b/test/snapshots/tty.golden
index a715c990..8d9e5f1e 100644
--- a/test/snapshots/tty.golden
+++ b/test/snapshots/tty.golden
@@ -15,11 +15,21 @@
|
|
|
-|
| /tmp/pardes-snap/tty/cwd Term+bash Save Mode Fil
| ter Collapse Del
| ls
| m.txt
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/tty/cwd
== snap tty-echo grid=100x31 cursor=4,8
|6: $ echo SNAP''OK
|7: SNAPOK
@@ -29,14 +39,13 @@
|4: ls ls
|6: echo SNAP''OK
|8:
-== snap shift-esc-normal grid=100x31 cursor=4,21
-|4: ls Last ls
-== snap ctrl-b-on grid=100x31 cursor=4,21
-|4: ls ls
-|17: $ /tmp/pardes-snap/tty/cwd Term+bash Save Mode Fil
-|19: $ ls
-|21: $
-== snap ctrl-b-off grid=100x31 cursor=4,21
-|17: /tmp/pardes-snap/tty/cwd Term+bash Save Mode Fil
-|19: ls
-|21:
+== snap shift-esc-normal grid=100x31 cursor=4,20
+|30: ✓ @p1 Last 1 message · SPC h m
+== snap ctrl-b-on grid=100x31 cursor=4,20
+|16: $ /tmp/pardes-snap/tty/cwd Term+bash Save Mode Fil
+|18: $ ls
+|20: $
+== snap ctrl-b-off grid=100x31 cursor=4,20
+|16: /tmp/pardes-snap/tty/cwd Term+bash Save Mode Fil
+|18: ls
+|20:
diff --git a/test/snapshots/ttyclick.golden b/test/snapshots/ttyclick.golden
index a65efdd1..9334dd01 100644
--- a/test/snapshots/ttyclick.golden
+++ b/test/snapshots/ttyclick.golden
@@ -15,11 +15,21 @@
|
|
|
-|
| /tmp/pardes-snap/ttyclick/cwd Term+bash Save Mod
| e Filter Collapse Del
| ls
| probe.txt
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/ttyclick/cwd
== snap tty-tagedit grid=100x31 cursor=32,2
== snap tty-tagexit grid=100x31 cursor=4,6
== snap ins-bodyclick grid=100x31 cursor=11,4
diff --git a/test/snapshots/ttyedit.golden b/test/snapshots/ttyedit.golden
index e39ed6bb..6328c54c 100644
--- a/test/snapshots/ttyedit.golden
+++ b/test/snapshots/ttyedit.golden
@@ -15,21 +15,30 @@
|
|
|
-|
| /tmp/pardes-snap/ttyedit/cwd Term+bash Save Mode
| Filter Collapse Del
| ls
| words.txt
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/ttyedit/cwd
== snap split grid=100x31 cursor=2,9
|2: ^ /tmp/pardes-snap/ttyedit/cwd Term+bash Save Mode /tmp/pardes-snap/ttyedit/cwd Term+bash Save Mode
-|4: next replaces it (Ctrl-b types to the program) ls
|8: one t
|9: wo three
|10: four five six
|11: seven eight nine
+|30: · @p1 a copy of the terminal's text: Tab or B2 runs it; what the program draw 1 message · SPC h m
== snap opened grid=100x31 cursor=6,10
|2: /tmp/pardes-snap/ttyedit/cwd Term+bash Save Mode /tmp/pardes-snap/ttyedit/cwd Term+bash Save Mode
-|4: ls ls
|10: OPEN
|11: four five six
|12: seven eight nine
diff --git a/test/snapshots/ttyfollow.golden b/test/snapshots/ttyfollow.golden
index 2c0ca230..b7e9f527 100644
--- a/test/snapshots/ttyfollow.golden
+++ b/test/snapshots/ttyfollow.golden
@@ -1,11 +1,10 @@
-== snap held-pre grid=100x31 cursor=4,16
+== snap held-pre grid=100x31 cursor=4,15
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
| /tmp/pardes-snap/ttyfollow/cwd Term+bash Save Mo /tmp/pardes-snap/ttyfollow/cwd Term+bash Save Mo
| de Filter Collapse Del de Filter Collapse Del
-| 186 ls
-| 187 s.txt
-| 188
+| 187 ls
+| 188 s.txt
| 189
| 190
| 191
@@ -20,25 +19,35 @@
| de Filter Collapse Del
| ls
| s.txt
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/ttyfollow/cwd
== snap held-post grid=100x31 cursor=54,9
|2: /tmp/pardes-snap/ttyfollow/cwd Term+bash Save Mo$ /tmp/pardes-snap/ttyfollow/cwd Term+bash Save Mo
-|4: 186 $ ls
-|6: 188 $ touch go; until test -f done1; do sleep 0.05;
-|7: 189 done; echo SYN''CED
-|8: 190 SYNCED
-|9: 191 $
-== snap tty-follows grid=100x31 cursor=4,16
+|4: 187 $ ls
+|6: 189 $ touch go; until test -f done1; do sleep 0.05;
+|7: 190 done; echo SYN''CED
+|8: 191 SYNCED
+|9: 192 $
+== snap tty-follows grid=100x31 cursor=4,15
|2: $ /tmp/pardes-snap/ttyfollow/cwd Term+bash Save Mo$ /tmp/pardes-snap/ttyfollow/cwd Term+bash Save Mo
-|4: 293 $ ls
-|5: 294 s.txt
-|6: 295 $ touch go; until test -f done1; do sleep 0.05;
-|7: 296 done; echo SYN''CED
-|8: 297 SYNCED
-|9: 298 $
-|10: 299
-|11: 300
-|12: [1]+ Done ( until test -f
-|13: go; do
-|14: sleep 0.05;
-|15: done; seq 201 260; touch done1 )
-|16: $
+|4: 294 $ ls
+|5: 295 s.txt
+|6: 296 $ touch go; until test -f done1; do sleep 0.05;
+|7: 297 done; echo SYN''CED
+|8: 298 SYNCED
+|9: 299 $
+|10: 300
+|11: [1]+ Done ( until test -f
+|12: go; do
+|13: sleep 0.05;
+|14: done; seq 201 260; touch done1 )
+|15: $
diff --git a/test/snapshots/ttyhelp.golden b/test/snapshots/ttyhelp.golden
index de9471a9..200aab50 100644
--- a/test/snapshots/ttyhelp.golden
+++ b/test/snapshots/ttyhelp.golden
@@ -22,23 +22,46 @@
|
| /tmp/pardes-snap/ttyhelp/cwd/+New Save Term Collapse Follow Del
| 1
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/ttyhelp/cwd
== 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: 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: $
+|11: 3 SPC ' Resume
+|12: 4 Reopen the last picker as it was: its rows, marks, cursor and query.
+|13: 5 In the tag of the pane its Enter lands in from this one: this pane if it reads, else its rea↩
+|14: der. `SPC '`.
+|15: 6
+|16: 7 SPC ? Help topbar
+|17: 8 Show every builtin with its keys and documentation, or one builtin's alone.
+|18: 9 `Help <name>`: that builtin alone, its keys spelled out, what it acts on and its line for a ↩
+|19: shell (`Help Diff`); a setting or an addon's word the same. `Help <keys>`: the builtins unde↩
+|20: r SPC and those keys (`Help l`, as `SPC l ?` shows them). Each fills the one +Help: a second
+|30: ✓ @p1 Help 1 message · SPC h m
+== snap leaderworks grid=100x31 cursor=47,5
+|5: ^ /tmp/pardes-snap/ttyhelp/cwd/+Help Help tutor 1/136
+|6: ▶ SPC h t · Tutor · help│ t Tutor
+|7: │ Open the tutor, a document to work through.
+|8: │ keys SPC h t
+|9: │
+|10: 1 pardes builtins: each one's keys and its name, then what it does. Run one by its keys, or by↩
+|11: its name anywhere: B2 on the word, Exec <name>, a line of a ctl file, or `pardes do <name>`↩
+|12: from a shell. `Help <name>` shows one builtin alone; `Help <keys>` (or SPC, those keys, the↩
+|13: n ?) the builtins under SPC and those keys.
+|14: 2
+|15: 3 SPC ' Resume
+|16: 4 Reopen the last picker as it was: its rows, marks, cursor and query.
+|17: 5 In the tag of the pane its Enter lands in from this one: this pane if it reads, else its rea↩
+|18: der. `SPC '`.
+|19: 6
+|20: 7 SPC ? Help topbar
diff --git a/test/snapshots/ttylook.golden b/test/snapshots/ttylook.golden
index 49a17f97..252640c5 100644
--- a/test/snapshots/ttylook.golden
+++ b/test/snapshots/ttylook.golden
@@ -15,11 +15,21 @@
|
|
|
-|
| /tmp/pardes-snap/ttylook/cwd Term+bash Save Mode Filter Co
| llapse Del
| ls
| big.txt plain.txt sub
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/ttylook/cwd
== 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,
@@ -37,11 +47,11 @@
|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,
+|16: 0-1 d,#496656, 2-30 #b2c3b8,#1d2824, 31-40 #d3b0d9,#1d2824, 41-59 #b2c3b8,#1d2824, 60-60 #b2c3b8,#608269, 61-119 #b2c3b8,#0d1410,
+|17: 0-1 d,#1d2824, 2-59 #b2c3b8,#1d2824, 60-60 #b2c3b8,#608269, 61-119 #b2c3b8,#0d1410,
+|18: 0-0 d,#608269, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#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,
+|20: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#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,
@@ -51,20 +61,21 @@
|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,
+|30: 0-1 d,#1d2824, 2-119 #b2c3b8,#1d2824,
== 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
+|30: · @p1 a copy of the terminal's text: Tab or B2 runs it; what the program draws next replaces it ( 1 message · SPC h m
== snap tok3 grid=120x31 cursor=22,5
|5: big.txt plain.txt sub big.txt plain.txt sub
-== snap diropen grid=120x31 cursor=7,8
-|7: /tmp/pardes-snap/ttylook/cwd/sub/ Get Term Collapse Del
-|8: 1
+== snap diropen grid=120x31 cursor=7,22
+|21: /tmp/pardes-snap/ttylook/cwd/sub/ Get Term Collapse Del
+|22: 1
== snap noop grid=120x31 cursor=2,5
== snap cursorword grid=120x31 cursor=3,4
-|22: /tmp/pardes-snap/ttylook/cwd/+Search Save Term Collapse Fo
-|23: llow LocationsConfig Del
-|24: 1 @p1:1:1-2
-|25: 2 ls
-|26: ~
+|7: /tmp/pardes-snap/ttylook/cwd/+Search Save Term Collapse Fo
+|8: llow LocationsConfig Del
+|9: 1 @p1:1:1-2
+|10: 2 ls
+|11: ~
diff --git a/test/snapshots/ttyonly.golden b/test/snapshots/ttyonly.golden
index ef0a5385..4c640cae 100644
--- a/test/snapshots/ttyonly.golden
+++ b/test/snapshots/ttyonly.golden
@@ -22,6 +22,14 @@
|
| /tmp/pardes-snap/ttyonly/cwd/+New Save Term Collapse Follow Del
| 1
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/ttyonly/cwd
== style ttyonly grid=100x31
|0: 0-1 d,#1d2824, 2-99 #b2c3b8,#1d2824,
|1: 0-1 d,#887455, 2-99 #becfc4,#314738,
@@ -53,4 +61,4 @@
|27: 0-0 d,#608269, 1-99 d,#0d1410,
|28: 0-0 d,#608269, 1-99 d,#0d1410,
|29: 0-0 d,#608269, 1-99 d,#0d1410,
-|30: 0-0 d,#608269, 1-99 d,#0d1410,
+|30: 0-1 d,#1d2824, 2-99 #b2c3b8,#1d2824,
diff --git a/test/snapshots/ttypaste.golden b/test/snapshots/ttypaste.golden
index b02c97d4..35364d52 100644
--- a/test/snapshots/ttypaste.golden
+++ b/test/snapshots/ttypaste.golden
@@ -15,9 +15,19 @@
|
|
|
-|
| /tmp/pardes-snap/ttypaste/cwd Term+bash Save Mod
| e Filter Collapse Del
| ls
| src.txt
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/ttypaste/cwd
== snap ctrl-v-with-empty-register-is-inert grid=100x31 cursor=18,6
diff --git a/test/snapshots/ttyprompt.golden b/test/snapshots/ttyprompt.golden
index ef3c5cea..e0f76455 100644
--- a/test/snapshots/ttyprompt.golden
+++ b/test/snapshots/ttyprompt.golden
@@ -15,11 +15,21 @@
|
|
|
-|
| /tmp/pardes-snap/ttyprompt/cwd Term+bash Save Mo
| de Filter Collapse Del
| ls
| probe.txt
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/ttyprompt/cwd
== snap in-tty grid=100x31 cursor=17,6
|2: $ /tmp/pardes-snap/ttyprompt/cwd Term+bash Save Mo /tmp/pardes-snap/ttyprompt/cwd Term+bash Save Mo
|4: $ ls ls
diff --git a/test/snapshots/ttytaken.golden b/test/snapshots/ttytaken.golden
index ee72ccc2..337072f1 100644
--- a/test/snapshots/ttytaken.golden
+++ b/test/snapshots/ttytaken.golden
@@ -4,12 +4,38 @@
| /tmp/pardes-snap/ttytaken/cwd Term+bash Save Mode Filter Collapse Del
| ls
| big.txt
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/ttytaken/cwd
== snap at-prompt grid=210x31 cursor=4,5
|2: /tmp/pardes-snap/ttytaken/cwd Term+bash Save Mode Filter Collapse Del @`echo TAKEN''ONE`
-|3: ls Exec
|5: echo TAKEN''ONE
|6: TAKENONE
-== snap paging grid=210x31 cursor=9,30
+|30: ✓ @p1 Exec 1 message · SPC h m
+== snap paging grid=210x31 cursor=9,29
|3: line 1
|4: line 2
|5: line 3
@@ -36,16 +62,15 @@
|26: line 24
|27: line 25
|28: line 26
-|29: line 27
-|30: big.txt
+|29: big.txt
== snap spawned grid=210x31 cursor=hidden
|2: /tmp/pardes-snap/ttytaken/cwd Term+bash Save Mode Filter Collapse Del @`echo TAKEN''ONE` @`echo TAKEN''TWO`
-|3: line 1 Exec
-|16: :
-|17: /tmp/pardes-snap/ttytaken/cwd (echo TAKEN''TWO) exit 0 Kill Save Collapse Del
-|18: % echo TAKEN''TWO
-|19: TAKENTWO
-|20: exit 0
+|15: :
+|16: /tmp/pardes-snap/ttytaken/cwd (echo TAKEN''TWO) exit 0 Kill Save Collapse Del
+|17: % echo TAKEN''TWO
+|18: TAKENTWO
+|19: exit 0
+|20:
|21:
|22:
|23:
@@ -55,4 +80,4 @@
|27:
|28:
|29:
-|30:
+|30: ✓ @p1 Exec ×2 1 message · SPC h m
diff --git a/test/snapshots/tutor.golden b/test/snapshots/tutor.golden
index 7d285c18..c6316c73 100644
--- a/test/snapshots/tutor.golden
+++ b/test/snapshots/tutor.golden
@@ -1,10 +1,24 @@
-== snap tutor grid=150x31 cursor=7,6
+== snap tutor grid=150x31 cursor=7,20
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
| /tmp/pardes-snap/tutor/cwd Term+bash Save Mode Filter Collapse Del /tmp/pardes-snap/tutor/cwd Term+bash Save Mode Filter Collapse Del
-| ls Tutor ls
+| ls ls
|
-| /tmp/pardes-snap/tutor/cwd/+Tutor Save Term Collapse Follow Del
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/tutor/cwd Term+bash Save Mode Filter Collapse Del
+| ls
+|
+| /tmp/pardes-snap/tutor/cwd/+Tutor Keep Save Term Collapse Follow Del
| 1
| 2 PARDES TUTOR
| 3
@@ -14,7 +28,5 @@
| 7 once and the second `Del` discards. `Tutor` or SPC h t opens a
| 8 fresh copy.
| 9
-| 10 The guide (docs/typ/guide.typ) explains; this is the hands-on part↩
-| .
-| /tmp/pardes-snap/tutor/cwd Term+bash Save Mode Filter Collapse Del
-| ls
+| 10 The guide (docs/typ/guide.typ) explains; this is the hands-on part
+| ✓ @p1 Tutor 1 message · SPC h m
diff --git a/test/snapshots/wheeldrift.golden b/test/snapshots/wheeldrift.golden
index 393a57e1..8efcad3c 100644
--- a/test/snapshots/wheeldrift.golden
+++ b/test/snapshots/wheeldrift.golden
@@ -1,9 +1,9 @@
== snap home grid=70x17 cursor=7,4
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config His
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/wheeldrift/cwd/drift.txt Save Term Collapse Follow
-| Del
-| 1 line 1_0123456789_abcdefghij_ZEND Wrap
+| /tmp/pardes-snap/wheeldrift/cwd/drift.txt Keep Save Term Collapse Fo
+| llow Del
+| 1 line 1_0123456789_abcdefghij_ZEND
| 2 line 2_0123456789_abcdefghij_ZEND
| 3 line 3_0123456789_abcdefghij_ZEND
| 4 line 4_0123456789_abcdefghij_ZEND
@@ -15,7 +15,7 @@
| 10 line 10_0123456789_abcdefghij_ZEND
| 11 line 11_0123456789_abcdefghij_ZEND
| 12 line 12_0123456789_abcdefghij_ZEND
-| 13 line 13_0123456789_abcdefghij_ZEND
+| ✓ /tmp/pardes-snap/wheeldrift/cwd/drift.txt Wra 1 message · SPC h m
== snap drifted grid=70x17 cursor=hidden
|4: 6 line 6_0123456789_abcdefghij_ZEND
|5: 7 line 7_0123456789_abcdefghij_ZEND
@@ -29,7 +29,6 @@
|13: 15 line 15_0123456789_abcdefghij_ZEND
|14: 16 line 16_0123456789_abcdefghij_ZEND
|15: 17 line 17_0123456789_abcdefghij_ZEND
-|16: 18 line 18_0123456789_abcdefghij_ZEND
== snap paying grid=70x17 cursor=hidden
== snap moved grid=70x17 cursor=hidden
|4: 6 123456789_abcdefghij_ZEND
@@ -44,7 +43,6 @@
|13: 15 0123456789_abcdefghij_ZEND
|14: 16 0123456789_abcdefghij_ZEND
|15: 17 0123456789_abcdefghij_ZEND
-|16: 18 0123456789_abcdefghij_ZEND
== snap rearmed grid=70x17 cursor=hidden
|4: 5 123456789_abcdefghij_ZEND
|5: 6 123456789_abcdefghij_ZEND
@@ -58,4 +56,3 @@
|13: 14 0123456789_abcdefghij_ZEND
|14: 15 0123456789_abcdefghij_ZEND
|15: 16 0123456789_abcdefghij_ZEND
-|16: 17 0123456789_abcdefghij_ZEND
diff --git a/test/snapshots/winch.golden b/test/snapshots/winch.golden
index bb994371..64d527c8 100644
--- a/test/snapshots/winch.golden
+++ b/test/snapshots/winch.golden
@@ -15,10 +15,21 @@
|
|
|
-|
| /tmp/pardes-snap/winch/cwd Term+bash Save Mode F
| ilter Collapse Del
| ls
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/winch/cwd
== snap resized grid=106x35 cursor=4,8
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
@@ -38,7 +49,20 @@
|
|
|
-|
| /tmp/pardes-snap/winch/cwd Term+bash Save Mode Filt
| er Collapse Del
| ls
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/winch/cwd
diff --git a/test/snapshots/windownav.golden b/test/snapshots/windownav.golden
index 9e7db6f6..140e4618 100644
--- a/test/snapshots/windownav.golden
+++ b/test/snapshots/windownav.golden
@@ -1,31 +1,57 @@
== snap start grid=100x31 cursor=7,4
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/windownav/cwd/w.txt Save Term C /tmp/pardes-snap/windownav/cwd Term+bash Save Mo
-| ollapse Follow Del de Filter Collapse Del
+| /tmp/pardes-snap/windownav/cwd/w.txt Keep Save T /tmp/pardes-snap/windownav/cwd Term+bash Save Mo
+| erm Collapse Follow Del de Filter Collapse Del
| 1 alpha ls
| 2 beta w.txt
| 3 gamma
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| ✓ @p2 Window 1 message · SPC h m
== snap to-term grid=100x31 cursor=54,6
-|4: 1 alpha Last ls
+|30: ✓ /tmp/pardes-snap/windownav/cwd/w.txt Last 2 messages · SPC h m
== snap back-to-file grid=100x31 cursor=7,4
-|4: 1 alpha ls Last
+|30: ✓ @p2 Last 3 messages · SPC h m
== snap esc-to-term grid=100x31 cursor=54,6
-|4: 1 alpha Last ls
+|30: ✓ /tmp/pardes-snap/windownav/cwd/w.txt Last 4 messages · SPC h m
== snap esc-back-to-file grid=100x31 cursor=7,4
-|4: 1 alpha ls Last
+|30: ✓ @p2 Last 5 messages · SPC h m
== snap altn grid=100x31 cursor=4,11
-|4: 1 alpha ls
|7: /tmp/pardes-snap/windownav/cwd Term+bash Save Mo
|8: de Filter Collapse Del
|9: ls
|10: w.txt
== snap up grid=100x31 cursor=7,4
+|30: ✓ @p3 Window 6 messages · SPC h m
== snap right grid=100x31 cursor=54,6
+|30: ✓ /tmp/pardes-snap/windownav/cwd/w.txt Window 7 messages · SPC h m
== snap left grid=100x31 cursor=7,4
+|30: ✓ @p2 Window 8 messages · SPC h m
== snap down grid=100x31 cursor=4,11
+|30: ✓ /tmp/pardes-snap/windownav/cwd/w.txt Window 9 messages · SPC h m
== snap toggle-doc grid=100x31 cursor=7,4
-|9: ls Last
+|30: ✓ @p3 Last 10 messages · SPC h m
== snap toggle-back grid=100x31 cursor=4,11
-|4: 1 alpha Last ls
-|9: ls
+|30: ✓ /tmp/pardes-snap/windownav/cwd/w.txt Last 11 messages · SPC h m
diff --git a/test/snapshots/windowops.golden b/test/snapshots/windowops.golden
index ab97a868..3b9af25b 100644
--- a/test/snapshots/windowops.golden
+++ b/test/snapshots/windowops.golden
@@ -15,11 +15,21 @@
|
|
|
-|
| /tmp/pardes-snap/windowops/cwd Term+bash Save Mo
| de Filter Collapse Del
| ls
| w.txt
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/windowops/cwd
== snap hover-h grid=100x31 cursor=4,6
== snap hborder-done grid=100x31 cursor=4,6
|13: /tmp/pardes-snap/windowops/cwd Term+bash Save Mo
@@ -29,7 +39,6 @@
|17:
|18:
|19:
-|20:
== snap move-preview grid=100x31 cursor=4,17
== snap moved grid=100x31 cursor=4,17
== snap altn grid=100x31 cursor=4,22
@@ -38,20 +47,22 @@
|20: ls
|21: w.txt
== snap focus-right grid=100x31 cursor=54,6
+|30: ✓ @p4 Window 1 message · SPC h m
== snap debug-on grid=100x31 cursor=54,6
|1: New Term Find Grep Joincol Delcol New Term F╭────────────────────────────────────╮
|2: /tmp/pardes-snap/windowops/cwd Term+bash Save Mo /tmp/parde│pardes resizes=1 │
|3: de Filter Collapse Del de Filter │theme orchard │
|4: ls ls │font default │
|5: w.txt w.txt │terms 4 cols 2 │
-|6: │active #2 48x27 │
-|7: │scroll 0/27 │
+|6: │active #2 48x26 │
+|7: │scroll 0/26 │
|8: │frame virtual clock │
|9: │ │
|10: │ │
|11: │ │
|12: │ │
|13: /tmp/pardes-snap/windowops/cwd Term+bash Save Mo ╰────────────────────────────────────╯
+|30: ✓ @p3 Debug 2 messages · SPC h m
== style debug-on grid=100x31
|0: 0-1 d,#1d2824, 2-74 #b2c3b8,#1d2824, 75-79 #f5f7ee,#3c614a, 80-80 #f5f7ee,#1d2824, 81-99 #b2c3b8,#1d2824,
|1: 0-1 d,#887455, 2-49 #b2c3b8,#1d2824, 50-51 #b2c3b8,#887455, 52-61 #becfc4,#314738, 62-99 d,d,
@@ -83,12 +94,12 @@
|27: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
|28: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
|29: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
-|30: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
+|30: 0-1 d,#1d2824, 2-99 #67756e,#1d2824,
== snap debug-off grid=100x31 cursor=54,6
|1: New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol
|2: /tmp/pardes-snap/windowops/cwd Term+bash Save Mo /tmp/pardes-snap/windowops/cwd Term+bash Save Mo
|3: de Filter Collapse Del de Filter Collapse Del
-|4: ls ls Debug
+|4: ls ls
|5: w.txt w.txt
|6:
|7:
@@ -98,3 +109,4 @@
|11:
|12:
|13: /tmp/pardes-snap/windowops/cwd Term+bash Save Mo
+|30: ✓ @p3 Debug ×2 2 messages · SPC h m
diff --git a/test/snapshots/wrap.golden b/test/snapshots/wrap.golden
index ba115b3f..29a51a33 100644
--- a/test/snapshots/wrap.golden
+++ b/test/snapshots/wrap.golden
@@ -1,8 +1,8 @@
== snap on-narrow grid=48x15 cursor=7,4
| Newcol Joincol Find Grep Help Changelog Tutor
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/wrap/cwd/long.txt Save Term C
-| ollapse Follow Del
+| /tmp/pardes-snap/wrap/cwd/long.txt Keep Save T
+| erm Collapse Follow Del
| 1 0---------1---------2---------3---------↩
| 4---------5---------6---------7---------↩
| 8---------9---------A---------B---------↩
@@ -11,14 +11,19 @@
| 2 second line
| 3 third line
| ~
+|
+|
+| /tmp/pardes-snap/wrap/cwd/long.txt:1
== snap clicked grid=48x15 cursor=17,4
== snap logical-j grid=48x15 cursor=17,9
+|14: /tmp/pardes-snap/wrap/cwd/long.txt:2
== snap visual-gj grid=48x15 cursor=10,5
+|14: /tmp/pardes-snap/wrap/cwd/long.txt:1
== snap visual-gj-again grid=48x15 cursor=10,6
== snap visual-gk grid=48x15 cursor=10,5
== snap visual-count-gj grid=48x15 cursor=10,7
== snap off grid=48x15 cursor=hidden
-|4: 1 0---------1---------2---------3---- Wrap
+|4: 1 0---------1---------2---------3---------4
|5: 2 second line
|6: 3 third line
|7: ~
@@ -26,7 +31,9 @@
|9:
|10:
|11:
+|14: ✓ /tmp/pardes-snap/wrap/c 1 message · SPC h m
== snap on-again grid=48x15 cursor=10,7
+|4: 1 0---------1---------2---------3---------↩
|5: 4---------5---------6---------7---------↩
|6: 8---------9---------A---------B---------↩
|7: C---------D---------E---------F---------↩
@@ -37,9 +44,16 @@
== snap on-wide grid=128x15 cursor=7,3
| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit
| New Term Find Grep Joincol Delcol
-| /tmp/pardes-snap/wrap/cwd/long.txt Save Term Collapse Follow Del
+| /tmp/pardes-snap/wrap/cwd/long.txt Keep Save Term Collapse Follow Del
| 1 0---------1---------2---------3---------4---------5---------6---------7---------8---------9---------A---------B---------↩
| C---------D---------E---------F---------G---------H---------I---------J---------
| 2 second line
| 3 third line
| ~
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/wrap/cwd/long.txt:1
diff --git a/test/snapshots/yankpaste.golden b/test/snapshots/yankpaste.golden
index 6519db3e..2099cb82 100644
--- a/test/snapshots/yankpaste.golden
+++ b/test/snapshots/yankpaste.golden
@@ -9,13 +9,36 @@
| 5 line 4
| 6 line 5
| ~
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/yankpaste/cwd/f.txt:4
== snap linewise-above grid=100x31 cursor=13,7
|8: 6 line 2
|9: 7 line 4
|10: 8 line 5
|11: ~
+|30: /tmp/pardes-snap/yankpaste/cwd/f.txt:5
== snap charwise-inline grid=100x31 cursor=10,3
|3: 1 liline 1
+|30: /tmp/pardes-snap/yankpaste/cwd/f.txt:1
== snap blankline grid=100x31 cursor=7,5
|4: 2
|5: 3
@@ -24,3 +47,4 @@
|11: 9 line 4
|12: 10 line 5
|13: ~
+|30: /tmp/pardes-snap/yankpaste/cwd/f.txt:3
diff --git a/test/terminal.zig b/test/terminal.zig
index 2873c278..5cf853e7 100644
--- a/test/terminal.zig
+++ b/test/terminal.zig
@@ -234,7 +234,7 @@ test "a position that cannot follow the output for want of memory is said on the
pane.feedOutput(p, "three\r\n");
failing.fail_index = std.math.maxInt(usize);
try std.testing.expect(failing.has_induced_failure);
- try std.testing.expectEqualStrings(panes.positions_lost, pane.msg[0..pane.msg_len]);
+ try std.testing.expectEqualStrings(panes.positions_lost, p.messages.saidBy(pane));
const logged = p.messages.at(p.messages.len -| 1) orelse return error.NothingLogged;
try std.testing.expectEqualStrings(panes.positions_lost, logged.slice());
}
@@ -270,7 +270,7 @@ test "rows asked for after a pane's cached rows were dropped, before the sweep,
test "terminal Filter keys indexed truecolor OSC and background-only cells through the theme" {
const testing = std.testing;
// Raw index assertions require a theme that inherits the ANSI palette.
- const p = try Pardes.init(testing.allocator, .{ .startup_config = "Theme helix\n", .tty_only = true, .cols = 18, .rows = 6 });
+ const p = try Pardes.init(testing.allocator, .{ .startup_config = "Theme helix\n", .tty_only = true, .cols = 18, .rows = 7 });
defer p.deinit();
while (p.nextEffect()) |_| {}
const pane = p.panes[0].?;