summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-30 17:35:06 -0300
committerGabriel Schneider <[email protected]>2026-10-30 17:35:06 -0300
commit6d8da8721141284cf33bb901168b26135893eb86 (patch)
tree791d63401d4e85fbca1d597a8ce0326e70efd545 /test
parentefd43a3a2cf03bb741366331158b368abf9ac583 (diff)
parentbf6810a8f9d6cc82050e7d9c0cfb06358301b574 (diff)
downloadpardes-6d8da8721141284cf33bb901168b26135893eb86.tar.gz
pardes-6d8da8721141284cf33bb901168b26135893eb86.zip
Merge latest upstream into the macOS branch for Zig 0.17
Retain the macOS branch history and local Acme selection color while adopting upstream's current core and platform changes. Pin Zig and ZLS to 0.17.0, and fetch the existing zstbi compatibility commit through upstream after its original fork was removed.
Diffstat (limited to 'test')
-rw-r--r--test/appearance_gallery.py30
-rw-r--r--test/bench_util.zig43
-rw-r--r--test/column_drag.zig176
-rw-r--r--test/column_tags.py9
-rw-r--r--test/deck/buttons.zon158
-rw-r--r--test/deck/lpad-swipe.zon322
-rw-r--r--test/deck/replay.zig41
-rw-r--r--test/deck/rpad-drag.zon442
-rw-r--r--test/deck/schema.zig10
-rw-r--r--test/deck/triggers.zon1148
-rw-r--r--test/e2e_harness.zig44
-rw-r--r--test/font_size.py10
-rw-r--r--test/fs.py1578
-rw-r--r--test/fs_bench.zig27
-rw-r--r--test/fs_namespace.zig91
-rw-r--r--test/fs_soak.py284
-rw-r--r--test/gui-goldens.txt17
-rw-r--r--test/gui_golden.py239
-rw-r--r--test/gui_monkey.py179
-rw-r--r--test/history.zig10
-rw-r--r--test/hxcases/cases.jsonl177
-rw-r--r--test/hxcases/goldens.jsonl177
-rw-r--r--test/hxcases/golf-goldens.jsonl124
-rw-r--r--test/hxcases/golf-waivers.jsonl0
-rw-r--r--test/hxcases/golf.jsonl124
-rw-r--r--test/hxcases/parity-waivers.jsonl6
-rw-r--r--test/hxcases/waivers.jsonl7
-rw-r--r--test/hxdiff.zig51
-rw-r--r--test/image_harness.zig2
-rw-r--r--test/kitty-fixtures/chafa.vt2
-rw-r--r--test/kitty-fixtures/icat-center.vt1
-rw-r--r--test/kitty-fixtures/icat-clear.vt1
-rw-r--r--test/kitty-fixtures/icat-left.vt1
-rw-r--r--test/kitty-fixtures/icat-place.vt1
-rw-r--r--test/kitty-fixtures/icat-placeholder.vt4
-rw-r--r--test/kitty-fixtures/icat-right.vt1
-rw-r--r--test/kitty.zig1349
-rw-r--r--test/kitty_client.zig153
-rw-r--r--test/kitty_harness.zig579
-rw-r--r--test/look_placement.py143
-rw-r--r--test/lspbench.zig196
-rw-r--r--test/lspfixture/broken.zig4
-rw-r--r--test/lspmock.zig31
-rw-r--r--test/macos_e2e.swift2
-rw-r--r--test/mode.zig63
-rw-r--r--test/monkey.zig244
-rw-r--r--test/monkey9p.py2010
-rw-r--r--test/ninep.py19
-rw-r--r--test/output.zig490
-rw-r--r--test/panes.zig2185
-rw-r--r--test/pdf.zig656
-rw-r--r--test/pdf_bench.zig49
-rw-r--r--test/pdf_pointer_bench.zig216
-rw-r--r--test/pdf_scroll_bench.zig153
-rw-r--r--test/pdf_sections_bench.zig75
-rw-r--r--test/perf-baseline-gui-debug.json1
-rw-r--r--test/perf-baseline-tty-debug.json1
-rw-r--r--test/perf-baseline-tty-fast.json1
-rw-r--r--test/perf.zig387
-rw-r--r--test/record_casts.py947
-rw-r--r--test/record_demos.py1242
-rw-r--r--test/selfmount.py425
-rw-r--r--test/snapshot.zig101
-rw-r--r--test/snapshots/argv.golden41
-rw-r--r--test/snapshots/badutf.golden15
-rw-r--r--test/snapshots/badutf.snap2
-rw-r--r--test/snapshots/boot.golden68
-rw-r--r--test/snapshots/builtins.golden109
-rw-r--r--test/snapshots/builtins.snap73
-rw-r--r--test/snapshots/callstack-inline.golden65
-rw-r--r--test/snapshots/callstack-inline.snap30
-rw-r--r--test/snapshots/callstack.golden27
-rw-r--r--test/snapshots/callstack.snap19
-rw-r--r--test/snapshots/chordcut.golden145
-rw-r--r--test/snapshots/chordcut.snap124
-rw-r--r--test/snapshots/cmdexit.golden15
-rw-r--r--test/snapshots/cmdexit.snap28
-rw-r--r--test/snapshots/cmdword.golden44
-rw-r--r--test/snapshots/cmdword.snap49
-rw-r--r--test/snapshots/colgrip.golden169
-rw-r--r--test/snapshots/colgrip.snap35
-rw-r--r--test/snapshots/collapse.golden72
-rw-r--r--test/snapshots/collapse.snap7
-rw-r--r--test/snapshots/cornerdrag-left.golden119
-rw-r--r--test/snapshots/cornerdrag-left.snap10
-rw-r--r--test/snapshots/cornerdrag.golden198
-rw-r--r--test/snapshots/cornerdrag.snap3
-rw-r--r--test/snapshots/cursorline.golden76
-rw-r--r--test/snapshots/delask.golden55
-rw-r--r--test/snapshots/delask.snap75
-rw-r--r--test/snapshots/diffview.golden148
-rw-r--r--test/snapshots/diffview.snap37
-rw-r--r--test/snapshots/dirpane.golden13
-rw-r--r--test/snapshots/dirpane.snap27
-rw-r--r--test/snapshots/doccol.golden36
-rw-r--r--test/snapshots/doccol.snap26
-rw-r--r--test/snapshots/dump.golden57
-rw-r--r--test/snapshots/dump.snap4
-rw-r--r--test/snapshots/edit.golden73
-rw-r--r--test/snapshots/emptycol.golden17
-rw-r--r--test/snapshots/emptycol.snap22
-rw-r--r--test/snapshots/exec-bigdrag.golden100
-rw-r--r--test/snapshots/exec-bigdrag.snap4
-rw-r--r--test/snapshots/exec.golden35
-rw-r--r--test/snapshots/exec.snap2
-rw-r--r--test/snapshots/fileedit.golden10
-rw-r--r--test/snapshots/filewatch.golden68
-rw-r--r--test/snapshots/filewatch.snap31
-rw-r--r--test/snapshots/find.golden183
-rw-r--r--test/snapshots/find.snap127
-rw-r--r--test/snapshots/fsearch.golden149
-rw-r--r--test/snapshots/fsearch.snap64
-rw-r--r--test/snapshots/ghostty-mid.golden13
-rw-r--r--test/snapshots/ghostty-mid.snap8
-rw-r--r--test/snapshots/grep.golden55
-rw-r--r--test/snapshots/grep.snap86
-rw-r--r--test/snapshots/headersweep-restored.golden54
-rw-r--r--test/snapshots/headersweep-restored.snap42
-rw-r--r--test/snapshots/headersweep.golden63
-rw-r--r--test/snapshots/headersweep.snap67
-rw-r--r--test/snapshots/hscroll.golden31
-rw-r--r--test/snapshots/hscroll.snap4
-rw-r--r--test/snapshots/images.golden146
-rw-r--r--test/snapshots/jumps.golden155
-rw-r--r--test/snapshots/jumps.snap21
-rw-r--r--test/snapshots/layout-close.golden81
-rw-r--r--test/snapshots/layout-close.snap22
-rw-r--r--test/snapshots/layout-open.golden48
-rw-r--r--test/snapshots/layout-open.snap16
-rw-r--r--test/snapshots/leader.golden204
-rw-r--r--test/snapshots/leader.snap17
-rw-r--r--test/snapshots/load.golden83
-rw-r--r--test/snapshots/logquiet.golden6
-rw-r--r--test/snapshots/look-center.golden16
-rw-r--r--test/snapshots/look-dir.golden17
-rw-r--r--test/snapshots/look-dir.snap3
-rw-r--r--test/snapshots/look-fd-deep.golden30
-rw-r--r--test/snapshots/look-fd-deep.snap34
-rw-r--r--test/snapshots/look-file-1col.golden10
-rw-r--r--test/snapshots/look-file.golden74
-rw-r--r--test/snapshots/lookloaded.golden42
-rw-r--r--test/snapshots/lookpanes.golden144
-rw-r--r--test/snapshots/lookpanes.snap27
-rw-r--r--test/snapshots/lookrange.golden218
-rw-r--r--test/snapshots/lookrange.snap24
-rw-r--r--test/snapshots/lsp-client-edit.golden29
-rw-r--r--test/snapshots/lsp-client.golden43
-rw-r--r--test/snapshots/lsp-client.snap11
-rw-r--r--test/snapshots/lsp-rename-files.golden27
-rw-r--r--test/snapshots/lsp-rename-files.snap29
-rw-r--r--test/snapshots/lsp-rename.golden19
-rw-r--r--test/snapshots/lsp.golden30
-rw-r--r--test/snapshots/lsp.snap12
-rw-r--r--test/snapshots/lspcomplete.golden68
-rw-r--r--test/snapshots/lspcomplete.snap37
-rw-r--r--test/snapshots/lspcompletemoved.golden8
-rw-r--r--test/snapshots/lspdebug.golden8
-rw-r--r--test/snapshots/lspdebug.snap32
-rw-r--r--test/snapshots/lsprelpath.golden246
-rw-r--r--test/snapshots/lsprelpath.snap81
-rw-r--r--test/snapshots/markup.golden112
-rw-r--r--test/snapshots/mini.golden292
-rw-r--r--test/snapshots/modal.golden105
-rw-r--r--test/snapshots/msg.golden52
-rw-r--r--test/snapshots/msg.snap14
-rw-r--r--test/snapshots/multicursor.golden86
-rw-r--r--test/snapshots/nested-optout.golden60
-rw-r--r--test/snapshots/nested.golden72
-rw-r--r--test/snapshots/ninep.golden237
-rw-r--r--test/snapshots/pagercolor.golden131
-rw-r--r--test/snapshots/pagercolor.snap24
-rw-r--r--test/snapshots/pipe.golden22
-rw-r--r--test/snapshots/psearch.golden109
-rw-r--r--test/snapshots/psearch.snap14
-rw-r--r--test/snapshots/reflow.golden14
-rw-r--r--test/snapshots/respawn.golden12
-rw-r--r--test/snapshots/respawn.snap6
-rw-r--r--test/snapshots/restore.golden18
-rw-r--r--test/snapshots/rsearch.golden59
-rw-r--r--test/snapshots/rsearch.snap59
-rw-r--r--test/snapshots/savepane.golden34
-rw-r--r--test/snapshots/scroll.golden97
-rw-r--r--test/snapshots/scroll.snap8
-rw-r--r--test/snapshots/scrolloff.golden98
-rw-r--r--test/snapshots/scrolloff.snap9
-rw-r--r--test/snapshots/selarg.golden25
-rw-r--r--test/snapshots/selarg.snap30
-rw-r--r--test/snapshots/selregex.golden110
-rw-r--r--test/snapshots/shellset.golden18
-rw-r--r--test/snapshots/shellset.snap12
-rw-r--r--test/snapshots/shrinktag.golden54
-rw-r--r--test/snapshots/shrinktag.snap39
-rw-r--r--test/snapshots/splitparent.golden62
-rw-r--r--test/snapshots/splitparent.snap25
-rw-r--r--test/snapshots/stepgrain.golden149
-rw-r--r--test/snapshots/stepgrain.snap59
-rw-r--r--test/snapshots/syntax.golden136
-rw-r--r--test/snapshots/tag.golden22
-rw-r--r--test/snapshots/tag.snap20
-rw-r--r--test/snapshots/tagalign.golden117
-rw-r--r--test/snapshots/tagalign.snap16
-rw-r--r--test/snapshots/tagalign2col.golden51
-rw-r--r--test/snapshots/tagalign2col.snap2
-rw-r--r--test/snapshots/tagbottom.golden57
-rw-r--r--test/snapshots/tagbottom.snap37
-rw-r--r--test/snapshots/tagbottomimage.golden128
-rw-r--r--test/snapshots/tagbottomshort.golden72
-rw-r--r--test/snapshots/tagbottomshort.snap9
-rw-r--r--test/snapshots/tagcmd.golden16
-rw-r--r--test/snapshots/tagcmd.snap20
-rw-r--r--test/snapshots/tagnav.golden104
-rw-r--r--test/snapshots/tagnav.snap157
-rw-r--r--test/snapshots/tagpath.golden80
-rw-r--r--test/snapshots/tagpath.snap16
-rw-r--r--test/snapshots/theme.golden1268
-rw-r--r--test/snapshots/theme.snap30
-rw-r--r--test/snapshots/themesel.golden1320
-rw-r--r--test/snapshots/themesel.snap81
-rw-r--r--test/snapshots/tinywin.golden40
-rw-r--r--test/snapshots/tinywin.snap31
-rw-r--r--test/snapshots/topbarexec.golden61
-rw-r--r--test/snapshots/topbarexec.snap10
-rw-r--r--test/snapshots/tty.golden53
-rw-r--r--test/snapshots/tty.snap25
-rw-r--r--test/snapshots/ttyclick.golden27
-rw-r--r--test/snapshots/ttyclick.snap14
-rw-r--r--test/snapshots/ttyedit.golden47
-rw-r--r--test/snapshots/ttyedit.snap4
-rw-r--r--test/snapshots/ttyfollow.golden56
-rw-r--r--test/snapshots/ttyhelp.golden74
-rw-r--r--test/snapshots/ttyhelp.snap5
-rw-r--r--test/snapshots/ttylook.golden111
-rw-r--r--test/snapshots/ttylook.snap15
-rw-r--r--test/snapshots/ttyonly.golden85
-rw-r--r--test/snapshots/ttypaste.golden15
-rw-r--r--test/snapshots/ttyprompt.golden29
-rw-r--r--test/snapshots/ttytaken.golden101
-rw-r--r--test/snapshots/ttytaken.snap59
-rw-r--r--test/snapshots/tutor.golden28
-rw-r--r--test/snapshots/wheeldrift.golden8
-rw-r--r--test/snapshots/winch.golden26
-rw-r--r--test/snapshots/windownav.golden46
-rw-r--r--test/snapshots/windownav.snap27
-rw-r--r--test/snapshots/windowops.golden263
-rw-r--r--test/snapshots/windowops.snap23
-rw-r--r--test/snapshots/wrap.golden54
-rw-r--r--test/snapshots/yankpaste.golden6
-rw-r--r--test/tag_cleanup.py2
-rw-r--r--test/ui_review.py12
-rw-r--r--test/unit_profile.zig4
-rw-r--r--test/unit_profile_test.zig7
-rw-r--r--test/v9fs.py32
-rw-r--r--test/web_harness.mjs49
-rw-r--r--test/window_opacity.py14
-rw-r--r--test/yazi_preview.py145
255 files changed, 21454 insertions, 8946 deletions
diff --git a/test/appearance_gallery.py b/test/appearance_gallery.py
index 0fa12136..98420a15 100644
--- a/test/appearance_gallery.py
+++ b/test/appearance_gallery.py
@@ -51,7 +51,7 @@ Orchard: crisp woodland color
Dusk: intentionally soft and warm
Theme dusk
-ThemeSel: Pardes themes come first.
+Themes: Pardes themes come first.
'''
@@ -78,11 +78,11 @@ def run(args):
launch=launch, inherited=inherited, terminal=handles) as (client, _):
source = next(serial for serial, tag in panes(client).items() if str(source_path) in tag)
before = set(panes(client))
- command(client, source, 'Newcol')
- right = require(wait_for(lambda: next((s for s in panes(client) if s not in before), None)), 'right column missing')
+ command(client, source, 'Newcol') # empty, its tag with the keyboard
+ right = int(client.read('/pane/new'))
client.write(f'/pane/{right}/name', f'{root / "Review"}\n'.encode())
client.write(f'/pane/{right}/body', PREFERENCE_NOTES if args.theme_selector else NOTES, truncate=True)
- client.write(f'/pane/{right}/ctl', b'clean\n')
+ client.write(f'/pane/{right}/dirty', b'0\n')
before = set(panes(client))
command(client, right, 'Tty')
terminal = require(wait_for(lambda: next((s for s in panes(client) if s not in before), None)), 'terminal missing')
@@ -91,15 +91,15 @@ def run(args):
def config_report():
before = set(panes(client))
- command(client, right, 'Config')
- pane = require(wait_for(lambda: next((s for s in panes(client) if s not in before), None)), 'Config output missing')
+ command(client, right, 'DumpConfig')
+ pane = require(wait_for(lambda: next((s for s in panes(client) if s not in before), None)), 'DumpConfig output missing')
text = client.read(f'/pane/{pane}/body').decode()
- client.write(f'/pane/{pane}/ctl', b'exec Del\n')
+ client.write(f'/pane/{pane}/exec', b'Del\n')
return text
settings = config_report()
- require('Font effective size: 18.00 pixels' in settings, 'configured font size not applied: ' + settings)
- require('TaglineSize: 80' in settings, 'configured tag size missing')
+ require(' 18.00 pixels\n' in settings, 'configured font size not applied: ' + settings)
+ require('TaglineSize 80' in settings, 'configured tag size missing')
(root / 'effective-config.txt').write_text(settings)
report['font_effective_pixels'] = 18
report['tagline_percent'] = 80
@@ -135,7 +135,7 @@ def run(args):
command(client, right, 'Theme ' + theme)
if args.theme_selector:
# Keep both quiet active gutter ink and vivid comments in view.
- client.write(f'/pane/{source}/ctl', f'look {source_path}:117\n'.encode())
+ client.write(f'/pane/{source}/look', f'{source_path}:117\n'.encode())
take_frame('classic-' + theme)
if args.theme_selector:
frame = client.screen()
@@ -159,26 +159,26 @@ def run(args):
if args.theme_selector:
command(client, terminal, 'Collapse')
before = set(panes(client))
- command(client, right, 'ThemeSel')
+ command(client, right, 'Themes')
selector = require(wait_for(lambda: next((s for s in panes(client) if s not in before), None)),
- 'ThemeSel missing')
+ 'Themes missing')
body = client.read(f'/pane/{selector}/body').decode()
native, legacy = body.split('# Legacy and imported themes', 1)
for theme in ('forge_black', 'forge_soft', 'orchard_black'):
require('Theme ' + theme + '\n' in native, 'native contrast variant below legacy heading')
require('Theme helix\n' in legacy, 'legacy theme section missing')
require('Theme orchard' in ''.join(c[0] for c in client.screen()['cells']),
- 'ThemeSel did not open at native first entry')
+ 'Themes did not open at native first entry')
take_frame('theme-selector')
report['native_themes_first'] = True
- client.write(f'/pane/{selector}/ctl', b'exec Del\n')
+ client.write(f'/pane/{selector}/exec', b'Del\n')
command(client, terminal, 'Collapse')
for pet in (() if args.skip_pets else ('cat', 'frog', 'off')):
command(client, right, 'Pet ' + pet)
settings = config_report()
require('Pet: ' + pet + '\n' in settings, 'pet setting not applied')
# Returning focus to the source closes all transient report state.
- client.write(f'/pane/{source}/ctl', f'look {source_path}:1\n'.encode())
+ client.write(f'/pane/{source}/look', f'{source_path}:1\n'.encode())
take_frame('pet-' + pet)
if pet != 'off':
frame = client.screen()
diff --git a/test/bench_util.zig b/test/bench_util.zig
new file mode 100644
index 00000000..9b91e621
--- /dev/null
+++ b/test/bench_util.zig
@@ -0,0 +1,43 @@
+//! What the PDF benches share: a clock, a fatal exit named for the bench, a
+//! seeded hash, a count parser and the core's effect drain.
+const std = @import("std");
+
+pub fn nowNs() u64 {
+ var ts: std.c.timespec = undefined;
+ _ = std.c.clock_gettime(.MONOTONIC, &ts);
+ return @as(u64, @intCast(ts.sec)) *| 1_000_000_000 +| @as(u64, @intCast(ts.nsec));
+}
+
+/// `fatal` for the bench called `who`: says so, prefixed, and exits 1.
+pub fn Fatal(comptime who: []const u8) type {
+ return struct {
+ pub fn f(comptime format: []const u8, args: anytype) noreturn {
+ std.debug.print(who ++ ": " ++ format ++ "\n", args);
+ std.process.exit(1);
+ }
+ };
+}
+
+/// A seeded hash of `value`'s bytes; a comptime integer hashes as a u64.
+pub fn mix(seed: u64, value: anytype) u64 {
+ const Value = @TypeOf(value);
+ const Stable = switch (@typeInfo(Value)) {
+ .comptime_int => u64,
+ else => Value,
+ };
+ var stable: Stable = value;
+ return std.hash.Wyhash.hash(seed, std.mem.asBytes(&stable));
+}
+
+/// A flag's value as a count in 1..`maximum`, or `fatal` saying why not.
+pub fn parsePositive(comptime fatal: anytype, name: []const u8, text: []const u8, maximum: usize) usize {
+ const value = std.fmt.parseUnsigned(usize, text, 10) catch
+ fatal("{s} expects a positive integer", .{name});
+ if (value == 0 or value > maximum)
+ fatal("{s} must be in 1..{d}", .{ name, maximum });
+ return value;
+}
+
+pub fn drainEffects(core: anytype) void {
+ while (core.nextEffect()) |_| {}
+}
diff --git a/test/column_drag.zig b/test/column_drag.zig
index be4e33a3..a089ab4a 100644
--- a/test/column_drag.zig
+++ b/test/column_drag.zig
@@ -8,17 +8,17 @@ fn mouse(p: *Pardes, kind: pardes.Mouse.Kind, col: u16) void {
p.update(.{ .mouse = .{ .button = .left, .kind = kind, .col = col, .row = pardes.TOPBAR_H } });
}
-fn tagLayer(p: *Pardes, column: usize) !*pardes.TagLayer {
+fn tagLayer(p: *Pardes, column: usize) !*pardes.Layer {
for (&p.surface.tag_layers) |*layer| {
- if (layer.cols > 0 and layer.kind == .column and layer.id == column) return layer;
+ if (layer.rows > 0 and layer.kind == .column and layer.id == column) return layer;
}
return error.MissingColumnTagLayer;
}
-fn headerMouse(layer: *const pardes.TagLayer, display_col: u16, kind: pardes.Mouse.Kind) pardes.Mouse {
+fn headerMouse(layer: *const pardes.Layer, display_col: u16, kind: pardes.Mouse.Kind) pardes.Mouse {
const x = @as(f32, @floatFromInt(layer.viewport.x)) * 10 + (@as(f32, @floatFromInt(display_col)) + 0.5) * 5;
const y = (@as(f32, @floatFromInt(layer.viewport.y)) + 0.5) * 20;
- return .{ .button = .left, .kind = kind, .col = @intFromFloat(x / 10), .row = @intFromFloat(y / 20), .tag_hit = layer.hitAt(x, y, 10, 20, 5, 10) };
+ return .{ .button = .left, .kind = kind, .col = @intFromFloat(x / 10), .row = @intFromFloat(y / 20), .tag_hit = layer.tagHit(x, y, 10, 20, 5, 10) };
}
const Snapshot = struct {
@@ -26,7 +26,7 @@ const Snapshot = struct {
serial: u32,
panes: [pardes.MAX_PANES]usize = undefined,
count: usize,
- tag: pardes.TagLine,
+ tag: []const u8,
};
fn expectOrder(p: *Pardes, before: []const Snapshot, order: []const usize) !void {
@@ -37,7 +37,7 @@ fn expectOrder(p: *Pardes, before: []const Snapshot, order: []const usize) !void
try std.testing.expectEqual(saved.serial, p.col_serial[column]);
try std.testing.expectEqual(saved.count, p.col_n[column]);
try std.testing.expectEqualSlices(usize, saved.panes[0..saved.count], p.col_panes[column][0..p.col_n[column]]);
- try std.testing.expectEqualStrings(saved.tag.slice(""), p.col_tags[column].slice(""));
+ try std.testing.expectEqualStrings(saved.tag, pardes.tagline.columnTag(p, column));
}
}
@@ -46,7 +46,6 @@ test "column grip drag moves only its interval and keeps tag caret with the colu
defer p.deinit();
_ = try p.setTestFile("body\n");
p.presentation.enabled = false;
- p.settings.column_tags = true;
p.row_metrics = .{ .body_w = 10, .body_h = 20, .tagline_w = 5, .tagline_h = 10 };
for (0..3) |_| {
try std.testing.expect(p.executeBuiltinLine(p.active, "New"));
@@ -59,7 +58,7 @@ test "column grip drag moves only its interval and keeps tag caret with the colu
try std.testing.expectEqual(@as(usize, 2), p.col_n[1]);
for ([_]u64{ 2, 3, 5, 7 }, 0..) |weight, column| {
p.col_weight[column] = weight;
- try std.testing.expect(p.col_tags[column].set(([_][]const u8{ "zero column header", "one column header", "two column header", "three column header" })[column]));
+ p.col_tags[column].own = try p.gpa.dupe(u8, ([_][]const u8{ "zero column header", "one column header", "two column header", "three column header" })[column]);
}
p.update(.tick);
var frame = std.heap.ArenaAllocator.init(p.gpa);
@@ -67,7 +66,7 @@ test "column grip drag moves only its interval and keeps tag caret with the colu
_ = try p.render(frame.allocator());
var before: [4]Snapshot = undefined;
for (&before, 0..) |*saved, column| {
- saved.* = .{ .weight = p.col_weight[column], .serial = p.col_serial[column], .count = p.col_n[column], .tag = p.col_tags[column] };
+ saved.* = .{ .weight = p.col_weight[column], .serial = p.col_serial[column], .count = p.col_n[column], .tag = pardes.tagline.columnTag(p, column) };
@memcpy(saved.panes[0..saved.count], p.col_panes[column][0..saved.count]);
}
const layer = try tagLayer(p, 1);
@@ -75,8 +74,8 @@ test "column grip drag moves only its interval and keeps tag caret with the colu
p.update(.{ .mouse = headerMouse(layer, 10, .press) });
p.update(.{ .mouse = headerMouse(layer, 10, .release) });
try std.testing.expectEqual(@as(?usize, 1), p.header_column);
- const caret = p.topbar_col;
- const anchor = p.header_anchor;
+ const caret = pardes.tagline.focusedHeader(p).?.cur_col;
+ const anchor = pardes.tagline.focusedHeader(p).?.vsel;
const scroll = p.header_scroll;
const target = p.col_x[3] + p.col_w[3] - 2;
const last_rect = p.rects[p.col_panes[3][0]];
@@ -93,14 +92,14 @@ test "column grip drag moves only its interval and keeps tag caret with the colu
try expectOrder(p, &before, &.{ 0, 2, 3, 1 });
try std.testing.expectEqual(active, p.active);
try std.testing.expectEqual(@as(?usize, 3), p.header_column);
- try std.testing.expectEqual(caret, p.topbar_col);
- try std.testing.expectEqual(anchor, p.header_anchor);
+ try std.testing.expectEqual(caret, pardes.tagline.focusedHeader(p).?.cur_col);
+ try std.testing.expectEqual(anchor, pardes.tagline.focusedHeader(p).?.vsel);
try std.testing.expectEqual(scroll, p.header_scroll);
// The old tag envelope must not edit the new occupant of its old index,
// including the interval before hosts request another rendered frame.
p.update(.{ .mouse = stale });
try std.testing.expectEqual(@as(?usize, 3), p.header_column);
- try std.testing.expectEqual(caret, p.topbar_col);
+ try std.testing.expectEqual(caret, pardes.tagline.focusedHeader(p).?.cur_col);
_ = try p.render(frame.allocator());
try std.testing.expectEqual(before[1].serial, (try tagLayer(p, 3)).serial);
try std.testing.expectEqual(p.col_w[3] - pardes.TAG_TEXT_INSET, (try tagLayer(p, 3)).viewport.w);
@@ -110,7 +109,7 @@ test "column grip drag moves only its interval and keeps tag caret with the colu
mouse(p, .release, back);
try expectOrder(p, &before, &.{ 0, 1, 2, 3 });
try std.testing.expectEqual(@as(?usize, 1), p.header_column);
- try std.testing.expectEqual(caret, p.topbar_col);
+ try std.testing.expectEqual(caret, pardes.tagline.focusedHeader(p).?.cur_col);
try std.testing.expectEqual(active, p.active);
// A structural change between press and release must not retarget the
// in-flight drag to whichever column now occupies the original index.
@@ -127,7 +126,6 @@ test "column grip is separate from compact text and the resize seam" {
defer p.deinit();
_ = try p.setTestFile("body\n");
p.presentation.enabled = false;
- p.settings.column_tags = true;
p.row_metrics = .{ .body_w = 10, .body_h = 20, .tagline_w = 5, .tagline_h = 10 };
try std.testing.expect(p.executeBuiltinLine(0, "New"));
try std.testing.expect(layout.splitColumn(p, p.active, p.active, false));
@@ -144,7 +142,7 @@ test "column grip is separate from compact text and the resize seam" {
try std.testing.expectEqual(p.col_x[column], rect.x);
try std.testing.expectEqual(rect.x + pardes.TAG_TEXT_INSET, (try tagLayer(p, column)).viewport.x);
for (p.surface.tagLayers()) |pane_layer| {
- if (pane_layer.cols > 0 and pane_layer.kind == .pane and pane_layer.id == pane_id)
+ if (pane_layer.rows > 0 and pane_layer.kind == .pane and pane_layer.id == pane_id)
try std.testing.expectEqual((try tagLayer(p, column)).viewport.x, pane_layer.viewport.x);
}
const pane_tag_y = if (p.settings.tag_bottom) rect.y + rect.h - pardes.BOX_H else rect.y;
@@ -155,17 +153,19 @@ test "column grip is separate from compact text and the resize seam" {
try std.testing.expectEqual(pardes.FontRole.tagline, surface.at(rect.x + pardes.TAG_TEXT_INSET, pardes.TOPBAR_H).style.font_role);
try std.testing.expectEqual(pardes.FontRole.tagline, surface.at(rect.x + pardes.TAG_TEXT_INSET, pane_tag_y).style.font_role);
}
- const gap_x = p.col_x[1] + config.GUTTER;
- try std.testing.expectEqualStrings(" ", p.surface.at(gap_x, pardes.TOPBAR_H).grapheme());
- mouse(p, .press, gap_x);
- try std.testing.expect(p.drag != .column_move);
- try std.testing.expect(!p.header_drag);
- mouse(p, .release, gap_x);
+ if (pardes.TAG_GAP > 0) {
+ const gap_x = p.col_x[1] + config.GUTTER;
+ try std.testing.expectEqualStrings(" ", p.surface.at(gap_x, pardes.TOPBAR_H).grapheme());
+ mouse(p, .press, gap_x);
+ try std.testing.expect(p.drag != .column_move);
+ try std.testing.expect(!p.header_drag);
+ mouse(p, .release, gap_x);
+ }
p.update(.{ .mouse = headerMouse(layer, 0, .press) });
try std.testing.expect(p.drag != .column_move);
try std.testing.expect(p.header_drag);
p.update(.{ .mouse = headerMouse(layer, 0, .release) });
- try std.testing.expectEqual(@as(?u16, 0), p.topbar_col);
+ try std.testing.expectEqual(@as(i32, 0), pardes.tagline.focusedHeader(p).?.cur_col);
mouse(p, .press, p.col_x[1] + config.GUTTER - 1);
try std.testing.expect(p.drag == .column_move);
mouse(p, .release, p.col_x[1] + config.GUTTER - 1);
@@ -176,12 +176,11 @@ test "column grip is separate from compact text and the resize seam" {
p.update(.{ .mouse = .{ .button = .left, .kind = .release, .col = seam, .row = body_row } });
}
-test "column grips stay blank and muted across focus hover and drag" {
+test "column grips stay blank, and muted across focus and hover until grabbed" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 80, .rows = 20 });
defer p.deinit();
_ = try p.setTestFile("left\n");
p.presentation.enabled = false;
- p.settings.column_tags = true;
p.row_metrics = .{ .body_w = 10, .body_h = 20, .tagline_w = 5, .tagline_h = 10 };
try std.testing.expect(p.executeBuiltinLine(0, "New"));
try std.testing.expect(layout.splitColumn(p, p.active, p.active, false));
@@ -198,11 +197,12 @@ test "column grips stay blank and muted across focus hover and drag" {
_ = frame.reset(.retain_capacity);
const surface = try p.render(frame.allocator());
const muted: pardes.Color = .{ .rgb = p.chromeTheme().column_box_dim };
+ const lit: pardes.Color = .{ .rgb = p.chromeTheme().column_box };
for (0..p.ncol) |column| {
for (0..config.GUTTER) |offset| {
const cell = surface.at(p.col_x[column] + @as(u16, @intCast(offset)), pardes.TOPBAR_H);
try std.testing.expectEqualStrings(" ", cell.grapheme());
- try std.testing.expectEqual(muted, cell.style.bg);
+ try std.testing.expectEqual(if (dragging and column == active_column) lit else muted, cell.style.bg);
try std.testing.expectEqual(pardes.FontRole.tagline, cell.style.font_role);
}
try std.testing.expectEqual(p.col_x[column] + pardes.TAG_TEXT_INSET, (try tagLayer(p, column)).viewport.x);
@@ -212,3 +212,125 @@ test "column grips stay blank and muted across focus hover and drag" {
}
}
}
+
+test "column grip dropped in its own place moves the column's left edge" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 120, .rows = 24 });
+ defer p.deinit();
+ _ = try p.setTestFile("body\n");
+ p.presentation.enabled = false;
+ try std.testing.expect(p.executeBuiltinLine(0, "New"));
+ try std.testing.expect(layout.splitColumn(p, p.active, p.active, false));
+ p.update(.tick);
+ var frame = std.heap.ArenaAllocator.init(p.gpa);
+ defer frame.deinit();
+ _ = try p.render(frame.allocator());
+ const serials = .{ p.col_serial[0], p.col_serial[1] };
+ const edge = p.col_x[1];
+ const total = p.col_w[0] + p.col_w[1];
+ // A click in place, from either grip cell, changes nothing.
+ for (0..config.GUTTER) |offset| {
+ const x = edge + @as(u16, @intCast(offset));
+ mouse(p, .press, x);
+ mouse(p, .release, x);
+ _ = try p.render(frame.allocator());
+ try std.testing.expectEqual(edge, p.col_x[1]);
+ }
+ // Grabbed by its second cell and dropped 7 cells left: the edge follows.
+ mouse(p, .press, edge + 1);
+ mouse(p, .drag, edge + 1 - 7);
+ _ = try p.render(frame.allocator());
+ mouse(p, .release, edge + 1 - 7);
+ _ = try p.render(frame.allocator());
+ try std.testing.expectEqual(edge - 7, p.col_x[1]);
+ try std.testing.expectEqual(total, p.col_w[0] + p.col_w[1]);
+ try std.testing.expectEqual(serials[0], p.col_serial[0]);
+ try std.testing.expectEqual(serials[1], p.col_serial[1]);
+ // Past the neighbour's middle it is still a reorder, not a resize.
+ mouse(p, .press, p.col_x[1]);
+ mouse(p, .release, p.col_x[0] + 1);
+ try std.testing.expectEqual(serials[1], p.col_serial[0]);
+ try std.testing.expectEqual(serials[0], p.col_serial[1]);
+}
+
+/// The column of the drag preview's rail, checked to run the full height
+/// below the workspace tag in the grabbed grip's color, except through the
+/// grip and pane boxes at the window's left edge.
+fn previewRail(p: *Pardes, frame: *std.heap.ArenaAllocator) !?u16 {
+ _ = frame.reset(.retain_capacity);
+ const surface = try p.render(frame.allocator());
+ const lit: pardes.Color = .{ .rgb = p.chromeTheme().column_box };
+ var found: ?u16 = null;
+ for (0..surface.cols) |x| {
+ if (!std.mem.eql(u8, surface.at(@intCast(x), surface.rows - 1).grapheme(), "╎")) continue;
+ try std.testing.expect(found == null);
+ found = @intCast(x);
+ for (p.topBarHeight()..surface.rows) |row| {
+ const cell = surface.at(@intCast(x), @intCast(row));
+ if (x < config.GUTTER and cell.style.font_role == .tagline) {
+ try std.testing.expect(!std.mem.eql(u8, cell.grapheme(), "╎"));
+ continue;
+ }
+ try std.testing.expectEqualStrings("╎", cell.grapheme());
+ try std.testing.expectEqual(lit, cell.style.fg);
+ }
+ }
+ return found;
+}
+
+test "column grip drag previews where the column lands, in the seam beside its rule" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 120, .rows = 24 });
+ defer p.deinit();
+ _ = try p.setTestFile("body\n");
+ p.presentation.enabled = false;
+ for (0..2) |_| {
+ try std.testing.expect(p.executeBuiltinLine(p.active, "New"));
+ try std.testing.expect(layout.splitColumn(p, p.active, p.active, false));
+ }
+ try std.testing.expectEqual(@as(usize, 3), p.ncol);
+ p.update(.tick);
+ var frame = std.heap.ArenaAllocator.init(p.gpa);
+ defer frame.deinit();
+ _ = try p.render(frame.allocator());
+ const serials = .{ p.col_serial[0], p.col_serial[1], p.col_serial[2] };
+
+ // Held on its own grip it lands nowhere new: no rail.
+ mouse(p, .press, p.col_x[1]);
+ mouse(p, .drag, p.col_x[1] + 1);
+ try std.testing.expectEqual(@as(?u16, null), try previewRail(p, &frame));
+ // Over the first column's left half it goes first. The window edge has
+ // no seam, and the gutter there is the GUI's scroll rail, so the rail
+ // runs in the gutter's last cell.
+ mouse(p, .drag, 3);
+ try std.testing.expectEqual(@as(?u16, config.GUTTER - 1), try previewRail(p, &frame));
+ // The pointer is over the first column's "New", but a carried column
+ // aims at a place: no word lights under it.
+ for (0..p.screen_w) |x| try std.testing.expect(!std.meta.eql(p.surface.at(@intCast(x), pardes.TOPBAR_H).style.bg, pardes.Color{ .rgb = p.theme().sel_bg }));
+ mouse(p, .release, 3);
+ try std.testing.expectEqual(serials[1], p.col_serial[0]);
+ try std.testing.expectEqual(serials[0], p.col_serial[1]);
+
+ // Past the middle column's middle it lands after it: the rail is in the
+ // seam cell left of the last column's rule, where a border drag's is.
+ mouse(p, .press, p.col_x[0]);
+ const past = p.col_x[1] + p.col_w[1] - 2;
+ mouse(p, .drag, past);
+ try std.testing.expectEqual(@as(?u16, p.col_x[2] - 1), try previewRail(p, &frame));
+ // Past the last column's middle: the window's last cell.
+ mouse(p, .drag, p.col_x[2] + p.col_w[2] - 1);
+ try std.testing.expectEqual(@as(?u16, p.screen_w - 1), try previewRail(p, &frame));
+ mouse(p, .release, p.col_x[2] + p.col_w[2] - 1);
+ try std.testing.expectEqual(serials[0], p.col_serial[0]);
+ try std.testing.expectEqual(serials[2], p.col_serial[1]);
+ try std.testing.expectEqual(serials[1], p.col_serial[2]);
+
+ // Short of a neighbour's middle the left edge moves, and the preview
+ // is the seam that edge will have: exactly where the release puts it.
+ const edge = p.col_x[2];
+ mouse(p, .press, edge + 1);
+ mouse(p, .drag, edge + 1 - 6);
+ try std.testing.expectEqual(@as(?u16, edge - 6 - 1), try previewRail(p, &frame));
+ mouse(p, .release, edge + 1 - 6);
+ _ = try p.render(frame.allocator());
+ try std.testing.expectEqual(edge - 6, p.col_x[2]);
+ try std.testing.expectEqual(@as(?u16, null), try previewRail(p, &frame));
+}
diff --git a/test/column_tags.py b/test/column_tags.py
index 80b623bd..ba638b7d 100644
--- a/test/column_tags.py
+++ b/test/column_tags.py
@@ -138,12 +138,15 @@ def run(args):
before = panes(client)
keys.click(*require(locate(client, 'Newcol', row=0), 'Newcol missing'), button=1)
- right = require(wait_for(lambda: new_serial(client, before)), 'Newcol did not create its pane')
+ # Newcol makes an empty column and gives its tag the keyboard; the
+ # pane made next fills it.
+ require(wait_for(lambda: client.read('/focus').strip() == b''), 'Newcol did not focus its empty column')
+ right = int(client.read('/pane/new'))
right_name = root / 'right.rs'
client.write(f'/pane/{right}/name', f'{right_name}\n'.encode())
right_body = b'// Column-local scratch\nfn main() {\n let ready = true;\n}\n'
client.write(f'/pane/{right}/body', right_body)
- client.write(f'/pane/{right}/ctl', b'clean\n')
+ client.write(f'/pane/{right}/dirty', b'0\n')
require(wait_for(lambda: locate(client, 'New Tty', row=1, minimum_col=75)), 'right column tag missing')
require(locate(client, 'New Tty', row=1, minimum_col=75) == (75, 1),
'right column tag retains an inset')
@@ -173,7 +176,7 @@ def run(args):
extra = require(wait_for(lambda: new_serial(client, before)), 'right-column New did not create a pane')
client.write(f'/pane/{extra}/body', b'RIGHT-COLUMN-NEW\n')
require(wait_for(lambda: locate(client, 'RIGHT-COLUMN-NEW', minimum_col=75)), 'right-column command targeted another column')
- client.write(f'/pane/{extra}/ctl', b'exec Del\n')
+ client.write(f'/pane/{extra}/exec', b'Del\n')
checks.append('middle-click New targets the inactive right column')
# An owned short-path file makes its complete tag visible. Pane-tag
diff --git a/test/deck/buttons.zon b/test/deck/buttons.zon
index 8b3ae7f8..50d9c70c 100644
--- a/test/deck/buttons.zon
+++ b/test/deck/buttons.zon
@@ -1,81 +1,81 @@
.{ .version = 1, .events = .{
-.{.t=3700753450,.pad=2,.ev=.{.button=.{.idx=10,.down=true}}},
-.{.t=3900818994,.pad=2,.ev=.{.button=.{.idx=10,.down=false}}},
-.{.t=3956546622,.pad=2,.ev=.{.button=.{.idx=9,.down=true}}},
-.{.t=4123264775,.pad=2,.ev=.{.button=.{.idx=9,.down=false}}},
-.{.t=4930702402,.pad=2,.ev=.{.button=.{.idx=8,.down=true}}},
-.{.t=5145495294,.pad=2,.ev=.{.button=.{.idx=8,.down=false}}},
-.{.t=5256748340,.pad=2,.ev=.{.button=.{.idx=7,.down=true}}},
-.{.t=5467530268,.pad=2,.ev=.{.button=.{.idx=7,.down=false}}},
-.{.t=6756403713,.pad=2,.ev=.{.button=.{.idx=2,.down=true}}},
-.{.t=6911854483,.pad=2,.ev=.{.button=.{.idx=2,.down=false}}},
-.{.t=7211860980,.pad=2,.ev=.{.button=.{.idx=3,.down=true}}},
-.{.t=7389532087,.pad=2,.ev=.{.button=.{.idx=3,.down=false}}},
-.{.t=8133944867,.pad=2,.ev=.{.button=.{.idx=3,.down=true}}},
-.{.t=8289426557,.pad=2,.ev=.{.button=.{.idx=3,.down=false}}},
-.{.t=9089438184,.pad=2,.ev=.{.button=.{.idx=5,.down=true}}},
-.{.t=9234016011,.pad=2,.ev=.{.button=.{.idx=2,.down=true}}},
-.{.t=9356447170,.pad=2,.ev=.{.button=.{.idx=2,.down=false}}},
-.{.t=9500690066,.pad=2,.ev=.{.button=.{.idx=5,.down=false}}},
-.{.t=10234132592,.pad=2,.ev=.{.button=.{.idx=5,.down=true}}},
-.{.t=10389693142,.pad=2,.ev=.{.button=.{.idx=2,.down=true}}},
-.{.t=10500635738,.pad=2,.ev=.{.button=.{.idx=2,.down=false}}},
-.{.t=10600562571,.pad=2,.ev=.{.button=.{.idx=5,.down=false}}},
-.{.t=11211884827,.pad=2,.ev=.{.button=.{.idx=3,.down=true}}},
-.{.t=11333789807,.pad=2,.ev=.{.button=.{.idx=3,.down=false}}},
-.{.t=11622673840,.pad=2,.ev=.{.button=.{.idx=3,.down=true}}},
-.{.t=11778210450,.pad=2,.ev=.{.button=.{.idx=3,.down=false}}},
-.{.t=12056066449,.pad=2,.ev=.{.button=.{.idx=0,.down=true}}},
-.{.t=12200470216,.pad=2,.ev=.{.button=.{.idx=0,.down=false}}},
-.{.t=13122626673,.pad=2,.ev=.{.button=.{.idx=1,.down=true}}},
-.{.t=13256318175,.pad=2,.ev=.{.button=.{.idx=1,.down=false}}},
-.{.t=30877608417,.pad=2,.ev=.{.button=.{.idx=13,.down=true}}},
-.{.t=30932947265,.pad=2,.ev=.{.button=.{.idx=13,.down=false}}},
-.{.t=31188916557,.pad=2,.ev=.{.button=.{.idx=14,.down=true}}},
-.{.t=31344392047,.pad=2,.ev=.{.button=.{.idx=14,.down=false}}},
-.{.t=31355303161,.pad=2,.ev=.{.button=.{.idx=11,.down=true}}},
-.{.t=31377574308,.pad=2,.ev=.{.button=.{.idx=11,.down=false}}},
-.{.t=31377580618,.pad=2,.ev=.{.button=.{.idx=11,.down=true}}},
-.{.t=31533158438,.pad=2,.ev=.{.button=.{.idx=11,.down=false}}},
-.{.t=31599806330,.pad=2,.ev=.{.button=.{.idx=12,.down=true}}},
-.{.t=31699701622,.pad=2,.ev=.{.button=.{.idx=14,.down=true}}},
-.{.t=31699711442,.pad=2,.ev=.{.button=.{.idx=12,.down=false}}},
-.{.t=31833163995,.pad=2,.ev=.{.button=.{.idx=14,.down=false}}},
-.{.t=31844214668,.pad=2,.ev=.{.button=.{.idx=11,.down=true}}},
-.{.t=31933218167,.pad=2,.ev=.{.button=.{.idx=11,.down=false}}},
-.{.t=31944106321,.pad=2,.ev=.{.button=.{.idx=13,.down=true}}},
-.{.t=31944118861,.pad=2,.ev=.{.button=.{.idx=13,.down=false}}},
-.{.t=32577585424,.pad=2,.ev=.{.button=.{.idx=7,.down=true}}},
-.{.t=32777404849,.pad=2,.ev=.{.button=.{.idx=7,.down=false}}},
-.{.t=32932893939,.pad=2,.ev=.{.button=.{.idx=8,.down=true}}},
-.{.t=33122371409,.pad=2,.ev=.{.button=.{.idx=8,.down=false}}},
-.{.t=34899667922,.pad=2,.ev=.{.button=.{.idx=10,.down=true}}},
-.{.t=35143908581,.pad=2,.ev=.{.button=.{.idx=10,.down=false}}},
-.{.t=35143918751,.pad=2,.ev=.{.button=.{.idx=9,.down=true}}},
-.{.t=35299532711,.pad=2,.ev=.{.button=.{.idx=9,.down=false}}},
-.{.t=36188307687,.pad=2,.ev=.{.button=.{.idx=10,.down=true}}},
-.{.t=36351697335,.pad=2,.ev=.{.button=.{.idx=9,.down=true}}},
-.{.t=36399712574,.pad=2,.ev=.{.button=.{.idx=10,.down=false}}},
-.{.t=36521680424,.pad=2,.ev=.{.button=.{.idx=10,.down=true}}},
-.{.t=36543814231,.pad=2,.ev=.{.button=.{.idx=9,.down=false}}},
-.{.t=36688528867,.pad=2,.ev=.{.button=.{.idx=10,.down=false}}},
-.{.t=38810548641,.pad=2,.ev=.{.button=.{.idx=8,.down=true}}},
-.{.t=38988265258,.pad=2,.ev=.{.button=.{.idx=8,.down=false}}},
-.{.t=39421485428,.pad=2,.ev=.{.button=.{.idx=7,.down=true}}},
-.{.t=39521563760,.pad=2,.ev=.{.button=.{.idx=8,.down=true}}},
-.{.t=39543869347,.pad=2,.ev=.{.button=.{.idx=7,.down=false}}},
-.{.t=39654975672,.pad=2,.ev=.{.button=.{.idx=8,.down=false}}},
-.{.t=40199575307,.pad=2,.ev=.{.button=.{.idx=0,.down=true}}},
-.{.t=40388115109,.pad=2,.ev=.{.button=.{.idx=0,.down=false}}},
-.{.t=40810375225,.pad=2,.ev=.{.button=.{.idx=2,.down=true}}},
-.{.t=40976868838,.pad=2,.ev=.{.button=.{.idx=2,.down=false}}},
-.{.t=41032455046,.pad=2,.ev=.{.button=.{.idx=3,.down=true}}},
-.{.t=41243668724,.pad=2,.ev=.{.button=.{.idx=3,.down=false}}},
-.{.t=42565700760,.pad=2,.ev=.{.button=.{.idx=2,.down=true}}},
-.{.t=42743538487,.pad=2,.ev=.{.button=.{.idx=2,.down=false}}},
-.{.t=43676697498,.pad=2,.ev=.{.button=.{.idx=5,.down=true}}},
-.{.t=43932510879,.pad=2,.ev=.{.button=.{.idx=5,.down=false}}},
-.{.t=43943745523,.pad=2,.ev=.{.button=.{.idx=1,.down=true}}},
-.{.t=44021582808,.pad=2,.ev=.{.button=.{.idx=1,.down=false}}},
-.{.t=44599100514,.pad=2,.ev=.{.button=.{.idx=1,.down=true}}},
+ .{ .t = 3700753450, .pad = 2, .ev = .{ .button = .{ .idx = 10, .down = true } } },
+ .{ .t = 3900818994, .pad = 2, .ev = .{ .button = .{ .idx = 10, .down = false } } },
+ .{ .t = 3956546622, .pad = 2, .ev = .{ .button = .{ .idx = 9, .down = true } } },
+ .{ .t = 4123264775, .pad = 2, .ev = .{ .button = .{ .idx = 9, .down = false } } },
+ .{ .t = 4930702402, .pad = 2, .ev = .{ .button = .{ .idx = 8, .down = true } } },
+ .{ .t = 5145495294, .pad = 2, .ev = .{ .button = .{ .idx = 8, .down = false } } },
+ .{ .t = 5256748340, .pad = 2, .ev = .{ .button = .{ .idx = 7, .down = true } } },
+ .{ .t = 5467530268, .pad = 2, .ev = .{ .button = .{ .idx = 7, .down = false } } },
+ .{ .t = 6756403713, .pad = 2, .ev = .{ .button = .{ .idx = 2, .down = true } } },
+ .{ .t = 6911854483, .pad = 2, .ev = .{ .button = .{ .idx = 2, .down = false } } },
+ .{ .t = 7211860980, .pad = 2, .ev = .{ .button = .{ .idx = 3, .down = true } } },
+ .{ .t = 7389532087, .pad = 2, .ev = .{ .button = .{ .idx = 3, .down = false } } },
+ .{ .t = 8133944867, .pad = 2, .ev = .{ .button = .{ .idx = 3, .down = true } } },
+ .{ .t = 8289426557, .pad = 2, .ev = .{ .button = .{ .idx = 3, .down = false } } },
+ .{ .t = 9089438184, .pad = 2, .ev = .{ .button = .{ .idx = 5, .down = true } } },
+ .{ .t = 9234016011, .pad = 2, .ev = .{ .button = .{ .idx = 2, .down = true } } },
+ .{ .t = 9356447170, .pad = 2, .ev = .{ .button = .{ .idx = 2, .down = false } } },
+ .{ .t = 9500690066, .pad = 2, .ev = .{ .button = .{ .idx = 5, .down = false } } },
+ .{ .t = 10234132592, .pad = 2, .ev = .{ .button = .{ .idx = 5, .down = true } } },
+ .{ .t = 10389693142, .pad = 2, .ev = .{ .button = .{ .idx = 2, .down = true } } },
+ .{ .t = 10500635738, .pad = 2, .ev = .{ .button = .{ .idx = 2, .down = false } } },
+ .{ .t = 10600562571, .pad = 2, .ev = .{ .button = .{ .idx = 5, .down = false } } },
+ .{ .t = 11211884827, .pad = 2, .ev = .{ .button = .{ .idx = 3, .down = true } } },
+ .{ .t = 11333789807, .pad = 2, .ev = .{ .button = .{ .idx = 3, .down = false } } },
+ .{ .t = 11622673840, .pad = 2, .ev = .{ .button = .{ .idx = 3, .down = true } } },
+ .{ .t = 11778210450, .pad = 2, .ev = .{ .button = .{ .idx = 3, .down = false } } },
+ .{ .t = 12056066449, .pad = 2, .ev = .{ .button = .{ .idx = 0, .down = true } } },
+ .{ .t = 12200470216, .pad = 2, .ev = .{ .button = .{ .idx = 0, .down = false } } },
+ .{ .t = 13122626673, .pad = 2, .ev = .{ .button = .{ .idx = 1, .down = true } } },
+ .{ .t = 13256318175, .pad = 2, .ev = .{ .button = .{ .idx = 1, .down = false } } },
+ .{ .t = 30877608417, .pad = 2, .ev = .{ .button = .{ .idx = 13, .down = true } } },
+ .{ .t = 30932947265, .pad = 2, .ev = .{ .button = .{ .idx = 13, .down = false } } },
+ .{ .t = 31188916557, .pad = 2, .ev = .{ .button = .{ .idx = 14, .down = true } } },
+ .{ .t = 31344392047, .pad = 2, .ev = .{ .button = .{ .idx = 14, .down = false } } },
+ .{ .t = 31355303161, .pad = 2, .ev = .{ .button = .{ .idx = 11, .down = true } } },
+ .{ .t = 31377574308, .pad = 2, .ev = .{ .button = .{ .idx = 11, .down = false } } },
+ .{ .t = 31377580618, .pad = 2, .ev = .{ .button = .{ .idx = 11, .down = true } } },
+ .{ .t = 31533158438, .pad = 2, .ev = .{ .button = .{ .idx = 11, .down = false } } },
+ .{ .t = 31599806330, .pad = 2, .ev = .{ .button = .{ .idx = 12, .down = true } } },
+ .{ .t = 31699701622, .pad = 2, .ev = .{ .button = .{ .idx = 14, .down = true } } },
+ .{ .t = 31699711442, .pad = 2, .ev = .{ .button = .{ .idx = 12, .down = false } } },
+ .{ .t = 31833163995, .pad = 2, .ev = .{ .button = .{ .idx = 14, .down = false } } },
+ .{ .t = 31844214668, .pad = 2, .ev = .{ .button = .{ .idx = 11, .down = true } } },
+ .{ .t = 31933218167, .pad = 2, .ev = .{ .button = .{ .idx = 11, .down = false } } },
+ .{ .t = 31944106321, .pad = 2, .ev = .{ .button = .{ .idx = 13, .down = true } } },
+ .{ .t = 31944118861, .pad = 2, .ev = .{ .button = .{ .idx = 13, .down = false } } },
+ .{ .t = 32577585424, .pad = 2, .ev = .{ .button = .{ .idx = 7, .down = true } } },
+ .{ .t = 32777404849, .pad = 2, .ev = .{ .button = .{ .idx = 7, .down = false } } },
+ .{ .t = 32932893939, .pad = 2, .ev = .{ .button = .{ .idx = 8, .down = true } } },
+ .{ .t = 33122371409, .pad = 2, .ev = .{ .button = .{ .idx = 8, .down = false } } },
+ .{ .t = 34899667922, .pad = 2, .ev = .{ .button = .{ .idx = 10, .down = true } } },
+ .{ .t = 35143908581, .pad = 2, .ev = .{ .button = .{ .idx = 10, .down = false } } },
+ .{ .t = 35143918751, .pad = 2, .ev = .{ .button = .{ .idx = 9, .down = true } } },
+ .{ .t = 35299532711, .pad = 2, .ev = .{ .button = .{ .idx = 9, .down = false } } },
+ .{ .t = 36188307687, .pad = 2, .ev = .{ .button = .{ .idx = 10, .down = true } } },
+ .{ .t = 36351697335, .pad = 2, .ev = .{ .button = .{ .idx = 9, .down = true } } },
+ .{ .t = 36399712574, .pad = 2, .ev = .{ .button = .{ .idx = 10, .down = false } } },
+ .{ .t = 36521680424, .pad = 2, .ev = .{ .button = .{ .idx = 10, .down = true } } },
+ .{ .t = 36543814231, .pad = 2, .ev = .{ .button = .{ .idx = 9, .down = false } } },
+ .{ .t = 36688528867, .pad = 2, .ev = .{ .button = .{ .idx = 10, .down = false } } },
+ .{ .t = 38810548641, .pad = 2, .ev = .{ .button = .{ .idx = 8, .down = true } } },
+ .{ .t = 38988265258, .pad = 2, .ev = .{ .button = .{ .idx = 8, .down = false } } },
+ .{ .t = 39421485428, .pad = 2, .ev = .{ .button = .{ .idx = 7, .down = true } } },
+ .{ .t = 39521563760, .pad = 2, .ev = .{ .button = .{ .idx = 8, .down = true } } },
+ .{ .t = 39543869347, .pad = 2, .ev = .{ .button = .{ .idx = 7, .down = false } } },
+ .{ .t = 39654975672, .pad = 2, .ev = .{ .button = .{ .idx = 8, .down = false } } },
+ .{ .t = 40199575307, .pad = 2, .ev = .{ .button = .{ .idx = 0, .down = true } } },
+ .{ .t = 40388115109, .pad = 2, .ev = .{ .button = .{ .idx = 0, .down = false } } },
+ .{ .t = 40810375225, .pad = 2, .ev = .{ .button = .{ .idx = 2, .down = true } } },
+ .{ .t = 40976868838, .pad = 2, .ev = .{ .button = .{ .idx = 2, .down = false } } },
+ .{ .t = 41032455046, .pad = 2, .ev = .{ .button = .{ .idx = 3, .down = true } } },
+ .{ .t = 41243668724, .pad = 2, .ev = .{ .button = .{ .idx = 3, .down = false } } },
+ .{ .t = 42565700760, .pad = 2, .ev = .{ .button = .{ .idx = 2, .down = true } } },
+ .{ .t = 42743538487, .pad = 2, .ev = .{ .button = .{ .idx = 2, .down = false } } },
+ .{ .t = 43676697498, .pad = 2, .ev = .{ .button = .{ .idx = 5, .down = true } } },
+ .{ .t = 43932510879, .pad = 2, .ev = .{ .button = .{ .idx = 5, .down = false } } },
+ .{ .t = 43943745523, .pad = 2, .ev = .{ .button = .{ .idx = 1, .down = true } } },
+ .{ .t = 44021582808, .pad = 2, .ev = .{ .button = .{ .idx = 1, .down = false } } },
+ .{ .t = 44599100514, .pad = 2, .ev = .{ .button = .{ .idx = 1, .down = true } } },
} }
diff --git a/test/deck/lpad-swipe.zon b/test/deck/lpad-swipe.zon
index 33a17751..d5b5049a 100644
--- a/test/deck/lpad-swipe.zon
+++ b/test/deck/lpad-swipe.zon
@@ -1,163 +1,163 @@
.{ .version = 1, .events = .{
-.{.t=28555347100,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.29483032,.y=0.24435425,.pressure=0.0022583008}}},
-.{.t=28555355490,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.2937622,.y=0.24847412,.pressure=0.0015563965}}},
-.{.t=28566662333,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.2920227,.y=0.25350952,.pressure=0.00048828125}}},
-.{.t=28566669273,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.up,.x=0.28912354,.y=0.25863647,.pressure=0}}},
-.{.t=28633190705,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.down,.x=0.26437378,.y=0.44036865,.pressure=0.0008239746}}},
-.{.t=28644226129,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.2635193,.y=0.44857788,.pressure=0.0008239746}}},
-.{.t=28644235079,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.26348877,.y=0.4538269,.pressure=0.0015563965}}},
-.{.t=28644241049,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.26272583,.y=0.45950317,.pressure=0.003692627}}},
-.{.t=28655363472,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.26229858,.y=0.46218872,.pressure=0.0047912598}}},
-.{.t=28655373032,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.26153564,.y=0.46594238,.pressure=0.005493164}}},
-.{.t=28666533886,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.2607727,.y=0.46810913,.pressure=0.008026123}}},
-.{.t=28666541736,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.26037598,.y=0.46969604,.pressure=0.00982666}}},
-.{.t=28666544986,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.26004028,.y=0.47079468,.pressure=0.010894775}}},
-.{.t=28677510399,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.25985718,.y=0.47192383,.pressure=0.011962891}}},
-.{.t=28677516759,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.25924683,.y=0.47277832,.pressure=0.013061523}}},
-.{.t=28677520229,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.25894165,.y=0.47366333,.pressure=0.01449585}}},
-.{.t=28688736483,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.25906372,.y=0.47409058,.pressure=0.015197754}}},
-.{.t=28688747523,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.25872803,.y=0.47351074,.pressure=0.013061523}}},
-.{.t=28688752063,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.25827026,.y=0.4732666,.pressure=0.013397217}}},
-.{.t=28699780696,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.2581787,.y=0.47317505,.pressure=0.014129639}}},
-.{.t=28699788576,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.25759888,.y=0.47305298,.pressure=0.014831543}}},
-.{.t=28699792416,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.25787354,.y=0.47280884,.pressure=0.01449585}}},
-.{.t=28711058720,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.25784302,.y=0.47225952,.pressure=0.013763428}}},
-.{.t=28711073040,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.25738525,.y=0.472229,.pressure=0.014129639}}},
-.{.t=28722312593,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.25720215,.y=0.4717102,.pressure=0.013763428}}},
-.{.t=28722328533,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.2572937,.y=0.47213745,.pressure=0.012329102}}},
-.{.t=28722335123,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.2576294,.y=0.4721985,.pressure=0.01449585}}},
-.{.t=28733104547,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.25784302,.y=0.4718933,.pressure=0.013763428}}},
-.{.t=28733113157,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.2571411,.y=0.472229,.pressure=0.013763428}}},
-.{.t=28733116517,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.256958,.y=0.47235107,.pressure=0.010894775}}},
-.{.t=28744542840,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.25598145,.y=0.47323608,.pressure=0.011962891}}},
-.{.t=28744554360,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.25558472,.y=0.47372437,.pressure=0.012329102}}},
-.{.t=28744558310,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.25463867,.y=0.47329712,.pressure=0.013061523}}},
-.{.t=28755164615,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.2541809,.y=0.4736023,.pressure=0.013397217}}},
-.{.t=28755173055,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.2536316,.y=0.47485352,.pressure=0.013397217}}},
-.{.t=28766369408,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.2527771,.y=0.4749756,.pressure=0.011962891}}},
-.{.t=28766376998,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.2524109,.y=0.47543335,.pressure=0.011962891}}},
-.{.t=28766380848,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.2518921,.y=0.4761963,.pressure=0.011962891}}},
-.{.t=28777479342,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.25073242,.y=0.4764099,.pressure=0.013397217}}},
-.{.t=28777487702,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.24984741,.y=0.4772644,.pressure=0.015197754}}},
-.{.t=28777491542,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.24942017,.y=0.47872925,.pressure=0.015563965}}},
-.{.t=28788858885,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.24816895,.y=0.47982788,.pressure=0.016296387}}},
-.{.t=28788869705,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.247406,.y=0.48181152,.pressure=0.016998291}}},
-.{.t=28788873665,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.24645996,.y=0.48260498,.pressure=0.015563965}}},
-.{.t=28800073548,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.2456665,.y=0.48516846,.pressure=0.01663208}}},
-.{.t=28800082148,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.24414062,.y=0.48757935,.pressure=0.018432617}}},
-.{.t=28800086718,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.2437439,.y=0.48986816,.pressure=0.019165039}}},
-.{.t=28810881362,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.2432251,.y=0.49273682,.pressure=0.017730713}}},
-.{.t=28810890602,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.24337769,.y=0.4951172,.pressure=0.018432617}}},
-.{.t=28822223135,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.24224854,.y=0.49868774,.pressure=0.018066406}}},
-.{.t=28822236725,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.2409668,.y=0.5030823,.pressure=0.018432617}}},
-.{.t=28822243035,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.24002075,.y=0.5093689,.pressure=0.017364502}}},
-.{.t=28833221849,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.23800659,.y=0.52023315,.pressure=0.017364502}}},
-.{.t=28833234799,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.23648071,.y=0.5312195,.pressure=0.018066406}}},
-.{.t=28833241859,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.23449707,.y=0.54260254,.pressure=0.018432617}}},
-.{.t=28844533292,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.23208618,.y=0.5539551,.pressure=0.019165039}}},
-.{.t=28844544902,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.22930908,.y=0.5640869,.pressure=0.020599365}}},
-.{.t=28844549012,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.22769165,.y=0.5701294,.pressure=0.022399902}}},
-.{.t=28855315576,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.22613525,.y=0.57528687,.pressure=0.023468018}}},
-.{.t=28855325516,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.22503662,.y=0.5812073,.pressure=0.02420044}}},
-.{.t=28866614540,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.22335815,.y=0.5848694,.pressure=0.02420044}}},
-.{.t=28866626480,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.22390747,.y=0.5887146,.pressure=0.024536133}}},
-.{.t=28866629910,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.22283936,.y=0.59265137,.pressure=0.024536133}}},
-.{.t=28877415724,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.22262573,.y=0.59625244,.pressure=0.025268555}}},
-.{.t=28877428004,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.22128296,.y=0.6008606,.pressure=0.025268555}}},
-.{.t=28888551597,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.2204895,.y=0.60409546,.pressure=0.025268555}}},
-.{.t=28888564767,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.21896362,.y=0.61083984,.pressure=0.025634766}}},
-.{.t=28888571967,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.21774292,.y=0.6156006,.pressure=0.025970459}}},
-.{.t=28899744701,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.21542358,.y=0.62112427,.pressure=0.02633667}}},
-.{.t=28899757861,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.21438599,.y=0.62576294,.pressure=0.027435303}}},
-.{.t=28899764601,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.21298218,.y=0.63223267,.pressure=0.027069092}}},
-.{.t=28910731865,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.21209717,.y=0.63708496,.pressure=0.02633667}}},
-.{.t=28910746485,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.21133423,.y=0.6419983,.pressure=0.02670288}}},
-.{.t=28921990138,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.21032715,.y=0.64730835,.pressure=0.027435303}}},
-.{.t=28922004158,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.2090149,.y=0.65237427,.pressure=0.027069092}}},
-.{.t=28922010498,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.20770264,.y=0.6588135,.pressure=0.02670288}}},
-.{.t=28932967412,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.20559692,.y=0.6654968,.pressure=0.025970459}}},
-.{.t=28932979792,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.20404053,.y=0.67285156,.pressure=0.025634766}}},
-.{.t=28932983492,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.20187378,.y=0.6821594,.pressure=0.024536133}}},
-.{.t=28944345285,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.19940186,.y=0.6911926,.pressure=0.02420044}}},
-.{.t=28944363135,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.19662476,.y=0.703949,.pressure=0.022033691}}},
-.{.t=28944369185,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.19250488,.y=0.71707153,.pressure=0.02130127}}},
-.{.t=28955070939,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.18859863,.y=0.7327881,.pressure=0.020599365}}},
-.{.t=28955080209,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.18469238,.y=0.7469177,.pressure=0.018798828}}},
-.{.t=28966644072,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.1803894,.y=0.76065063,.pressure=0.018066406}}},
-.{.t=28966660132,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.17681885,.y=0.7729492,.pressure=0.019165039}}},
-.{.t=28966666102,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.17303467,.y=0.78430176,.pressure=0.01953125}}},
-.{.t=28977523276,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.17047119,.y=0.79385376,.pressure=0.019165039}}},
-.{.t=28977533506,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.16790771,.y=0.8000183,.pressure=0.019866943}}},
-.{.t=28977538756,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.16583252,.y=0.8055115,.pressure=0.018798828}}},
-.{.t=28988801809,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.16448975,.y=0.8109131,.pressure=0.01953125}}},
-.{.t=28988815059,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.16299438,.y=0.81552124,.pressure=0.02130127}}},
-.{.t=28988820159,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.16275024,.y=0.8183899,.pressure=0.02166748}}},
-.{.t=29000005933,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.16235352,.y=0.8191223,.pressure=0.022399902}}},
-.{.t=29000020133,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.16220093,.y=0.820343,.pressure=0.023468018}}},
-.{.t=29000023943,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.16268921,.y=0.8208618,.pressure=0.023834229}}},
-.{.t=29010879647,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.1618042,.y=0.82214355,.pressure=0.025634766}}},
-.{.t=29010893477,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.16238403,.y=0.82196045,.pressure=0.02633667}}},
-.{.t=29022239700,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.16329956,.y=0.82180786,.pressure=0.027069092}}},
-.{.t=29022255010,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.16305542,.y=0.8227539,.pressure=0.027069092}}},
-.{.t=29022260530,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.16360474,.y=0.8215027,.pressure=0.02670288}}},
-.{.t=29033423863,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.16390991,.y=0.8215637,.pressure=0.02670288}}},
-.{.t=29033439393,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.16513062,.y=0.820282,.pressure=0.02633667}}},
-.{.t=29033446553,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.16571045,.y=0.82003784,.pressure=0.027069092}}},
-.{.t=29044100787,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.16552734,.y=0.81985474,.pressure=0.024536133}}},
-.{.t=29044110747,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.16653442,.y=0.8192444,.pressure=0.023468018}}},
-.{.t=29044114927,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.16690063,.y=0.81710815,.pressure=0.023101807}}},
-.{.t=29055305531,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.16772461,.y=0.81536865,.pressure=0.022766113}}},
-.{.t=29055315751,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.16854858,.y=0.81365967,.pressure=0.022399902}}},
-.{.t=29066613054,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.16940308,.y=0.811615,.pressure=0.02166748}}},
-.{.t=29066629614,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.17041016,.y=0.80908203,.pressure=0.02130127}}},
-.{.t=29066636804,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.17147827,.y=0.8067322,.pressure=0.02130127}}},
-.{.t=29077513018,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.17288208,.y=0.8036804,.pressure=0.019165039}}},
-.{.t=29077525768,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.17391968,.y=0.8003235,.pressure=0.015197754}}},
-.{.t=29077531158,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.17553711,.y=0.7965088,.pressure=0.014831543}}},
-.{.t=29088910511,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.17697144,.y=0.7913208,.pressure=0.015563965}}},
-.{.t=29088924801,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.17819214,.y=0.78622437,.pressure=0.01449585}}},
-.{.t=29088930391,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.17999268,.y=0.7813721,.pressure=0.013397217}}},
-.{.t=29100047575,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.18148804,.y=0.7752991,.pressure=0.014129639}}},
-.{.t=29100061535,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.1831665,.y=0.76898193,.pressure=0.014129639}}},
-.{.t=29100068045,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.184906,.y=0.7624817,.pressure=0.013763428}}},
-.{.t=29111067488,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.18692017,.y=0.7561035,.pressure=0.013061523}}},
-.{.t=29111083948,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.18884277,.y=0.7487488,.pressure=0.01449585}}},
-.{.t=29122288972,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.19082642,.y=0.7409973,.pressure=0.01449585}}},
-.{.t=29122305542,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.19223022,.y=0.73428345,.pressure=0.014831543}}},
-.{.t=29122313342,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.19274902,.y=0.7257385,.pressure=0.014831543}}},
-.{.t=29133328146,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.19299316,.y=0.714447,.pressure=0.015197754}}},
-.{.t=29133345356,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.1928711,.y=0.7018738,.pressure=0.01449585}}},
-.{.t=29133350306,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.19335938,.y=0.6808777,.pressure=0.014831543}}},
-.{.t=29144200749,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.19464111,.y=0.65582275,.pressure=0.014831543}}},
-.{.t=29144216579,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.19668579,.y=0.63186646,.pressure=0.01449585}}},
-.{.t=29144223419,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.19927979,.y=0.6045227,.pressure=0.013763428}}},
-.{.t=29154998954,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.20211792,.y=0.57891846,.pressure=0.0126953125}}},
-.{.t=29155006203,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.20501709,.y=0.551239,.pressure=0.0126953125}}},
-.{.t=29166393667,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.20880127,.y=0.5248718,.pressure=0.012329102}}},
-.{.t=29166404147,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.21270752,.y=0.499115,.pressure=0.013397217}}},
-.{.t=29166409197,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.21655273,.y=0.47366333,.pressure=0.013763428}}},
-.{.t=29177500380,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.2204895,.y=0.45114136,.pressure=0.0101623535}}},
-.{.t=29177510970,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.22451782,.y=0.4290161,.pressure=0.0101623535}}},
-.{.t=29177516230,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.2286377,.y=0.40975952,.pressure=0.0101623535}}},
-.{.t=29188832983,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.23208618,.y=0.39212036,.pressure=0.010528564}}},
-.{.t=29188846483,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.23532104,.y=0.375885,.pressure=0.007293701}}},
-.{.t=29188851103,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.23809814,.y=0.35943604,.pressure=0.009460449}}},
-.{.t=29200021967,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.24072266,.y=0.34292603,.pressure=0.011260986}}},
-.{.t=29200037067,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.24298096,.y=0.32809448,.pressure=0.011962891}}},
-.{.t=29200042877,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.24493408,.y=0.3138733,.pressure=0.010528564}}},
-.{.t=29210884631,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.24728394,.y=0.29989624,.pressure=0.012329102}}},
-.{.t=29221881625,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.24908447,.y=0.2866516,.pressure=0.011962891}}},
-.{.t=29221891355,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.250885,.y=0.2755432,.pressure=0.010528564}}},
-.{.t=29221896615,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.252594,.y=0.26571655,.pressure=0.011962891}}},
-.{.t=29233293918,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.25378418,.y=0.2571106,.pressure=0.0126953125}}},
-.{.t=29233306418,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.25476074,.y=0.24942017,.pressure=0.0126953125}}},
-.{.t=29233312238,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.25534058,.y=0.24307251,.pressure=0.011260986}}},
-.{.t=29244359261,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.25610352,.y=0.23760986,.pressure=0.0101623535}}},
-.{.t=29244375081,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.25680542,.y=0.23291016,.pressure=0.0101623535}}},
-.{.t=29244383211,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.25750732,.y=0.22824097,.pressure=0.0101623535}}},
-.{.t=29255381715,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.25823975,.y=0.22570801,.pressure=0.007659912}}},
-.{.t=29255392615,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.25909424,.y=0.2234497,.pressure=0.007293701}}},
-.{.t=29266740458,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.2599182,.y=0.22180176,.pressure=0.006225586}}},
-.{.t=29266753748,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.26089478,.y=0.22140503,.pressure=0.0051574707}}},
-.{.t=29266758978,.pad=2,.ev=.{.touch=.{.touchpad=0,.finger=0,.phase=.motion,.x=0.26275635,.y=0.22149658,.pressure=0.0033569336}}},
+ .{ .t = 28555347100, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.29483032, .y = 0.24435425, .pressure = 0.0022583008 } } },
+ .{ .t = 28555355490, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.2937622, .y = 0.24847412, .pressure = 0.0015563965 } } },
+ .{ .t = 28566662333, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.2920227, .y = 0.25350952, .pressure = 0.00048828125 } } },
+ .{ .t = 28566669273, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .up, .x = 0.28912354, .y = 0.25863647, .pressure = 0 } } },
+ .{ .t = 28633190705, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .down, .x = 0.26437378, .y = 0.44036865, .pressure = 0.0008239746 } } },
+ .{ .t = 28644226129, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.2635193, .y = 0.44857788, .pressure = 0.0008239746 } } },
+ .{ .t = 28644235079, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.26348877, .y = 0.4538269, .pressure = 0.0015563965 } } },
+ .{ .t = 28644241049, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.26272583, .y = 0.45950317, .pressure = 0.003692627 } } },
+ .{ .t = 28655363472, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.26229858, .y = 0.46218872, .pressure = 0.0047912598 } } },
+ .{ .t = 28655373032, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.26153564, .y = 0.46594238, .pressure = 0.005493164 } } },
+ .{ .t = 28666533886, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.2607727, .y = 0.46810913, .pressure = 0.008026123 } } },
+ .{ .t = 28666541736, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.26037598, .y = 0.46969604, .pressure = 0.00982666 } } },
+ .{ .t = 28666544986, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.26004028, .y = 0.47079468, .pressure = 0.010894775 } } },
+ .{ .t = 28677510399, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.25985718, .y = 0.47192383, .pressure = 0.011962891 } } },
+ .{ .t = 28677516759, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.25924683, .y = 0.47277832, .pressure = 0.013061523 } } },
+ .{ .t = 28677520229, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.25894165, .y = 0.47366333, .pressure = 0.01449585 } } },
+ .{ .t = 28688736483, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.25906372, .y = 0.47409058, .pressure = 0.015197754 } } },
+ .{ .t = 28688747523, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.25872803, .y = 0.47351074, .pressure = 0.013061523 } } },
+ .{ .t = 28688752063, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.25827026, .y = 0.4732666, .pressure = 0.013397217 } } },
+ .{ .t = 28699780696, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.2581787, .y = 0.47317505, .pressure = 0.014129639 } } },
+ .{ .t = 28699788576, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.25759888, .y = 0.47305298, .pressure = 0.014831543 } } },
+ .{ .t = 28699792416, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.25787354, .y = 0.47280884, .pressure = 0.01449585 } } },
+ .{ .t = 28711058720, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.25784302, .y = 0.47225952, .pressure = 0.013763428 } } },
+ .{ .t = 28711073040, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.25738525, .y = 0.472229, .pressure = 0.014129639 } } },
+ .{ .t = 28722312593, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.25720215, .y = 0.4717102, .pressure = 0.013763428 } } },
+ .{ .t = 28722328533, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.2572937, .y = 0.47213745, .pressure = 0.012329102 } } },
+ .{ .t = 28722335123, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.2576294, .y = 0.4721985, .pressure = 0.01449585 } } },
+ .{ .t = 28733104547, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.25784302, .y = 0.4718933, .pressure = 0.013763428 } } },
+ .{ .t = 28733113157, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.2571411, .y = 0.472229, .pressure = 0.013763428 } } },
+ .{ .t = 28733116517, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.256958, .y = 0.47235107, .pressure = 0.010894775 } } },
+ .{ .t = 28744542840, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.25598145, .y = 0.47323608, .pressure = 0.011962891 } } },
+ .{ .t = 28744554360, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.25558472, .y = 0.47372437, .pressure = 0.012329102 } } },
+ .{ .t = 28744558310, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.25463867, .y = 0.47329712, .pressure = 0.013061523 } } },
+ .{ .t = 28755164615, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.2541809, .y = 0.4736023, .pressure = 0.013397217 } } },
+ .{ .t = 28755173055, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.2536316, .y = 0.47485352, .pressure = 0.013397217 } } },
+ .{ .t = 28766369408, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.2527771, .y = 0.4749756, .pressure = 0.011962891 } } },
+ .{ .t = 28766376998, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.2524109, .y = 0.47543335, .pressure = 0.011962891 } } },
+ .{ .t = 28766380848, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.2518921, .y = 0.4761963, .pressure = 0.011962891 } } },
+ .{ .t = 28777479342, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.25073242, .y = 0.4764099, .pressure = 0.013397217 } } },
+ .{ .t = 28777487702, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.24984741, .y = 0.4772644, .pressure = 0.015197754 } } },
+ .{ .t = 28777491542, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.24942017, .y = 0.47872925, .pressure = 0.015563965 } } },
+ .{ .t = 28788858885, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.24816895, .y = 0.47982788, .pressure = 0.016296387 } } },
+ .{ .t = 28788869705, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.247406, .y = 0.48181152, .pressure = 0.016998291 } } },
+ .{ .t = 28788873665, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.24645996, .y = 0.48260498, .pressure = 0.015563965 } } },
+ .{ .t = 28800073548, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.2456665, .y = 0.48516846, .pressure = 0.01663208 } } },
+ .{ .t = 28800082148, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.24414062, .y = 0.48757935, .pressure = 0.018432617 } } },
+ .{ .t = 28800086718, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.2437439, .y = 0.48986816, .pressure = 0.019165039 } } },
+ .{ .t = 28810881362, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.2432251, .y = 0.49273682, .pressure = 0.017730713 } } },
+ .{ .t = 28810890602, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.24337769, .y = 0.4951172, .pressure = 0.018432617 } } },
+ .{ .t = 28822223135, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.24224854, .y = 0.49868774, .pressure = 0.018066406 } } },
+ .{ .t = 28822236725, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.2409668, .y = 0.5030823, .pressure = 0.018432617 } } },
+ .{ .t = 28822243035, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.24002075, .y = 0.5093689, .pressure = 0.017364502 } } },
+ .{ .t = 28833221849, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.23800659, .y = 0.52023315, .pressure = 0.017364502 } } },
+ .{ .t = 28833234799, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.23648071, .y = 0.5312195, .pressure = 0.018066406 } } },
+ .{ .t = 28833241859, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.23449707, .y = 0.54260254, .pressure = 0.018432617 } } },
+ .{ .t = 28844533292, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.23208618, .y = 0.5539551, .pressure = 0.019165039 } } },
+ .{ .t = 28844544902, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.22930908, .y = 0.5640869, .pressure = 0.020599365 } } },
+ .{ .t = 28844549012, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.22769165, .y = 0.5701294, .pressure = 0.022399902 } } },
+ .{ .t = 28855315576, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.22613525, .y = 0.57528687, .pressure = 0.023468018 } } },
+ .{ .t = 28855325516, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.22503662, .y = 0.5812073, .pressure = 0.02420044 } } },
+ .{ .t = 28866614540, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.22335815, .y = 0.5848694, .pressure = 0.02420044 } } },
+ .{ .t = 28866626480, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.22390747, .y = 0.5887146, .pressure = 0.024536133 } } },
+ .{ .t = 28866629910, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.22283936, .y = 0.59265137, .pressure = 0.024536133 } } },
+ .{ .t = 28877415724, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.22262573, .y = 0.59625244, .pressure = 0.025268555 } } },
+ .{ .t = 28877428004, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.22128296, .y = 0.6008606, .pressure = 0.025268555 } } },
+ .{ .t = 28888551597, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.2204895, .y = 0.60409546, .pressure = 0.025268555 } } },
+ .{ .t = 28888564767, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.21896362, .y = 0.61083984, .pressure = 0.025634766 } } },
+ .{ .t = 28888571967, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.21774292, .y = 0.6156006, .pressure = 0.025970459 } } },
+ .{ .t = 28899744701, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.21542358, .y = 0.62112427, .pressure = 0.02633667 } } },
+ .{ .t = 28899757861, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.21438599, .y = 0.62576294, .pressure = 0.027435303 } } },
+ .{ .t = 28899764601, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.21298218, .y = 0.63223267, .pressure = 0.027069092 } } },
+ .{ .t = 28910731865, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.21209717, .y = 0.63708496, .pressure = 0.02633667 } } },
+ .{ .t = 28910746485, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.21133423, .y = 0.6419983, .pressure = 0.02670288 } } },
+ .{ .t = 28921990138, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.21032715, .y = 0.64730835, .pressure = 0.027435303 } } },
+ .{ .t = 28922004158, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.2090149, .y = 0.65237427, .pressure = 0.027069092 } } },
+ .{ .t = 28922010498, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.20770264, .y = 0.6588135, .pressure = 0.02670288 } } },
+ .{ .t = 28932967412, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.20559692, .y = 0.6654968, .pressure = 0.025970459 } } },
+ .{ .t = 28932979792, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.20404053, .y = 0.67285156, .pressure = 0.025634766 } } },
+ .{ .t = 28932983492, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.20187378, .y = 0.6821594, .pressure = 0.024536133 } } },
+ .{ .t = 28944345285, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.19940186, .y = 0.6911926, .pressure = 0.02420044 } } },
+ .{ .t = 28944363135, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.19662476, .y = 0.703949, .pressure = 0.022033691 } } },
+ .{ .t = 28944369185, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.19250488, .y = 0.71707153, .pressure = 0.02130127 } } },
+ .{ .t = 28955070939, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.18859863, .y = 0.7327881, .pressure = 0.020599365 } } },
+ .{ .t = 28955080209, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.18469238, .y = 0.7469177, .pressure = 0.018798828 } } },
+ .{ .t = 28966644072, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.1803894, .y = 0.76065063, .pressure = 0.018066406 } } },
+ .{ .t = 28966660132, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.17681885, .y = 0.7729492, .pressure = 0.019165039 } } },
+ .{ .t = 28966666102, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.17303467, .y = 0.78430176, .pressure = 0.01953125 } } },
+ .{ .t = 28977523276, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.17047119, .y = 0.79385376, .pressure = 0.019165039 } } },
+ .{ .t = 28977533506, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.16790771, .y = 0.8000183, .pressure = 0.019866943 } } },
+ .{ .t = 28977538756, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.16583252, .y = 0.8055115, .pressure = 0.018798828 } } },
+ .{ .t = 28988801809, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.16448975, .y = 0.8109131, .pressure = 0.01953125 } } },
+ .{ .t = 28988815059, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.16299438, .y = 0.81552124, .pressure = 0.02130127 } } },
+ .{ .t = 28988820159, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.16275024, .y = 0.8183899, .pressure = 0.02166748 } } },
+ .{ .t = 29000005933, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.16235352, .y = 0.8191223, .pressure = 0.022399902 } } },
+ .{ .t = 29000020133, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.16220093, .y = 0.820343, .pressure = 0.023468018 } } },
+ .{ .t = 29000023943, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.16268921, .y = 0.8208618, .pressure = 0.023834229 } } },
+ .{ .t = 29010879647, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.1618042, .y = 0.82214355, .pressure = 0.025634766 } } },
+ .{ .t = 29010893477, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.16238403, .y = 0.82196045, .pressure = 0.02633667 } } },
+ .{ .t = 29022239700, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.16329956, .y = 0.82180786, .pressure = 0.027069092 } } },
+ .{ .t = 29022255010, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.16305542, .y = 0.8227539, .pressure = 0.027069092 } } },
+ .{ .t = 29022260530, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.16360474, .y = 0.8215027, .pressure = 0.02670288 } } },
+ .{ .t = 29033423863, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.16390991, .y = 0.8215637, .pressure = 0.02670288 } } },
+ .{ .t = 29033439393, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.16513062, .y = 0.820282, .pressure = 0.02633667 } } },
+ .{ .t = 29033446553, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.16571045, .y = 0.82003784, .pressure = 0.027069092 } } },
+ .{ .t = 29044100787, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.16552734, .y = 0.81985474, .pressure = 0.024536133 } } },
+ .{ .t = 29044110747, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.16653442, .y = 0.8192444, .pressure = 0.023468018 } } },
+ .{ .t = 29044114927, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.16690063, .y = 0.81710815, .pressure = 0.023101807 } } },
+ .{ .t = 29055305531, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.16772461, .y = 0.81536865, .pressure = 0.022766113 } } },
+ .{ .t = 29055315751, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.16854858, .y = 0.81365967, .pressure = 0.022399902 } } },
+ .{ .t = 29066613054, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.16940308, .y = 0.811615, .pressure = 0.02166748 } } },
+ .{ .t = 29066629614, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.17041016, .y = 0.80908203, .pressure = 0.02130127 } } },
+ .{ .t = 29066636804, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.17147827, .y = 0.8067322, .pressure = 0.02130127 } } },
+ .{ .t = 29077513018, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.17288208, .y = 0.8036804, .pressure = 0.019165039 } } },
+ .{ .t = 29077525768, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.17391968, .y = 0.8003235, .pressure = 0.015197754 } } },
+ .{ .t = 29077531158, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.17553711, .y = 0.7965088, .pressure = 0.014831543 } } },
+ .{ .t = 29088910511, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.17697144, .y = 0.7913208, .pressure = 0.015563965 } } },
+ .{ .t = 29088924801, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.17819214, .y = 0.78622437, .pressure = 0.01449585 } } },
+ .{ .t = 29088930391, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.17999268, .y = 0.7813721, .pressure = 0.013397217 } } },
+ .{ .t = 29100047575, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.18148804, .y = 0.7752991, .pressure = 0.014129639 } } },
+ .{ .t = 29100061535, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.1831665, .y = 0.76898193, .pressure = 0.014129639 } } },
+ .{ .t = 29100068045, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.184906, .y = 0.7624817, .pressure = 0.013763428 } } },
+ .{ .t = 29111067488, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.18692017, .y = 0.7561035, .pressure = 0.013061523 } } },
+ .{ .t = 29111083948, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.18884277, .y = 0.7487488, .pressure = 0.01449585 } } },
+ .{ .t = 29122288972, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.19082642, .y = 0.7409973, .pressure = 0.01449585 } } },
+ .{ .t = 29122305542, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.19223022, .y = 0.73428345, .pressure = 0.014831543 } } },
+ .{ .t = 29122313342, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.19274902, .y = 0.7257385, .pressure = 0.014831543 } } },
+ .{ .t = 29133328146, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.19299316, .y = 0.714447, .pressure = 0.015197754 } } },
+ .{ .t = 29133345356, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.1928711, .y = 0.7018738, .pressure = 0.01449585 } } },
+ .{ .t = 29133350306, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.19335938, .y = 0.6808777, .pressure = 0.014831543 } } },
+ .{ .t = 29144200749, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.19464111, .y = 0.65582275, .pressure = 0.014831543 } } },
+ .{ .t = 29144216579, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.19668579, .y = 0.63186646, .pressure = 0.01449585 } } },
+ .{ .t = 29144223419, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.19927979, .y = 0.6045227, .pressure = 0.013763428 } } },
+ .{ .t = 29154998954, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.20211792, .y = 0.57891846, .pressure = 0.0126953125 } } },
+ .{ .t = 29155006203, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.20501709, .y = 0.551239, .pressure = 0.0126953125 } } },
+ .{ .t = 29166393667, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.20880127, .y = 0.5248718, .pressure = 0.012329102 } } },
+ .{ .t = 29166404147, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.21270752, .y = 0.499115, .pressure = 0.013397217 } } },
+ .{ .t = 29166409197, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.21655273, .y = 0.47366333, .pressure = 0.013763428 } } },
+ .{ .t = 29177500380, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.2204895, .y = 0.45114136, .pressure = 0.0101623535 } } },
+ .{ .t = 29177510970, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.22451782, .y = 0.4290161, .pressure = 0.0101623535 } } },
+ .{ .t = 29177516230, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.2286377, .y = 0.40975952, .pressure = 0.0101623535 } } },
+ .{ .t = 29188832983, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.23208618, .y = 0.39212036, .pressure = 0.010528564 } } },
+ .{ .t = 29188846483, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.23532104, .y = 0.375885, .pressure = 0.007293701 } } },
+ .{ .t = 29188851103, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.23809814, .y = 0.35943604, .pressure = 0.009460449 } } },
+ .{ .t = 29200021967, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.24072266, .y = 0.34292603, .pressure = 0.011260986 } } },
+ .{ .t = 29200037067, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.24298096, .y = 0.32809448, .pressure = 0.011962891 } } },
+ .{ .t = 29200042877, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.24493408, .y = 0.3138733, .pressure = 0.010528564 } } },
+ .{ .t = 29210884631, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.24728394, .y = 0.29989624, .pressure = 0.012329102 } } },
+ .{ .t = 29221881625, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.24908447, .y = 0.2866516, .pressure = 0.011962891 } } },
+ .{ .t = 29221891355, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.250885, .y = 0.2755432, .pressure = 0.010528564 } } },
+ .{ .t = 29221896615, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.252594, .y = 0.26571655, .pressure = 0.011962891 } } },
+ .{ .t = 29233293918, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.25378418, .y = 0.2571106, .pressure = 0.0126953125 } } },
+ .{ .t = 29233306418, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.25476074, .y = 0.24942017, .pressure = 0.0126953125 } } },
+ .{ .t = 29233312238, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.25534058, .y = 0.24307251, .pressure = 0.011260986 } } },
+ .{ .t = 29244359261, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.25610352, .y = 0.23760986, .pressure = 0.0101623535 } } },
+ .{ .t = 29244375081, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.25680542, .y = 0.23291016, .pressure = 0.0101623535 } } },
+ .{ .t = 29244383211, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.25750732, .y = 0.22824097, .pressure = 0.0101623535 } } },
+ .{ .t = 29255381715, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.25823975, .y = 0.22570801, .pressure = 0.007659912 } } },
+ .{ .t = 29255392615, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.25909424, .y = 0.2234497, .pressure = 0.007293701 } } },
+ .{ .t = 29266740458, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.2599182, .y = 0.22180176, .pressure = 0.006225586 } } },
+ .{ .t = 29266753748, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.26089478, .y = 0.22140503, .pressure = 0.0051574707 } } },
+ .{ .t = 29266758978, .pad = 2, .ev = .{ .touch = .{ .touchpad = 0, .finger = 0, .phase = .motion, .x = 0.26275635, .y = 0.22149658, .pressure = 0.0033569336 } } },
} }
diff --git a/test/deck/replay.zig b/test/deck/replay.zig
index 475f7476..778f4191 100644
--- a/test/deck/replay.zig
+++ b/test/deck/replay.zig
@@ -20,8 +20,9 @@ const Tally = struct {
fn replay(src: [:0]const u8) !Tally {
const gpa = std.testing.allocator;
- const rec = try schema.parse(gpa, src);
- defer schema.free(gpa, rec);
+ var arena: std.heap.ArenaAllocator = .init(gpa);
+ defer arena.deinit();
+ const rec = try schema.parse(gpa, arena.allocator(), src);
var d: deck.Deck = .{};
var tally: Tally = .{};
for (rec.events) |ev| {
@@ -44,12 +45,12 @@ fn replay(src: [:0]const u8) !Tally {
tally.max_step = @max(tally.max_step, @max(@abs(mv.dx), @abs(mv.dy)));
},
.click => |ck| if (ck.down) {
- tally.click_down[@intFromEnum(ck.which)] += 1;
+ tally.click_down[@backingInt(ck.which)] += 1;
} else {
- tally.click_up[@intFromEnum(ck.which)] += 1;
+ tally.click_up[@backingInt(ck.which)] += 1;
},
.wheel => |ticks| tally.wheel += ticks,
- .key => |k| tally.keys[@intFromEnum(k)] += 1,
+ .key => |k| tally.keys[@backingInt(k)] += 1,
.rumble => tally.rumbles += 1,
};
}
@@ -71,7 +72,7 @@ test "right-pad drag moves the pointer, fresh touches don't jump" {
try std.testing.expectEqual(0, t.wheel);
// a light-touch drag stays well under the click threshold — no phantom
// select clicks (nor their rumble)
- try std.testing.expectEqual(0, t.click_down[@intFromEnum(deck.Click.select)]);
+ try std.testing.expectEqual(0, t.click_down[@backingInt(deck.Click.select)]);
try std.testing.expectEqual(0, t.rumbles);
}
@@ -81,11 +82,11 @@ test "trigger pull+release clicks exactly once each" {
// through dozens of intermediate values, interleaved with ~500 stick
// axis events: hysteresis must yield exactly one click apiece, only
// the execute pull rumbles, and the sticks produce nothing
- try std.testing.expectEqual(1, t.click_down[@intFromEnum(deck.Click.select)]);
- try std.testing.expectEqual(1, t.click_up[@intFromEnum(deck.Click.select)]);
- try std.testing.expectEqual(1, t.click_down[@intFromEnum(deck.Click.execute)]);
- try std.testing.expectEqual(1, t.click_up[@intFromEnum(deck.Click.execute)]);
- try std.testing.expectEqual(0, t.click_down[@intFromEnum(deck.Click.look)]);
+ try std.testing.expectEqual(1, t.click_down[@backingInt(deck.Click.select)]);
+ try std.testing.expectEqual(1, t.click_up[@backingInt(deck.Click.select)]);
+ try std.testing.expectEqual(1, t.click_down[@backingInt(deck.Click.execute)]);
+ try std.testing.expectEqual(1, t.click_up[@backingInt(deck.Click.execute)]);
+ try std.testing.expectEqual(0, t.click_down[@backingInt(deck.Click.look)]);
try std.testing.expectEqual(1, t.rumbles);
try std.testing.expectEqual(0, t.moves);
}
@@ -99,7 +100,7 @@ test "left-pad swipe scrolls" {
try std.testing.expectEqual(5, t.wheel);
try std.testing.expectEqual(0, t.moves);
// the swipe presses lightly — no phantom look clicks
- try std.testing.expectEqual(0, t.click_down[@intFromEnum(deck.Click.look)]);
+ try std.testing.expectEqual(0, t.click_down[@backingInt(deck.Click.look)]);
try std.testing.expectEqual(0, t.rumbles);
}
@@ -165,15 +166,15 @@ test "buttons: dpad n/N, A Enter, Y Tab, L1 look + rumble" {
const t = try replay(@embedFile("buttons.zon"));
// every button press of a real all-buttons sweep: dpad-down x1,
// dpad-up x3, A x2, Y x5, L1 x3; the other buttons map to nothing
- try std.testing.expectEqual(1, t.keys[@intFromEnum(deck.Keytap.n)]);
- try std.testing.expectEqual(3, t.keys[@intFromEnum(deck.Keytap.cap_n)]);
- try std.testing.expectEqual(2, t.keys[@intFromEnum(deck.Keytap.enter)]);
- try std.testing.expectEqual(5, t.keys[@intFromEnum(deck.Keytap.tab)]);
- try std.testing.expectEqual(3, t.click_down[@intFromEnum(deck.Click.look)]);
- try std.testing.expectEqual(3, t.click_up[@intFromEnum(deck.Click.look)]);
+ try std.testing.expectEqual(1, t.keys[@backingInt(deck.Keytap.n)]);
+ try std.testing.expectEqual(3, t.keys[@backingInt(deck.Keytap.cap_n)]);
+ try std.testing.expectEqual(2, t.keys[@backingInt(deck.Keytap.enter)]);
+ try std.testing.expectEqual(5, t.keys[@backingInt(deck.Keytap.tab)]);
+ try std.testing.expectEqual(3, t.click_down[@backingInt(deck.Click.look)]);
+ try std.testing.expectEqual(3, t.click_up[@backingInt(deck.Click.look)]);
try std.testing.expectEqual(3, t.rumbles);
- try std.testing.expectEqual(0, t.click_down[@intFromEnum(deck.Click.select)]);
- try std.testing.expectEqual(0, t.click_down[@intFromEnum(deck.Click.execute)]);
+ try std.testing.expectEqual(0, t.click_down[@backingInt(deck.Click.select)]);
+ try std.testing.expectEqual(0, t.click_down[@backingInt(deck.Click.execute)]);
try std.testing.expectEqual(0, t.moves);
try std.testing.expectEqual(0, t.wheel);
}
diff --git a/test/deck/rpad-drag.zon b/test/deck/rpad-drag.zon
index 20dea6ef..c7a82db9 100644
--- a/test/deck/rpad-drag.zon
+++ b/test/deck/rpad-drag.zon
@@ -1,223 +1,223 @@
.{ .version = 1, .events = .{
-.{.t=1557743788,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.down,.x=0.48794556,.y=0.3156128,.pressure=0.0004272461}}},
-.{.t=1557747308,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.49105835,.y=0.31570435,.pressure=0.0015563965}}},
-.{.t=1568667061,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.49325562,.y=0.31576538,.pressure=0.004638672}}},
-.{.t=1568677161,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.49591064,.y=0.31585693,.pressure=0.0035095215}}},
-.{.t=1568682171,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.4988098,.y=0.31588745,.pressure=0.0026855469}}},
-.{.t=1579851545,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.50076294,.y=0.31607056,.pressure=0.004638672}}},
-.{.t=1579859265,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.50289917,.y=0.31637573,.pressure=0.0063171387}}},
-.{.t=1579863375,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.5050354,.y=0.31655884,.pressure=0.008026123}}},
-.{.t=1590959349,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.50717163,.y=0.31655884,.pressure=0.0063171387}}},
-.{.t=1590970369,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.50927734,.y=0.31698608,.pressure=0.0040893555}}},
-.{.t=1590975739,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.5108948,.y=0.31750488,.pressure=0.0038146973}}},
-.{.t=1601902982,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.5126953,.y=0.31808472,.pressure=0.005218506}}},
-.{.t=1601911482,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.51400757,.y=0.318573,.pressure=0.0066223145}}},
-.{.t=1613345665,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.51571655,.y=0.31878662,.pressure=0.007171631}}},
-.{.t=1613352235,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.51660156,.y=0.31936646,.pressure=0.0068969727}}},
-.{.t=1613356725,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.5178528,.y=0.3199463,.pressure=0.0066223145}}},
-.{.t=1624412039,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.5187378,.y=0.3206787,.pressure=0.0057678223}}},
-.{.t=1624425589,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.52023315,.y=0.32138062,.pressure=0.0043640137}}},
-.{.t=1624432009,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.5215454,.y=0.3218689,.pressure=0.0040893555}}},
-.{.t=1635289123,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.5227356,.y=0.3222351,.pressure=0.0018310547}}},
-.{.t=1635297503,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.52371216,.y=0.3229065,.pressure=0.0026855469}}},
-.{.t=1635301553,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.5246887,.y=0.3234558,.pressure=0.002105713}}},
-.{.t=1646425097,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.52545166,.y=0.323761,.pressure=0.0007019043}}},
-.{.t=1646433957,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.up,.x=0.5263977,.y=0.3241577,.pressure=0}}},
-.{.t=1657611170,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.down,.x=0.52749634,.y=0.32489014,.pressure=0.0004272461}}},
-.{.t=1657620700,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.up,.x=0.52893066,.y=0.32543945,.pressure=0}}},
-.{.t=2568455904,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.down,.x=0.71746826,.y=0.4960022,.pressure=0.0026855469}}},
-.{.t=2568464274,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.72143555,.y=0.49996948,.pressure=0.0032348633}}},
-.{.t=2568468384,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.72436523,.y=0.5033264,.pressure=0.004638672}}},
-.{.t=2579442397,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7271118,.y=0.5065918,.pressure=0.0066223145}}},
-.{.t=2579450697,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.73065186,.y=0.51031494,.pressure=0.008850098}}},
-.{.t=2579455357,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7350464,.y=0.5145569,.pressure=0.010253906}}},
-.{.t=2590631621,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.74017334,.y=0.51916504,.pressure=0.012512207}}},
-.{.t=2590639051,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7455139,.y=0.52420044,.pressure=0.014190674}}},
-.{.t=2601728264,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7537842,.y=0.5307617,.pressure=0.01727295}}},
-.{.t=2601737594,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.76501465,.y=0.5390625,.pressure=0.017852783}}},
-.{.t=2601745184,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7758789,.y=0.54782104,.pressure=0.017578125}}},
-.{.t=2612868798,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.78726196,.y=0.55740356,.pressure=0.018676758}}},
-.{.t=2612877548,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.79766846,.y=0.56655884,.pressure=0.016998291}}},
-.{.t=2612881858,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.8077698,.y=0.57421875,.pressure=0.016174316}}},
-.{.t=2624096121,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.81689453,.y=0.5804138,.pressure=0.0184021}}},
-.{.t=2624103861,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.8230896,.y=0.58462524,.pressure=0.017578125}}},
-.{.t=2624108371,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.8291321,.y=0.58810425,.pressure=0.016448975}}},
-.{.t=2635100225,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.8328247,.y=0.5901184,.pressure=0.015594482}}},
-.{.t=2635107345,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.835022,.y=0.59017944,.pressure=0.016174316}}},
-.{.t=2635111905,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.83724976,.y=0.5899353,.pressure=0.016174316}}},
-.{.t=2646151229,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.8390808,.y=0.5890198,.pressure=0.014770508}}},
-.{.t=2646160149,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.8404541,.y=0.58709717,.pressure=0.014190674}}},
-.{.t=2657358812,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.8408203,.y=0.58535767,.pressure=0.016448975}}},
-.{.t=2657364952,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.8411865,.y=0.5831604,.pressure=0.015045166}}},
-.{.t=2657368602,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.84106445,.y=0.5809021,.pressure=0.0184021}}},
-.{.t=2668497496,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.84155273,.y=0.5791321,.pressure=0.018676758}}},
-.{.t=2668503176,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.84198,.y=0.5767517,.pressure=0.0184021}}},
-.{.t=2679574619,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.8413696,.y=0.5749817,.pressure=0.01727295}}},
-.{.t=2679583429,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.8410034,.y=0.57302856,.pressure=0.015594482}}},
-.{.t=2679588959,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.8402405,.y=0.57077026,.pressure=0.016998291}}},
-.{.t=2690585493,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.83987427,.y=0.5680237,.pressure=0.017578125}}},
-.{.t=2690591573,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.8392639,.y=0.5658264,.pressure=0.016998291}}},
-.{.t=2701710277,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.8384094,.y=0.56329346,.pressure=0.015045166}}},
-.{.t=2701715427,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.8366089,.y=0.5602722,.pressure=0.012512207}}},
-.{.t=2701719287,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.8343506,.y=0.55578613,.pressure=0.013641357}}},
-.{.t=2712932260,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.8309326,.y=0.5510254,.pressure=0.012512207}}},
-.{.t=2712941600,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.8270569,.y=0.54504395,.pressure=0.013641357}}},
-.{.t=2712946870,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.82263184,.y=0.53845215,.pressure=0.012786865}}},
-.{.t=2724074464,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.8186035,.y=0.5309448,.pressure=0.012237549}}},
-.{.t=2724081034,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.8176575,.y=0.5210266,.pressure=0.011383057}}},
-.{.t=2724085114,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.8161926,.y=0.5109863,.pressure=0.010253906}}},
-.{.t=2735041467,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.81481934,.y=0.49887085,.pressure=0.008575439}}},
-.{.t=2735049697,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.8135681,.y=0.48706055,.pressure=0.0066223145}}},
-.{.t=2735053437,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.8110962,.y=0.47451782,.pressure=0.0066223145}}},
-.{.t=2746200461,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.8079529,.y=0.46011353,.pressure=0.008300781}}},
-.{.t=2746207531,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.8046875,.y=0.44818115,.pressure=0.008850098}}},
-.{.t=2757301144,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.8004761,.y=0.4363098,.pressure=0.010253906}}},
-.{.t=2757308574,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.796051,.y=0.4248352,.pressure=0.009979248}}},
-.{.t=2757312724,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.79104614,.y=0.4133911,.pressure=0.013366699}}},
-.{.t=2775948317,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.78637695,.y=0.4032898,.pressure=0.012237549}}},
-.{.t=2775958817,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.78131104,.y=0.39471436,.pressure=0.015045166}}},
-.{.t=2775962507,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7763977,.y=0.38796997,.pressure=0.016723633}}},
-.{.t=2775966007,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.77178955,.y=0.38198853,.pressure=0.018127441}}},
-.{.t=2775969667,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.76724243,.y=0.37753296,.pressure=0.019805908}}},
-.{.t=2779448262,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7628784,.y=0.37338257,.pressure=0.018127441}}},
-.{.t=2790559265,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.75909424,.y=0.36990356,.pressure=0.020935059}}},
-.{.t=2790566225,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.75512695,.y=0.36654663,.pressure=0.021484375}}},
-.{.t=2801688299,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7513733,.y=0.36395264,.pressure=0.020385742}}},
-.{.t=2801695099,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7475891,.y=0.36190796,.pressure=0.020385742}}},
-.{.t=2801697739,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.74487305,.y=0.35958862,.pressure=0.020385742}}},
-.{.t=2812906962,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.74191284,.y=0.3572998,.pressure=0.022888184}}},
-.{.t=2812918202,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7388611,.y=0.35458374,.pressure=0.022338867}}},
-.{.t=2812924662,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7357178,.y=0.35250854,.pressure=0.021209717}}},
-.{.t=2824054786,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7324829,.y=0.3503418,.pressure=0.021484375}}},
-.{.t=2824059786,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7289429,.y=0.3484497,.pressure=0.022888184}}},
-.{.t=2824063716,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.72506714,.y=0.34591675,.pressure=0.022613525}}},
-.{.t=2835063039,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7218323,.y=0.34277344,.pressure=0.02319336}}},
-.{.t=2835070099,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7174072,.y=0.34020996,.pressure=0.020080566}}},
-.{.t=2835075929,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.71273804,.y=0.33743286,.pressure=0.020080566}}},
-.{.t=2846116163,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7079773,.y=0.3343506,.pressure=0.018676758}}},
-.{.t=2846123943,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7023926,.y=0.33081055,.pressure=0.019805908}}},
-.{.t=2857453356,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.6963806,.y=0.32598877,.pressure=0.019805908}}},
-.{.t=2857460036,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.6892395,.y=0.32144165,.pressure=0.020935059}}},
-.{.t=2857466116,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.6821289,.y=0.31661987,.pressure=0.018127441}}},
-.{.t=2868624580,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.6739197,.y=0.31192017,.pressure=0.018676758}}},
-.{.t=2868632160,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.6664429,.y=0.3072815,.pressure=0.018981934}}},
-.{.t=2868637550,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.6587219,.y=0.30307007,.pressure=0.017578125}}},
-.{.t=2879637654,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.65133667,.y=0.29888916,.pressure=0.017852783}}},
-.{.t=2879646144,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.6444702,.y=0.29452515,.pressure=0.017852783}}},
-.{.t=2879653574,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.6372986,.y=0.29092407,.pressure=0.016174316}}},
-.{.t=2890493398,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.6305542,.y=0.28729248,.pressure=0.016448975}}},
-.{.t=2890500368,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.62493896,.y=0.28427124,.pressure=0.016448975}}},
-.{.t=2901904031,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.6192627,.y=0.28234863,.pressure=0.015594482}}},
-.{.t=2901913451,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.61428833,.y=0.27990723,.pressure=0.014190674}}},
-.{.t=2901920201,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.6097412,.y=0.277771,.pressure=0.013641357}}},
-.{.t=2913077524,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.6056824,.y=0.27627563,.pressure=0.013641357}}},
-.{.t=2913084054,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.6019287,.y=0.27560425,.pressure=0.012512207}}},
-.{.t=2913088274,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.5984192,.y=0.27441406,.pressure=0.011657715}}},
-.{.t=2924138128,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.59536743,.y=0.27404785,.pressure=0.011962891}}},
-.{.t=2924146018,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.5923767,.y=0.27398682,.pressure=0.013641357}}},
-.{.t=2924151648,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.5900574,.y=0.2736206,.pressure=0.013366699}}},
-.{.t=2935179332,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.5883484,.y=0.27407837,.pressure=0.014465332}}},
-.{.t=2935187861,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.5866394,.y=0.27478027,.pressure=0.01586914}}},
-.{.t=2935191171,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.58551025,.y=0.2756958,.pressure=0.015045166}}},
-.{.t=2946370475,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.5841675,.y=0.27648926,.pressure=0.01727295}}},
-.{.t=2946379375,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.5830078,.y=0.27764893,.pressure=0.0184021}}},
-.{.t=2957467849,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.5821533,.y=0.278656,.pressure=0.01953125}}},
-.{.t=2957477449,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.5817566,.y=0.28030396,.pressure=0.016998291}}},
-.{.t=2957483529,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.58148193,.y=0.28225708,.pressure=0.015319824}}},
-.{.t=2968627182,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.5809021,.y=0.2843933,.pressure=0.01586914}}},
-.{.t=2968643772,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.580719,.y=0.28659058,.pressure=0.014190674}}},
-.{.t=2979684996,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.5805969,.y=0.28967285,.pressure=0.013641357}}},
-.{.t=2979694336,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.58026123,.y=0.29241943,.pressure=0.010559082}}},
-.{.t=2979699086,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.57995605,.y=0.29571533,.pressure=0.008575439}}},
-.{.t=2990715289,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.57958984,.y=0.29934692,.pressure=0.010253906}}},
-.{.t=2990723719,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.5793457,.y=0.30322266,.pressure=0.008300781}}},
-.{.t=3002153093,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.5791931,.y=0.30700684,.pressure=0.0060424805}}},
-.{.t=3002161152,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.5791931,.y=0.3117981,.pressure=0.0060424805}}},
-.{.t=3002165632,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.57958984,.y=0.3164673,.pressure=0.00491333}}},
-.{.t=3012982186,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.5806885,.y=0.3215027,.pressure=0.0068969727}}},
-.{.t=3012991236,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.5819702,.y=0.32669067,.pressure=0.0057678223}}},
-.{.t=3012998166,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.5845032,.y=0.3322754,.pressure=0.007446289}}},
-.{.t=3024201460,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.5869446,.y=0.33740234,.pressure=0.008026123}}},
-.{.t=3024208990,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.59017944,.y=0.34225464,.pressure=0.009155273}}},
-.{.t=3024211980,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.5932617,.y=0.34698486,.pressure=0.012237549}}},
-.{.t=3035025244,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.59643555,.y=0.3517456,.pressure=0.013366699}}},
-.{.t=3035031374,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.6001282,.y=0.35601807,.pressure=0.016998291}}},
-.{.t=3035034874,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.60409546,.y=0.3600464,.pressure=0.019805908}}},
-.{.t=3046541367,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.60775757,.y=0.36398315,.pressure=0.022338867}}},
-.{.t=3046548887,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.61169434,.y=0.36740112,.pressure=0.022613525}}},
-.{.t=3057532891,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.6154785,.y=0.37051392,.pressure=0.025146484}}},
-.{.t=3057540471,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.6194763,.y=0.37329102,.pressure=0.025421143}}},
-.{.t=3057545781,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.6232605,.y=0.3761902,.pressure=0.026000977}}},
-.{.t=3068735374,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.62753296,.y=0.3789673,.pressure=0.025421143}}},
-.{.t=3068748304,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.6313782,.y=0.3816223,.pressure=0.024017334}}},
-.{.t=3068754594,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.63513184,.y=0.38391113,.pressure=0.023742676}}},
-.{.t=3079554878,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.6390991,.y=0.38616943,.pressure=0.023468018}}},
-.{.t=3079563518,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.6433716,.y=0.38833618,.pressure=0.02178955}}},
-.{.t=3079568338,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.64767456,.y=0.39031982,.pressure=0.02319336}}},
-.{.t=3090741042,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.65234375,.y=0.3919983,.pressure=0.02319336}}},
-.{.t=3090749882,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.65689087,.y=0.39379883,.pressure=0.021209717}}},
-.{.t=3101724975,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.6610718,.y=0.39520264,.pressure=0.022888184}}},
-.{.t=3101732005,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.66574097,.y=0.39642334,.pressure=0.021484375}}},
-.{.t=3101735255,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.6701355,.y=0.3973999,.pressure=0.019805908}}},
-.{.t=3113361458,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.6748352,.y=0.39767456,.pressure=0.0206604}}},
-.{.t=3113368498,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.67944336,.y=0.39797974,.pressure=0.022613525}}},
-.{.t=3113372028,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.6838379,.y=0.39785767,.pressure=0.022338867}}},
-.{.t=3123796833,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.6879883,.y=0.3970642,.pressure=0.01953125}}},
-.{.t=3123803053,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.69177246,.y=0.39624023,.pressure=0.018127441}}},
-.{.t=3123806563,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.69555664,.y=0.39569092,.pressure=0.016998291}}},
-.{.t=3134998596,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.69888306,.y=0.3942871,.pressure=0.016998291}}},
-.{.t=3135007066,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7023926,.y=0.39257812,.pressure=0.017578125}}},
-.{.t=3135011336,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7060852,.y=0.39056396,.pressure=0.017578125}}},
-.{.t=3146195970,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7102051,.y=0.38861084,.pressure=0.015594482}}},
-.{.t=3146202620,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.715271,.y=0.386261,.pressure=0.014190674}}},
-.{.t=3157408853,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7234802,.y=0.38327026,.pressure=0.01586914}}},
-.{.t=3157418073,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.730896,.y=0.38006592,.pressure=0.01586914}}},
-.{.t=3157423313,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.73880005,.y=0.37652588,.pressure=0.016448975}}},
-.{.t=3168334437,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.74557495,.y=0.37350464,.pressure=0.017578125}}},
-.{.t=3168341357,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.75097656,.y=0.37020874,.pressure=0.016723633}}},
-.{.t=3168344697,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7561035,.y=0.36791992,.pressure=0.013916016}}},
-.{.t=3179518520,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.75982666,.y=0.36517334,.pressure=0.013061523}}},
-.{.t=3179524910,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7633362,.y=0.3623352,.pressure=0.013061523}}},
-.{.t=3179530860,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.765625,.y=0.35949707,.pressure=0.013641357}}},
-.{.t=3190702424,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7669678,.y=0.3564453,.pressure=0.012786865}}},
-.{.t=3190710904,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.76849365,.y=0.3536682,.pressure=0.011383057}}},
-.{.t=3201886237,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7687378,.y=0.35095215,.pressure=0.010559082}}},
-.{.t=3201895897,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7681885,.y=0.34838867,.pressure=0.009155273}}},
-.{.t=3201900097,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7668457,.y=0.34570312,.pressure=0.009155273}}},
-.{.t=3212919591,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7654724,.y=0.34277344,.pressure=0.008850098}}},
-.{.t=3212927311,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7631836,.y=0.34002686,.pressure=0.0066223145}}},
-.{.t=3212932591,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7612915,.y=0.3373413,.pressure=0.0040893555}}},
-.{.t=3224127654,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7590027,.y=0.33529663,.pressure=0.0043640137}}},
-.{.t=3224134564,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7567444,.y=0.33319092,.pressure=0.0024108887}}},
-.{.t=3224138834,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7541809,.y=0.3307495,.pressure=0.00491333}}},
-.{.t=3234961798,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.75216675,.y=0.32843018,.pressure=0.0038146973}}},
-.{.t=3234967628,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7489929,.y=0.32583618,.pressure=0.0038146973}}},
-.{.t=3234971398,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7467346,.y=0.32296753,.pressure=0.005218506}}},
-.{.t=3246367272,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7436218,.y=0.32019043,.pressure=0.0043640137}}},
-.{.t=3246376701,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7402649,.y=0.3173523,.pressure=0.0038146973}}},
-.{.t=3257870675,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.73721313,.y=0.31466675,.pressure=0.0018310547}}},
-.{.t=3257881104,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7336731,.y=0.31219482,.pressure=0.0024108887}}},
-.{.t=3257886264,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.73062134,.y=0.3100891,.pressure=0.0015563965}}},
-.{.t=3268291019,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.72720337,.y=0.30807495,.pressure=0.0007019043}}},
-.{.t=3268298969,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7241516,.y=0.30593872,.pressure=0.0015563965}}},
-.{.t=3268303569,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7213135,.y=0.30371094,.pressure=0.0035095215}}},
-.{.t=3279746522,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.71810913,.y=0.302063,.pressure=0.002960205}}},
-.{.t=3279757542,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.7147217,.y=0.30056763,.pressure=0.00491333}}},
-.{.t=3279762862,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.71087646,.y=0.29907227,.pressure=0.00491333}}},
-.{.t=3290574016,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.70751953,.y=0.29745483,.pressure=0.0040893555}}},
-.{.t=3290581596,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.70376587,.y=0.29592896,.pressure=0.0040893555}}},
-.{.t=3301750300,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.6994934,.y=0.2951355,.pressure=0.0038146973}}},
-.{.t=3301760370,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.6951904,.y=0.29397583,.pressure=0.005218506}}},
-.{.t=3301767410,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.6905823,.y=0.29284668,.pressure=0.00491333}}},
-.{.t=3312951293,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.685791,.y=0.29266357,.pressure=0.0068969727}}},
-.{.t=3312959893,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.68136597,.y=0.29257202,.pressure=0.005493164}}},
-.{.t=3312965373,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.6772461,.y=0.29229736,.pressure=0.0068969727}}},
-.{.t=3324079267,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.672699,.y=0.29318237,.pressure=0.004638672}}},
-.{.t=3324090337,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.66882324,.y=0.294281,.pressure=0.004638672}}},
-.{.t=3324095997,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.66537476,.y=0.29525757,.pressure=0.004638672}}},
-.{.t=3335061800,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.6620178,.y=0.2966919,.pressure=0.002960205}}},
-.{.t=3335068160,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.6590576,.y=0.29788208,.pressure=0.0007019043}}},
-.{.t=3335073750,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.up,.x=0.6562805,.y=0.29956055,.pressure=0}}},
-.{.t=3390587188,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.down,.x=0.6447449,.y=0.33596802,.pressure=0.0007019043}}},
-.{.t=3390593138,.pad=2,.ev=.{.touch=.{.touchpad=1,.finger=0,.phase=.motion,.x=0.6447754,.y=0.3406067,.pressure=0.0035095215}}},
+ .{ .t = 1557743788, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .down, .x = 0.48794556, .y = 0.3156128, .pressure = 0.0004272461 } } },
+ .{ .t = 1557747308, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.49105835, .y = 0.31570435, .pressure = 0.0015563965 } } },
+ .{ .t = 1568667061, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.49325562, .y = 0.31576538, .pressure = 0.004638672 } } },
+ .{ .t = 1568677161, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.49591064, .y = 0.31585693, .pressure = 0.0035095215 } } },
+ .{ .t = 1568682171, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.4988098, .y = 0.31588745, .pressure = 0.0026855469 } } },
+ .{ .t = 1579851545, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.50076294, .y = 0.31607056, .pressure = 0.004638672 } } },
+ .{ .t = 1579859265, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.50289917, .y = 0.31637573, .pressure = 0.0063171387 } } },
+ .{ .t = 1579863375, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.5050354, .y = 0.31655884, .pressure = 0.008026123 } } },
+ .{ .t = 1590959349, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.50717163, .y = 0.31655884, .pressure = 0.0063171387 } } },
+ .{ .t = 1590970369, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.50927734, .y = 0.31698608, .pressure = 0.0040893555 } } },
+ .{ .t = 1590975739, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.5108948, .y = 0.31750488, .pressure = 0.0038146973 } } },
+ .{ .t = 1601902982, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.5126953, .y = 0.31808472, .pressure = 0.005218506 } } },
+ .{ .t = 1601911482, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.51400757, .y = 0.318573, .pressure = 0.0066223145 } } },
+ .{ .t = 1613345665, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.51571655, .y = 0.31878662, .pressure = 0.007171631 } } },
+ .{ .t = 1613352235, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.51660156, .y = 0.31936646, .pressure = 0.0068969727 } } },
+ .{ .t = 1613356725, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.5178528, .y = 0.3199463, .pressure = 0.0066223145 } } },
+ .{ .t = 1624412039, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.5187378, .y = 0.3206787, .pressure = 0.0057678223 } } },
+ .{ .t = 1624425589, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.52023315, .y = 0.32138062, .pressure = 0.0043640137 } } },
+ .{ .t = 1624432009, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.5215454, .y = 0.3218689, .pressure = 0.0040893555 } } },
+ .{ .t = 1635289123, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.5227356, .y = 0.3222351, .pressure = 0.0018310547 } } },
+ .{ .t = 1635297503, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.52371216, .y = 0.3229065, .pressure = 0.0026855469 } } },
+ .{ .t = 1635301553, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.5246887, .y = 0.3234558, .pressure = 0.002105713 } } },
+ .{ .t = 1646425097, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.52545166, .y = 0.323761, .pressure = 0.0007019043 } } },
+ .{ .t = 1646433957, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .up, .x = 0.5263977, .y = 0.3241577, .pressure = 0 } } },
+ .{ .t = 1657611170, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .down, .x = 0.52749634, .y = 0.32489014, .pressure = 0.0004272461 } } },
+ .{ .t = 1657620700, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .up, .x = 0.52893066, .y = 0.32543945, .pressure = 0 } } },
+ .{ .t = 2568455904, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .down, .x = 0.71746826, .y = 0.4960022, .pressure = 0.0026855469 } } },
+ .{ .t = 2568464274, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.72143555, .y = 0.49996948, .pressure = 0.0032348633 } } },
+ .{ .t = 2568468384, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.72436523, .y = 0.5033264, .pressure = 0.004638672 } } },
+ .{ .t = 2579442397, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7271118, .y = 0.5065918, .pressure = 0.0066223145 } } },
+ .{ .t = 2579450697, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.73065186, .y = 0.51031494, .pressure = 0.008850098 } } },
+ .{ .t = 2579455357, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7350464, .y = 0.5145569, .pressure = 0.010253906 } } },
+ .{ .t = 2590631621, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.74017334, .y = 0.51916504, .pressure = 0.012512207 } } },
+ .{ .t = 2590639051, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7455139, .y = 0.52420044, .pressure = 0.014190674 } } },
+ .{ .t = 2601728264, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7537842, .y = 0.5307617, .pressure = 0.01727295 } } },
+ .{ .t = 2601737594, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.76501465, .y = 0.5390625, .pressure = 0.017852783 } } },
+ .{ .t = 2601745184, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7758789, .y = 0.54782104, .pressure = 0.017578125 } } },
+ .{ .t = 2612868798, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.78726196, .y = 0.55740356, .pressure = 0.018676758 } } },
+ .{ .t = 2612877548, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.79766846, .y = 0.56655884, .pressure = 0.016998291 } } },
+ .{ .t = 2612881858, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.8077698, .y = 0.57421875, .pressure = 0.016174316 } } },
+ .{ .t = 2624096121, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.81689453, .y = 0.5804138, .pressure = 0.0184021 } } },
+ .{ .t = 2624103861, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.8230896, .y = 0.58462524, .pressure = 0.017578125 } } },
+ .{ .t = 2624108371, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.8291321, .y = 0.58810425, .pressure = 0.016448975 } } },
+ .{ .t = 2635100225, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.8328247, .y = 0.5901184, .pressure = 0.015594482 } } },
+ .{ .t = 2635107345, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.835022, .y = 0.59017944, .pressure = 0.016174316 } } },
+ .{ .t = 2635111905, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.83724976, .y = 0.5899353, .pressure = 0.016174316 } } },
+ .{ .t = 2646151229, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.8390808, .y = 0.5890198, .pressure = 0.014770508 } } },
+ .{ .t = 2646160149, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.8404541, .y = 0.58709717, .pressure = 0.014190674 } } },
+ .{ .t = 2657358812, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.8408203, .y = 0.58535767, .pressure = 0.016448975 } } },
+ .{ .t = 2657364952, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.8411865, .y = 0.5831604, .pressure = 0.015045166 } } },
+ .{ .t = 2657368602, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.84106445, .y = 0.5809021, .pressure = 0.0184021 } } },
+ .{ .t = 2668497496, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.84155273, .y = 0.5791321, .pressure = 0.018676758 } } },
+ .{ .t = 2668503176, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.84198, .y = 0.5767517, .pressure = 0.0184021 } } },
+ .{ .t = 2679574619, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.8413696, .y = 0.5749817, .pressure = 0.01727295 } } },
+ .{ .t = 2679583429, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.8410034, .y = 0.57302856, .pressure = 0.015594482 } } },
+ .{ .t = 2679588959, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.8402405, .y = 0.57077026, .pressure = 0.016998291 } } },
+ .{ .t = 2690585493, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.83987427, .y = 0.5680237, .pressure = 0.017578125 } } },
+ .{ .t = 2690591573, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.8392639, .y = 0.5658264, .pressure = 0.016998291 } } },
+ .{ .t = 2701710277, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.8384094, .y = 0.56329346, .pressure = 0.015045166 } } },
+ .{ .t = 2701715427, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.8366089, .y = 0.5602722, .pressure = 0.012512207 } } },
+ .{ .t = 2701719287, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.8343506, .y = 0.55578613, .pressure = 0.013641357 } } },
+ .{ .t = 2712932260, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.8309326, .y = 0.5510254, .pressure = 0.012512207 } } },
+ .{ .t = 2712941600, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.8270569, .y = 0.54504395, .pressure = 0.013641357 } } },
+ .{ .t = 2712946870, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.82263184, .y = 0.53845215, .pressure = 0.012786865 } } },
+ .{ .t = 2724074464, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.8186035, .y = 0.5309448, .pressure = 0.012237549 } } },
+ .{ .t = 2724081034, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.8176575, .y = 0.5210266, .pressure = 0.011383057 } } },
+ .{ .t = 2724085114, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.8161926, .y = 0.5109863, .pressure = 0.010253906 } } },
+ .{ .t = 2735041467, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.81481934, .y = 0.49887085, .pressure = 0.008575439 } } },
+ .{ .t = 2735049697, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.8135681, .y = 0.48706055, .pressure = 0.0066223145 } } },
+ .{ .t = 2735053437, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.8110962, .y = 0.47451782, .pressure = 0.0066223145 } } },
+ .{ .t = 2746200461, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.8079529, .y = 0.46011353, .pressure = 0.008300781 } } },
+ .{ .t = 2746207531, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.8046875, .y = 0.44818115, .pressure = 0.008850098 } } },
+ .{ .t = 2757301144, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.8004761, .y = 0.4363098, .pressure = 0.010253906 } } },
+ .{ .t = 2757308574, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.796051, .y = 0.4248352, .pressure = 0.009979248 } } },
+ .{ .t = 2757312724, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.79104614, .y = 0.4133911, .pressure = 0.013366699 } } },
+ .{ .t = 2775948317, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.78637695, .y = 0.4032898, .pressure = 0.012237549 } } },
+ .{ .t = 2775958817, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.78131104, .y = 0.39471436, .pressure = 0.015045166 } } },
+ .{ .t = 2775962507, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7763977, .y = 0.38796997, .pressure = 0.016723633 } } },
+ .{ .t = 2775966007, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.77178955, .y = 0.38198853, .pressure = 0.018127441 } } },
+ .{ .t = 2775969667, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.76724243, .y = 0.37753296, .pressure = 0.019805908 } } },
+ .{ .t = 2779448262, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7628784, .y = 0.37338257, .pressure = 0.018127441 } } },
+ .{ .t = 2790559265, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.75909424, .y = 0.36990356, .pressure = 0.020935059 } } },
+ .{ .t = 2790566225, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.75512695, .y = 0.36654663, .pressure = 0.021484375 } } },
+ .{ .t = 2801688299, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7513733, .y = 0.36395264, .pressure = 0.020385742 } } },
+ .{ .t = 2801695099, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7475891, .y = 0.36190796, .pressure = 0.020385742 } } },
+ .{ .t = 2801697739, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.74487305, .y = 0.35958862, .pressure = 0.020385742 } } },
+ .{ .t = 2812906962, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.74191284, .y = 0.3572998, .pressure = 0.022888184 } } },
+ .{ .t = 2812918202, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7388611, .y = 0.35458374, .pressure = 0.022338867 } } },
+ .{ .t = 2812924662, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7357178, .y = 0.35250854, .pressure = 0.021209717 } } },
+ .{ .t = 2824054786, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7324829, .y = 0.3503418, .pressure = 0.021484375 } } },
+ .{ .t = 2824059786, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7289429, .y = 0.3484497, .pressure = 0.022888184 } } },
+ .{ .t = 2824063716, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.72506714, .y = 0.34591675, .pressure = 0.022613525 } } },
+ .{ .t = 2835063039, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7218323, .y = 0.34277344, .pressure = 0.02319336 } } },
+ .{ .t = 2835070099, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7174072, .y = 0.34020996, .pressure = 0.020080566 } } },
+ .{ .t = 2835075929, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.71273804, .y = 0.33743286, .pressure = 0.020080566 } } },
+ .{ .t = 2846116163, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7079773, .y = 0.3343506, .pressure = 0.018676758 } } },
+ .{ .t = 2846123943, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7023926, .y = 0.33081055, .pressure = 0.019805908 } } },
+ .{ .t = 2857453356, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.6963806, .y = 0.32598877, .pressure = 0.019805908 } } },
+ .{ .t = 2857460036, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.6892395, .y = 0.32144165, .pressure = 0.020935059 } } },
+ .{ .t = 2857466116, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.6821289, .y = 0.31661987, .pressure = 0.018127441 } } },
+ .{ .t = 2868624580, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.6739197, .y = 0.31192017, .pressure = 0.018676758 } } },
+ .{ .t = 2868632160, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.6664429, .y = 0.3072815, .pressure = 0.018981934 } } },
+ .{ .t = 2868637550, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.6587219, .y = 0.30307007, .pressure = 0.017578125 } } },
+ .{ .t = 2879637654, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.65133667, .y = 0.29888916, .pressure = 0.017852783 } } },
+ .{ .t = 2879646144, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.6444702, .y = 0.29452515, .pressure = 0.017852783 } } },
+ .{ .t = 2879653574, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.6372986, .y = 0.29092407, .pressure = 0.016174316 } } },
+ .{ .t = 2890493398, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.6305542, .y = 0.28729248, .pressure = 0.016448975 } } },
+ .{ .t = 2890500368, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.62493896, .y = 0.28427124, .pressure = 0.016448975 } } },
+ .{ .t = 2901904031, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.6192627, .y = 0.28234863, .pressure = 0.015594482 } } },
+ .{ .t = 2901913451, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.61428833, .y = 0.27990723, .pressure = 0.014190674 } } },
+ .{ .t = 2901920201, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.6097412, .y = 0.277771, .pressure = 0.013641357 } } },
+ .{ .t = 2913077524, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.6056824, .y = 0.27627563, .pressure = 0.013641357 } } },
+ .{ .t = 2913084054, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.6019287, .y = 0.27560425, .pressure = 0.012512207 } } },
+ .{ .t = 2913088274, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.5984192, .y = 0.27441406, .pressure = 0.011657715 } } },
+ .{ .t = 2924138128, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.59536743, .y = 0.27404785, .pressure = 0.011962891 } } },
+ .{ .t = 2924146018, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.5923767, .y = 0.27398682, .pressure = 0.013641357 } } },
+ .{ .t = 2924151648, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.5900574, .y = 0.2736206, .pressure = 0.013366699 } } },
+ .{ .t = 2935179332, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.5883484, .y = 0.27407837, .pressure = 0.014465332 } } },
+ .{ .t = 2935187861, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.5866394, .y = 0.27478027, .pressure = 0.01586914 } } },
+ .{ .t = 2935191171, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.58551025, .y = 0.2756958, .pressure = 0.015045166 } } },
+ .{ .t = 2946370475, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.5841675, .y = 0.27648926, .pressure = 0.01727295 } } },
+ .{ .t = 2946379375, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.5830078, .y = 0.27764893, .pressure = 0.0184021 } } },
+ .{ .t = 2957467849, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.5821533, .y = 0.278656, .pressure = 0.01953125 } } },
+ .{ .t = 2957477449, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.5817566, .y = 0.28030396, .pressure = 0.016998291 } } },
+ .{ .t = 2957483529, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.58148193, .y = 0.28225708, .pressure = 0.015319824 } } },
+ .{ .t = 2968627182, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.5809021, .y = 0.2843933, .pressure = 0.01586914 } } },
+ .{ .t = 2968643772, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.580719, .y = 0.28659058, .pressure = 0.014190674 } } },
+ .{ .t = 2979684996, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.5805969, .y = 0.28967285, .pressure = 0.013641357 } } },
+ .{ .t = 2979694336, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.58026123, .y = 0.29241943, .pressure = 0.010559082 } } },
+ .{ .t = 2979699086, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.57995605, .y = 0.29571533, .pressure = 0.008575439 } } },
+ .{ .t = 2990715289, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.57958984, .y = 0.29934692, .pressure = 0.010253906 } } },
+ .{ .t = 2990723719, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.5793457, .y = 0.30322266, .pressure = 0.008300781 } } },
+ .{ .t = 3002153093, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.5791931, .y = 0.30700684, .pressure = 0.0060424805 } } },
+ .{ .t = 3002161152, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.5791931, .y = 0.3117981, .pressure = 0.0060424805 } } },
+ .{ .t = 3002165632, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.57958984, .y = 0.3164673, .pressure = 0.00491333 } } },
+ .{ .t = 3012982186, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.5806885, .y = 0.3215027, .pressure = 0.0068969727 } } },
+ .{ .t = 3012991236, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.5819702, .y = 0.32669067, .pressure = 0.0057678223 } } },
+ .{ .t = 3012998166, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.5845032, .y = 0.3322754, .pressure = 0.007446289 } } },
+ .{ .t = 3024201460, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.5869446, .y = 0.33740234, .pressure = 0.008026123 } } },
+ .{ .t = 3024208990, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.59017944, .y = 0.34225464, .pressure = 0.009155273 } } },
+ .{ .t = 3024211980, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.5932617, .y = 0.34698486, .pressure = 0.012237549 } } },
+ .{ .t = 3035025244, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.59643555, .y = 0.3517456, .pressure = 0.013366699 } } },
+ .{ .t = 3035031374, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.6001282, .y = 0.35601807, .pressure = 0.016998291 } } },
+ .{ .t = 3035034874, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.60409546, .y = 0.3600464, .pressure = 0.019805908 } } },
+ .{ .t = 3046541367, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.60775757, .y = 0.36398315, .pressure = 0.022338867 } } },
+ .{ .t = 3046548887, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.61169434, .y = 0.36740112, .pressure = 0.022613525 } } },
+ .{ .t = 3057532891, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.6154785, .y = 0.37051392, .pressure = 0.025146484 } } },
+ .{ .t = 3057540471, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.6194763, .y = 0.37329102, .pressure = 0.025421143 } } },
+ .{ .t = 3057545781, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.6232605, .y = 0.3761902, .pressure = 0.026000977 } } },
+ .{ .t = 3068735374, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.62753296, .y = 0.3789673, .pressure = 0.025421143 } } },
+ .{ .t = 3068748304, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.6313782, .y = 0.3816223, .pressure = 0.024017334 } } },
+ .{ .t = 3068754594, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.63513184, .y = 0.38391113, .pressure = 0.023742676 } } },
+ .{ .t = 3079554878, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.6390991, .y = 0.38616943, .pressure = 0.023468018 } } },
+ .{ .t = 3079563518, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.6433716, .y = 0.38833618, .pressure = 0.02178955 } } },
+ .{ .t = 3079568338, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.64767456, .y = 0.39031982, .pressure = 0.02319336 } } },
+ .{ .t = 3090741042, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.65234375, .y = 0.3919983, .pressure = 0.02319336 } } },
+ .{ .t = 3090749882, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.65689087, .y = 0.39379883, .pressure = 0.021209717 } } },
+ .{ .t = 3101724975, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.6610718, .y = 0.39520264, .pressure = 0.022888184 } } },
+ .{ .t = 3101732005, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.66574097, .y = 0.39642334, .pressure = 0.021484375 } } },
+ .{ .t = 3101735255, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.6701355, .y = 0.3973999, .pressure = 0.019805908 } } },
+ .{ .t = 3113361458, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.6748352, .y = 0.39767456, .pressure = 0.0206604 } } },
+ .{ .t = 3113368498, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.67944336, .y = 0.39797974, .pressure = 0.022613525 } } },
+ .{ .t = 3113372028, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.6838379, .y = 0.39785767, .pressure = 0.022338867 } } },
+ .{ .t = 3123796833, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.6879883, .y = 0.3970642, .pressure = 0.01953125 } } },
+ .{ .t = 3123803053, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.69177246, .y = 0.39624023, .pressure = 0.018127441 } } },
+ .{ .t = 3123806563, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.69555664, .y = 0.39569092, .pressure = 0.016998291 } } },
+ .{ .t = 3134998596, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.69888306, .y = 0.3942871, .pressure = 0.016998291 } } },
+ .{ .t = 3135007066, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7023926, .y = 0.39257812, .pressure = 0.017578125 } } },
+ .{ .t = 3135011336, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7060852, .y = 0.39056396, .pressure = 0.017578125 } } },
+ .{ .t = 3146195970, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7102051, .y = 0.38861084, .pressure = 0.015594482 } } },
+ .{ .t = 3146202620, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.715271, .y = 0.386261, .pressure = 0.014190674 } } },
+ .{ .t = 3157408853, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7234802, .y = 0.38327026, .pressure = 0.01586914 } } },
+ .{ .t = 3157418073, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.730896, .y = 0.38006592, .pressure = 0.01586914 } } },
+ .{ .t = 3157423313, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.73880005, .y = 0.37652588, .pressure = 0.016448975 } } },
+ .{ .t = 3168334437, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.74557495, .y = 0.37350464, .pressure = 0.017578125 } } },
+ .{ .t = 3168341357, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.75097656, .y = 0.37020874, .pressure = 0.016723633 } } },
+ .{ .t = 3168344697, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7561035, .y = 0.36791992, .pressure = 0.013916016 } } },
+ .{ .t = 3179518520, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.75982666, .y = 0.36517334, .pressure = 0.013061523 } } },
+ .{ .t = 3179524910, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7633362, .y = 0.3623352, .pressure = 0.013061523 } } },
+ .{ .t = 3179530860, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.765625, .y = 0.35949707, .pressure = 0.013641357 } } },
+ .{ .t = 3190702424, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7669678, .y = 0.3564453, .pressure = 0.012786865 } } },
+ .{ .t = 3190710904, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.76849365, .y = 0.3536682, .pressure = 0.011383057 } } },
+ .{ .t = 3201886237, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7687378, .y = 0.35095215, .pressure = 0.010559082 } } },
+ .{ .t = 3201895897, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7681885, .y = 0.34838867, .pressure = 0.009155273 } } },
+ .{ .t = 3201900097, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7668457, .y = 0.34570312, .pressure = 0.009155273 } } },
+ .{ .t = 3212919591, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7654724, .y = 0.34277344, .pressure = 0.008850098 } } },
+ .{ .t = 3212927311, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7631836, .y = 0.34002686, .pressure = 0.0066223145 } } },
+ .{ .t = 3212932591, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7612915, .y = 0.3373413, .pressure = 0.0040893555 } } },
+ .{ .t = 3224127654, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7590027, .y = 0.33529663, .pressure = 0.0043640137 } } },
+ .{ .t = 3224134564, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7567444, .y = 0.33319092, .pressure = 0.0024108887 } } },
+ .{ .t = 3224138834, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7541809, .y = 0.3307495, .pressure = 0.00491333 } } },
+ .{ .t = 3234961798, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.75216675, .y = 0.32843018, .pressure = 0.0038146973 } } },
+ .{ .t = 3234967628, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7489929, .y = 0.32583618, .pressure = 0.0038146973 } } },
+ .{ .t = 3234971398, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7467346, .y = 0.32296753, .pressure = 0.005218506 } } },
+ .{ .t = 3246367272, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7436218, .y = 0.32019043, .pressure = 0.0043640137 } } },
+ .{ .t = 3246376701, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7402649, .y = 0.3173523, .pressure = 0.0038146973 } } },
+ .{ .t = 3257870675, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.73721313, .y = 0.31466675, .pressure = 0.0018310547 } } },
+ .{ .t = 3257881104, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7336731, .y = 0.31219482, .pressure = 0.0024108887 } } },
+ .{ .t = 3257886264, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.73062134, .y = 0.3100891, .pressure = 0.0015563965 } } },
+ .{ .t = 3268291019, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.72720337, .y = 0.30807495, .pressure = 0.0007019043 } } },
+ .{ .t = 3268298969, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7241516, .y = 0.30593872, .pressure = 0.0015563965 } } },
+ .{ .t = 3268303569, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7213135, .y = 0.30371094, .pressure = 0.0035095215 } } },
+ .{ .t = 3279746522, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.71810913, .y = 0.302063, .pressure = 0.002960205 } } },
+ .{ .t = 3279757542, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.7147217, .y = 0.30056763, .pressure = 0.00491333 } } },
+ .{ .t = 3279762862, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.71087646, .y = 0.29907227, .pressure = 0.00491333 } } },
+ .{ .t = 3290574016, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.70751953, .y = 0.29745483, .pressure = 0.0040893555 } } },
+ .{ .t = 3290581596, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.70376587, .y = 0.29592896, .pressure = 0.0040893555 } } },
+ .{ .t = 3301750300, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.6994934, .y = 0.2951355, .pressure = 0.0038146973 } } },
+ .{ .t = 3301760370, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.6951904, .y = 0.29397583, .pressure = 0.005218506 } } },
+ .{ .t = 3301767410, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.6905823, .y = 0.29284668, .pressure = 0.00491333 } } },
+ .{ .t = 3312951293, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.685791, .y = 0.29266357, .pressure = 0.0068969727 } } },
+ .{ .t = 3312959893, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.68136597, .y = 0.29257202, .pressure = 0.005493164 } } },
+ .{ .t = 3312965373, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.6772461, .y = 0.29229736, .pressure = 0.0068969727 } } },
+ .{ .t = 3324079267, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.672699, .y = 0.29318237, .pressure = 0.004638672 } } },
+ .{ .t = 3324090337, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.66882324, .y = 0.294281, .pressure = 0.004638672 } } },
+ .{ .t = 3324095997, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.66537476, .y = 0.29525757, .pressure = 0.004638672 } } },
+ .{ .t = 3335061800, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.6620178, .y = 0.2966919, .pressure = 0.002960205 } } },
+ .{ .t = 3335068160, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.6590576, .y = 0.29788208, .pressure = 0.0007019043 } } },
+ .{ .t = 3335073750, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .up, .x = 0.6562805, .y = 0.29956055, .pressure = 0 } } },
+ .{ .t = 3390587188, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .down, .x = 0.6447449, .y = 0.33596802, .pressure = 0.0007019043 } } },
+ .{ .t = 3390593138, .pad = 2, .ev = .{ .touch = .{ .touchpad = 1, .finger = 0, .phase = .motion, .x = 0.6447754, .y = 0.3406067, .pressure = 0.0035095215 } } },
} }
diff --git a/test/deck/schema.zig b/test/deck/schema.zig
index 782c829a..401e15e8 100644
--- a/test/deck/schema.zig
+++ b/test/deck/schema.zig
@@ -61,10 +61,8 @@ pub const Event = struct {
};
};
-pub fn parse(gpa: std.mem.Allocator, src: [:0]const u8) error{ OutOfMemory, ParseZon }!Recording {
- return std.zon.parse.fromSliceAlloc(Recording, gpa, src, null, .{});
-}
-
-pub fn free(gpa: std.mem.Allocator, rec: Recording) void {
- std.zon.parse.free(gpa, rec);
+/// The recording's slices live in `arena`.
+pub fn parse(gpa: std.mem.Allocator, arena: std.mem.Allocator, src: [:0]const u8) error{ OutOfMemory, ParseZon }!Recording {
+ var diagnostics: std.zon.parse.Diagnostics = undefined;
+ return std.zon.parse.fromSlice(Recording, .{ .gpa = gpa, .arena = arena, .source = src, .diagnostics = &diagnostics });
}
diff --git a/test/deck/triggers.zon b/test/deck/triggers.zon
index ad5f7656..8cac4b66 100644
--- a/test/deck/triggers.zon
+++ b/test/deck/triggers.zon
@@ -1,576 +1,576 @@
.{ .version = 1, .events = .{
-.{.t=3100837937,.pad=2,.ev=.{.axis=.{.idx=3,.value=997}}},
-.{.t=3100845387,.pad=2,.ev=.{.axis=.{.idx=0,.value=-829}}},
-.{.t=3100845387,.pad=2,.ev=.{.axis=.{.idx=1,.value=-1441}}},
-.{.t=3100845387,.pad=2,.ev=.{.axis=.{.idx=3,.value=1027}}},
-.{.t=3100849157,.pad=2,.ev=.{.axis=.{.idx=0,.value=-802}}},
-.{.t=3100849157,.pad=2,.ev=.{.axis=.{.idx=1,.value=-1411}}},
-.{.t=3100849157,.pad=2,.ev=.{.axis=.{.idx=3,.value=1057}}},
-.{.t=3111923010,.pad=2,.ev=.{.axis=.{.idx=0,.value=-829}}},
-.{.t=3111923010,.pad=2,.ev=.{.axis=.{.idx=1,.value=-1529}}},
-.{.t=3111923010,.pad=2,.ev=.{.axis=.{.idx=3,.value=1027}}},
-.{.t=3111936310,.pad=2,.ev=.{.axis=.{.idx=0,.value=-802}}},
-.{.t=3111936310,.pad=2,.ev=.{.axis=.{.idx=1,.value=-1323}}},
-.{.t=3111941850,.pad=2,.ev=.{.axis=.{.idx=1,.value=-1558}}},
-.{.t=3111941850,.pad=2,.ev=.{.axis=.{.idx=3,.value=997}}},
-.{.t=3123013224,.pad=2,.ev=.{.axis=.{.idx=0,.value=-829}}},
-.{.t=3123013224,.pad=2,.ev=.{.axis=.{.idx=1,.value=-1294}}},
-.{.t=3123013224,.pad=2,.ev=.{.axis=.{.idx=3,.value=1027}}},
-.{.t=3123021794,.pad=2,.ev=.{.axis=.{.idx=0,.value=-802}}},
-.{.t=3123021794,.pad=2,.ev=.{.axis=.{.idx=1,.value=-941}}},
-.{.t=3123021794,.pad=2,.ev=.{.axis=.{.idx=3,.value=997}}},
-.{.t=3134267607,.pad=2,.ev=.{.axis=.{.idx=5,.value=0}}},
-.{.t=3134267607,.pad=2,.ev=.{.axis=.{.idx=5,.value=214}}},
-.{.t=3134267607,.pad=2,.ev=.{.axis=.{.idx=0,.value=-829}}},
-.{.t=3134267607,.pad=2,.ev=.{.axis=.{.idx=1,.value=-647}}},
-.{.t=3134277137,.pad=2,.ev=.{.axis=.{.idx=5,.value=2674}}},
-.{.t=3134277137,.pad=2,.ev=.{.axis=.{.idx=0,.value=-802}}},
-.{.t=3134277137,.pad=2,.ev=.{.axis=.{.idx=1,.value=-500}}},
-.{.t=3134280727,.pad=2,.ev=.{.axis=.{.idx=5,.value=5436}}},
-.{.t=3134280727,.pad=2,.ev=.{.axis=.{.idx=0,.value=-829}}},
-.{.t=3134280727,.pad=2,.ev=.{.axis=.{.idx=1,.value=-206}}},
-.{.t=3134280727,.pad=2,.ev=.{.axis=.{.idx=3,.value=1027}}},
-.{.t=3146260210,.pad=2,.ev=.{.axis=.{.idx=5,.value=8198}}},
-.{.t=3146260210,.pad=2,.ev=.{.axis=.{.idx=0,.value=-774}}},
-.{.t=3146260210,.pad=2,.ev=.{.axis=.{.idx=1,.value=-176}}},
-.{.t=3146260210,.pad=2,.ev=.{.axis=.{.idx=3,.value=997}}},
-.{.t=3146270520,.pad=2,.ev=.{.axis=.{.idx=5,.value=11211}}},
-.{.t=3146270520,.pad=2,.ev=.{.axis=.{.idx=0,.value=-802}}},
-.{.t=3146270520,.pad=2,.ev=.{.axis=.{.idx=1,.value=-29}}},
-.{.t=3146274870,.pad=2,.ev=.{.axis=.{.idx=5,.value=13671}}},
-.{.t=3146274870,.pad=2,.ev=.{.axis=.{.idx=1,.value=86}}},
-.{.t=3146274870,.pad=2,.ev=.{.axis=.{.idx=3,.value=1027}}},
-.{.t=3156416215,.pad=2,.ev=.{.axis=.{.idx=5,.value=16432}}},
-.{.t=3156416215,.pad=2,.ev=.{.axis=.{.idx=0,.value=-829}}},
-.{.t=3156416215,.pad=2,.ev=.{.axis=.{.idx=1,.value=288}}},
-.{.t=3156416215,.pad=2,.ev=.{.axis=.{.idx=3,.value=997}}},
-.{.t=3156435465,.pad=2,.ev=.{.axis=.{.idx=5,.value=18893}}},
-.{.t=3156435465,.pad=2,.ev=.{.axis=.{.idx=0,.value=-802}}},
-.{.t=3156435465,.pad=2,.ev=.{.axis=.{.idx=1,.value=462}}},
-.{.t=3156441825,.pad=2,.ev=.{.axis=.{.idx=5,.value=21504}}},
-.{.t=3156441825,.pad=2,.ev=.{.axis=.{.idx=1,.value=491}}},
-.{.t=3156441825,.pad=2,.ev=.{.axis=.{.idx=3,.value=1057}}},
-.{.t=3167440508,.pad=2,.ev=.{.axis=.{.idx=5,.value=23915}}},
-.{.t=3167440508,.pad=2,.ev=.{.axis=.{.idx=1,.value=664}}},
-.{.t=3167440508,.pad=2,.ev=.{.axis=.{.idx=3,.value=1027}}},
-.{.t=3167449678,.pad=2,.ev=.{.axis=.{.idx=5,.value=26224}}},
-.{.t=3167449678,.pad=2,.ev=.{.axis=.{.idx=0,.value=-829}}},
-.{.t=3167449678,.pad=2,.ev=.{.axis=.{.idx=1,.value=779}}},
-.{.t=3167449678,.pad=2,.ev=.{.axis=.{.idx=3,.value=997}}},
-.{.t=3178634312,.pad=2,.ev=.{.axis=.{.idx=5,.value=28384}}},
-.{.t=3178634312,.pad=2,.ev=.{.axis=.{.idx=0,.value=-802}}},
-.{.t=3178634312,.pad=2,.ev=.{.axis=.{.idx=1,.value=837}}},
-.{.t=3178634312,.pad=2,.ev=.{.axis=.{.idx=3,.value=1027}}},
-.{.t=3178646332,.pad=2,.ev=.{.axis=.{.idx=5,.value=30593}}},
-.{.t=3178646332,.pad=2,.ev=.{.axis=.{.idx=0,.value=-829}}},
-.{.t=3178646332,.pad=2,.ev=.{.axis=.{.idx=3,.value=997}}},
-.{.t=3178651472,.pad=2,.ev=.{.axis=.{.idx=5,.value=32702}}},
-.{.t=3178651472,.pad=2,.ev=.{.axis=.{.idx=0,.value=-802}}},
-.{.t=3189737565,.pad=2,.ev=.{.axis=.{.idx=5,.value=32766}}},
-.{.t=3189737565,.pad=2,.ev=.{.axis=.{.idx=1,.value=924}}},
-.{.t=3189737565,.pad=2,.ev=.{.axis=.{.idx=3,.value=1027}}},
-.{.t=3189748175,.pad=2,.ev=.{.axis=.{.idx=3,.value=1057}}},
-.{.t=3189751215,.pad=2,.ev=.{.axis=.{.idx=1,.value=953}}},
-.{.t=3189751215,.pad=2,.ev=.{.axis=.{.idx=3,.value=1027}}},
-.{.t=3200899959,.pad=2,.ev=.{.axis=.{.idx=3,.value=997}}},
-.{.t=3200909349,.pad=2,.ev=.{.axis=.{.idx=0,.value=-774}}},
-.{.t=3200909349,.pad=2,.ev=.{.axis=.{.idx=1,.value=924}}},
-.{.t=3200914229,.pad=2,.ev=.{.axis=.{.idx=0,.value=-802}}},
-.{.t=3200914229,.pad=2,.ev=.{.axis=.{.idx=1,.value=953}}},
-.{.t=3200914229,.pad=2,.ev=.{.axis=.{.idx=3,.value=1027}}},
-.{.t=3212027402,.pad=2,.ev=.{.axis=.{.idx=0,.value=-829}}},
-.{.t=3212027402,.pad=2,.ev=.{.axis=.{.idx=1,.value=1010}}},
-.{.t=3212027402,.pad=2,.ev=.{.axis=.{.idx=3,.value=997}}},
-.{.t=3212033902,.pad=2,.ev=.{.axis=.{.idx=3,.value=1027}}},
-.{.t=3222960156,.pad=2,.ev=.{.axis=.{.idx=1,.value=981}}},
-.{.t=3222960156,.pad=2,.ev=.{.axis=.{.idx=3,.value=997}}},
-.{.t=3222967916,.pad=2,.ev=.{.axis=.{.idx=0,.value=-802}}},
-.{.t=3222967916,.pad=2,.ev=.{.axis=.{.idx=1,.value=953}}},
-.{.t=3222967916,.pad=2,.ev=.{.axis=.{.idx=3,.value=1087}}},
-.{.t=3234186130,.pad=2,.ev=.{.axis=.{.idx=0,.value=-857}}},
-.{.t=3234186130,.pad=2,.ev=.{.axis=.{.idx=1,.value=981}}},
-.{.t=3234186130,.pad=2,.ev=.{.axis=.{.idx=3,.value=1027}}},
-.{.t=3234194710,.pad=2,.ev=.{.axis=.{.idx=0,.value=-802}}},
-.{.t=3234194710,.pad=2,.ev=.{.axis=.{.idx=1,.value=953}}},
-.{.t=3234194710,.pad=2,.ev=.{.axis=.{.idx=3,.value=997}}},
-.{.t=3234198480,.pad=2,.ev=.{.axis=.{.idx=0,.value=-829}}},
-.{.t=3234198480,.pad=2,.ev=.{.axis=.{.idx=1,.value=1097}}},
-.{.t=3245272663,.pad=2,.ev=.{.axis=.{.idx=1,.value=1126}}},
-.{.t=3245272663,.pad=2,.ev=.{.axis=.{.idx=3,.value=1057}}},
-.{.t=3245280873,.pad=2,.ev=.{.axis=.{.idx=0,.value=-802}}},
-.{.t=3245280873,.pad=2,.ev=.{.axis=.{.idx=3,.value=997}}},
-.{.t=3245284263,.pad=2,.ev=.{.axis=.{.idx=1,.value=1097}}},
-.{.t=3245284263,.pad=2,.ev=.{.axis=.{.idx=3,.value=1027}}},
-.{.t=3256351647,.pad=2,.ev=.{.axis=.{.idx=0,.value=-829}}},
-.{.t=3256351647,.pad=2,.ev=.{.axis=.{.idx=3,.value=997}}},
-.{.t=3256361897,.pad=2,.ev=.{.axis=.{.idx=1,.value=1126}}},
-.{.t=3256361897,.pad=2,.ev=.{.axis=.{.idx=3,.value=1027}}},
-.{.t=3256366557,.pad=2,.ev=.{.axis=.{.idx=0,.value=-857}}},
-.{.t=3267453910,.pad=2,.ev=.{.axis=.{.idx=0,.value=-829}}},
-.{.t=3267461450,.pad=2,.ev=.{.axis=.{.idx=0,.value=-802}}},
-.{.t=3267461450,.pad=2,.ev=.{.axis=.{.idx=1,.value=1097}}},
-.{.t=3267461450,.pad=2,.ev=.{.axis=.{.idx=3,.value=1057}}},
-.{.t=3278671394,.pad=2,.ev=.{.axis=.{.idx=3,.value=1027}}},
-.{.t=3278679494,.pad=2,.ev=.{.axis=.{.idx=0,.value=-829}}},
-.{.t=3278679494,.pad=2,.ev=.{.axis=.{.idx=1,.value=1126}}},
-.{.t=3278679494,.pad=2,.ev=.{.axis=.{.idx=3,.value=997}}},
-.{.t=3278684284,.pad=2,.ev=.{.axis=.{.idx=1,.value=1097}}},
-.{.t=3289747017,.pad=2,.ev=.{.axis=.{.idx=0,.value=-802}}},
-.{.t=3289757957,.pad=2,.ev=.{.axis=.{.idx=0,.value=-774}}},
-.{.t=3289757957,.pad=2,.ev=.{.axis=.{.idx=1,.value=1068}}},
-.{.t=3289757957,.pad=2,.ev=.{.axis=.{.idx=3,.value=1057}}},
-.{.t=3289764977,.pad=2,.ev=.{.axis=.{.idx=0,.value=-829}}},
-.{.t=3289764977,.pad=2,.ev=.{.axis=.{.idx=3,.value=1027}}},
-.{.t=3300894251,.pad=2,.ev=.{.axis=.{.idx=0,.value=-802}}},
-.{.t=3300894251,.pad=2,.ev=.{.axis=.{.idx=3,.value=1057}}},
-.{.t=3300904161,.pad=2,.ev=.{.axis=.{.idx=0,.value=-829}}},
-.{.t=3300904161,.pad=2,.ev=.{.axis=.{.idx=3,.value=1027}}},
-.{.t=3300908771,.pad=2,.ev=.{.axis=.{.idx=3,.value=1057}}},
-.{.t=3312130554,.pad=2,.ev=.{.axis=.{.idx=0,.value=-802}}},
-.{.t=3312130554,.pad=2,.ev=.{.axis=.{.idx=1,.value=1039}}},
-.{.t=3312130554,.pad=2,.ev=.{.axis=.{.idx=3,.value=1027}}},
-.{.t=3312142164,.pad=2,.ev=.{.axis=.{.idx=3,.value=1057}}},
-.{.t=3312145624,.pad=2,.ev=.{.axis=.{.idx=0,.value=-829}}},
-.{.t=3312145624,.pad=2,.ev=.{.axis=.{.idx=1,.value=1068}}},
-.{.t=3312145624,.pad=2,.ev=.{.axis=.{.idx=3,.value=1027}}},
-.{.t=3323185928,.pad=2,.ev=.{.axis=.{.idx=0,.value=-802}}},
-.{.t=3323185928,.pad=2,.ev=.{.axis=.{.idx=1,.value=1039}}},
-.{.t=3323197438,.pad=2,.ev=.{.axis=.{.idx=1,.value=1010}}},
-.{.t=3334415941,.pad=2,.ev=.{.axis=.{.idx=0,.value=-829}}},
-.{.t=3334415941,.pad=2,.ev=.{.axis=.{.idx=3,.value=1057}}},
-.{.t=3334428191,.pad=2,.ev=.{.axis=.{.idx=0,.value=-802}}},
-.{.t=3334428191,.pad=2,.ev=.{.axis=.{.idx=3,.value=1027}}},
-.{.t=3334433441,.pad=2,.ev=.{.axis=.{.idx=0,.value=-829}}},
-.{.t=3345319335,.pad=2,.ev=.{.axis=.{.idx=0,.value=-802}}},
-.{.t=3345319335,.pad=2,.ev=.{.axis=.{.idx=1,.value=1039}}},
-.{.t=3345329665,.pad=2,.ev=.{.axis=.{.idx=0,.value=-774}}},
-.{.t=3345329665,.pad=2,.ev=.{.axis=.{.idx=1,.value=1010}}},
-.{.t=3345329665,.pad=2,.ev=.{.axis=.{.idx=3,.value=997}}},
-.{.t=3345334835,.pad=2,.ev=.{.axis=.{.idx=0,.value=-802}}},
-.{.t=3356434069,.pad=2,.ev=.{.axis=.{.idx=0,.value=-829}}},
-.{.t=3356434069,.pad=2,.ev=.{.axis=.{.idx=1,.value=1039}}},
-.{.t=3356434069,.pad=2,.ev=.{.axis=.{.idx=3,.value=1027}}},
-.{.t=3356449919,.pad=2,.ev=.{.axis=.{.idx=0,.value=-802}}},
-.{.t=3356449919,.pad=2,.ev=.{.axis=.{.idx=1,.value=1010}}},
-.{.t=3356449919,.pad=2,.ev=.{.axis=.{.idx=3,.value=997}}},
-.{.t=3367716072,.pad=2,.ev=.{.axis=.{.idx=0,.value=-857}}},
-.{.t=3367716072,.pad=2,.ev=.{.axis=.{.idx=1,.value=1068}}},
-.{.t=3367728332,.pad=2,.ev=.{.axis=.{.idx=0,.value=-829}}},
-.{.t=3367728332,.pad=2,.ev=.{.axis=.{.idx=1,.value=1039}}},
-.{.t=3367728332,.pad=2,.ev=.{.axis=.{.idx=3,.value=1027}}},
-.{.t=3367733692,.pad=2,.ev=.{.axis=.{.idx=0,.value=-802}}},
-.{.t=3367733692,.pad=2,.ev=.{.axis=.{.idx=1,.value=1010}}},
-.{.t=3367733692,.pad=2,.ev=.{.axis=.{.idx=3,.value=1057}}},
-.{.t=3378615526,.pad=2,.ev=.{.axis=.{.idx=3,.value=997}}},
-.{.t=3389836929,.pad=2,.ev=.{.axis=.{.idx=0,.value=-774}}},
-.{.t=3389836929,.pad=2,.ev=.{.axis=.{.idx=1,.value=981}}},
-.{.t=3389836929,.pad=2,.ev=.{.axis=.{.idx=3,.value=1027}}},
-.{.t=3389847129,.pad=2,.ev=.{.axis=.{.idx=5,.value=31648}}},
-.{.t=3389847129,.pad=2,.ev=.{.axis=.{.idx=0,.value=-802}}},
-.{.t=3389847129,.pad=2,.ev=.{.axis=.{.idx=1,.value=1010}}},
-.{.t=3389852719,.pad=2,.ev=.{.axis=.{.idx=5,.value=29137}}},
-.{.t=3389852719,.pad=2,.ev=.{.axis=.{.idx=1,.value=1039}}},
-.{.t=3401186593,.pad=2,.ev=.{.axis=.{.idx=5,.value=26074}}},
-.{.t=3401186593,.pad=2,.ev=.{.axis=.{.idx=0,.value=-829}}},
-.{.t=3401194003,.pad=2,.ev=.{.axis=.{.idx=5,.value=23262}}},
-.{.t=3401194003,.pad=2,.ev=.{.axis=.{.idx=0,.value=-802}}},
-.{.t=3401194003,.pad=2,.ev=.{.axis=.{.idx=1,.value=1010}}},
-.{.t=3401194003,.pad=2,.ev=.{.axis=.{.idx=3,.value=1057}}},
-.{.t=3401198713,.pad=2,.ev=.{.axis=.{.idx=5,.value=20349}}},
-.{.t=3401198713,.pad=2,.ev=.{.axis=.{.idx=3,.value=997}}},
-.{.t=3411932407,.pad=2,.ev=.{.axis=.{.idx=5,.value=17587}}},
-.{.t=3411932407,.pad=2,.ev=.{.axis=.{.idx=0,.value=-829}}},
-.{.t=3411932407,.pad=2,.ev=.{.axis=.{.idx=1,.value=1039}}},
-.{.t=3411941077,.pad=2,.ev=.{.axis=.{.idx=5,.value=15127}}},
-.{.t=3411941077,.pad=2,.ev=.{.axis=.{.idx=0,.value=-802}}},
-.{.t=3411941077,.pad=2,.ev=.{.axis=.{.idx=3,.value=1027}}},
-.{.t=3411944947,.pad=2,.ev=.{.axis=.{.idx=5,.value=12617}}},
-.{.t=3411944947,.pad=2,.ev=.{.axis=.{.idx=0,.value=-829}}},
-.{.t=3411944947,.pad=2,.ev=.{.axis=.{.idx=1,.value=953}}},
-.{.t=3411944947,.pad=2,.ev=.{.axis=.{.idx=3,.value=997}}},
-.{.t=3423178470,.pad=2,.ev=.{.axis=.{.idx=5,.value=10307}}},
-.{.t=3423178470,.pad=2,.ev=.{.axis=.{.idx=0,.value=-802}}},
-.{.t=3423178470,.pad=2,.ev=.{.axis=.{.idx=1,.value=924}}},
-.{.t=3423187080,.pad=2,.ev=.{.axis=.{.idx=5,.value=8298}}},
-.{.t=3423187080,.pad=2,.ev=.{.axis=.{.idx=1,.value=981}}},
-.{.t=3423187080,.pad=2,.ev=.{.axis=.{.idx=3,.value=1027}}},
-.{.t=3434307174,.pad=2,.ev=.{.axis=.{.idx=5,.value=6340}}},
-.{.t=3434307174,.pad=2,.ev=.{.axis=.{.idx=1,.value=924}}},
-.{.t=3434315334,.pad=2,.ev=.{.axis=.{.idx=5,.value=4532}}},
-.{.t=3434315334,.pad=2,.ev=.{.axis=.{.idx=3,.value=997}}},
-.{.t=3434318744,.pad=2,.ev=.{.axis=.{.idx=5,.value=2975}}},
-.{.t=3434318744,.pad=2,.ev=.{.axis=.{.idx=1,.value=866}}},
-.{.t=3445336427,.pad=2,.ev=.{.axis=.{.idx=5,.value=1067}}},
-.{.t=3445336427,.pad=2,.ev=.{.axis=.{.idx=1,.value=635}}},
-.{.t=3445344507,.pad=2,.ev=.{.axis=.{.idx=4,.value=446}}},
-.{.t=3445344507,.pad=2,.ev=.{.axis=.{.idx=5,.value=0}}},
-.{.t=3445344507,.pad=2,.ev=.{.axis=.{.idx=1,.value=346}}},
-.{.t=3445344507,.pad=2,.ev=.{.axis=.{.idx=3,.value=1027}}},
-.{.t=3445348567,.pad=2,.ev=.{.axis=.{.idx=4,.value=1854}}},
-.{.t=3445348567,.pad=2,.ev=.{.axis=.{.idx=1,.value=-59}}},
-.{.t=3456475621,.pad=2,.ev=.{.axis=.{.idx=4,.value=3310}}},
-.{.t=3456475621,.pad=2,.ev=.{.axis=.{.idx=1,.value=-176}}},
-.{.t=3456475621,.pad=2,.ev=.{.axis=.{.idx=3,.value=997}}},
-.{.t=3456483971,.pad=2,.ev=.{.axis=.{.idx=4,.value=4436}}},
-.{.t=3456483971,.pad=2,.ev=.{.axis=.{.idx=1,.value=-441}}},
-.{.t=3456487161,.pad=2,.ev=.{.axis=.{.idx=4,.value=5891}}},
-.{.t=3456487161,.pad=2,.ev=.{.axis=.{.idx=1,.value=-558}}},
-.{.t=22900269279,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1493}}},
-.{.t=22900269279,.pad=2,.ev=.{.axis=.{.idx=1,.value=981}}},
-.{.t=22900269279,.pad=2,.ev=.{.axis=.{.idx=3,.value=1087}}},
-.{.t=22900282319,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1465}}},
-.{.t=22900282319,.pad=2,.ev=.{.axis=.{.idx=1,.value=953}}},
-.{.t=22900282319,.pad=2,.ev=.{.axis=.{.idx=2,.value=-469}}},
-.{.t=22900282319,.pad=2,.ev=.{.axis=.{.idx=3,.value=1118}}},
-.{.t=22900288339,.pad=2,.ev=.{.axis=.{.idx=1,.value=981}}},
-.{.t=22900288339,.pad=2,.ev=.{.axis=.{.idx=2,.value=-439}}},
-.{.t=22900288339,.pad=2,.ev=.{.axis=.{.idx=3,.value=1087}}},
-.{.t=22911078513,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1438}}},
-.{.t=22911078513,.pad=2,.ev=.{.axis=.{.idx=1,.value=953}}},
-.{.t=22911078513,.pad=2,.ev=.{.axis=.{.idx=2,.value=-469}}},
-.{.t=22911090183,.pad=2,.ev=.{.axis=.{.idx=2,.value=-498}}},
-.{.t=22922174447,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1465}}},
-.{.t=22922174447,.pad=2,.ev=.{.axis=.{.idx=2,.value=-527}}},
-.{.t=22922174447,.pad=2,.ev=.{.axis=.{.idx=3,.value=1148}}},
-.{.t=22922182927,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1493}}},
-.{.t=22922182927,.pad=2,.ev=.{.axis=.{.idx=1,.value=981}}},
-.{.t=22922182927,.pad=2,.ev=.{.axis=.{.idx=2,.value=-498}}},
-.{.t=22922182927,.pad=2,.ev=.{.axis=.{.idx=3,.value=1118}}},
-.{.t=22922186907,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1465}}},
-.{.t=22933453380,.pad=2,.ev=.{.axis=.{.idx=2,.value=-469}}},
-.{.t=22933463530,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1438}}},
-.{.t=22933463530,.pad=2,.ev=.{.axis=.{.idx=1,.value=924}}},
-.{.t=22933463530,.pad=2,.ev=.{.axis=.{.idx=2,.value=-498}}},
-.{.t=22933463530,.pad=2,.ev=.{.axis=.{.idx=3,.value=1148}}},
-.{.t=22933469520,.pad=2,.ev=.{.axis=.{.idx=1,.value=953}}},
-.{.t=22933469520,.pad=2,.ev=.{.axis=.{.idx=2,.value=-469}}},
-.{.t=22933469520,.pad=2,.ev=.{.axis=.{.idx=3,.value=1118}}},
-.{.t=22944601464,.pad=2,.ev=.{.axis=.{.idx=2,.value=-439}}},
-.{.t=22944601464,.pad=2,.ev=.{.axis=.{.idx=3,.value=1087}}},
-.{.t=22944613874,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1465}}},
-.{.t=22944613874,.pad=2,.ev=.{.axis=.{.idx=2,.value=-469}}},
-.{.t=22944613874,.pad=2,.ev=.{.axis=.{.idx=3,.value=1118}}},
-.{.t=22944619754,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1438}}},
-.{.t=22955633677,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1493}}},
-.{.t=22955633677,.pad=2,.ev=.{.axis=.{.idx=1,.value=981}}},
-.{.t=22955633677,.pad=2,.ev=.{.axis=.{.idx=2,.value=-439}}},
-.{.t=22955633677,.pad=2,.ev=.{.axis=.{.idx=3,.value=1087}}},
-.{.t=22955647207,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1465}}},
-.{.t=22955647207,.pad=2,.ev=.{.axis=.{.idx=1,.value=953}}},
-.{.t=22955647207,.pad=2,.ev=.{.axis=.{.idx=2,.value=-498}}},
-.{.t=22955647207,.pad=2,.ev=.{.axis=.{.idx=3,.value=1148}}},
-.{.t=22955652047,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1438}}},
-.{.t=22955652047,.pad=2,.ev=.{.axis=.{.idx=3,.value=1118}}},
-.{.t=22966619841,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1465}}},
-.{.t=22966619841,.pad=2,.ev=.{.axis=.{.idx=2,.value=-469}}},
-.{.t=22966628121,.pad=2,.ev=.{.axis=.{.idx=1,.value=924}}},
-.{.t=22966628121,.pad=2,.ev=.{.axis=.{.idx=3,.value=1087}}},
-.{.t=22977745245,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1438}}},
-.{.t=22977745245,.pad=2,.ev=.{.axis=.{.idx=1,.value=953}}},
-.{.t=22977745245,.pad=2,.ev=.{.axis=.{.idx=2,.value=-498}}},
-.{.t=22977745245,.pad=2,.ev=.{.axis=.{.idx=3,.value=1148}}},
-.{.t=22977753905,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1465}}},
-.{.t=22977753905,.pad=2,.ev=.{.axis=.{.idx=2,.value=-469}}},
-.{.t=22977753905,.pad=2,.ev=.{.axis=.{.idx=3,.value=1118}}},
-.{.t=22977757525,.pad=2,.ev=.{.axis=.{.idx=2,.value=-439}}},
-.{.t=22988922908,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1438}}},
-.{.t=22988922908,.pad=2,.ev=.{.axis=.{.idx=1,.value=981}}},
-.{.t=22988936008,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1465}}},
-.{.t=22988936008,.pad=2,.ev=.{.axis=.{.idx=2,.value=-469}}},
-.{.t=22988940638,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1438}}},
-.{.t=22988940638,.pad=2,.ev=.{.axis=.{.idx=1,.value=953}}},
-.{.t=23000140672,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1465}}},
-.{.t=23000140672,.pad=2,.ev=.{.axis=.{.idx=2,.value=-498}}},
-.{.t=23000152872,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1438}}},
-.{.t=23000152872,.pad=2,.ev=.{.axis=.{.idx=1,.value=924}}},
-.{.t=23000152872,.pad=2,.ev=.{.axis=.{.idx=2,.value=-439}}},
-.{.t=23000152872,.pad=2,.ev=.{.axis=.{.idx=3,.value=1087}}},
-.{.t=23000158442,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1493}}},
-.{.t=23000158442,.pad=2,.ev=.{.axis=.{.idx=1,.value=953}}},
-.{.t=23000158442,.pad=2,.ev=.{.axis=.{.idx=2,.value=-410}}},
-.{.t=23011247285,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1438}}},
-.{.t=23011247285,.pad=2,.ev=.{.axis=.{.idx=2,.value=-439}}},
-.{.t=23011247285,.pad=2,.ev=.{.axis=.{.idx=3,.value=1057}}},
-.{.t=23011260265,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1465}}},
-.{.t=23011260265,.pad=2,.ev=.{.axis=.{.idx=2,.value=-469}}},
-.{.t=23011260265,.pad=2,.ev=.{.axis=.{.idx=3,.value=1118}}},
-.{.t=23022366569,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1438}}},
-.{.t=23022366569,.pad=2,.ev=.{.axis=.{.idx=1,.value=924}}},
-.{.t=23022366569,.pad=2,.ev=.{.axis=.{.idx=2,.value=-498}}},
-.{.t=23022366569,.pad=2,.ev=.{.axis=.{.idx=3,.value=1148}}},
-.{.t=23022380099,.pad=2,.ev=.{.axis=.{.idx=2,.value=-439}}},
-.{.t=23022380099,.pad=2,.ev=.{.axis=.{.idx=3,.value=1087}}},
-.{.t=23022385329,.pad=2,.ev=.{.axis=.{.idx=2,.value=-469}}},
-.{.t=23022385329,.pad=2,.ev=.{.axis=.{.idx=3,.value=1118}}},
-.{.t=23033207513,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1465}}},
-.{.t=23033207513,.pad=2,.ev=.{.axis=.{.idx=1,.value=953}}},
-.{.t=23033215483,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1438}}},
-.{.t=23033215483,.pad=2,.ev=.{.axis=.{.idx=1,.value=924}}},
-.{.t=23033215483,.pad=2,.ev=.{.axis=.{.idx=2,.value=-439}}},
-.{.t=23033215483,.pad=2,.ev=.{.axis=.{.idx=3,.value=1087}}},
-.{.t=23033219653,.pad=2,.ev=.{.axis=.{.idx=1,.value=953}}},
-.{.t=23044563226,.pad=2,.ev=.{.axis=.{.idx=1,.value=924}}},
-.{.t=23044563226,.pad=2,.ev=.{.axis=.{.idx=2,.value=-469}}},
-.{.t=23044563226,.pad=2,.ev=.{.axis=.{.idx=3,.value=1118}}},
-.{.t=23044572856,.pad=2,.ev=.{.axis=.{.idx=2,.value=-410}}},
-.{.t=23044572856,.pad=2,.ev=.{.axis=.{.idx=3,.value=1087}}},
-.{.t=23044576806,.pad=2,.ev=.{.axis=.{.idx=1,.value=953}}},
-.{.t=23044576806,.pad=2,.ev=.{.axis=.{.idx=2,.value=-469}}},
-.{.t=23044576806,.pad=2,.ev=.{.axis=.{.idx=3,.value=1118}}},
-.{.t=23055818709,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1465}}},
-.{.t=23055818709,.pad=2,.ev=.{.axis=.{.idx=3,.value=1087}}},
-.{.t=23055828779,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1438}}},
-.{.t=23055828779,.pad=2,.ev=.{.axis=.{.idx=1,.value=924}}},
-.{.t=23055828779,.pad=2,.ev=.{.axis=.{.idx=3,.value=1118}}},
-.{.t=23055832789,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1410}}},
-.{.t=23055832789,.pad=2,.ev=.{.axis=.{.idx=3,.value=1087}}},
-.{.t=23066680603,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1465}}},
-.{.t=23066680603,.pad=2,.ev=.{.axis=.{.idx=1,.value=953}}},
-.{.t=23066680603,.pad=2,.ev=.{.axis=.{.idx=3,.value=1118}}},
-.{.t=23066690143,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1493}}},
-.{.t=23066690143,.pad=2,.ev=.{.axis=.{.idx=1,.value=981}}},
-.{.t=23066690143,.pad=2,.ev=.{.axis=.{.idx=2,.value=-439}}},
-.{.t=23066690143,.pad=2,.ev=.{.axis=.{.idx=3,.value=1087}}},
-.{.t=23077703397,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1438}}},
-.{.t=23077703397,.pad=2,.ev=.{.axis=.{.idx=1,.value=924}}},
-.{.t=23077703397,.pad=2,.ev=.{.axis=.{.idx=3,.value=1118}}},
-.{.t=23077711687,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1465}}},
-.{.t=23077711687,.pad=2,.ev=.{.axis=.{.idx=1,.value=953}}},
-.{.t=23077711687,.pad=2,.ev=.{.axis=.{.idx=2,.value=-469}}},
-.{.t=23077715567,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1493}}},
-.{.t=23077715567,.pad=2,.ev=.{.axis=.{.idx=1,.value=981}}},
-.{.t=23077715567,.pad=2,.ev=.{.axis=.{.idx=2,.value=-439}}},
-.{.t=23077715567,.pad=2,.ev=.{.axis=.{.idx=3,.value=1087}}},
-.{.t=23088844720,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1438}}},
-.{.t=23088844720,.pad=2,.ev=.{.axis=.{.idx=1,.value=953}}},
-.{.t=23088844720,.pad=2,.ev=.{.axis=.{.idx=2,.value=-498}}},
-.{.t=23088844720,.pad=2,.ev=.{.axis=.{.idx=3,.value=1148}}},
-.{.t=23088853270,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1465}}},
-.{.t=23088853270,.pad=2,.ev=.{.axis=.{.idx=2,.value=-469}}},
-.{.t=23088853270,.pad=2,.ev=.{.axis=.{.idx=3,.value=1118}}},
-.{.t=23088856830,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1438}}},
-.{.t=23088856830,.pad=2,.ev=.{.axis=.{.idx=1,.value=924}}},
-.{.t=23088856830,.pad=2,.ev=.{.axis=.{.idx=2,.value=-439}}},
-.{.t=23100184994,.pad=2,.ev=.{.axis=.{.idx=1,.value=953}}},
-.{.t=23100184994,.pad=2,.ev=.{.axis=.{.idx=2,.value=-410}}},
-.{.t=23100184994,.pad=2,.ev=.{.axis=.{.idx=3,.value=1087}}},
-.{.t=23100197834,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1465}}},
-.{.t=23100202044,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1438}}},
-.{.t=23100202044,.pad=2,.ev=.{.axis=.{.idx=1,.value=924}}},
-.{.t=23100202044,.pad=2,.ev=.{.axis=.{.idx=2,.value=-439}}},
-.{.t=23111316337,.pad=2,.ev=.{.axis=.{.idx=2,.value=-410}}},
-.{.t=23111328087,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1465}}},
-.{.t=23111328087,.pad=2,.ev=.{.axis=.{.idx=2,.value=-439}}},
-.{.t=23122579831,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1438}}},
-.{.t=23122579831,.pad=2,.ev=.{.axis=.{.idx=2,.value=-498}}},
-.{.t=23122579831,.pad=2,.ev=.{.axis=.{.idx=3,.value=1118}}},
-.{.t=23122592031,.pad=2,.ev=.{.axis=.{.idx=1,.value=953}}},
-.{.t=23122592031,.pad=2,.ev=.{.axis=.{.idx=2,.value=-469}}},
-.{.t=23122595681,.pad=2,.ev=.{.axis=.{.idx=1,.value=924}}},
-.{.t=23122595681,.pad=2,.ev=.{.axis=.{.idx=2,.value=-439}}},
-.{.t=23122595681,.pad=2,.ev=.{.axis=.{.idx=3,.value=1087}}},
-.{.t=23133201565,.pad=2,.ev=.{.axis=.{.idx=1,.value=953}}},
-.{.t=23133205635,.pad=2,.ev=.{.axis=.{.idx=4,.value=728}}},
-.{.t=23133205635,.pad=2,.ev=.{.axis=.{.idx=1,.value=924}}},
-.{.t=23133205635,.pad=2,.ev=.{.axis=.{.idx=3,.value=1118}}},
-.{.t=23144628108,.pad=2,.ev=.{.axis=.{.idx=4,.value=3169}}},
-.{.t=23144628108,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1493}}},
-.{.t=23144628108,.pad=2,.ev=.{.axis=.{.idx=1,.value=953}}},
-.{.t=23144628108,.pad=2,.ev=.{.axis=.{.idx=2,.value=-410}}},
-.{.t=23144628108,.pad=2,.ev=.{.axis=.{.idx=3,.value=1087}}},
-.{.t=23144640728,.pad=2,.ev=.{.axis=.{.idx=4,.value=6314}}},
-.{.t=23144640728,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1465}}},
-.{.t=23144640728,.pad=2,.ev=.{.axis=.{.idx=2,.value=-469}}},
-.{.t=23144640728,.pad=2,.ev=.{.axis=.{.idx=3,.value=1118}}},
-.{.t=23144644338,.pad=2,.ev=.{.axis=.{.idx=4,.value=10679}}},
-.{.t=23144644338,.pad=2,.ev=.{.axis=.{.idx=1,.value=981}}},
-.{.t=23144644338,.pad=2,.ev=.{.axis=.{.idx=2,.value=-410}}},
-.{.t=23144644338,.pad=2,.ev=.{.axis=.{.idx=3,.value=1087}}},
-.{.t=23155757852,.pad=2,.ev=.{.axis=.{.idx=4,.value=16500}}},
-.{.t=23155757852,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1493}}},
-.{.t=23155757852,.pad=2,.ev=.{.axis=.{.idx=1,.value=953}}},
-.{.t=23155767512,.pad=2,.ev=.{.axis=.{.idx=4,.value=23682}}},
-.{.t=23155767512,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1438}}},
-.{.t=23155767512,.pad=2,.ev=.{.axis=.{.idx=1,.value=924}}},
-.{.t=23155773302,.pad=2,.ev=.{.axis=.{.idx=4,.value=32084}}},
-.{.t=23155773302,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1465}}},
-.{.t=23166856095,.pad=2,.ev=.{.axis=.{.idx=4,.value=32766}}},
-.{.t=23166856095,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1438}}},
-.{.t=23166856095,.pad=2,.ev=.{.axis=.{.idx=2,.value=-439}}},
-.{.t=23166869315,.pad=2,.ev=.{.axis=.{.idx=1,.value=953}}},
-.{.t=23166869315,.pad=2,.ev=.{.axis=.{.idx=3,.value=1118}}},
-.{.t=23177937079,.pad=2,.ev=.{.axis=.{.idx=1,.value=924}}},
-.{.t=23177937079,.pad=2,.ev=.{.axis=.{.idx=3,.value=1087}}},
-.{.t=23177947099,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1465}}},
-.{.t=23177947099,.pad=2,.ev=.{.axis=.{.idx=2,.value=-410}}},
-.{.t=23177950979,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1438}}},
-.{.t=23177950979,.pad=2,.ev=.{.axis=.{.idx=2,.value=-439}}},
-.{.t=23177950979,.pad=2,.ev=.{.axis=.{.idx=3,.value=1118}}},
-.{.t=23188909763,.pad=2,.ev=.{.axis=.{.idx=2,.value=-410}}},
-.{.t=23188909763,.pad=2,.ev=.{.axis=.{.idx=3,.value=1087}}},
-.{.t=23188919373,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1493}}},
-.{.t=23188919373,.pad=2,.ev=.{.axis=.{.idx=1,.value=981}}},
-.{.t=23188923533,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1465}}},
-.{.t=23188923533,.pad=2,.ev=.{.axis=.{.idx=1,.value=953}}},
-.{.t=23188923533,.pad=2,.ev=.{.axis=.{.idx=2,.value=-439}}},
-.{.t=23188923533,.pad=2,.ev=.{.axis=.{.idx=3,.value=1057}}},
-.{.t=23200341706,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1438}}},
-.{.t=23200341706,.pad=2,.ev=.{.axis=.{.idx=1,.value=924}}},
-.{.t=23200341706,.pad=2,.ev=.{.axis=.{.idx=3,.value=1087}}},
-.{.t=23200357446,.pad=2,.ev=.{.axis=.{.idx=2,.value=-469}}},
-.{.t=23200360546,.pad=2,.ev=.{.axis=.{.idx=1,.value=866}}},
-.{.t=23200360546,.pad=2,.ev=.{.axis=.{.idx=2,.value=-439}}},
-.{.t=23211356329,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1493}}},
-.{.t=23211356329,.pad=2,.ev=.{.axis=.{.idx=1,.value=895}}},
-.{.t=23211356329,.pad=2,.ev=.{.axis=.{.idx=3,.value=1057}}},
-.{.t=23211369469,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1438}}},
-.{.t=23211369469,.pad=2,.ev=.{.axis=.{.idx=1,.value=808}}},
-.{.t=23211369469,.pad=2,.ev=.{.axis=.{.idx=2,.value=-469}}},
-.{.t=23211369469,.pad=2,.ev=.{.axis=.{.idx=3,.value=1118}}},
-.{.t=23222496653,.pad=2,.ev=.{.axis=.{.idx=1,.value=722}}},
-.{.t=23222496653,.pad=2,.ev=.{.axis=.{.idx=2,.value=-410}}},
-.{.t=23222496653,.pad=2,.ev=.{.axis=.{.idx=3,.value=1057}}},
-.{.t=23222508723,.pad=2,.ev=.{.axis=.{.idx=1,.value=664}}},
-.{.t=23222508723,.pad=2,.ev=.{.axis=.{.idx=2,.value=-439}}},
-.{.t=23222508723,.pad=2,.ev=.{.axis=.{.idx=3,.value=1087}}},
-.{.t=23222512923,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1465}}},
-.{.t=23222512923,.pad=2,.ev=.{.axis=.{.idx=1,.value=693}}},
-.{.t=23222512923,.pad=2,.ev=.{.axis=.{.idx=3,.value=1118}}},
-.{.t=23233616896,.pad=2,.ev=.{.axis=.{.idx=1,.value=404}}},
-.{.t=23233616896,.pad=2,.ev=.{.axis=.{.idx=3,.value=1087}}},
-.{.t=23233628876,.pad=2,.ev=.{.axis=.{.idx=1,.value=462}}},
-.{.t=23233628876,.pad=2,.ev=.{.axis=.{.idx=2,.value=-469}}},
-.{.t=23233628876,.pad=2,.ev=.{.axis=.{.idx=3,.value=1118}}},
-.{.t=23233634716,.pad=2,.ev=.{.axis=.{.idx=1,.value=375}}},
-.{.t=23233634716,.pad=2,.ev=.{.axis=.{.idx=2,.value=-439}}},
-.{.t=23244703810,.pad=2,.ev=.{.axis=.{.idx=1,.value=404}}},
-.{.t=23244703810,.pad=2,.ev=.{.axis=.{.idx=2,.value=-469}}},
-.{.t=23244703810,.pad=2,.ev=.{.axis=.{.idx=3,.value=1087}}},
-.{.t=23244716710,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1438}}},
-.{.t=23244716710,.pad=2,.ev=.{.axis=.{.idx=1,.value=288}}},
-.{.t=23244716710,.pad=2,.ev=.{.axis=.{.idx=2,.value=-439}}},
-.{.t=23244722470,.pad=2,.ev=.{.axis=.{.idx=1,.value=317}}},
-.{.t=23255891634,.pad=2,.ev=.{.axis=.{.idx=1,.value=260}}},
-.{.t=23255891634,.pad=2,.ev=.{.axis=.{.idx=2,.value=-469}}},
-.{.t=23255903964,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1410}}},
-.{.t=23255903964,.pad=2,.ev=.{.axis=.{.idx=1,.value=144}}},
-.{.t=23255903964,.pad=2,.ev=.{.axis=.{.idx=3,.value=1057}}},
-.{.t=23255909564,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1465}}},
-.{.t=23255909564,.pad=2,.ev=.{.axis=.{.idx=1,.value=115}}},
-.{.t=23266911057,.pad=2,.ev=.{.axis=.{.idx=4,.value=30723}}},
-.{.t=23266911057,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1438}}},
-.{.t=23266911057,.pad=2,.ev=.{.axis=.{.idx=1,.value=86}}},
-.{.t=23266924047,.pad=2,.ev=.{.axis=.{.idx=4,.value=27437}}},
-.{.t=23266924047,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1465}}},
-.{.t=23266924047,.pad=2,.ev=.{.axis=.{.idx=1,.value=115}}},
-.{.t=23266924047,.pad=2,.ev=.{.axis=.{.idx=3,.value=1087}}},
-.{.t=23278235081,.pad=2,.ev=.{.axis=.{.idx=4,.value=24292}}},
-.{.t=23278235081,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1438}}},
-.{.t=23278235081,.pad=2,.ev=.{.axis=.{.idx=1,.value=29}}},
-.{.t=23278246901,.pad=2,.ev=.{.axis=.{.idx=4,.value=21053}}},
-.{.t=23278246901,.pad=2,.ev=.{.axis=.{.idx=1,.value=57}}},
-.{.t=23278246901,.pad=2,.ev=.{.axis=.{.idx=2,.value=-439}}},
-.{.t=23278246901,.pad=2,.ev=.{.axis=.{.idx=3,.value=1057}}},
-.{.t=23278254110,.pad=2,.ev=.{.axis=.{.idx=4,.value=17814}}},
-.{.t=23278254110,.pad=2,.ev=.{.axis=.{.idx=1,.value=86}}},
-.{.t=23278254110,.pad=2,.ev=.{.axis=.{.idx=2,.value=-498}}},
-.{.t=23278254110,.pad=2,.ev=.{.axis=.{.idx=3,.value=1087}}},
-.{.t=23289217094,.pad=2,.ev=.{.axis=.{.idx=4,.value=14341}}},
-.{.t=23289217094,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1465}}},
-.{.t=23289217094,.pad=2,.ev=.{.axis=.{.idx=1,.value=144}}},
-.{.t=23289217094,.pad=2,.ev=.{.axis=.{.idx=2,.value=-469}}},
-.{.t=23289217094,.pad=2,.ev=.{.axis=.{.idx=3,.value=1057}}},
-.{.t=23289231434,.pad=2,.ev=.{.axis=.{.idx=4,.value=11384}}},
-.{.t=23289231434,.pad=2,.ev=.{.axis=.{.idx=1,.value=57}}},
-.{.t=23289236534,.pad=2,.ev=.{.axis=.{.idx=4,.value=8708}}},
-.{.t=23289236534,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1438}}},
-.{.t=23289236534,.pad=2,.ev=.{.axis=.{.idx=1,.value=0}}},
-.{.t=23300340478,.pad=2,.ev=.{.axis=.{.idx=4,.value=6126}}},
-.{.t=23300340478,.pad=2,.ev=.{.axis=.{.idx=2,.value=-439}}},
-.{.t=23300350538,.pad=2,.ev=.{.axis=.{.idx=4,.value=4014}}},
-.{.t=23300350538,.pad=2,.ev=.{.axis=.{.idx=1,.value=86}}},
-.{.t=23300354158,.pad=2,.ev=.{.axis=.{.idx=4,.value=2465}}},
-.{.t=23300354158,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1410}}},
-.{.t=23300354158,.pad=2,.ev=.{.axis=.{.idx=1,.value=288}}},
-.{.t=23311366832,.pad=2,.ev=.{.axis=.{.idx=4,.value=634}}},
-.{.t=23311366832,.pad=2,.ev=.{.axis=.{.idx=1,.value=462}}},
-.{.t=23311366832,.pad=2,.ev=.{.axis=.{.idx=3,.value=1027}}},
-.{.t=23311379542,.pad=2,.ev=.{.axis=.{.idx=4,.value=0}}},
-.{.t=23311379542,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1355}}},
-.{.t=23311379542,.pad=2,.ev=.{.axis=.{.idx=1,.value=779}}},
-.{.t=23311379542,.pad=2,.ev=.{.axis=.{.idx=2,.value=-410}}},
-.{.t=23322638775,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1272}}},
-.{.t=23322638775,.pad=2,.ev=.{.axis=.{.idx=1,.value=953}}},
-.{.t=23322638775,.pad=2,.ev=.{.axis=.{.idx=2,.value=-439}}},
-.{.t=23322649765,.pad=2,.ev=.{.axis=.{.idx=0,.value=-1051}}},
-.{.t=23322649765,.pad=2,.ev=.{.axis=.{.idx=1,.value=981}}},
-.{.t=23322649765,.pad=2,.ev=.{.axis=.{.idx=3,.value=1057}}},
-.{.t=23322654995,.pad=2,.ev=.{.axis=.{.idx=0,.value=-885}}},
-.{.t=23322654995,.pad=2,.ev=.{.axis=.{.idx=1,.value=1039}}},
-.{.t=23333351109,.pad=2,.ev=.{.axis=.{.idx=0,.value=-691}}},
-.{.t=23333351109,.pad=2,.ev=.{.axis=.{.idx=2,.value=-469}}},
-.{.t=23333359049,.pad=2,.ev=.{.axis=.{.idx=0,.value=-553}}},
-.{.t=23333359049,.pad=2,.ev=.{.axis=.{.idx=3,.value=1087}}},
-.{.t=23333362519,.pad=2,.ev=.{.axis=.{.idx=1,.value=1010}}},
-.{.t=23333362519,.pad=2,.ev=.{.axis=.{.idx=2,.value=-439}}},
-.{.t=23333362519,.pad=2,.ev=.{.axis=.{.idx=3,.value=1057}}},
-.{.t=23344695372,.pad=2,.ev=.{.axis=.{.idx=1,.value=981}}},
-.{.t=23344706662,.pad=2,.ev=.{.axis=.{.idx=0,.value=-525}}},
-.{.t=23344706662,.pad=2,.ev=.{.axis=.{.idx=1,.value=953}}},
-.{.t=23344711982,.pad=2,.ev=.{.axis=.{.idx=0,.value=-553}}},
-.{.t=23344711982,.pad=2,.ev=.{.axis=.{.idx=1,.value=981}}},
-.{.t=23355868326,.pad=2,.ev=.{.axis=.{.idx=0,.value=-498}}},
-.{.t=23355868326,.pad=2,.ev=.{.axis=.{.idx=1,.value=1010}}},
-.{.t=23355878956,.pad=2,.ev=.{.axis=.{.idx=0,.value=-525}}},
-.{.t=23355878956,.pad=2,.ev=.{.axis=.{.idx=1,.value=981}}},
-.{.t=23355878956,.pad=2,.ev=.{.axis=.{.idx=2,.value=-469}}},
-.{.t=23355878956,.pad=2,.ev=.{.axis=.{.idx=3,.value=1087}}},
-.{.t=23355884866,.pad=2,.ev=.{.axis=.{.idx=1,.value=1010}}},
-.{.t=23355884866,.pad=2,.ev=.{.axis=.{.idx=2,.value=-410}}},
-.{.t=23355884866,.pad=2,.ev=.{.axis=.{.idx=3,.value=1027}}},
-.{.t=23366942749,.pad=2,.ev=.{.axis=.{.idx=0,.value=-553}}},
-.{.t=23366952219,.pad=2,.ev=.{.axis=.{.idx=0,.value=-525}}},
-.{.t=23366952219,.pad=2,.ev=.{.axis=.{.idx=1,.value=981}}},
-.{.t=23366952219,.pad=2,.ev=.{.axis=.{.idx=2,.value=-439}}},
-.{.t=23366952219,.pad=2,.ev=.{.axis=.{.idx=3,.value=1057}}},
-.{.t=23378047613,.pad=2,.ev=.{.axis=.{.idx=0,.value=-553}}},
-.{.t=23378047613,.pad=2,.ev=.{.axis=.{.idx=1,.value=1010}}},
-.{.t=23378064723,.pad=2,.ev=.{.axis=.{.idx=0,.value=-525}}},
-.{.t=23378064723,.pad=2,.ev=.{.axis=.{.idx=1,.value=981}}},
-.{.t=23378064723,.pad=2,.ev=.{.axis=.{.idx=2,.value=-469}}},
-.{.t=23388957907,.pad=2,.ev=.{.axis=.{.idx=0,.value=-553}}},
-.{.t=23388957907,.pad=2,.ev=.{.axis=.{.idx=1,.value=1039}}},
-.{.t=23388957907,.pad=2,.ev=.{.axis=.{.idx=2,.value=-439}}},
-.{.t=23388957907,.pad=2,.ev=.{.axis=.{.idx=3,.value=1027}}},
-.{.t=23388967217,.pad=2,.ev=.{.axis=.{.idx=1,.value=1010}}},
-.{.t=23388967217,.pad=2,.ev=.{.axis=.{.idx=2,.value=-410}}},
-.{.t=23388970117,.pad=2,.ev=.{.axis=.{.idx=0,.value=-525}}},
-.{.t=23388970117,.pad=2,.ev=.{.axis=.{.idx=1,.value=981}}},
-.{.t=23388970117,.pad=2,.ev=.{.axis=.{.idx=2,.value=-439}}},
-.{.t=23388970117,.pad=2,.ev=.{.axis=.{.idx=3,.value=1057}}},
-.{.t=23400316180,.pad=2,.ev=.{.axis=.{.idx=2,.value=-469}}},
-.{.t=23400325960,.pad=2,.ev=.{.axis=.{.idx=0,.value=-580}}},
-.{.t=23400325960,.pad=2,.ev=.{.axis=.{.idx=1,.value=1039}}},
-.{.t=23400325960,.pad=2,.ev=.{.axis=.{.idx=2,.value=-410}}},
-.{.t=23400330510,.pad=2,.ev=.{.axis=.{.idx=0,.value=-525}}},
-.{.t=23400330510,.pad=2,.ev=.{.axis=.{.idx=1,.value=981}}},
-.{.t=23400330510,.pad=2,.ev=.{.axis=.{.idx=2,.value=-439}}},
-.{.t=23411327274,.pad=2,.ev=.{.axis=.{.idx=1,.value=1039}}},
-.{.t=23411337364,.pad=2,.ev=.{.axis=.{.idx=1,.value=1010}}},
-.{.t=23411337364,.pad=2,.ev=.{.axis=.{.idx=3,.value=1027}}},
-.{.t=23422593127,.pad=2,.ev=.{.axis=.{.idx=2,.value=-469}}},
-.{.t=23422593127,.pad=2,.ev=.{.axis=.{.idx=3,.value=1057}}},
-.{.t=23422603997,.pad=2,.ev=.{.axis=.{.idx=2,.value=-410}}},
-.{.t=23422603997,.pad=2,.ev=.{.axis=.{.idx=3,.value=1027}}},
-.{.t=23422607677,.pad=2,.ev=.{.axis=.{.idx=2,.value=-439}}},
-.{.t=23422607677,.pad=2,.ev=.{.axis=.{.idx=3,.value=1057}}},
-.{.t=23433465571,.pad=2,.ev=.{.axis=.{.idx=1,.value=1039}}},
-.{.t=23433465571,.pad=2,.ev=.{.axis=.{.idx=3,.value=1027}}},
-.{.t=23433473571,.pad=2,.ev=.{.axis=.{.idx=1,.value=1010}}},
-.{.t=23433473571,.pad=2,.ev=.{.axis=.{.idx=2,.value=-469}}},
-.{.t=23433473571,.pad=2,.ev=.{.axis=.{.idx=3,.value=1057}}},
-.{.t=23444613485,.pad=2,.ev=.{.axis=.{.idx=1,.value=1039}}},
-.{.t=23444623255,.pad=2,.ev=.{.axis=.{.idx=2,.value=-439}}},
-.{.t=23444626645,.pad=2,.ev=.{.axis=.{.idx=1,.value=1010}}},
-.{.t=23444626645,.pad=2,.ev=.{.axis=.{.idx=3,.value=1027}}},
+ .{ .t = 3100837937, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 997 } } },
+ .{ .t = 3100845387, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -829 } } },
+ .{ .t = 3100845387, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = -1441 } } },
+ .{ .t = 3100845387, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1027 } } },
+ .{ .t = 3100849157, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -802 } } },
+ .{ .t = 3100849157, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = -1411 } } },
+ .{ .t = 3100849157, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1057 } } },
+ .{ .t = 3111923010, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -829 } } },
+ .{ .t = 3111923010, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = -1529 } } },
+ .{ .t = 3111923010, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1027 } } },
+ .{ .t = 3111936310, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -802 } } },
+ .{ .t = 3111936310, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = -1323 } } },
+ .{ .t = 3111941850, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = -1558 } } },
+ .{ .t = 3111941850, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 997 } } },
+ .{ .t = 3123013224, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -829 } } },
+ .{ .t = 3123013224, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = -1294 } } },
+ .{ .t = 3123013224, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1027 } } },
+ .{ .t = 3123021794, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -802 } } },
+ .{ .t = 3123021794, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = -941 } } },
+ .{ .t = 3123021794, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 997 } } },
+ .{ .t = 3134267607, .pad = 2, .ev = .{ .axis = .{ .idx = 5, .value = 0 } } },
+ .{ .t = 3134267607, .pad = 2, .ev = .{ .axis = .{ .idx = 5, .value = 214 } } },
+ .{ .t = 3134267607, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -829 } } },
+ .{ .t = 3134267607, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = -647 } } },
+ .{ .t = 3134277137, .pad = 2, .ev = .{ .axis = .{ .idx = 5, .value = 2674 } } },
+ .{ .t = 3134277137, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -802 } } },
+ .{ .t = 3134277137, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = -500 } } },
+ .{ .t = 3134280727, .pad = 2, .ev = .{ .axis = .{ .idx = 5, .value = 5436 } } },
+ .{ .t = 3134280727, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -829 } } },
+ .{ .t = 3134280727, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = -206 } } },
+ .{ .t = 3134280727, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1027 } } },
+ .{ .t = 3146260210, .pad = 2, .ev = .{ .axis = .{ .idx = 5, .value = 8198 } } },
+ .{ .t = 3146260210, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -774 } } },
+ .{ .t = 3146260210, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = -176 } } },
+ .{ .t = 3146260210, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 997 } } },
+ .{ .t = 3146270520, .pad = 2, .ev = .{ .axis = .{ .idx = 5, .value = 11211 } } },
+ .{ .t = 3146270520, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -802 } } },
+ .{ .t = 3146270520, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = -29 } } },
+ .{ .t = 3146274870, .pad = 2, .ev = .{ .axis = .{ .idx = 5, .value = 13671 } } },
+ .{ .t = 3146274870, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 86 } } },
+ .{ .t = 3146274870, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1027 } } },
+ .{ .t = 3156416215, .pad = 2, .ev = .{ .axis = .{ .idx = 5, .value = 16432 } } },
+ .{ .t = 3156416215, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -829 } } },
+ .{ .t = 3156416215, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 288 } } },
+ .{ .t = 3156416215, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 997 } } },
+ .{ .t = 3156435465, .pad = 2, .ev = .{ .axis = .{ .idx = 5, .value = 18893 } } },
+ .{ .t = 3156435465, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -802 } } },
+ .{ .t = 3156435465, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 462 } } },
+ .{ .t = 3156441825, .pad = 2, .ev = .{ .axis = .{ .idx = 5, .value = 21504 } } },
+ .{ .t = 3156441825, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 491 } } },
+ .{ .t = 3156441825, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1057 } } },
+ .{ .t = 3167440508, .pad = 2, .ev = .{ .axis = .{ .idx = 5, .value = 23915 } } },
+ .{ .t = 3167440508, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 664 } } },
+ .{ .t = 3167440508, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1027 } } },
+ .{ .t = 3167449678, .pad = 2, .ev = .{ .axis = .{ .idx = 5, .value = 26224 } } },
+ .{ .t = 3167449678, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -829 } } },
+ .{ .t = 3167449678, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 779 } } },
+ .{ .t = 3167449678, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 997 } } },
+ .{ .t = 3178634312, .pad = 2, .ev = .{ .axis = .{ .idx = 5, .value = 28384 } } },
+ .{ .t = 3178634312, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -802 } } },
+ .{ .t = 3178634312, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 837 } } },
+ .{ .t = 3178634312, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1027 } } },
+ .{ .t = 3178646332, .pad = 2, .ev = .{ .axis = .{ .idx = 5, .value = 30593 } } },
+ .{ .t = 3178646332, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -829 } } },
+ .{ .t = 3178646332, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 997 } } },
+ .{ .t = 3178651472, .pad = 2, .ev = .{ .axis = .{ .idx = 5, .value = 32702 } } },
+ .{ .t = 3178651472, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -802 } } },
+ .{ .t = 3189737565, .pad = 2, .ev = .{ .axis = .{ .idx = 5, .value = 32766 } } },
+ .{ .t = 3189737565, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 924 } } },
+ .{ .t = 3189737565, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1027 } } },
+ .{ .t = 3189748175, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1057 } } },
+ .{ .t = 3189751215, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 953 } } },
+ .{ .t = 3189751215, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1027 } } },
+ .{ .t = 3200899959, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 997 } } },
+ .{ .t = 3200909349, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -774 } } },
+ .{ .t = 3200909349, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 924 } } },
+ .{ .t = 3200914229, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -802 } } },
+ .{ .t = 3200914229, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 953 } } },
+ .{ .t = 3200914229, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1027 } } },
+ .{ .t = 3212027402, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -829 } } },
+ .{ .t = 3212027402, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1010 } } },
+ .{ .t = 3212027402, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 997 } } },
+ .{ .t = 3212033902, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1027 } } },
+ .{ .t = 3222960156, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 981 } } },
+ .{ .t = 3222960156, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 997 } } },
+ .{ .t = 3222967916, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -802 } } },
+ .{ .t = 3222967916, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 953 } } },
+ .{ .t = 3222967916, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1087 } } },
+ .{ .t = 3234186130, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -857 } } },
+ .{ .t = 3234186130, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 981 } } },
+ .{ .t = 3234186130, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1027 } } },
+ .{ .t = 3234194710, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -802 } } },
+ .{ .t = 3234194710, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 953 } } },
+ .{ .t = 3234194710, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 997 } } },
+ .{ .t = 3234198480, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -829 } } },
+ .{ .t = 3234198480, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1097 } } },
+ .{ .t = 3245272663, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1126 } } },
+ .{ .t = 3245272663, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1057 } } },
+ .{ .t = 3245280873, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -802 } } },
+ .{ .t = 3245280873, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 997 } } },
+ .{ .t = 3245284263, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1097 } } },
+ .{ .t = 3245284263, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1027 } } },
+ .{ .t = 3256351647, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -829 } } },
+ .{ .t = 3256351647, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 997 } } },
+ .{ .t = 3256361897, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1126 } } },
+ .{ .t = 3256361897, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1027 } } },
+ .{ .t = 3256366557, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -857 } } },
+ .{ .t = 3267453910, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -829 } } },
+ .{ .t = 3267461450, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -802 } } },
+ .{ .t = 3267461450, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1097 } } },
+ .{ .t = 3267461450, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1057 } } },
+ .{ .t = 3278671394, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1027 } } },
+ .{ .t = 3278679494, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -829 } } },
+ .{ .t = 3278679494, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1126 } } },
+ .{ .t = 3278679494, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 997 } } },
+ .{ .t = 3278684284, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1097 } } },
+ .{ .t = 3289747017, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -802 } } },
+ .{ .t = 3289757957, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -774 } } },
+ .{ .t = 3289757957, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1068 } } },
+ .{ .t = 3289757957, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1057 } } },
+ .{ .t = 3289764977, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -829 } } },
+ .{ .t = 3289764977, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1027 } } },
+ .{ .t = 3300894251, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -802 } } },
+ .{ .t = 3300894251, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1057 } } },
+ .{ .t = 3300904161, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -829 } } },
+ .{ .t = 3300904161, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1027 } } },
+ .{ .t = 3300908771, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1057 } } },
+ .{ .t = 3312130554, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -802 } } },
+ .{ .t = 3312130554, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1039 } } },
+ .{ .t = 3312130554, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1027 } } },
+ .{ .t = 3312142164, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1057 } } },
+ .{ .t = 3312145624, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -829 } } },
+ .{ .t = 3312145624, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1068 } } },
+ .{ .t = 3312145624, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1027 } } },
+ .{ .t = 3323185928, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -802 } } },
+ .{ .t = 3323185928, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1039 } } },
+ .{ .t = 3323197438, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1010 } } },
+ .{ .t = 3334415941, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -829 } } },
+ .{ .t = 3334415941, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1057 } } },
+ .{ .t = 3334428191, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -802 } } },
+ .{ .t = 3334428191, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1027 } } },
+ .{ .t = 3334433441, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -829 } } },
+ .{ .t = 3345319335, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -802 } } },
+ .{ .t = 3345319335, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1039 } } },
+ .{ .t = 3345329665, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -774 } } },
+ .{ .t = 3345329665, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1010 } } },
+ .{ .t = 3345329665, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 997 } } },
+ .{ .t = 3345334835, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -802 } } },
+ .{ .t = 3356434069, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -829 } } },
+ .{ .t = 3356434069, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1039 } } },
+ .{ .t = 3356434069, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1027 } } },
+ .{ .t = 3356449919, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -802 } } },
+ .{ .t = 3356449919, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1010 } } },
+ .{ .t = 3356449919, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 997 } } },
+ .{ .t = 3367716072, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -857 } } },
+ .{ .t = 3367716072, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1068 } } },
+ .{ .t = 3367728332, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -829 } } },
+ .{ .t = 3367728332, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1039 } } },
+ .{ .t = 3367728332, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1027 } } },
+ .{ .t = 3367733692, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -802 } } },
+ .{ .t = 3367733692, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1010 } } },
+ .{ .t = 3367733692, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1057 } } },
+ .{ .t = 3378615526, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 997 } } },
+ .{ .t = 3389836929, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -774 } } },
+ .{ .t = 3389836929, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 981 } } },
+ .{ .t = 3389836929, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1027 } } },
+ .{ .t = 3389847129, .pad = 2, .ev = .{ .axis = .{ .idx = 5, .value = 31648 } } },
+ .{ .t = 3389847129, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -802 } } },
+ .{ .t = 3389847129, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1010 } } },
+ .{ .t = 3389852719, .pad = 2, .ev = .{ .axis = .{ .idx = 5, .value = 29137 } } },
+ .{ .t = 3389852719, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1039 } } },
+ .{ .t = 3401186593, .pad = 2, .ev = .{ .axis = .{ .idx = 5, .value = 26074 } } },
+ .{ .t = 3401186593, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -829 } } },
+ .{ .t = 3401194003, .pad = 2, .ev = .{ .axis = .{ .idx = 5, .value = 23262 } } },
+ .{ .t = 3401194003, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -802 } } },
+ .{ .t = 3401194003, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1010 } } },
+ .{ .t = 3401194003, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1057 } } },
+ .{ .t = 3401198713, .pad = 2, .ev = .{ .axis = .{ .idx = 5, .value = 20349 } } },
+ .{ .t = 3401198713, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 997 } } },
+ .{ .t = 3411932407, .pad = 2, .ev = .{ .axis = .{ .idx = 5, .value = 17587 } } },
+ .{ .t = 3411932407, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -829 } } },
+ .{ .t = 3411932407, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1039 } } },
+ .{ .t = 3411941077, .pad = 2, .ev = .{ .axis = .{ .idx = 5, .value = 15127 } } },
+ .{ .t = 3411941077, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -802 } } },
+ .{ .t = 3411941077, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1027 } } },
+ .{ .t = 3411944947, .pad = 2, .ev = .{ .axis = .{ .idx = 5, .value = 12617 } } },
+ .{ .t = 3411944947, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -829 } } },
+ .{ .t = 3411944947, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 953 } } },
+ .{ .t = 3411944947, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 997 } } },
+ .{ .t = 3423178470, .pad = 2, .ev = .{ .axis = .{ .idx = 5, .value = 10307 } } },
+ .{ .t = 3423178470, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -802 } } },
+ .{ .t = 3423178470, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 924 } } },
+ .{ .t = 3423187080, .pad = 2, .ev = .{ .axis = .{ .idx = 5, .value = 8298 } } },
+ .{ .t = 3423187080, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 981 } } },
+ .{ .t = 3423187080, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1027 } } },
+ .{ .t = 3434307174, .pad = 2, .ev = .{ .axis = .{ .idx = 5, .value = 6340 } } },
+ .{ .t = 3434307174, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 924 } } },
+ .{ .t = 3434315334, .pad = 2, .ev = .{ .axis = .{ .idx = 5, .value = 4532 } } },
+ .{ .t = 3434315334, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 997 } } },
+ .{ .t = 3434318744, .pad = 2, .ev = .{ .axis = .{ .idx = 5, .value = 2975 } } },
+ .{ .t = 3434318744, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 866 } } },
+ .{ .t = 3445336427, .pad = 2, .ev = .{ .axis = .{ .idx = 5, .value = 1067 } } },
+ .{ .t = 3445336427, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 635 } } },
+ .{ .t = 3445344507, .pad = 2, .ev = .{ .axis = .{ .idx = 4, .value = 446 } } },
+ .{ .t = 3445344507, .pad = 2, .ev = .{ .axis = .{ .idx = 5, .value = 0 } } },
+ .{ .t = 3445344507, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 346 } } },
+ .{ .t = 3445344507, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1027 } } },
+ .{ .t = 3445348567, .pad = 2, .ev = .{ .axis = .{ .idx = 4, .value = 1854 } } },
+ .{ .t = 3445348567, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = -59 } } },
+ .{ .t = 3456475621, .pad = 2, .ev = .{ .axis = .{ .idx = 4, .value = 3310 } } },
+ .{ .t = 3456475621, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = -176 } } },
+ .{ .t = 3456475621, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 997 } } },
+ .{ .t = 3456483971, .pad = 2, .ev = .{ .axis = .{ .idx = 4, .value = 4436 } } },
+ .{ .t = 3456483971, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = -441 } } },
+ .{ .t = 3456487161, .pad = 2, .ev = .{ .axis = .{ .idx = 4, .value = 5891 } } },
+ .{ .t = 3456487161, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = -558 } } },
+ .{ .t = 22900269279, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1493 } } },
+ .{ .t = 22900269279, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 981 } } },
+ .{ .t = 22900269279, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1087 } } },
+ .{ .t = 22900282319, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1465 } } },
+ .{ .t = 22900282319, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 953 } } },
+ .{ .t = 22900282319, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -469 } } },
+ .{ .t = 22900282319, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1118 } } },
+ .{ .t = 22900288339, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 981 } } },
+ .{ .t = 22900288339, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -439 } } },
+ .{ .t = 22900288339, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1087 } } },
+ .{ .t = 22911078513, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1438 } } },
+ .{ .t = 22911078513, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 953 } } },
+ .{ .t = 22911078513, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -469 } } },
+ .{ .t = 22911090183, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -498 } } },
+ .{ .t = 22922174447, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1465 } } },
+ .{ .t = 22922174447, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -527 } } },
+ .{ .t = 22922174447, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1148 } } },
+ .{ .t = 22922182927, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1493 } } },
+ .{ .t = 22922182927, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 981 } } },
+ .{ .t = 22922182927, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -498 } } },
+ .{ .t = 22922182927, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1118 } } },
+ .{ .t = 22922186907, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1465 } } },
+ .{ .t = 22933453380, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -469 } } },
+ .{ .t = 22933463530, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1438 } } },
+ .{ .t = 22933463530, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 924 } } },
+ .{ .t = 22933463530, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -498 } } },
+ .{ .t = 22933463530, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1148 } } },
+ .{ .t = 22933469520, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 953 } } },
+ .{ .t = 22933469520, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -469 } } },
+ .{ .t = 22933469520, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1118 } } },
+ .{ .t = 22944601464, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -439 } } },
+ .{ .t = 22944601464, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1087 } } },
+ .{ .t = 22944613874, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1465 } } },
+ .{ .t = 22944613874, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -469 } } },
+ .{ .t = 22944613874, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1118 } } },
+ .{ .t = 22944619754, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1438 } } },
+ .{ .t = 22955633677, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1493 } } },
+ .{ .t = 22955633677, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 981 } } },
+ .{ .t = 22955633677, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -439 } } },
+ .{ .t = 22955633677, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1087 } } },
+ .{ .t = 22955647207, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1465 } } },
+ .{ .t = 22955647207, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 953 } } },
+ .{ .t = 22955647207, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -498 } } },
+ .{ .t = 22955647207, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1148 } } },
+ .{ .t = 22955652047, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1438 } } },
+ .{ .t = 22955652047, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1118 } } },
+ .{ .t = 22966619841, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1465 } } },
+ .{ .t = 22966619841, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -469 } } },
+ .{ .t = 22966628121, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 924 } } },
+ .{ .t = 22966628121, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1087 } } },
+ .{ .t = 22977745245, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1438 } } },
+ .{ .t = 22977745245, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 953 } } },
+ .{ .t = 22977745245, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -498 } } },
+ .{ .t = 22977745245, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1148 } } },
+ .{ .t = 22977753905, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1465 } } },
+ .{ .t = 22977753905, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -469 } } },
+ .{ .t = 22977753905, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1118 } } },
+ .{ .t = 22977757525, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -439 } } },
+ .{ .t = 22988922908, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1438 } } },
+ .{ .t = 22988922908, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 981 } } },
+ .{ .t = 22988936008, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1465 } } },
+ .{ .t = 22988936008, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -469 } } },
+ .{ .t = 22988940638, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1438 } } },
+ .{ .t = 22988940638, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 953 } } },
+ .{ .t = 23000140672, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1465 } } },
+ .{ .t = 23000140672, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -498 } } },
+ .{ .t = 23000152872, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1438 } } },
+ .{ .t = 23000152872, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 924 } } },
+ .{ .t = 23000152872, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -439 } } },
+ .{ .t = 23000152872, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1087 } } },
+ .{ .t = 23000158442, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1493 } } },
+ .{ .t = 23000158442, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 953 } } },
+ .{ .t = 23000158442, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -410 } } },
+ .{ .t = 23011247285, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1438 } } },
+ .{ .t = 23011247285, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -439 } } },
+ .{ .t = 23011247285, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1057 } } },
+ .{ .t = 23011260265, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1465 } } },
+ .{ .t = 23011260265, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -469 } } },
+ .{ .t = 23011260265, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1118 } } },
+ .{ .t = 23022366569, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1438 } } },
+ .{ .t = 23022366569, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 924 } } },
+ .{ .t = 23022366569, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -498 } } },
+ .{ .t = 23022366569, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1148 } } },
+ .{ .t = 23022380099, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -439 } } },
+ .{ .t = 23022380099, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1087 } } },
+ .{ .t = 23022385329, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -469 } } },
+ .{ .t = 23022385329, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1118 } } },
+ .{ .t = 23033207513, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1465 } } },
+ .{ .t = 23033207513, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 953 } } },
+ .{ .t = 23033215483, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1438 } } },
+ .{ .t = 23033215483, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 924 } } },
+ .{ .t = 23033215483, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -439 } } },
+ .{ .t = 23033215483, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1087 } } },
+ .{ .t = 23033219653, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 953 } } },
+ .{ .t = 23044563226, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 924 } } },
+ .{ .t = 23044563226, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -469 } } },
+ .{ .t = 23044563226, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1118 } } },
+ .{ .t = 23044572856, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -410 } } },
+ .{ .t = 23044572856, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1087 } } },
+ .{ .t = 23044576806, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 953 } } },
+ .{ .t = 23044576806, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -469 } } },
+ .{ .t = 23044576806, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1118 } } },
+ .{ .t = 23055818709, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1465 } } },
+ .{ .t = 23055818709, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1087 } } },
+ .{ .t = 23055828779, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1438 } } },
+ .{ .t = 23055828779, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 924 } } },
+ .{ .t = 23055828779, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1118 } } },
+ .{ .t = 23055832789, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1410 } } },
+ .{ .t = 23055832789, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1087 } } },
+ .{ .t = 23066680603, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1465 } } },
+ .{ .t = 23066680603, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 953 } } },
+ .{ .t = 23066680603, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1118 } } },
+ .{ .t = 23066690143, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1493 } } },
+ .{ .t = 23066690143, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 981 } } },
+ .{ .t = 23066690143, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -439 } } },
+ .{ .t = 23066690143, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1087 } } },
+ .{ .t = 23077703397, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1438 } } },
+ .{ .t = 23077703397, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 924 } } },
+ .{ .t = 23077703397, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1118 } } },
+ .{ .t = 23077711687, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1465 } } },
+ .{ .t = 23077711687, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 953 } } },
+ .{ .t = 23077711687, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -469 } } },
+ .{ .t = 23077715567, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1493 } } },
+ .{ .t = 23077715567, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 981 } } },
+ .{ .t = 23077715567, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -439 } } },
+ .{ .t = 23077715567, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1087 } } },
+ .{ .t = 23088844720, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1438 } } },
+ .{ .t = 23088844720, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 953 } } },
+ .{ .t = 23088844720, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -498 } } },
+ .{ .t = 23088844720, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1148 } } },
+ .{ .t = 23088853270, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1465 } } },
+ .{ .t = 23088853270, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -469 } } },
+ .{ .t = 23088853270, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1118 } } },
+ .{ .t = 23088856830, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1438 } } },
+ .{ .t = 23088856830, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 924 } } },
+ .{ .t = 23088856830, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -439 } } },
+ .{ .t = 23100184994, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 953 } } },
+ .{ .t = 23100184994, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -410 } } },
+ .{ .t = 23100184994, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1087 } } },
+ .{ .t = 23100197834, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1465 } } },
+ .{ .t = 23100202044, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1438 } } },
+ .{ .t = 23100202044, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 924 } } },
+ .{ .t = 23100202044, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -439 } } },
+ .{ .t = 23111316337, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -410 } } },
+ .{ .t = 23111328087, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1465 } } },
+ .{ .t = 23111328087, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -439 } } },
+ .{ .t = 23122579831, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1438 } } },
+ .{ .t = 23122579831, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -498 } } },
+ .{ .t = 23122579831, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1118 } } },
+ .{ .t = 23122592031, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 953 } } },
+ .{ .t = 23122592031, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -469 } } },
+ .{ .t = 23122595681, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 924 } } },
+ .{ .t = 23122595681, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -439 } } },
+ .{ .t = 23122595681, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1087 } } },
+ .{ .t = 23133201565, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 953 } } },
+ .{ .t = 23133205635, .pad = 2, .ev = .{ .axis = .{ .idx = 4, .value = 728 } } },
+ .{ .t = 23133205635, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 924 } } },
+ .{ .t = 23133205635, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1118 } } },
+ .{ .t = 23144628108, .pad = 2, .ev = .{ .axis = .{ .idx = 4, .value = 3169 } } },
+ .{ .t = 23144628108, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1493 } } },
+ .{ .t = 23144628108, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 953 } } },
+ .{ .t = 23144628108, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -410 } } },
+ .{ .t = 23144628108, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1087 } } },
+ .{ .t = 23144640728, .pad = 2, .ev = .{ .axis = .{ .idx = 4, .value = 6314 } } },
+ .{ .t = 23144640728, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1465 } } },
+ .{ .t = 23144640728, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -469 } } },
+ .{ .t = 23144640728, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1118 } } },
+ .{ .t = 23144644338, .pad = 2, .ev = .{ .axis = .{ .idx = 4, .value = 10679 } } },
+ .{ .t = 23144644338, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 981 } } },
+ .{ .t = 23144644338, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -410 } } },
+ .{ .t = 23144644338, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1087 } } },
+ .{ .t = 23155757852, .pad = 2, .ev = .{ .axis = .{ .idx = 4, .value = 16500 } } },
+ .{ .t = 23155757852, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1493 } } },
+ .{ .t = 23155757852, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 953 } } },
+ .{ .t = 23155767512, .pad = 2, .ev = .{ .axis = .{ .idx = 4, .value = 23682 } } },
+ .{ .t = 23155767512, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1438 } } },
+ .{ .t = 23155767512, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 924 } } },
+ .{ .t = 23155773302, .pad = 2, .ev = .{ .axis = .{ .idx = 4, .value = 32084 } } },
+ .{ .t = 23155773302, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1465 } } },
+ .{ .t = 23166856095, .pad = 2, .ev = .{ .axis = .{ .idx = 4, .value = 32766 } } },
+ .{ .t = 23166856095, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1438 } } },
+ .{ .t = 23166856095, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -439 } } },
+ .{ .t = 23166869315, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 953 } } },
+ .{ .t = 23166869315, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1118 } } },
+ .{ .t = 23177937079, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 924 } } },
+ .{ .t = 23177937079, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1087 } } },
+ .{ .t = 23177947099, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1465 } } },
+ .{ .t = 23177947099, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -410 } } },
+ .{ .t = 23177950979, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1438 } } },
+ .{ .t = 23177950979, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -439 } } },
+ .{ .t = 23177950979, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1118 } } },
+ .{ .t = 23188909763, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -410 } } },
+ .{ .t = 23188909763, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1087 } } },
+ .{ .t = 23188919373, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1493 } } },
+ .{ .t = 23188919373, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 981 } } },
+ .{ .t = 23188923533, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1465 } } },
+ .{ .t = 23188923533, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 953 } } },
+ .{ .t = 23188923533, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -439 } } },
+ .{ .t = 23188923533, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1057 } } },
+ .{ .t = 23200341706, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1438 } } },
+ .{ .t = 23200341706, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 924 } } },
+ .{ .t = 23200341706, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1087 } } },
+ .{ .t = 23200357446, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -469 } } },
+ .{ .t = 23200360546, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 866 } } },
+ .{ .t = 23200360546, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -439 } } },
+ .{ .t = 23211356329, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1493 } } },
+ .{ .t = 23211356329, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 895 } } },
+ .{ .t = 23211356329, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1057 } } },
+ .{ .t = 23211369469, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1438 } } },
+ .{ .t = 23211369469, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 808 } } },
+ .{ .t = 23211369469, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -469 } } },
+ .{ .t = 23211369469, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1118 } } },
+ .{ .t = 23222496653, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 722 } } },
+ .{ .t = 23222496653, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -410 } } },
+ .{ .t = 23222496653, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1057 } } },
+ .{ .t = 23222508723, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 664 } } },
+ .{ .t = 23222508723, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -439 } } },
+ .{ .t = 23222508723, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1087 } } },
+ .{ .t = 23222512923, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1465 } } },
+ .{ .t = 23222512923, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 693 } } },
+ .{ .t = 23222512923, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1118 } } },
+ .{ .t = 23233616896, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 404 } } },
+ .{ .t = 23233616896, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1087 } } },
+ .{ .t = 23233628876, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 462 } } },
+ .{ .t = 23233628876, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -469 } } },
+ .{ .t = 23233628876, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1118 } } },
+ .{ .t = 23233634716, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 375 } } },
+ .{ .t = 23233634716, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -439 } } },
+ .{ .t = 23244703810, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 404 } } },
+ .{ .t = 23244703810, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -469 } } },
+ .{ .t = 23244703810, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1087 } } },
+ .{ .t = 23244716710, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1438 } } },
+ .{ .t = 23244716710, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 288 } } },
+ .{ .t = 23244716710, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -439 } } },
+ .{ .t = 23244722470, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 317 } } },
+ .{ .t = 23255891634, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 260 } } },
+ .{ .t = 23255891634, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -469 } } },
+ .{ .t = 23255903964, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1410 } } },
+ .{ .t = 23255903964, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 144 } } },
+ .{ .t = 23255903964, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1057 } } },
+ .{ .t = 23255909564, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1465 } } },
+ .{ .t = 23255909564, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 115 } } },
+ .{ .t = 23266911057, .pad = 2, .ev = .{ .axis = .{ .idx = 4, .value = 30723 } } },
+ .{ .t = 23266911057, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1438 } } },
+ .{ .t = 23266911057, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 86 } } },
+ .{ .t = 23266924047, .pad = 2, .ev = .{ .axis = .{ .idx = 4, .value = 27437 } } },
+ .{ .t = 23266924047, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1465 } } },
+ .{ .t = 23266924047, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 115 } } },
+ .{ .t = 23266924047, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1087 } } },
+ .{ .t = 23278235081, .pad = 2, .ev = .{ .axis = .{ .idx = 4, .value = 24292 } } },
+ .{ .t = 23278235081, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1438 } } },
+ .{ .t = 23278235081, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 29 } } },
+ .{ .t = 23278246901, .pad = 2, .ev = .{ .axis = .{ .idx = 4, .value = 21053 } } },
+ .{ .t = 23278246901, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 57 } } },
+ .{ .t = 23278246901, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -439 } } },
+ .{ .t = 23278246901, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1057 } } },
+ .{ .t = 23278254110, .pad = 2, .ev = .{ .axis = .{ .idx = 4, .value = 17814 } } },
+ .{ .t = 23278254110, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 86 } } },
+ .{ .t = 23278254110, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -498 } } },
+ .{ .t = 23278254110, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1087 } } },
+ .{ .t = 23289217094, .pad = 2, .ev = .{ .axis = .{ .idx = 4, .value = 14341 } } },
+ .{ .t = 23289217094, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1465 } } },
+ .{ .t = 23289217094, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 144 } } },
+ .{ .t = 23289217094, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -469 } } },
+ .{ .t = 23289217094, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1057 } } },
+ .{ .t = 23289231434, .pad = 2, .ev = .{ .axis = .{ .idx = 4, .value = 11384 } } },
+ .{ .t = 23289231434, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 57 } } },
+ .{ .t = 23289236534, .pad = 2, .ev = .{ .axis = .{ .idx = 4, .value = 8708 } } },
+ .{ .t = 23289236534, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1438 } } },
+ .{ .t = 23289236534, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 0 } } },
+ .{ .t = 23300340478, .pad = 2, .ev = .{ .axis = .{ .idx = 4, .value = 6126 } } },
+ .{ .t = 23300340478, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -439 } } },
+ .{ .t = 23300350538, .pad = 2, .ev = .{ .axis = .{ .idx = 4, .value = 4014 } } },
+ .{ .t = 23300350538, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 86 } } },
+ .{ .t = 23300354158, .pad = 2, .ev = .{ .axis = .{ .idx = 4, .value = 2465 } } },
+ .{ .t = 23300354158, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1410 } } },
+ .{ .t = 23300354158, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 288 } } },
+ .{ .t = 23311366832, .pad = 2, .ev = .{ .axis = .{ .idx = 4, .value = 634 } } },
+ .{ .t = 23311366832, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 462 } } },
+ .{ .t = 23311366832, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1027 } } },
+ .{ .t = 23311379542, .pad = 2, .ev = .{ .axis = .{ .idx = 4, .value = 0 } } },
+ .{ .t = 23311379542, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1355 } } },
+ .{ .t = 23311379542, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 779 } } },
+ .{ .t = 23311379542, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -410 } } },
+ .{ .t = 23322638775, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1272 } } },
+ .{ .t = 23322638775, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 953 } } },
+ .{ .t = 23322638775, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -439 } } },
+ .{ .t = 23322649765, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -1051 } } },
+ .{ .t = 23322649765, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 981 } } },
+ .{ .t = 23322649765, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1057 } } },
+ .{ .t = 23322654995, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -885 } } },
+ .{ .t = 23322654995, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1039 } } },
+ .{ .t = 23333351109, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -691 } } },
+ .{ .t = 23333351109, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -469 } } },
+ .{ .t = 23333359049, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -553 } } },
+ .{ .t = 23333359049, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1087 } } },
+ .{ .t = 23333362519, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1010 } } },
+ .{ .t = 23333362519, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -439 } } },
+ .{ .t = 23333362519, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1057 } } },
+ .{ .t = 23344695372, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 981 } } },
+ .{ .t = 23344706662, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -525 } } },
+ .{ .t = 23344706662, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 953 } } },
+ .{ .t = 23344711982, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -553 } } },
+ .{ .t = 23344711982, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 981 } } },
+ .{ .t = 23355868326, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -498 } } },
+ .{ .t = 23355868326, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1010 } } },
+ .{ .t = 23355878956, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -525 } } },
+ .{ .t = 23355878956, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 981 } } },
+ .{ .t = 23355878956, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -469 } } },
+ .{ .t = 23355878956, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1087 } } },
+ .{ .t = 23355884866, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1010 } } },
+ .{ .t = 23355884866, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -410 } } },
+ .{ .t = 23355884866, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1027 } } },
+ .{ .t = 23366942749, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -553 } } },
+ .{ .t = 23366952219, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -525 } } },
+ .{ .t = 23366952219, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 981 } } },
+ .{ .t = 23366952219, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -439 } } },
+ .{ .t = 23366952219, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1057 } } },
+ .{ .t = 23378047613, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -553 } } },
+ .{ .t = 23378047613, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1010 } } },
+ .{ .t = 23378064723, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -525 } } },
+ .{ .t = 23378064723, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 981 } } },
+ .{ .t = 23378064723, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -469 } } },
+ .{ .t = 23388957907, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -553 } } },
+ .{ .t = 23388957907, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1039 } } },
+ .{ .t = 23388957907, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -439 } } },
+ .{ .t = 23388957907, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1027 } } },
+ .{ .t = 23388967217, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1010 } } },
+ .{ .t = 23388967217, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -410 } } },
+ .{ .t = 23388970117, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -525 } } },
+ .{ .t = 23388970117, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 981 } } },
+ .{ .t = 23388970117, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -439 } } },
+ .{ .t = 23388970117, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1057 } } },
+ .{ .t = 23400316180, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -469 } } },
+ .{ .t = 23400325960, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -580 } } },
+ .{ .t = 23400325960, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1039 } } },
+ .{ .t = 23400325960, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -410 } } },
+ .{ .t = 23400330510, .pad = 2, .ev = .{ .axis = .{ .idx = 0, .value = -525 } } },
+ .{ .t = 23400330510, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 981 } } },
+ .{ .t = 23400330510, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -439 } } },
+ .{ .t = 23411327274, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1039 } } },
+ .{ .t = 23411337364, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1010 } } },
+ .{ .t = 23411337364, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1027 } } },
+ .{ .t = 23422593127, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -469 } } },
+ .{ .t = 23422593127, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1057 } } },
+ .{ .t = 23422603997, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -410 } } },
+ .{ .t = 23422603997, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1027 } } },
+ .{ .t = 23422607677, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -439 } } },
+ .{ .t = 23422607677, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1057 } } },
+ .{ .t = 23433465571, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1039 } } },
+ .{ .t = 23433465571, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1027 } } },
+ .{ .t = 23433473571, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1010 } } },
+ .{ .t = 23433473571, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -469 } } },
+ .{ .t = 23433473571, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1057 } } },
+ .{ .t = 23444613485, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1039 } } },
+ .{ .t = 23444623255, .pad = 2, .ev = .{ .axis = .{ .idx = 2, .value = -439 } } },
+ .{ .t = 23444626645, .pad = 2, .ev = .{ .axis = .{ .idx = 1, .value = 1010 } } },
+ .{ .t = 23444626645, .pad = 2, .ev = .{ .axis = .{ .idx = 3, .value = 1027 } } },
} }
diff --git a/test/e2e_harness.zig b/test/e2e_harness.zig
index f7f380df..a2010c19 100644
--- a/test/e2e_harness.zig
+++ b/test/e2e_harness.zig
@@ -64,6 +64,8 @@ pub const Harness = struct {
/// when true, print the captured screen state after each pump/waitFor and on
/// every assertion, so live test runs can be inspected (zig build test -Dtrace).
trace: bool = false,
+ /// How much of a `CSI 5 n` the output has ended on (`feed`).
+ status_request: u8 = 0,
/// every raw byte the app has emitted (accumulated in pump). Lets tests assert
/// on control sequences the emulator consumes and never renders (e.g. OSC 52
/// clipboard writes). Capture is bounded explicitly so a runaway child cannot
@@ -92,7 +94,7 @@ pub const Harness = struct {
const ws = posix.winsize{ .row = rows, .col = cols, .xpixel = 0, .ypixel = 0 };
const pid = forkpty(&master, null, null, &ws);
if (pid == 0) {
- for ([_][*:0]const u8{ "PARDES_9P", "PARDES_PANE", "PARDES_FORWARD_LOOK" }) |name|
+ for ([_][*:0]const u8{ "PARDES_PID", "PARDES_9P", "PARDES_PANE" }) |name|
if (unsetenv(name) != 0) _exit(126);
_ = execvp(exe, argv.ptr);
_exit(127);
@@ -102,7 +104,7 @@ pub const Harness = struct {
term.* = try ghostty_vt.Terminal.init(std.Io.Threaded.global_single_threaded.io(), gpa, .{
.cols = cols,
.rows = rows,
- .max_scrollback = 1024 * 1024,
+ .max_scrollback_bytes = 1024 * 1024,
});
errdefer term.deinit(gpa);
// vtStream() captures a pointer to `term`; term is heap-allocated so the
@@ -147,6 +149,24 @@ pub const Harness = struct {
/// Read pty output and feed it to our ghostty terminal for `ms` ms. After
/// this, the grid reflects everything the app rendered so far.
+ /// The app's output into the emulator. The one query answered is the
+ /// device status request (`CSI 5 n` → `CSI 0 n`), as every terminal
+ /// does: the tty asks it after each frame and draws no other until the
+ /// answer (FrameAck in src/tty/tty.zig).
+ fn feed(self: *Harness, bytes: []const u8) void {
+ self.stream.nextSlice(bytes);
+ const request = "\x1b[5n";
+ for (bytes) |b| {
+ if (b == request[self.status_request]) {
+ self.status_request += 1;
+ } else self.status_request = if (b == 0x1b) 1 else 0;
+ if (self.status_request == request.len) {
+ self.status_request = 0;
+ _ = libc.write(self.master, "\x1b[0n", 4);
+ }
+ }
+ }
+
pub fn pump(self: *Harness, ms: i64) !void {
const deadline = nowMs() + ms;
var buf: [4096]u8 = undefined;
@@ -157,7 +177,7 @@ pub const Harness = struct {
const n = posix.read(self.master, &buf) catch break;
if (n == 0) break;
self.recordRaw(buf[0..n]);
- self.stream.nextSlice(buf[0..n]);
+ self.feed(buf[0..n]);
}
}
if (self.trace) self.traceScreen("pump");
@@ -176,7 +196,7 @@ pub const Harness = struct {
const n = posix.read(self.master, &buf) catch return false;
if (n == 0) return false;
self.recordRaw(buf[0..n]);
- self.stream.nextSlice(buf[0..n]);
+ self.feed(buf[0..n]);
return true;
}
@@ -243,7 +263,7 @@ pub const Harness = struct {
const n = posix.read(self.master, &buf) catch break;
if (n == 0) break;
self.recordRaw(buf[0..n]);
- self.stream.nextSlice(buf[0..n]);
+ self.feed(buf[0..n]);
}
const text = try self.screenText();
defer self.gpa.free(text);
@@ -270,7 +290,7 @@ pub const Harness = struct {
const n = posix.read(self.master, &buf) catch break;
if (n == 0) break;
self.recordRaw(buf[0..n]);
- self.stream.nextSlice(buf[0..n]);
+ self.feed(buf[0..n]);
if (std.mem.indexOf(u8, self.raw.items, needle) != null) return true;
}
return false;
@@ -366,6 +386,18 @@ pub const Harness = struct {
};
/// Write a file (helper for test setup, raw libc).
+pub fn appendFile(path: [*:0]const u8, data: []const u8) !void {
+ const fd = libc.open(path, .{ .ACCMODE = .WRONLY, .CREAT = true, .APPEND = true }, @as(libc.mode_t, 0o644));
+ if (fd < 0) return error.OpenFailed;
+ defer _ = libc.close(fd);
+ var off: usize = 0;
+ while (off < data.len) {
+ const w = libc.write(fd, data[off..].ptr, data.len - off);
+ if (w <= 0) break;
+ off += @intCast(w);
+ }
+}
+
pub fn writeFile(path: [*:0]const u8, data: []const u8) !void {
const fd = libc.open(path, .{ .ACCMODE = .WRONLY, .CREAT = true, .TRUNC = true }, @as(libc.mode_t, 0o644));
if (fd < 0) return error.OpenFailed;
diff --git a/test/font_size.py b/test/font_size.py
index 3a0a9a28..878d6472 100644
--- a/test/font_size.py
+++ b/test/font_size.py
@@ -25,21 +25,21 @@ def run(args):
control = new_pane(client, b'')
def report(size):
- execute(client, control, 'Config')
+ execute(client, control, 'DumpConfig')
def ready():
for serial, tag in panes(client).items():
- if '/+Config ' in tag:
+ if '/+DumpConfig ' in tag:
body = client.read(f'/pane/{serial}/body').decode()
- if f'Font effective size: {size:.2f} pixels' in body:
+ if f' {size:.2f} pixels\n' in body and 'Font in use: ' in body:
return body
return None
return require(wait_for(ready), f'Font did not become {size} pixels')
initial = report(18)
- require('Font requested size: 18.00' in initial, 'startup size suffix ignored')
+ require(':18.00\n' in initial, 'startup size suffix ignored')
require(args.font in initial, 'requested font missing')
execute(client, control, f'Font {args.font}:20.5')
- require('Font requested size: 20.50' in report(20.5), 'fractional size ignored')
+ require(':20.50\n' in report(20.5), 'fractional size ignored')
execute(client, control, f'Font {args.font}')
report(20.5) # no suffix preserves current size
execute(client, control, f'Font {args.font}:900')
diff --git a/test/fs.py b/test/fs.py
index 819a78d6..98767a41 100644
--- a/test/fs.py
+++ b/test/fs.py
@@ -3,6 +3,10 @@ import contextlib
import fcntl
import json
import os
+import shutil
+import select
+import signal
+import socket
from pathlib import Path
import subprocess
import struct
@@ -100,8 +104,14 @@ def session(binary, root, name, *options, socket_name=None, file=None, tty=False
assert not reader.is_alive(), 'terminal reader did not stop'
+def newest(client):
+ """The newest pane's serial: /index is ordered by serial."""
+ return int(client.read('/index').splitlines()[-1].split()[0])
+
+
def new_pane(client, contents):
- serial = int(client.read('/new').split()[0])
+ """An open of /pane/new makes a pane; the read names it."""
+ serial = int(client.read('/pane/new'))
if contents:
client.write(f'/pane/{serial}/body', contents)
return serial
@@ -110,18 +120,32 @@ def new_pane(client, contents):
def look(client, path, source=None):
"""A right click on `path` from a pane (a fresh scratch by default)."""
serial = source if source is not None else new_pane(client, b'')
- client.write(f'/pane/{serial}/ctl', f'look {path}\n'.encode())
- results = [int(row) for row in client.read('/ctl').split()]
+ client.write(f'/pane/{serial}/look', f'{path}\n'.encode())
+ results = [int(row) for row in client.read('/look').split()]
assert len(results) == 1 and results[0] != serial, (path, results)
+ # The scratch it looked from goes: a column holds only so many panes,
+ # each its tag and two rows.
+ if source is None:
+ client.remove(f'/pane/{serial}')
return results[0]
def execute(client, serial, command):
"""A middle click on `command` from a pane."""
- client.write(f'/pane/{serial}/ctl', f'exec {command}\n'.encode())
+ client.write(f'/pane/{serial}/exec', f'{command}\n'.encode())
+
+
+def execute_refused(client, serial, command, words):
+ """A middle click on a builtin that fails: the write fails, saying why."""
+ try:
+ execute(client, serial, command)
+ except OSError as why:
+ assert words in str(why), (command, why)
+ return
+ raise AssertionError(f'{command!r} was taken')
-def walk_tree(client, path='/', skip=('/new', '/log', '/os', '/screen')):
+def walk_tree(client, path='/', skip=('/log', '/os', '/screen')):
"""Stat every entry below `path`, as `find` does, without opening anything."""
seen = []
for name in client.list(path):
@@ -136,20 +160,25 @@ def walk_tree(client, path='/', skip=('/new', '/log', '/os', '/screen')):
def discovery(binary, embedded=False):
with tempfile.TemporaryDirectory(prefix='pardes-discovery-') as directory:
root = Path(directory)
- with session(binary, root, 'discovery') as (client, _):
+ with session(binary, root, 'discovery') as (client, address):
top = client.list('/')
- assert top[:9] == ['README', 'index', 'ctl', 'new', 'log', 'screen', 'listeners', 'pane', 'os'], top
- assert 'self' not in top and 'cons' not in top, top
+ # A set: which files the root holds, not the order a listing gives.
+ assert set(top) - {'src', 'shaders'} == {'README', 'index', 'status', 'focus', 'ctl', 'commands', 'recent',
+ 'look', 'exec', 'pager', 'log', 'screen', 'listeners', 'layout', 'tag', 'tagexec',
+ 'pane', 'col', 'os'}, top
+ assert 'self' not in top and 'cons' not in top and 'new' not in top, top
assert ('src' in top) == embedded, (top, embedded)
before = client.read('/index')
guide = client.read('/README')
- assert guide.count(b'\n') <= 45 and b'exec Msg' in guide and b'/new' in guide, guide
+ assert guide.count(b'\n') <= 45 and b'Msg hello' in guide and b'pane/new' in guide, guide
assert client.stat('/README')['length'] == len(guide)
# ls/stat/find over the whole tree, without opening, creates nothing.
seen = walk_tree(client)
names = {path for path, _ in seen}
- assert {'/index', '/ctl', '/new', '/log', '/pane/1', '/pane/1/body', '/pane/1/name',
- '/pane/1/sel', '/pane/1/ctl', '/pane/1/tag', '/pane/1/event'} <= names, sorted(names)
+ assert {'/index', '/status', '/look', '/exec', '/log', '/pane/1', '/pane/1/body',
+ '/pane/1/name', '/pane/1/sel', '/pane/1/ctl', '/pane/1/tag', '/pane/1/event',
+ '/pane/1/dot', '/pane/1/limit', '/pane/1/dirty', '/pane/1/mark',
+ '/pane/1/scroll', '/pane/1/look', '/pane/1/exec'} <= names, sorted(names)
assert '/pane/1/pty' not in names, 'the fixture file pane grew a pty/'
assert not any(name.startswith('/self') or name.endswith('/rdsel') or name.endswith('/wrsel')
for name in names), sorted(names)
@@ -159,21 +188,110 @@ def discovery(binary, embedded=False):
assert client.read('/index') == before, 'browsing created a pane'
assert client.stat('/index')['length'] == len(before) > 0
index = client.stat('/index')
- assert index['mode'] == 0o444 and client.stat('/ctl')['mode'] == 0o666
+ assert index['mode'] == 0o444 and client.stat('/status')['mode'] == 0o444
+ assert client.stat('/exec')['mode'] == 0o666
assert client.stat('/pane/1/body')['mode'] == 0o666 and client.stat('/pane')['mode'] == 0o755
+ # A range file reads the pair it takes; a flag file reads 0 or 1.
+ assert client.stat('/pane/1/addr')['length'] == 24
+ assert client.stat('/pane/1/limit')['length'] == 0
+ assert client.read('/pane/1/dirty') == b'0\n'
+ assert client.read('/pane/1/scroll') == b'1\n'
fixture = int(before.split()[0])
- assert before.split()[1:3] == [b'text', b'0'] and before.endswith(b'/discovery.txt\n'), before
- # Before any command, /ctl reports the editor.
- status = dict(line.split(maxsplit=1) for line in client.read('/ctl').decode().splitlines())
- assert int(status['pid']) > 0 and status['version'] and int(status['panes']) == 1, status
- # /new: one pane per open, its serial is the file's content.
- log = client.open('/log')
- first = int(client.read('/new').split()[0])
- second = int(client.read('/new').split()[0])
+ assert before.split()[1:3] == [b'text', b'0'] and before.rsplit(b' ', 1)[0].endswith(b'/discovery.txt'), before
+ # /status reports the editor; /exec has nothing to report yet.
+ status = dict(line.split(maxsplit=1) for line in client.read('/status').decode().splitlines())
+ assert int(status['pid']) > 0 and status['version'] and int(status['panes']) >= 1, status
+ assert client.read('/exec') == b''
+ # An open of /pane/new makes a pane and the read names it; each
+ # open makes another. A stat makes none, which is why new can be
+ # listed at all: ls -l stats every name a listing gave it.
+ # /log answers the recent past and ends; `follow` written to the
+ # same open makes its reads past that wait for new records.
+ log = client.open('/log', 2)
+ frozen = len(client.read_fid(log))
+ client.rpc(118, struct.pack('<IQI', log, 0, 7) + b'follow\n')
+ first = int(client.read('/pane/new'))
+ assert first == newest(client)
+ second = int(client.read('/pane/new'))
assert first != second and first != fixture, (first, second)
- assert client.read_fid(log) == f'new {first} {root}/+New\n'.encode()
- assert client.read_fid(log) == f'new {second} {root}/+New\n'.encode()
- assert set(client.list('/pane')) == {str(fixture), str(first), str(second)}
+ assert 'new' in client.list('/pane'), 'new should be visible to ls'
+ client.stat('/pane/new')
+ assert newest(client) == second, 'a stat of new made a pane'
+ # What the editor said is in the stream too.
+ def pane_event():
+ while (record := client.read_fid(log, frozen)).startswith((b'msg ', b'err ')):
+ pass
+ return record
+ assert pane_event() == f'new {first} {root}/+New\n'.encode()
+ assert pane_event() == f'new {second} {root}/+New\n'.encode()
+ # A follower that is waiting wakes when the editor logs, not when
+ # some unrelated request next happens to wait.
+ with Client(address) as follower:
+ waiting = follower.open('/log', 2)
+ start = len(follower.read_fid(waiting))
+ follower.rpc(118, struct.pack('<IQI', waiting, 0, 7) + b'follow\n')
+ woke = []
+ reader = threading.Thread(target=lambda: woke.append(follower.read_fid(waiting, start)), daemon=True)
+ reader.start()
+ time.sleep(.2)
+ client.write('/exec', b'Msg woken\n')
+ reader.join(5)
+ assert woke and woke[0].endswith(b' woken\n'), woke
+ # A pane's ctl takes acme's lock: a second open's lock fails at
+ # once with "file in use" until the holder unlocks, and nothing
+ # else waits on it meanwhile.
+ with Client(address) as other:
+ mine = client.open(f'/pane/{first}/ctl', 2)
+ client.rpc(118, struct.pack('<IQI', mine, 0, 5) + b'lock\n')
+ theirs = other.open(f'/pane/{first}/ctl', 1)
+ try:
+ other.rpc(118, struct.pack('<IQI', theirs, 0, 5) + b'lock\n')
+ raise AssertionError('a second lock was taken')
+ except OSError as refused:
+ assert 'file in use' in str(refused), refused
+ client.write(f'/pane/{first}/addr', b'#0')
+ client.rpc(118, struct.pack('<IQI', mine, 0, 7) + b'unlock\n')
+ other.rpc(118, struct.pack('<IQI', theirs, 0, 5) + b'lock\n')
+ client.close(mine)
+ other.close(theirs)
+ # /focus names the pane with the keyboard and moves it, as rio's
+ # wctl `current` does; a pane's ctl line ends saying which it is.
+ client.write('/focus', f'{first}\n'.encode())
+ assert client.read('/focus') == f'{first}\n'.encode()
+ assert client.read(f'/pane/{first}/ctl').endswith(b' current ')
+ assert client.read(f'/pane/{second}/ctl').endswith(b' notcurrent ')
+ try:
+ client.write('/focus', b'99999\n')
+ raise AssertionError('focus took a serial no pane has')
+ except OSError as refused:
+ assert 'no such pane' in str(refused), refused
+ # /ctl reads the settings as a write takes them and takes the
+ # session's builtins; a pane's ctl takes the pane's.
+ settings = client.read('/ctl')
+ assert b'Verbose ' in settings and b'Platform' not in settings, settings
+ client.write('/ctl', settings)
+ assert client.read('/ctl') == settings
+ client.write('/ctl', b'Verbose off\n')
+ assert b'Verbose off\n' in client.read('/ctl')
+ for path, line, why in (('/ctl', b'Del\n', 'not a session control message "Del"'),
+ ('/ctl', b'Nope 3\n', 'unknown control message "Nope 3"'),
+ (f'/pane/{first}/ctl', b'Newcol\n', 'not a window control message "Newcol"')):
+ try:
+ client.write(path, line)
+ raise AssertionError(f'{path} took {line!r}')
+ except OSError as refused:
+ assert why in str(refused), refused
+ commands = client.read('/commands').decode().splitlines()
+ def row(start):
+ return any(r == start or r.startswith(start + ' ') for r in commands)
+ assert row('Newcol root') and row('Save arg pane') and row('Edit arg both'), commands
+ # word, `arg` if it takes one, its ctl, a setting's values, then `-- ` what it does
+ assert all(r.split()[2 if r.split()[1] == 'arg' else 1] in ('root', 'pane', 'both') for r in commands), commands
+ assert row('Placement arg root acme,pardes'), commands
+ assert client.stat('/commands')['length'] == len('\n'.join(commands).encode()) + 1 # bytes: a description may end in …
+ client.write(f'/pane/{first}/ctl', b'Msg said through ctl\n')
+ assert 'said through ctl' in ''.join(cell[0] for cell in client.screen()['cells'])
+ assert set(client.list('/pane')) == {'new', str(fixture), str(first), str(second)}
client.write(f'/pane/{first}/body', b'first pane', truncate=True)
assert client.read(f'/pane/{first}/body') == b'first pane'
assert client.read(f'/pane/{second}/body') == b''
@@ -184,60 +302,913 @@ def discovery(binary, embedded=False):
assert client.read(f'/pane/{first}/name') == f'{root}/+New\n'.encode()
client.write(f'/pane/{first}/name', b'notes.txt\n')
assert client.read(f'/pane/{first}/name') == f'{root}/notes.txt\n'.encode()
- assert client.read_fid(log) == f'rename {first} {root}/notes.txt\n'.encode()
+ assert pane_event() == f'rename {first} {root}/notes.txt\n'.encode()
assert client.stat(f'/pane/{first}/name')['length'] == len(f'{root}/notes.txt\n')
+ # Copying addr onto dot selects that range; sel reads and replaces it.
client.write(f'/pane/{first}/addr', b'#0,#5')
- client.write(f'/pane/{first}/ctl', b'dot=addr\n')
+ client.write(f'/pane/{first}/dot', client.read(f'/pane/{first}/addr'))
+ assert client.read(f'/pane/{first}/dot') == client.read(f'/pane/{first}/addr')
assert client.read(f'/pane/{first}/sel') == b'first'
assert client.stat(f'/pane/{first}/sel')['length'] == 5
client.write(f'/pane/{first}/sel', b'FIRST')
assert client.read(f'/pane/{first}/body') == b'FIRST pane'
assert client.read(f'/pane/{first}/sel') == b''
- # exec Msg shows text; exec Save writes the named file; exec Del closes.
- client.write(f'/pane/{first}/ctl', b'exec Msg hello from 9P\n')
+ # exec Msg shows text; exec Save writes the named file; rmdir closes.
+ client.write(f'/pane/{first}/exec', b'Msg hello from 9P\n')
assert 'hello from 9P' in ''.join(cell[0] for cell in client.screen()['cells'])
- client.write(f'/pane/{first}/ctl', b'exec Save\n')
+ assert client.read(f'/pane/{first}/dirty') == b'1\n'
+ client.write(f'/pane/{first}/exec', b'Save\n')
assert (root / 'notes.txt').read_bytes() == b'FIRST pane'
- assert client.read_fid(log) == f'save {first} {root}/notes.txt\n'.encode()
- assert client.read('/ctl') == f'{first}\n'.encode()
- client.write('/ctl', b'exec Del\n')
- assert client.read_fid(log) == f'del {second} {root}/+New\n'.encode()
+ assert pane_event() == f'save {first} {root}/notes.txt\n'.encode()
+ assert client.read('/exec') == f'{first}\n'.encode()
+ assert client.read(f'/pane/{first}/dirty') == b'0\n'
+ client.remove(f'/pane/{second}')
+ assert pane_event() == f'del {second} {root}/+New\n'.encode()
assert str(second) not in client.list('/pane')
- # look through /ctl opens a file; the serial reads back.
+ # look opens a file; the serial reads back.
(root / 'opened.txt').write_bytes(b'one\ntwo\nthree\n')
- client.write('/ctl', f'look {root}/opened.txt:2\n'.encode())
- opened = int(client.read('/ctl'))
+ client.write('/look', f'{root}/opened.txt:2\n'.encode())
+ opened = int(client.read('/look'))
assert opened not in (fixture, first, second), opened
assert client.read(f'/pane/{opened}/body') == b'one\ntwo\nthree\n'
assert client.read(f'/pane/{opened}/name') == f'{root}/opened.txt\n'.encode()
- assert client.read_fid(log) == f'new {opened} {root}/opened.txt\n'.encode()
- client.write(f'/pane/{first}/ctl', f'look {root}/opened.txt:3\n'.encode())
- assert client.read('/ctl') == f'{opened}\n'.encode(), 'a repeated look targets the open pane'
- assert set(client.list('/pane')) == {str(fixture), str(first), str(opened)}
+ assert pane_event() == f'new {opened} {root}/opened.txt\n'.encode()
+ client.write(f'/pane/{first}/look', f'{root}/opened.txt:3\n'.encode())
+ assert client.read('/look') == f'{opened}\n'.encode(), 'a repeated look targets the open pane'
+ assert {str(fixture), str(first), str(opened)} <= set(client.list('/pane'))
# Writing an event record back still performs the action it names.
client.write(f'/pane/{first}/body', b'Msg via event', truncate=True)
client.write(f'/pane/{first}/event', b'FX0 13\n')
assert 'via event' in ''.join(cell[0] for cell in client.screen()['cells'])
- for bad in [b'Look x\n', b'Exec Msg x\n', b'put\n', b'name x\n', b'del\n']:
+ # A command line may not carry control characters, and nothing else
+ # in the tree may be created or removed.
+ refused = [lambda: client.write('/exec', b'Msg a\x00b'),
+ lambda: client.write('/status', b'anything\n'),
+ lambda: client.mkdir('/', 'x'),
+ lambda: client.mkdir('/pane', 'one'),
+ lambda: client.create('/pane', 'plain-file'),
+ lambda: client.remove('/pane/1/body'),
+ lambda: client.remove('/index')]
+ for index, attempt in enumerate(refused):
try:
- client.write('/ctl', bad)
+ attempt()
except OSError:
pass
else:
- raise AssertionError(f'{bad!r} was accepted')
+ raise AssertionError(f'refusal {index} was accepted')
client.close(log)
if embedded:
assert client.read('/src/pardes.zig').startswith(b'const std')
assert client.stat('/src/pardes.zig')['mode'] == 0o444
assert b'pub const Pardes' in client.read(f'/pane/{look(client, "/virtual/src/pardes.zig")}/body')
- print('9P discovery: listing/stat/find are inert; new, ctl, name, sel and log behave')
+ # An open of data with OTRUNC (a shell's >) deletes the addressed
+ # range only, so the write after it replaces that range.
+ scratch = new_pane(client, b'hello world\nsecond line\n')
+ client.write(f'/pane/{scratch}/addr', b'#0,#5')
+ client.write(f'/pane/{scratch}/data', b'HOWDY', truncate=True)
+ assert client.read(f'/pane/{scratch}/body') == b'HOWDY world\nsecond line\n'
+ # sam's regexps: ^ at any line; a miss says so and leaves no
+ # address, so the data write after it refuses.
+ client.write(f'/pane/{scratch}/addr', b'/^second/')
+ assert client.read(f'/pane/{scratch}/addr') == b' 12 18 '
+ for path, data, why in ((f'/pane/{scratch}/addr', b'/nowhere/', 'no match for regexp'),
+ (f'/pane/{scratch}/data', b'LOST', 'no address')):
+ try:
+ client.write(path, data)
+ raise AssertionError(f'{path} took {data!r}')
+ except OSError as refused:
+ assert why in str(refused), refused
+ assert client.read(f'/pane/{scratch}/body') == b'HOWDY world\nsecond line\n'
+ # Through a mount both read as EINVAL; the log says which and why.
+ assert f'err {scratch} addr: no match for regexp\n'.encode() in client.read('/log')
+ client.remove(f'/pane/{scratch}')
+ # Real `diff -u` in a command pane: the terminal turns the tab
+ # before each timestamp into blanks, and a look at a changed line
+ # still opens the new file at it.
+ (root / 'diff-old.txt').write_text('one\ntwo\nthree\n')
+ (root / 'diff-new.txt').write_text('one\nTWO\nthree\n')
+ seen = client.read('/log').decode().count('\nexit ')
+ client.write('/exec', b'diff -u diff-old.txt diff-new.txt\n')
+ deadline = time.monotonic() + 10
+ while client.read('/log').decode().count('\nexit ') <= seen:
+ assert time.monotonic() < deadline, 'diff -u never ended'
+ time.sleep(.05)
+ # A command's pane is kind cmd, not term: no shell to type into.
+ ran = [row.split()[0] for row in client.read('/index').decode().splitlines() if row.split()[1] == 'cmd']
+ shown = client.read(f'/pane/{ran[-1]}/body').decode()
+ assert '+++ diff-new.txt' in shown and '\t' not in shown, shown
+ client.write(f'/pane/{ran[-1]}/look', b'+TWO\n')
+ opened = [row for row in client.read('/index').decode().splitlines() if row.split()[3] == f'{root}/diff-new.txt']
+ assert len(opened) == 1, client.read('/index')
+ client.remove(f'/pane/{opened[0].split()[0]}')
+ client.remove(f'/pane/{ran[-1]}')
+ # A Save makes the directories its file goes in, whatever names
+ # it: the pane's own name or Save's path.
+ # `~` is home (this session's HOME, the test's root) wherever a
+ # path is typed: Save, name, a look, with an address or not.
+ tilde = new_pane(client, b'one\ntwo\nthree\n')
+ client.write(f'/pane/{tilde}/ctl', b'Save ~/tilde-made/sub/x.txt\n')
+ assert (root / 'tilde-made/sub/x.txt').read_bytes() == b'one\ntwo\nthree\n'
+ client.write(f'/pane/{tilde}/name', b'~/tilde-named.txt\n')
+ assert client.read(f'/pane/{tilde}/name') == f'{root}/tilde-named.txt\n'.encode()
+ client.remove(f'/pane/{tilde}')
+ client.write('/look', b'~/tilde-made/sub/x.txt:3\n')
+ looked = [row for row in client.read('/index').decode().splitlines() if row.split()[3] == f'{root}/tilde-made/sub/x.txt']
+ assert len(looked) == 1, client.read('/index')
+ assert client.read(f'/pane/{looked[0].split()[0]}/addr').startswith(b'8 '), client.read(f'/pane/{looked[0].split()[0]}/addr')
+ client.remove(f'/pane/{looked[0].split()[0]}')
+ made_dirs = new_pane(client, b'deep\n')
+ client.write(f'/pane/{made_dirs}/ctl', f'Save {root}/save-made/a/b/x.txt\n'.encode())
+ assert (root / 'save-made/a/b/x.txt').read_bytes() == b'deep\n'
+ client.write(f'/pane/{made_dirs}/name', f'{root}/save-named/c/y.txt\n'.encode())
+ client.write(f'/pane/{made_dirs}/ctl', b'Save\n')
+ assert (root / 'save-named/c/y.txt').read_bytes() == b'deep\n'
+ client.remove(f'/pane/{made_dirs}')
+ # A save the host cannot do (a directory it may not make) fails
+ # the write that asked for it, and the log's err record names
+ # the path and why.
+ unsaved = new_pane(client, b'unsaved\n')
+ try:
+ client.write(f'/pane/{unsaved}/ctl', b'Save /nonexistent-pardes-dir/x.txt\n')
+ raise AssertionError('a Save into a missing directory succeeded')
+ except OSError as refused:
+ assert 'Save /nonexistent-pardes-dir/x.txt: no such directory' in str(refused), refused
+ assert f'err {unsaved} ctl: Save /nonexistent-pardes-dir/x.txt: '.encode() in client.read('/log'), client.read('/log')
+ client.remove(f'/pane/{unsaved}')
+
+ # Sixteen connections fill the slots; the next is told why.
+ extra = [Client(address) for _ in range(15)]
+ try:
+ try:
+ Client(address).__exit__()
+ raise AssertionError('a seventeenth connection was served')
+ except OSError as refused:
+ assert 'too many connections' in str(refused), refused
+ finally:
+ for other in extra:
+ other.__exit__()
+ deadline = time.monotonic() + 5
+ while b'err - 9p: too many connections' not in client.read('/log'):
+ assert time.monotonic() < deadline, client.read('/log')
+ time.sleep(.01)
+
+ print('9P discovery: listing/stat/find are inert; new, remove, look, exec, name, sel, log, ctl lock, focus, the ctl split and commands behave')
+
+
+def run_file(binary):
+ """pty/run: a line in, how it ended out, on the same open."""
+ def run(c, serial, line):
+ fid = c.open(f'/pane/{serial}/pty/run', 2)
+ try:
+ c.rpc(118, struct.pack('<IQI', fid, 0, len(line)) + line)
+ return c.read_fid(fid)
+ finally:
+ c.close(fid)
+ with tempfile.TemporaryDirectory() as directory:
+ root = Path(directory)
+ with session(binary, root, 'run') as (client, address):
+ # From a pane on a peer's path no command or terminal starts:
+ # refused before any pane is made, no `exit 127` pane left.
+ peer = new_pane(client, b'')
+ client.write(f'/pane/{peer}/name', b'/n/nosuchpeer/d/f.txt\n')
+ count = len(client.read('/index').splitlines())
+ execute_refused(client, peer, 'ls', 'no such directory')
+ execute_refused(client, peer, 'Tty', 'no such directory')
+ assert len(client.read('/index').splitlines()) == count, client.read('/index')
+ assert b'exit 127' not in client.read('/log')
+ client.remove(f'/pane/{peer}')
+ client.write('/exec', b'Shell bash\n')
+ client.write('/exec', b'Tty\n')
+ term = int(max(r.split()[0] for r in client.read('/index').splitlines() if r.split()[1] == b'term'))
+ deadline = time.monotonic() + 10
+ while run(client, term, b'true\n') == b'busy\n': # until its first prompt
+ assert time.monotonic() < deadline, 'the shell never reached a prompt'
+ time.sleep(.05)
+ assert run(client, term, b'false\n') == b'exit 1\n'
+ assert run(client, term, b'printf "one\\ntwo\\n"\n') == b'exit 0\none\ntwo\n' # then what it printed
+ assert run(client, term, b'sh -c "exit 7"\n') == b'exit 7\n'
+ assert run(client, term, b'fi\n') == b'error not run\n' # a syntax error runs nothing
+ assert run(client, term, b"echo 'open\n") == b'error not run\n' # nor does an open quote
+ assert run(client, term, b'true\n') == b'exit 0\n' # ...and the shell is clear after
+ # With no frontend attached the pty's size is in pixels too, at a
+ # nominal 8x16 cell: a program sizes its kitty graphics by it.
+ said = run(client, term, b'python3 -c \'import fcntl,termios,struct;print(*struct.unpack("4H",fcntl.ioctl(0,termios.TIOCGWINSZ,bytes(8))))\'\n')
+ rows, cols, xpixel, ypixel = map(int, said.split(b'\n')[1].split())
+ assert (xpixel, ypixel) == (cols * 8, rows * 16) and xpixel > 0, said
+ # A paging command run through pty/run does not wait in less: the
+ # terminal's PAGER is `pardes -`, and its text is a +Pager pane.
+ if shutil.which('git'):
+ repo = root / 'pagedrepo'
+ repo.mkdir()
+ git = ['git', '-C', str(repo), '-c', 'user.name=p', '-c', 'user.email=p@x']
+ subprocess.run(git + ['init', '-q'], check=True, env=dict(os.environ, HOME=str(root)))
+ (repo / 'f').write_text('x\n')
+ subprocess.run(git + ['add', 'f'], check=True, env=dict(os.environ, HOME=str(root)))
+ subprocess.run(git + ['commit', '-qm', 'paged-commit-subject'], check=True, env=dict(os.environ, HOME=str(root)))
+ assert run(client, term, b'git -C pagedrepo log\n').startswith(b'exit 0\n')
+ pager = [r.split()[0].decode() for r in client.read('/index').splitlines() if r.split()[3:4] == [f'{repo}/+Pager'.encode()]] # git -C runs it in the repo
+ assert len(pager) == 1, client.read('/index')
+ assert b'paged-commit-subject' in client.read(f'/pane/{pager[0]}/body')
+ assert b'\x1b' not in client.read(f'/pane/{pager[0]}/body')
+ client.remove(f'/pane/{pager[0]}')
+ # systemd's tools page through their own variable: set too, its
+ # secure mode off, the path unquoted where it needs none.
+ systemd_pager = run(client, term, b'printenv SYSTEMD_PAGER SYSTEMD_PAGERSECURE\n')
+ assert systemd_pager.startswith(b'exit 0\n') and systemd_pager.rstrip().endswith(b' -\n0'), systemd_pager
+ if shutil.which('journalctl'):
+ assert run(client, term, b'journalctl -n 3 --no-hostname\n').startswith(b'exit ')
+ for row in client.read('/index').splitlines():
+ if row.split()[3:4] == [f'{root}/+Pager'.encode()]:
+ client.remove(f'/pane/{row.split()[0].decode()}')
+ # A pty is not given one row (it loses the prompt's input mark,
+ # and the shell would read busy for ever): refused, and said.
+ try:
+ client.write(f'/pane/{term}/pty/ctl', b'winsize 20 1\n')
+ raise AssertionError('winsize 20 1 was taken')
+ except OSError as refused:
+ assert 'at least 2 rows' in str(refused), refused
+ client.write(f'/pane/{term}/pty/ctl', b'winsize 20 2\n')
+ time.sleep(.5)
+ assert run(client, term, b'true\n') == b'exit 0\n'
+ assert client.read(f'/pane/{term}/pty/ctl').split()[2] == b'2', client.read(f'/pane/{term}/pty/ctl')
+ client.write(f'/pane/{term}/pty/ctl', b'winsize 80 24\n')
+ # A shell started again that cannot start (its directory is
+ # there but cannot be entered) fails the write and leaves the
+ # running shell be: runs still work.
+ locked = root / 'locked'
+ locked.mkdir()
+ assert run(client, term, f'cd {locked}\n'.encode()) == b'exit 0\n'
+ deadline = time.monotonic() + 5
+ while str(locked).encode() not in client.read('/index'):
+ assert time.monotonic() < deadline, client.read('/index')
+ time.sleep(.05)
+ locked.chmod(0o600)
+ try:
+ client.write(f'/pane/{term}/pty/ctl', b'exec\n')
+ raise AssertionError('pty/ctl exec of a shell that cannot start was taken')
+ except OSError as refused:
+ assert 'shell' in str(refused), refused
+ finally:
+ locked.chmod(0o755)
+ kept = run(client, term, b'true\n')
+ assert kept == b'exit 0\n', (kept, client.read('/log')[-600:])
+ assert run(client, term, f'cd {root}\n'.encode()) == b'exit 0\n'
+ with Client(address) as other:
+ slow = []
+ waiter = threading.Thread(target=lambda: slow.append(run(other, term, b'sleep 1\n')), daemon=True)
+ waiter.start()
+ time.sleep(.3)
+ # The job the other client ran holds the tty, and says so.
+ assert run(client, term, b'true\n') == b'busy: sleep is running\n'
+ waiter.join(5)
+ assert slow == [b'exit 0\n'], slow
+ closing = []
+ waiter = threading.Thread(target=lambda: closing.append(run(other, term, b'sleep 30\n')), daemon=True)
+ waiter.start()
+ time.sleep(.3)
+ client.write(f'/pane/{term}/exec', b'Del\n')
+ waiter.join(5)
+ assert closing == [b'error shell gone\n'], closing
+
+
+def exit_answers(binary):
+ """Exit written to /ctl is answered before the editor quits."""
+ with tempfile.TemporaryDirectory(prefix='pardes-exit-') as directory:
+ seen = {}
+ with session(binary, Path(directory), 'exit', terminal=seen) as (client, _):
+ client.write('/ctl', b'Exit\n')
+ deadline = time.monotonic() + 5
+ while time.monotonic() < deadline:
+ try:
+ # a zombie has quit; the session reaps it
+ if Path(f'/proc/{seen["pid"]}/stat').read_text().split(') ')[1][0] == 'Z':
+ break
+ except FileNotFoundError:
+ break
+ time.sleep(.01)
+ else:
+ raise AssertionError("Exit did not quit the editor")
+
+
+def unattended_messages_expire(binary):
+ """With nothing attached, a message leaves after MessageLinger on its own
+ clock: no key, no click, no other request comes to move it along."""
+ with tempfile.TemporaryDirectory(prefix='pardes-msg-') as directory:
+ with session(binary, Path(directory), 'msg') as (client, _):
+ client.write('/pane/1/ctl', b'Msg lingering-words\n')
+ def shown():
+ screen = json.loads(client.read('/screen'))
+ return 'lingering-words' in ''.join(cell[0] for cell in screen['cells'])
+ assert shown()
+ # Reading /screen is itself a request, so wait without asking.
+ time.sleep(2.5)
+ assert not shown(), 'an unattended message outlived MessageLinger'
+
+
+def directory_panes(binary):
+ """A look at a directory opens a pane listing it, as acme's directory
+ window: a text pane named with a trailing /, its body the entries (a
+ directory's marked /), ctl's isdir 1, and get reads it again."""
+ with tempfile.TemporaryDirectory(prefix='pardes-dirpane-') as directory:
+ root = Path(directory).resolve()
+ listed = root / 'listed'
+ (listed / 'sub').mkdir(parents=True)
+ (listed / '.dot').write_bytes(b'')
+ with session(binary, root, 'dirpane') as (client, _):
+ serial = look(client, str(listed))
+ rows = [row.split() for row in client.read('/index').decode().splitlines()]
+ row = next(r for r in rows if int(r[0]) == serial)
+ assert row[1:4] == ['text', '0', f'{listed}/'], row
+ body = client.read(f'/pane/{serial}/body').decode()
+ assert body.split() == ['.dot', 'sub/'], body
+ assert client.read(f'/pane/{serial}/ctl').split()[3] == b'1'
+ (listed / 'later').write_bytes(b'')
+ client.write(f'/pane/{serial}/ctl', b'get\n')
+ assert client.read(f'/pane/{serial}/body').decode().split() == ['.dot', 'later', 'sub/']
+
+
+def putall_answers_after_its_saves(binary):
+ """Putall with one pane refused (its file changed on disk under unsaved
+ edits) fails, and is answered only once the other panes' saves have
+ landed."""
+ with tempfile.TemporaryDirectory(prefix='pardes-putall-') as directory:
+ root = Path(directory).resolve()
+ (root / 'a.txt').write_bytes(b'a\n')
+ (root / 'b.txt').write_bytes(b'b\n')
+ with session(binary, root, 'putall') as (client, _):
+ a = look(client, str(root / 'a.txt'))
+ b = look(client, str(root / 'b.txt'))
+ for serial in (a, b):
+ client.write(f'/pane/{serial}/body', b'edited\n')
+ (root / 'b.txt').write_bytes(b'changed on disk\n')
+ deadline = time.monotonic() + 10
+ while f'changed {b}' not in client.read('/log').decode():
+ assert time.monotonic() < deadline, 'the watch never saw b.txt change'
+ time.sleep(.05)
+ try:
+ client.write('/ctl', b'Putall\n')
+ except OSError as why:
+ assert 'modified on disk' in str(why), why
+ else:
+ raise AssertionError('Putall over a file changed on disk was taken')
+ assert (root / 'a.txt').read_bytes() == b'a\nedited\n', (root / 'a.txt').read_bytes()
+ assert (root / 'b.txt').read_bytes() == b'changed on disk\n'
+
+
+def new_terminals_named_once(binary):
+ """A terminal started outside the session's directory is named by that
+ directory from its `new` on: no rename to the session's and back."""
+ with tempfile.TemporaryDirectory(prefix='pardes-names-') as directory:
+ root = Path(directory)
+ (root / 'sub').mkdir()
+ with session(binary, root, 'names') as (client, _):
+ # A look at a directory starts a terminal there (DirLook
+ # terminal); DirLook pane, the default, lists it in a pane.
+ client.write('/ctl', b'DirLook terminal\n')
+ made = [look(client, str(root / 'sub'))]
+ before = {int(row.split()[0]) for row in client.read('/index').splitlines()}
+ client.write('/pane/1/ctl', b'Tty\n')
+ if shutil.which('fish'):
+ client.write('/pane/1/ctl', b'Tty fish\n')
+ made += [s for s in (int(row.split()[0]) for row in client.read('/index').splitlines()) if s not in before]
+ time.sleep(1.5) # their shells start and say where they are
+ # A shell started again by pty/ctl exec: named as it was.
+ client.write(f'/pane/{made[0]}/pty/ctl', b'exec\n')
+ time.sleep(1.5)
+ log = client.read('/log').decode()
+ for serial in made:
+ assert f'\nrename {serial} ' not in '\n' + log, (serial, log)
+ assert f'\nnew {serial} {root}' in '\n' + log, (serial, log)
+ # A shell that cannot start (its interpreter is not there): Tty
+ # fails the write with why and leaves no pane; pty/ctl exec
+ # fails with why and keeps its terminal.
+ bad = root / 'badsh'
+ bad.write_bytes(b'#!/nonexistent/interp\n')
+ bad.chmod(0o755)
+ panes = client.read('/index')
+ for where, line in (('/pane/1/ctl', f'Tty {bad}\n'), ('/ctl', f'Shell {bad}\n')):
+ try:
+ client.write(where, line.encode())
+ raise AssertionError(f'{line} of a shell that cannot start was taken')
+ except OSError as refused:
+ assert 'interpreter /nonexistent/interp not found' in str(refused), refused
+ time.sleep(.3)
+ assert client.read('/index').count(b'\n') == panes.count(b'\n'), client.read('/index')
+ assert b'shell: shell not found' not in client.read('/log'), client.read('/log')
+ assert str(made[0]).encode() in b' '.join(r.split()[0] for r in client.read('/index').splitlines())
+
+
+def recent_survives_restart(binary):
+ """A file opened and closed is in /recent closed, and still is in the
+ next session: the list is kept under $XDG_STATE_HOME (here HOME's
+ .local/state) across restarts."""
+ with tempfile.TemporaryDirectory(prefix='pardes-recent-') as directory:
+ root = Path(directory)
+ kept = root / 'kept.txt'
+ kept.write_bytes(b'one\ntwo\n')
+ with session(binary, root, 'recent1') as (client, _):
+ serial = look(client, f'{kept}:2')
+ assert f'open {kept}\n' in client.read('/recent').decode()
+ client.write(f'/pane/{serial}/ctl', b'Del\n')
+ assert f'closed {kept}\n' in client.read('/recent').decode(), client.read('/recent')
+ assert (root / '.local' / 'state' / 'pardes' / 'store').exists()
+ with session(binary, root, 'recent2') as (client, _):
+ listed = client.read('/recent').decode()
+ assert f'closed {kept}\n' in listed, listed
+ # Recent fills a query pane with it, its row relative to the
+ # pane's directory, and a look at the row opens it again.
+ client.write('/pane/1/exec', b'Recent\n')
+ rows = int(client.read('/pane/1/exec').split()[-1])
+ body = client.read(f'/pane/{rows}/body').decode()
+ assert body.startswith('Recent '), body
+ row = next(r for r in body.splitlines() if r.startswith('kept.txt:'))
+ client.write(f'/pane/{rows}/look', (row.split(' ')[0] + '\n').encode())
+ assert f'open {kept}\n' in client.read('/recent').decode()
+
+
+def del_twice(client, serial):
+ """Del, and again when the first refused over unsaved text."""
+ try:
+ client.write(f'/pane/{serial}/ctl', b'Del\n')
+ except OSError:
+ client.write(f'/pane/{serial}/ctl', b'Del\n')
+
+
+def store_shared_between_windows(binary):
+ """Two windows share one store (Store.zig): a file opened in one is in
+ the other's /recent at its next read, with no restart; a pane Del'd in
+ one comes back where it was from a look at its @p serial there, its text
+ with it, and only there."""
+ with tempfile.TemporaryDirectory(prefix='pardes-store-') as directory:
+ root = Path(directory)
+ shared = root / 'shared.txt'
+ shared.write_bytes(b'one\ntwo\nthree\n')
+ with session(binary, root, 'store1') as (one, _), session(binary, root, 'store2') as (two, _):
+ serial = look(one, f'{shared}:3')
+ assert f'open {shared}\n' in one.read('/recent').decode()
+ assert f'closed {shared}\n' in two.read('/recent').decode(), two.read('/recent')
+ one.write(f'/pane/{serial}/ctl', b'Del\n')
+ assert f'closed {shared}\n' in one.read('/recent').decode()
+ scratch = new_pane(one, b'kept across a Del\n')
+ del_twice(one, scratch)
+ assert str(scratch) not in [row.split()[0] for row in one.read('/index').decode().splitlines()]
+ back = look(one, f'@p{scratch}')
+ assert one.read(f'/pane/{back}/body') == b'kept across a Del\n'
+ # The other window's session closed no such pane.
+ source = new_pane(two, b'')
+ try:
+ two.write(f'/pane/{source}/look', f'@p{scratch}\n'.encode())
+ except OSError:
+ pass
+ assert b'kept across a Del' not in b''.join(two.read(f'/pane/{row.split()[0]}/body')
+ for row in two.read('/index').decode().splitlines())
+ assert (root / '.local' / 'state' / 'pardes' / 'store').exists()
+
+
+def workflow_canary(binary):
+ """One session driven as the dogfood agents drive it, asserting the log
+ and the read-backs at every step: the canary for the main paths (the
+ round-18 Grep that never found anything went through every narrower
+ test). Look files, Grep and Find hits and misses, a plain word looked
+ at, Edit in two files, Save, get, pty/run failing then passing, a
+ command pane and Kill, a REPL send, the layout and a column's files,
+ ask/answer, and Dump/Restore last."""
+ started = time.monotonic()
+ with tempfile.TemporaryDirectory(prefix='pardes-flow-') as directory:
+ root = Path(directory)
+ (root / 'a.txt').write_bytes(b'alpha one\nshared word\n')
+ (root / 'b.txt').write_bytes(b'beta two\nshared word\n')
+ (root / 's.sh').write_bytes(b'echo from-file\n')
+
+ def wait(ready, what, seconds=10):
+ deadline = time.monotonic() + seconds
+ while not ready():
+ assert time.monotonic() < deadline, what
+ time.sleep(.05)
+
+ with session(binary, root, 'flow') as (client, address):
+ def log():
+ return client.read('/log').decode('utf-8', 'replace')
+
+ def made_by(serial, line):
+ """The pane an exec at `serial` made, as exec reads it back."""
+ client.write(f'/pane/{serial}/exec', line)
+ return int(client.read(f'/pane/{serial}/exec').split()[-1])
+
+ # Look opens files, and the log says new.
+ a = look(client, str(root / 'a.txt'))
+ b = look(client, str(root / 'b.txt'))
+ assert client.read(f'/pane/{a}/body') == b'alpha one\nshared word\n'
+ assert f'new {a} {root}/a.txt\n' in log() and f'new {b} {root}/b.txt\n' in log()
+
+ # Grep and Find: a hit fills its query pane, line 1 the query and
+ # the lines under each file's name; a miss fails ENOENT.
+ grep = made_by(a, b'Grep shared\n')
+ rows = client.read(f'/pane/{grep}/body').decode()
+ assert rows == 'Grep shared\na.txt\na.txt:2:1 shared word\nb.txt\nb.txt:2:1 shared word\n', rows
+ client.remove(f'/pane/{grep}')
+ execute_refused(client, a, 'Grep zzqqnomatch', 'Grep: text not found')
+ found = made_by(a, b'Find b.txt\n')
+ assert 'b.txt' in client.read(f'/pane/{found}/body').decode()
+ client.remove(f'/pane/{found}')
+ execute_refused(client, a, 'Find zzqqnomatch', 'Find: name not found')
+
+ # A plain word looked at is found in the pane, after its dot.
+ client.write(f'/pane/{a}/dot', b' 0 0 ')
+ client.write(f'/pane/{a}/look', b'shared\n')
+ assert client.read(f'/pane/{a}/dot').split() == [b'10', b'16'], client.read(f'/pane/{a}/dot')
+
+ # Edit in two files, then Save each: on disk, and logged.
+ for pane in (a, b):
+ client.write(f'/pane/{pane}/ctl', b'Edit ,s/shared/SHARED/g\n')
+ assert client.read(f'/pane/{b}/body') == b'beta two\nSHARED word\n'
+ for pane in (a, b):
+ client.write(f'/pane/{pane}/exec', b'Save\n')
+ assert (root / 'a.txt').read_bytes() == b'alpha one\nSHARED word\n'
+ assert f'save {a} {root}/a.txt\n' in log() and f'save {b} {root}/b.txt\n' in log()
+
+ # get reloads what changed on disk.
+ (root / 'b.txt').write_bytes(b'from disk\n')
+ client.write(f'/pane/{b}/ctl', b'get\n')
+ assert client.read(f'/pane/{b}/body') == b'from disk\n'
+
+ # A terminal: pty/run failing then passing.
+ term = made_by(1, b'Tty\n')
+
+ def run(line):
+ fid = client.open(f'/pane/{term}/pty/run', 2)
+ try:
+ client.rpc(118, struct.pack('<IQI', fid, 0, len(line)) + line)
+ return client.read_fid(fid)
+ finally:
+ client.close(fid)
+ deadline = time.monotonic() + 10
+ while (answer := run(b'true\n')) != b'exit 0\n':
+ assert time.monotonic() < deadline, answer
+ time.sleep(.05)
+ assert run(b'false\n') == b'exit 1\n'
+ assert run(b'echo passed\n') == b'exit 0\npassed\n'
+ # (A run's answer is its record: the log has no err for these.)
+ assert f'err {term} pty/run' not in log(), log()
+
+ # A command pane, and Kill: its exit is logged.
+ sleeper = made_by(a, b'sleep 30\n')
+ assert f'run {sleeper} sleep 30\n' in log()
+ client.write('/ctl', b'Kill sleep\n')
+ wait(lambda: f'\nexit {sleeper} ' in log(), 'Kill: no exit logged')
+
+ # A REPL send: a program in the terminal (cat, which says back
+ # what it is sent; a nested shell reads as the shell itself)
+ # bound as bash's REPL, an exec on a .sh file's body (its event
+ # written back) goes there.
+ s = look(client, str(root / 's.sh'))
+ client.write(f'/pane/{term}/pty/data', b'cat\r')
+ wait(lambda: client.read(f'/pane/{term}/pty/status').split()[-1] == b'1', ('the REPL program did not start', client.read(f'/pane/{term}/body')[-300:]))
+ client.write(f'/pane/{term}/ctl', b'Repl bash\n')
+ fid = client.open(f'/pane/{s}/event', 2)
+ try:
+ record = b'MX0 0 0 14 echo from-file\n'
+ client.rpc(118, struct.pack('<IQI', fid, 0, len(record)) + record)
+ finally:
+ client.close(fid)
+ wait(lambda: f'\nsend {s} {term} ' in log(), ('no REPL send logged', log()[-800:]))
+ wait(lambda: client.read(f'/pane/{term}/body').count(b'echo from-file') >= 2, 'the REPL did not get it')
+ client.write(f'/pane/{term}/ctl', b'Repl -\n')
+ client.write(f'/pane/{term}/pty/data', b'\x04')
+ wait(lambda: run(b'true\n') == b'exit 0\n', 'the terminal did not come back to its shell')
+
+ # The layout and a column's files: Newcol, its tag, rmdir.
+ assert len(client.read('/layout').splitlines()) >= 2 # a column, then `active`
+ client.write('/ctl', b'Newcol\n')
+ columns = [row for row in client.read('/layout').splitlines() if not row.startswith(b'active')]
+ assert len(columns) == 2, columns
+ empty = columns[-1].split()[0].decode()
+ assert b'New' in client.read(f'/col/{empty}/tag')
+ client.remove(f'/col/{empty}')
+ assert len([row for row in client.read('/layout').splitlines() if not row.startswith(b'active')]) == 1
+
+ # ask/answer: Save on a terminal asks for a path over 9P.
+ client.write(f'/pane/{term}/exec', b'Save\n')
+ wait(lambda: f'ask {term} save path\n' in log(), 'no ask logged')
+ client.write(f'/pane/{term}/ctl', f'answer {root}/scroll.txt\n'.encode())
+ wait(lambda: (root / 'scroll.txt').exists(), 'the answered Save wrote nothing')
+ assert f'answer {term} {root}/scroll.txt\n' in log()
+
+ # Dump, then Restore it: the new session names its panes.
+ client.write('/ctl', b'Dump\n')
+ saved = root / 'flow.dump.zon'
+ wait(saved.exists, 'Dump wrote nothing')
+ assert f'dump {saved}\n' in log()
+ try:
+ client.write('/ctl', f'Restore {saved}\n'.encode())
+ except (EOFError, OSError):
+ pass
+ time.sleep(.5)
+ with Client(address) as restored:
+ wait(lambda: f'restore {saved}' in restored.read('/log').decode(), 'Restore not logged')
+ names = restored.read('/index').decode()
+ assert f'{root}/a.txt' in names and f'{root}/b.txt' in names, names
+ # Recent goes on across the Restore, and is kept after it.
+ assert f'{root}/a.txt\n' in restored.read('/recent').decode(), restored.read('/recent')
+ (root / 'after.txt').write_bytes(b'after\n')
+ look(restored, str(root / 'after.txt'))
+ assert f'open {root}/after.txt\n' in restored.read('/recent').decode()
+ state = root / '.local' / 'state' / 'pardes' / 'store'
+ wait(lambda: f'{root}/after.txt'.encode() in state.read_bytes(), 'Recent not kept after Restore')
+ assert time.monotonic() - started < 30, 'the canary took too long'
+
+
+def python_repl_runs_one_line(binary):
+ """A one-line exec sent to Python's own REPL (3.13's pyrepl, which asks
+ for bracketed paste) runs at once, with no second Enter: the Enter
+ reaches it after the paste, not inside it. A real pty, a real python3."""
+ python = shutil.which('python3')
+ if python is None:
+ return
+ version = subprocess.run([python, '-c', 'import sys; print(sys.version_info >= (3, 13))'],
+ capture_output=True, text=True).stdout.strip()
+ if version != 'True':
+ return
+ with tempfile.TemporaryDirectory(prefix='pardes-repl-') as directory:
+ with session(binary, Path(directory), 'repl') as (client, _):
+ def panes(client):
+ return {int(row.split()[0]) for row in client.read('/index').splitlines()}
+ before = panes(client)
+ client.write('/pane/1/ctl', b'Tty\n')
+ deadline = time.monotonic() + 10
+ while time.monotonic() < deadline and panes(client) == before:
+ time.sleep(.05)
+ tty = max(panes(client) - before)
+ def body():
+ return client.read(f'/pane/{tty}/body').decode('utf-8', 'replace')
+ def wait_for(text, seconds=15):
+ deadline = time.monotonic() + seconds
+ while time.monotonic() < deadline:
+ if text in body():
+ return True
+ time.sleep(.1)
+ return False
+ assert wait_for('$') or wait_for('>'), body()
+ client.write(f'/pane/{tty}/pty/data', python.encode() + b' -q\r')
+ assert wait_for('>>>'), body()
+ client.write(f'/pane/{tty}/ctl', b'Repl python\n')
+ # An exec on the REPL's own body goes to the REPL, as its event
+ # record written back does: an empty range acts on its text.
+ fid = client.open(f'/pane/{tty}/event', 2)
+ try:
+ record = b'MX0 0 0 10 print(6*7)\n'
+ client.rpc(118, struct.pack('<IQI', fid, 0, len(record)) + record)
+ assert wait_for('\n42'), body()
+ # After the session has sat idle, the Enter still waits for
+ # the paste: core time is as old as the last frame then.
+ for n in range(5):
+ time.sleep(2)
+ line = f'print({1000 + n})'.encode()
+ record = b'MX0 0 0 %d %s\n' % (len(line), line)
+ client.rpc(118, struct.pack('<IQI', fid, 0, len(record)) + record)
+ assert wait_for(f'\n{1000 + n}'), (n, body())
+ # More than one line, with and without a newline at the end,
+ # and a block with a statement after it: each runs whole,
+ # and the REPL is back at its prompt, not at `...`.
+ for code, outputs in [(b'print(11)\nprint(22)', ['11', '22']),
+ (b'print(33)\nprint(44)\n', ['33', '44']),
+ (b'for i in range(2):\n print(55 + i)\nprint(77)\n', ['55', '56', '77'])]:
+ record = b'MX0 0 0 %d %s\n' % (len(code), code)
+ client.rpc(118, struct.pack('<IQI', fid, 0, len(record)) + record)
+ for out in outputs:
+ assert wait_for(f'\n{out}\n'), (code, out, body())
+ time.sleep(.5)
+ assert body().rstrip().endswith('>>>'), (code, body()[-200:])
+ finally:
+ client.close(fid)
+
+
+def signal_cleans_up(binary):
+ """A detached session told to stop by a signal unlinks its sockets."""
+ for sig in [signal.SIGTERM, signal.SIGINT, signal.SIGHUP]:
+ with tempfile.TemporaryDirectory(prefix='pardes-sig-') as directory:
+ root = Path(directory)
+ seen = {}
+ with session(binary, root, 'sig', terminal=seen) as (client, address):
+ detached = root / 'pardes-detached-sig.sock'
+ assert address.exists() and detached.exists()
+ os.kill(seen['pid'], sig)
+ deadline = time.monotonic() + 5
+ while (address.exists() or detached.exists()) and time.monotonic() < deadline:
+ time.sleep(.01)
+ assert not address.exists() and not detached.exists(), (sig, list(root.iterdir()))
+
+
+def odd_paths(binary):
+ """Long and odd paths written where a path goes -- name, look, DumpDir,
+ Dump, Save -- are refused or said, never a crash: a part over 255 bytes
+ (ENAMETOOLONG), a loop of links (ELOOP), a file taken for a directory
+ (ENOTDIR), one not ours (EACCES)."""
+ with tempfile.TemporaryDirectory(prefix='pardes-odd-') as directory:
+ root = Path(directory)
+ (root / 'loop').symlink_to(root / 'loop')
+ (root / 'plain').write_bytes(b'x\n')
+ odd = ['/tmp/' + 'x' * 300 + '/f.txt', str(root / ('y' * 300)), str(root / 'loop' / 'f'),
+ str(root / 'plain' / 'f'), '/root/nope/f', str(root / 'a' / '..' / 'b.txt')]
+ with session(binary, root, 'odd') as (client, _):
+ serial = new_pane(client, b'text\n')
+ for path in odd:
+ for where, line in ((f'/pane/{serial}/name', path), ('/look', path),
+ ('/ctl', f'DumpDir {path}'), ('/ctl', 'Dump'), (f'/pane/{serial}/ctl', 'Save')):
+ try:
+ client.write(where, (line + '\n').encode())
+ except OSError:
+ pass
+ assert client.read('/index'), (where, line)
+ client.write('/ctl', b'DumpDir\n')
+ # A theme file that is not there, or no theme, fails the write.
+ (root / 'bad.zon').write_bytes(b'.{ .nonsense = 1 }')
+ for line, why in ((f'ThemeFile {root}/missing.zon', 'theme file'), (f'ThemeFile {root}/bad.zon', 'theme file'),
+ ('ThemeFile notes.txt', 'a theme file is a .zon')):
+ try:
+ client.write('/ctl', (line + '\n').encode())
+ raise AssertionError(f'{line} was taken')
+ except OSError as refused:
+ assert why in str(refused), (line, refused)
+
+
+def delcol_last_keeps_window(binary):
+ """Delcol on the last column leaves the window, empty but for the
+ workspace tag, as acme does; Newcol and New start again from there."""
+ with tempfile.TemporaryDirectory(prefix='pardes-delcol-') as directory:
+ with session(binary, Path(directory), 'delcol') as (client, _):
+ def columns():
+ return [l for l in client.read('/layout').decode().splitlines() if l and not l.startswith('active')]
+ while columns():
+ client.write(f'/col/{columns()[0].split()[0]}/ctl', b'Delcol\n')
+ # Still here, empty.
+ assert client.read('/index') == b'', client.read('/index')
+ client.write('/ctl', b'Newcol\n')
+ assert len(columns()) == 1, columns()
+ serial = new_pane(client, b'back\n')
+ assert str(serial).encode() in client.read('/index'), client.read('/index')
+
+
+def cut_writes(binary):
+ """A write bigger than a 9P message comes as several, cut anywhere: each
+ command line runs once, whole, an Edit block once it ends, and a last
+ line with no newline when the open closes. Never a fragment."""
+ with tempfile.TemporaryDirectory(prefix='pardes-cut-') as directory:
+ with session(binary, Path(directory), 'cut') as (client, _):
+ burst = b''.join(b'Msg burst-%04d\n' % i for i in range(1000))
+ assert len(burst) > client.msize
+ client.write('/exec', burst)
+ log = client.read('/log').decode()
+ said = [line.split(' ', 2)[2] for line in log.splitlines() if line.startswith('msg ') and 'burst-' in line]
+ assert said == ['burst-%04d' % i for i in range(1000)], said[:3] + said[-3:]
+ assert '\nrun ' not in log and 'exit 127' not in log, log[-400:]
+ client.write('/exec', b'Msg no-newline-at-end')
+ assert 'msg ' in client.read('/log').decode().split('no-newline-at-end')[0][-40:]
+ serial = new_pane(client, b'')
+ block = b'Edit ,a\n' + b''.join(b'line %05d of the block\n' % i for i in range(2500)) + b'.\n'
+ assert len(block) > 50000
+ client.write(f'/pane/{serial}/ctl', block)
+ body = client.read(f'/pane/{serial}/body').decode().splitlines()
+ assert body == ['line %05d of the block' % i for i in range(2500)], (len(body), body[:2])
+ # A detached session with no frontend is 160x50 until told.
+ screen = client.screen()
+ assert (screen['cols'], screen['rows']) == (160, 50), (screen['cols'], screen['rows'])
+ client.write('/ctl', b'size 132 40\n')
+ screen = client.screen()
+ assert (screen['cols'], screen['rows']) == (132, 40), (screen['cols'], screen['rows'])
+
+
+def edit_commands(binary):
+ """Edit's `< | >` run off the loop and answer the write that ran them
+ once applied; a failing one changes nothing and fails the write in its
+ words; X edits every open file it matches; w writes. The editor answers
+ other requests while a slow command runs."""
+ with tempfile.TemporaryDirectory(prefix='pardes-edit-') as directory:
+ root = Path(directory)
+ (root / 'a.txt').write_bytes(b'pear\napple\nfig\n')
+ (root / 'b.txt').write_bytes(b'apple pie\n')
+ with session(binary, root, 'edit') as (client, address):
+ a = look(client, str(root / 'a.txt'))
+ b = look(client, str(root / 'b.txt'))
+ # The write returns with the text sorted, through the session's
+ # shell in the file's directory.
+ client.write(f'/pane/{a}/ctl', b'Edit , | sort\n')
+ assert client.read(f'/pane/{a}/body') == b'apple\nfig\npear\n'
+ client.write(f'/pane/{a}/ctl', b'Edit $ < pwd\n')
+ assert client.read(f'/pane/{a}/body') == f'apple\nfig\npear\n{root}\n'.encode()
+ client.write(f'/pane/{a}/ctl', b'Undo\n')
+ assert client.read(f'/pane/{a}/body') == b'apple\nfig\npear\n'
+ # A per-match command, one undo step.
+ client.write(f'/pane/{a}/ctl', b'Edit ,x/[a-z]+/ | tr a-z A-Z\n')
+ assert client.read(f'/pane/{a}/body') == b'APPLE\nFIG\nPEAR\n'
+ # A failing command: nothing changed, the write fails in words,
+ # its stderr in +Errors.
+ try:
+ client.write(f'/pane/{a}/ctl', b'Edit , | echo nope >&2; exit 4\n')
+ raise AssertionError('a failing Edit command was taken')
+ except OSError as why:
+ assert 'exit status 4' in str(why), why
+ assert client.read(f'/pane/{a}/body') == b'APPLE\nFIG\nPEAR\n'
+ index = client.read('/index').decode()
+ errors = [line.split()[0] for line in index.splitlines() if line.endswith(('+Errors', f'{root}/+Errors')) or '+Errors' in line]
+ assert errors and any(b'nope' in client.read(f'/pane/{e}/body') for e in errors), index
+ # While a slow command runs, the editor answers.
+ done = threading.Event()
+
+ def slow():
+ with Client(address) as other:
+ other.write(f'/pane/{b}/ctl', b'Edit , | sleep 1; cat\n')
+ done.set()
+ worker = threading.Thread(target=slow)
+ worker.start()
+ time.sleep(.2)
+ began = time.monotonic()
+ client.read('/index')
+ assert time.monotonic() - began < .5 and not done.is_set(), 'the editor waited on the command'
+ worker.join(timeout=15)
+ assert done.is_set()
+ # On the same connection: the Edit's write is held, and a read sent
+ # after it is answered first; a Tflush of it stops it, changes
+ # nothing, and frees the way for the next Edit.
+ def send(kind, tag, payload):
+ client.socket.sendall(struct.pack('<IBH', 7 + len(payload), kind, tag) + payload)
+
+ def answer():
+ size, kind, tag = struct.unpack('<IBH', client.receive(7))
+ return kind, tag, client.receive(size - 7)
+ ctl = client.open(f'/pane/{a}/ctl', 1)
+ status = client.open('/status', 0)
+ line = b'Edit , | sleep 1; cat\n'
+ began = time.monotonic()
+ send(118, 900, struct.pack('<IQI', ctl, 0, len(line)) + line)
+ send(116, 901, struct.pack('<IQI', status, 0, 4096))
+ first = answer()
+ assert first[1] == 901 and first[0] == 117 and time.monotonic() - began < .5, (first[:2], time.monotonic() - began)
+ second = answer()
+ assert second[1] == 900 and second[0] == 119, second
+ line = b'Edit , | sleep 5; tr a-z A-Z\n'
+ send(118, 902, struct.pack('<IQI', ctl, 0, len(line)) + line)
+ time.sleep(.3)
+ send(108, 903, struct.pack('<H', 902))
+ tags = sorted(answer()[1] for _ in range(2))
+ assert tags == [902, 903], tags
+ client.close(ctl)
+ client.close(status)
+ time.sleep(1)
+ client.write(f'/pane/{a}/ctl', b'Edit , | cat\n')
+ time.sleep(4.5)
+ assert client.read(f'/pane/{a}/body') == b'APPLE\nFIG\nPEAR\n', client.read(f'/pane/{a}/body')
+ # X: each open file whose line matches; w writes it.
+ client.write(f'/pane/{a}/ctl', b'Edit X/b\\.txt$/ ,s/apple/APPLE/\n')
+ assert client.read(f'/pane/{b}/body') == b'APPLE pie\n'
+ client.write(f'/pane/{b}/ctl', b'Edit w\n')
+ assert (root / 'b.txt').read_bytes() == b'APPLE pie\n'
+ client.write(f'/pane/{a}/ctl', b'Edit 1 w first.txt\n')
+ assert (root / 'first.txt').read_bytes() == b'APPLE\n'
+ # A file changed on disk under unsaved edits: Edit's w refuses
+ # once, as Save does, and the next w overwrites it.
+ w1 = root / 'w1.txt'
+ w1.write_bytes(b'one\n')
+ w = look(client, str(w1))
+ client.write(f'/pane/{w}/ctl', b'Edit $a/two/\n')
+ seen = client.read('/log').decode().count(f'\nchanged {w}')
+ with open(w1, 'ab') as f:
+ f.write(b'external\n')
+ deadline = time.monotonic() + 10
+ while client.read('/log').decode().count(f'\nchanged {w}') == seen:
+ assert time.monotonic() < deadline, 'the change on disk was not heard'
+ time.sleep(.05)
+ try:
+ client.write(f'/pane/{w}/ctl', b'Edit w\n')
+ raise AssertionError('w overwrote a file changed on disk')
+ except OSError as why:
+ assert 'modified on disk since read (w again to overwrite)' in str(why), why
+ assert w1.read_bytes() == b'one\nexternal\n'
+ client.write(f'/pane/{w}/ctl', b'Edit w\n')
+ assert w1.read_bytes() == b'one\ntwo', w1.read_bytes()
def test(binary, quic=False):
started = time.monotonic()
+ cut_writes(binary)
+ edit_commands(binary)
+ odd_paths(binary)
+ delcol_last_keeps_window(binary)
+ run_file(binary)
+ exit_answers(binary)
+ unattended_messages_expire(binary)
+ new_terminals_named_once(binary)
+ directory_panes(binary)
+ putall_answers_after_its_saves(binary)
+ workflow_canary(binary)
+ recent_survives_restart(binary)
+ store_shared_between_windows(binary)
+ python_repl_runs_one_line(binary)
+ signal_cleans_up(binary)
for options, message in [
(['--fs'], b'no such option'),
(['--fs9'], b'no such option'),
+ (['--', 'a', 'b'], b'is the second'),
(['--9p'], b'--9p needs a socket name'),
(['--9p='], b'invalid 9P socket name'),
(['--9p=a/b'], b'invalid 9P socket name'),
@@ -266,7 +1237,7 @@ def test(binary, quic=False):
assert not (root / 'pardes-9p-renamed.sock').exists()
assert named.read('/pane/1/body') == b'initial\n'
with session(binary, root, 'first') as (client, address):
- assert {'pane', 'index', 'new', 'ctl', 'log', 'os'} <= set(client.list('/'))
+ assert {'pane', 'index', 'status', 'look', 'exec', 'log', 'os'} <= set(client.list('/'))
assert 'self' not in client.list('/')
assert client.read('/pane/1/body') == b'initial\n'
assert client.read('/os' + str(root / 'first.txt')) == b'initial\n'
@@ -282,6 +1253,17 @@ def test(binary, quic=False):
with Client(address, msize=256) as small:
assert set(small.list('/os' + str(listing))) == {
f'entry-{number:02}' for number in range(24)}
+ # 64 KiB frames: a ctl line with no newline is held whatever the
+ # size of its write -- a mount cuts lines anywhere -- and runs at
+ # the close, its failure then in the log.
+ with Client(address, msize=65536) as big:
+ assert big.msize == 65536
+ ctl = big.open('/pane/1/ctl', 1)
+ line = b'bogus' + b'x' * 20000
+ big.rpc(118, struct.pack('<IQI', ctl, 0, len(line)) + line)
+ assert b'ctl: unknown control message' not in client.read('/log')
+ big.close(ctl)
+ assert b'ctl: unknown control message' in client.read('/log')
frozen = client.open('/screen')
before = bytearray(client.read_fid(frozen, count=31))
@@ -346,7 +1328,7 @@ def test(binary, quic=False):
opened = look(remote, '/n/peer/pane/' + str(serial) + '/body')
assert remote.read(f'/pane/{opened}/body') == b'replaced\nevent\n'
remote.write(f'/pane/{opened}/body', b'saved to peer\n', truncate=True)
- remote.write(f'/pane/{opened}/ctl', b'exec Save\n')
+ remote.write(f'/pane/{opened}/exec', b'Save\n')
assert client.read(body) == b'saved to peer\n'
large = b'mounted file contents\n' * 60000
@@ -356,24 +1338,29 @@ def test(binary, quic=False):
assert remote.read(f'/pane/{opened}/body') == large
edited = large[:-3] + b'edited\n'
remote.write(f'/pane/{opened}/body', edited, truncate=True)
- remote.write(f'/pane/{opened}/ctl', b'exec Save\n')
+ remote.write(f'/pane/{opened}/exec', b'Save\n')
assert large_path.read_bytes() == edited
assert client.read('/os' + str(large_path)) == edited
+ # A path not there under a peer's mount is a miss, as any
+ # path to no file is: the write answered, the err logged.
+ remote.write('/look', b'/n/peer/os' + str(root / 'no-such-file.txt').encode() + b'\n')
+ assert b'no such file' in remote.read('/log')
with session(binary, root, 'runtime') as (remote, own_address):
control = new_pane(remote, b'')
execute(remote, control, 'Mount peer ' + str(address))
opened = look(remote, '/n/peer/pane/1/body', source=control)
assert remote.read(f'/pane/{opened}/body') == client.read('/pane/1/body')
- execute(remote, control, 'Mount peer ' + str(own_address))
- execute(remote, control, 'Unmount peer')
+ # A builtin that fails through exec fails the write (one rule).
+ execute_refused(remote, control, 'Mount peer ' + str(own_address), 'already mounted')
+ execute_refused(remote, control, 'Unmount peer', 'mount in use') # a pane is open on it
remote.write(f'/pane/{opened}/body', b'runtime mounted Save\n', truncate=True)
- remote.write(f'/pane/{opened}/ctl', b'exec Save\n')
+ remote.write(f'/pane/{opened}/exec', b'Save\n')
assert client.read('/pane/1/body') == b'runtime mounted Save\n'
assert remote.read('/pane/1/body') == b'initial\n'
roots = look(remote, '/n', source=control)
assert b'/n/peer/\n' in remote.read(f'/pane/{roots}/body')
- remote.write(f'/pane/{opened}/ctl', b'exec Del\n')
+ remote.write(f'/pane/{opened}/exec', b'Del\n')
execute(remote, control, 'Unmount peer')
remote.write(f'/pane/{roots}/ctl', b'get\n')
assert remote.read(f'/pane/{roots}/body') == b'/n/os/\n/n/self/\n'
@@ -385,7 +1372,7 @@ def test(binary, quic=False):
file='/n/peer/pane/1/body:1') as (remote, _):
assert remote.read('/pane/1/body') == b'runtime mounted Save\n'
- client.write(f'/pane/{serial}/ctl', b'exec Del\n')
+ client.write(f'/pane/{serial}/exec', b'Del\n')
assert str(serial) not in client.list('/pane')
for tty in [False, True]:
@@ -393,7 +1380,7 @@ def test(binary, quic=False):
with session(binary, root, name, tty=tty) as (old, address):
old.write('/pane/1/body', b'dumped state\n', truncate=True)
control = new_pane(old, b'')
- execute(old, control, 'Restore ' + str(root / 'missing dump.zon'))
+ execute_refused(old, control, 'Restore ' + str(root / 'missing dump.zon'), 'no such file')
assert old.read('/pane/1/body') == b'dumped state\n'
execute(old, control, 'Mount own ' + str(address))
execute(old, control, 'Dump')
@@ -408,24 +1395,42 @@ def test(binary, quic=False):
assert old.read_fid(held_body) == b'dumped state\n'
assert old.read_fid(held_screen, count=1) == b'{'
old.write('/pane/1/body', b'changed after dump\n', truncate=True)
+ # Unsaved text is asked about once, as Exit asks; the second
+ # Restore goes ahead, and is answered before the hang-up.
try:
execute(old, control, 'Restore ' + str(saved))
- except (EOFError, ConnectionResetError, BrokenPipeError):
+ except OSError as refused:
+ assert 'Modified' in str(refused), refused
+ assert old.read('/pane/1/body') == b'changed after dump\n'
+ # Answered before the hang-up: the write's reply comes; the
+ # clunk after it may meet the connection already cut.
+ restore = old.open(f'/pane/{control}/exec', 1)
+ line = ('Restore ' + str(saved) + '\n').encode()
+ old.rpc(118, struct.pack('<IQI', restore, 0, len(line)) + line)
+ try:
+ old.close(restore)
+ except (EOFError, OSError):
pass
+ # Refused while the connections are cut, or cut already.
try:
old.read_fid(held_body)
- except (EOFError, ConnectionResetError, BrokenPipeError):
+ except (EOFError, OSError):
pass
else:
raise AssertionError('Restore left an old body fid usable')
with Client(address) as restored:
+ # The new log names its panes, then where they came from.
+ log = restored.read('/log')
+ assert b'\nrestore ' + str(saved).encode() + b'\n' in log, log
+ # then which serial each pane had: restored <old> <new>
+ assert (b'\n'.join(b'restored %d %d' % (old, new) for old, new in zip(sorted(old_ids), sorted(int(r.split()[0]) for r in restored.read('/index').splitlines()))) + b'\nrestoredcol ') in log, log
restored_ids = [int(row.split()[0]) for row in restored.read('/index').splitlines()]
assert len(restored_ids) == 2 and old_ids.isdisjoint(restored_ids), restored_ids
file_id, control_id = restored_ids
contents = restored.read(f'/pane/{file_id}/body')
assert contents == b'dumped state\n', (contents, saved.read_text(), restored.read('/index'))
- assert restored.read(f'/pane/{control_id}/body') == b'', 'commands ran through ctl, not the body'
- assert restored.screen()['cols'] == 80
+ assert restored.read(f'/pane/{control_id}/body') == b'', 'commands ran through exec, not the body'
+ assert restored.screen()['cols'] == (80 if tty else 160) # a detached one is 160x50
opened = look(restored, '/n/own/os' + str(root / (name + '.txt')), source=control_id)
assert restored.read(f'/pane/{opened}/body') == b'initial\n'
@@ -435,7 +1440,13 @@ def test(binary, quic=False):
spaced = child_dir / 'space name.txt'
spaced.write_bytes(b'first line\nsecond line\n')
env = os.environ.copy()
- env.update(PARDES_9P=str(address), PARDES_PANE='1', PARDES_FORWARD_LOOK='1')
+ # PARDES_PID is what says "you are inside a pardes"; the socket
+ # and the pane only say how to reach it. Without the pid the child
+ # starts its own session, so this test used to pass only when the
+ # runner itself happened to be running inside one.
+ status = dict(line.split(maxsplit=1) for line in client.read('/status').decode().splitlines())
+ env.update(PARDES_9P=str(address), PARDES_PANE='1', PARDES_PID=status['pid'])
+ env.pop('PARDES_FORWARD_LOOK', None)
for word, expected, selected, reuse in [('space name.txt:2:4', spaced.read_bytes(), [14, 14], False),
('/n/self/pane/1/body', b'initial\n', None, False),
('/virtual/pane/1/body:1:2-4', b'initial\n', [1, 4], True)]:
@@ -451,14 +1462,12 @@ def test(binary, quic=False):
assert client.read(f'/pane/{opened}/body') == expected
assert client.read('/pane/1/body') == b'initial\n'
if selected is not None:
- addr = client.open(f'/pane/{opened}/addr')
- client.write(f'/pane/{opened}/ctl', b'addr=dot\n')
- actual = list(map(int, client.read_fid(addr).split()))
- client.close(addr)
+ # The selection is dot; reading it takes no command at all.
+ actual = list(map(int, client.read(f'/pane/{opened}/dot').split()))
assert actual == selected, (word, actual, selected)
addr = client.open('/pane/1/addr', 2)
- ctl = client.open('/pane/1/ctl', 1)
- for fid, text in [(addr, b'#0,#3'), (ctl, b'limit=addr\n'), (addr, b'#0')]:
+ limit = client.open('/pane/1/limit', 2)
+ for fid, text in [(addr, b'#0,#3'), (limit, b'#0,#3'), (addr, b'#0')]:
client.rpc(118, struct.pack('<IQI', fid, 0, len(text)) + text)
try:
for _ in range(8):
@@ -474,7 +1483,7 @@ def test(binary, quic=False):
raise AssertionError('no-argument child cleared the parent address limit')
finally:
client.close(addr)
- client.close(ctl)
+ client.close(limit)
client.read('/pane/1/ctl')
control = new_pane(client, b'')
@@ -485,7 +1494,7 @@ def test(binary, quic=False):
assert time.monotonic() < deadline, 'forwarding fixture Dump did not finish'
time.sleep(.005)
before = client.read('/index')
- inherited = {key: env[key] for key in ['PARDES_9P', 'PARDES_PANE', 'PARDES_FORWARD_LOOK']}
+ inherited = {key: env[key] for key in ['PARDES_9P', 'PARDES_PANE', 'PARDES_PID']}
cases = [
('mount', ['--mount=peer=' + str(address), '/n/peer/pane/1/body'], None),
('name', ['--9p=forwarded-name'], 'forwarded-name'),
@@ -510,18 +1519,30 @@ def test(binary, quic=False):
assert local.read('/index') == before
assert local.read('/pane/1/body') == b'initial\n'
else:
- assert len(index) == (3 if name == 'shells' else 1), index
+ # A bare tty launch is a shell plus the empty text pane
+ # the boot puts under it; --shells=3 is the classic
+ # three-shell layout and has no scratch.
+ assert len(index) == (3 if name == 'shells' else 2), index
if name in ['tcp', 'quic']:
assert (name + '!127.0.0.1!').encode() in local.read('/listeners')
assert client.read('/index') == before
assert client.read('/pane/1/body') == b'initial\n'
+ # A session that answers takes the file or says why, as acme's B
+ # does: a pane it has not is its refusal and exit 1, never a
+ # nested editor drawn inside the pane that asked.
+ gone = subprocess.run([binary, '--tty', str(spaced)], cwd=root,
+ env=dict(env, PARDES_PANE='4294967295'), stdin=subprocess.DEVNULL,
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=10)
+ assert gone.returncode == 1 and gone.stderr.startswith(b'pardes: '), gone
+ assert client.read('/index') == before
for name, identity, word in [
('stale-file', dict(inherited, PARDES_9P=str(root / 'absent.sock')), str(spaced)),
('stale-missing', dict(inherited, PARDES_9P=str(root / 'absent.sock')), 'missing-child-file.txt'),
('stale-noarg', dict(inherited, PARDES_9P=str(root / 'absent.sock')), None),
- ('stale-pane', dict(inherited, PARDES_PANE='4294967295'), str(spaced)),
- ('disabled', dict(inherited, PARDES_FORWARD_LOOK='0'), str(spaced)),
+ # No pid means "not inside a pardes at all", which is what
+ # --nested withholds and what a plain shell has.
+ ('not-nested', {k: v for k, v in inherited.items() if k != 'PARDES_PID'}, str(spaced)),
]:
with session(binary, root, name, tty=True, inherited=identity,
launch=['--tty', *([word] if word else [])]) as (local, local_address):
@@ -533,6 +1554,388 @@ def test(binary, quic=False):
cell[0] for cell in local.screen()['cells'])
assert client.read('/index') == before
+ # --wait (acme's E): a launch inside a pane lasts until the pane it
+ # opened is deleted, as an $EDITOR must; one on a file already open
+ # waits on that pane; a session that goes away ends it with 1.
+ with session(binary, root, 'wait') as (client, address):
+ # A command run from a pane's tag gets acme's $winid, that pane;
+ # one from the workspace's tag, none.
+ def command_body(node, line):
+ client.write(node, line)
+ serial = int(client.read(node).split()[-1])
+ deadline = time.monotonic() + 10
+ while True:
+ log = client.read('/log').decode()
+ ran = log.rfind(f'\nrun {serial} ')
+ if ran >= 0 and f'\nexit {serial} ' in log[ran:]:
+ body = client.read(f'/pane/{serial}/body').decode().split('% echo winid')[-1]
+ client.remove(f'/pane/{serial}')
+ return body
+ assert time.monotonic() < deadline, log[-400:]
+ time.sleep(.05)
+ first_pane = min(int(row.split()[0]) for row in client.read('/index').splitlines())
+ assert f'winid={first_pane}\n' in command_body(f'/pane/{first_pane}/tagexec', b'echo winid=$winid\n')
+ assert 'winid=\n' in command_body('/tagexec', b'echo winid=$winid\n')
+ # A second --detach of a name a live session holds: said, exit 1,
+ # no Zig error trace.
+ second_env = {k: v for k, v in os.environ.items() if not k.startswith('PARDES_')}
+ second_env.update(HOME=str(root), XDG_RUNTIME_DIR=str(root))
+ second = subprocess.run([binary, '--detach=wait'], cwd=root, env=second_env,
+ stdout=subprocess.DEVNULL, stderr=subprocess.PIPE, timeout=20)
+ assert second.returncode == 1, second
+ assert second.stderr == b'pardes: a session named wait is already running\n', second.stderr
+ status = dict(line.split(maxsplit=1) for line in client.read('/status').decode().splitlines())
+ env = {k: v for k, v in os.environ.items() if k != 'PARDES_FORWARD_LOOK'}
+ env.update(PARDES_9P=str(address), PARDES_PANE='1', PARDES_PID=status['pid'])
+ edited = root / 'wait edit.txt'
+ edited.write_bytes(b'edit me\n')
+
+ def serials():
+ return {int(row.split()[0]) for row in client.read('/index').splitlines()}
+
+ def launch(flag):
+ before = serials()
+ child = subprocess.Popen([binary, flag, str(edited)], cwd=root, env=env,
+ stdout=subprocess.DEVNULL, stderr=subprocess.PIPE)
+ deadline = time.monotonic() + 3
+ while child.poll() is None and not serials() - before and time.monotonic() < deadline:
+ time.sleep(.01)
+ return child
+
+ first = launch('--wait')
+ opened, = serials() - {1}
+ second = launch('-w')
+ time.sleep(.5)
+ assert first.poll() is None and second.poll() is None, (first.stderr.read(), second.stderr.read())
+ assert serials() == {1, opened}
+ client.write(f'/pane/{opened}/body', b'edited\n', truncate=True)
+ execute(client, opened, 'Save')
+ client.remove(f'/pane/{opened}')
+ deleted = time.monotonic()
+ assert first.wait(timeout=5) == 0
+ # Woken by the `del` record, not a poll.
+ assert time.monotonic() - deleted < .05, time.monotonic() - deleted
+ assert second.wait(timeout=5) == 0
+ assert edited.read_bytes() == b'edited\n'
+ # --wait from outside the session's panes, $PARDES_9P alone (an
+ # agent's EDITOR): asked of the session, not a screen of its own.
+ outside_env = {k: v for k, v in env.items() if k not in ('PARDES_PANE', 'PARDES_PID')}
+ far = root / 'wait far.txt'
+ far.write_bytes(b'far\n')
+ before = serials()
+ waiting = subprocess.Popen([binary, '--wait', str(far)], cwd=root, env=outside_env,
+ stdin=subprocess.DEVNULL, stdout=subprocess.DEVNULL, stderr=subprocess.PIPE)
+ deadline = time.monotonic() + 5
+ while not serials() - before and time.monotonic() < deadline:
+ time.sleep(.01)
+ far_pane, = serials() - before
+ time.sleep(.3)
+ assert waiting.poll() is None, waiting.stderr.read()
+ client.remove(f'/pane/{far_pane}')
+ assert waiting.wait(timeout=5) == 0
+ # --wait with a $PARDES_9P that answers no more: said, exit 1,
+ # never a screen of its own drawn in the asker's terminal.
+ dead_env = dict(outside_env, PARDES_9P=str(root / 'pardes-9p-gone.sock'))
+ gone = subprocess.run([binary, '--wait', str(far)], cwd=root, env=dead_env, capture_output=True, timeout=10)
+ assert gone.returncode == 1 and b'does not answer' in gone.stderr, gone
+ # --wait with no FILE says it needs one, and waits on nothing.
+ bare = subprocess.run([binary, '--wait'], cwd=root, env=env, capture_output=True, timeout=10)
+ assert bare.returncode == 1 and b'--wait needs a FILE' in bare.stderr, bare
+ # `--` ends the options: a name starting with a dash is a name.
+ dash = root / '-dash.txt'
+ dash.write_bytes(b'dash\n')
+ before = serials()
+ assert subprocess.run([binary, '--', dash.name], cwd=root, env=env, capture_output=True, timeout=10).returncode == 0
+ dashed, = serials() - before
+ assert client.read(f'/pane/{dashed}/name').rstrip(b'\n') == str(dash).encode()
+ client.remove(f'/pane/{dashed}')
+ # A name under a directory that may not be searched is refused,
+ # permission denied, exit 1, no pane: its Save could never be.
+ (root / 'noperm').mkdir()
+ (root / 'noperm').chmod(0)
+ before = serials()
+ try:
+ denied = subprocess.run([binary, 'noperm/a/b/c'], cwd=root, env=env, capture_output=True, timeout=10)
+ finally:
+ (root / 'noperm').chmod(0o755)
+ assert denied.returncode == 1 and b'permission denied' in denied.stderr, denied
+ assert serials() == before
+ # --wait waits on the pane its look answered, on the look's own
+ # open: a name /index shows escaped (a backslash is `\\` there)
+ # is still the pane waited on, not one already gone.
+ odd = root / 'wait\\odd.txt'
+ odd.write_bytes(b'odd\n')
+ before = serials()
+ waiting = subprocess.Popen([binary, '--wait', str(odd)], cwd=root, env=env,
+ stdout=subprocess.DEVNULL, stderr=subprocess.PIPE)
+ deadline = time.monotonic() + 3
+ while not serials() - before and time.monotonic() < deadline:
+ time.sleep(.01)
+ odd_pane, = serials() - before
+ time.sleep(.5)
+ assert waiting.poll() is None, waiting.stderr.read()
+ client.remove(f'/pane/{odd_pane}')
+ assert waiting.wait(timeout=5) == 0
+ # A name not there yet opens a pane named it, as acme's B does,
+ # and Save creates it: git's and fish's temporary files are.
+ fresh = root / 'wait new.txt'
+ before = serials()
+ made = subprocess.Popen([binary, '--wait', fresh.name], cwd=root, env=env,
+ stdout=subprocess.DEVNULL, stderr=subprocess.PIPE)
+ # The launch makes the pane (pane/new), then names it: wait for
+ # the name, not the pane.
+ deadline = time.monotonic() + 3
+ while str(fresh).encode() not in client.read('/index'):
+ assert made.poll() is None, made.stderr.read()
+ assert time.monotonic() < deadline, 'a new name opened no pane named it'
+ time.sleep(.01)
+ named, = serials() - before
+ client.write(f'/pane/{named}/body', b'new\n')
+ execute(client, named, 'Save')
+ client.remove(f'/pane/{named}')
+ code = made.wait(timeout=5)
+ assert code == 0, (code, made.stderr.read())
+ assert fresh.read_bytes() == b'new\n'
+ # ...in a directory not there either: forwarded all the same, and
+ # Save makes the directories.
+ deep = root / 'wait-missing' / 'sub' / 'new.txt'
+ before = serials()
+ made = subprocess.Popen([binary, 'wait-missing/sub/new.txt'], cwd=root, env=env,
+ stdout=subprocess.DEVNULL, stderr=subprocess.PIPE)
+ assert made.wait(timeout=5) == 0, made.stderr.read()
+ deadline = time.monotonic() + 3
+ while str(deep).encode() not in client.read('/index'):
+ assert time.monotonic() < deadline, 'a name in a missing directory opened no pane named it'
+ time.sleep(.01)
+ named, = serials() - before
+ client.write(f'/pane/{named}/body', b'deep\n')
+ execute(client, named, 'Save')
+ client.remove(f'/pane/{named}')
+ assert deep.read_bytes() == b'deep\n'
+ # `pardes '~/x'`, quoted so the shell left the `~`: home all the
+ # same: the launching shell's HOME.
+ before = serials()
+ quoted = subprocess.run([binary, '~/fwd-tilde.txt'], cwd=root, env=dict(env, HOME=str(root)),
+ stdout=subprocess.DEVNULL, stderr=subprocess.PIPE, timeout=10)
+ assert quoted.returncode == 0, quoted.stderr
+ assert f'{root}/fwd-tilde.txt'.encode() in client.read('/index'), client.read('/index')
+ for serial in serials() - before:
+ client.remove(f'/pane/{serial}')
+ # A name the session refuses: its reason and exit 1, as B's,
+ # never a nested editor, and no pane left for it.
+ before = serials()
+ refused = subprocess.run([binary, 'x' * 300 + '.txt'], cwd=root, env=env,
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=10)
+ assert refused.returncode == 1, refused
+ assert b'a component over 255 bytes' in refused.stderr, refused.stderr
+ assert serials() == before, (serials(), before)
+ # A pane address the session has not is refused in words, exit
+ # 1, no pane made for a file of that name; one it has is looked
+ # at. A name with a newline is said in words, not an error name.
+ # `pardes -` (a terminal's PAGER): stdin, its escapes stripped, in a
+ # +Pager pane of the session, clean, and back at once.
+ fed = subprocess.run([binary, '-'], cwd=root, env=env, input=b'\x1b[1mbold\x1b[0m text\n',
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=10)
+ assert fed.returncode == 0, fed.stderr
+ made_now, = serials() - before
+ assert client.read(f'/pane/{made_now}/name') == f'{root}/+Pager\n'.encode()
+ assert client.read(f'/pane/{made_now}/body') == b'bold text\n'
+ row = [r for r in client.read('/index').splitlines() if r.split()[0] == str(made_now).encode()][0]
+ assert row.split()[2] == b'0', row # clean: nothing to ask at Exit
+ # Its `new` record names it as it is: no +New and a rename.
+ log_now = client.read('/log').decode()
+ assert f'\nnew {made_now} {root}/+Pager\n' in '\n' + log_now, log_now[-400:]
+ assert f'\nrename {made_now} ' not in '\n' + log_now
+ # Its colours are the pane's, drawn and never read: the body is
+ # the plain text, and the screen shows `red` in the theme's red
+ # and `rgb` in the colour given, the rest in the pane's ink.
+ fed = subprocess.run([binary, '-'], cwd=root, env=env,
+ input=b'\x1b]0;title\x07\x1b[31mred\x1b[m \x1b[38;2;1;2;3mrgb\x1b[m plain\n',
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=10)
+ assert fed.returncode == 0, fed.stderr
+ assert client.read(f'/pane/{made_now}/body') == b'red rgb plain\n'
+ screen = client.screen()
+ for row in range(screen['rows']):
+ cells = screen['cells'][row * screen['cols']:(row + 1) * screen['cols']]
+ text = ''.join(cell[0] for cell in cells)
+ at = text.find('red rgb plain')
+ if at >= 0:
+ break
+ else:
+ raise AssertionError(('the paged text is not on the screen', screen))
+ ink = [screen['styles'][cells[at + i][1]]['fg'] for i in (0, 4, 8)]
+ assert ink[1] == {'rgb': [1, 2, 3]}, ink
+ assert ink[0] != ink[2] and ink[0] != ink[1], ink
+ # The directory's one +Pager: the next paged text refills it.
+ fed = subprocess.run([binary, '-'], cwd=root, env=env, input=b'again\r\nprogress 10%\rprogress 100%\n',
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=10)
+ assert fed.returncode == 0, fed.stderr
+ assert serials() - before == {made_now}, (serials(), before)
+ assert client.read(f'/pane/{made_now}/body') == b'again\nprogress 100%\n'
+ client.remove(f'/pane/{made_now}')
+ # More than one 8 MiB write's worth arrives whole, byte for byte,
+ # in the one +Pager (each write once replaced the last).
+ big = b''.join(b'line %08d of the paged text\n' % i for i in range(400000)) # ~11 MiB
+ assert len(big) > 8 * 1024 * 1024
+ fed = subprocess.run([binary, '-'], cwd=root, env=env, input=big,
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=120)
+ assert fed.returncode == 0, fed.stderr
+ big_pane, = serials() - before
+ assert client.read(f'/pane/{big_pane}/body') == big, 'the paged body is not the text'
+ # Past the 256 MiB cap: the first 256 MiB, then the cut note.
+ cap = 256 * 1024 * 1024
+ huge = subprocess.Popen(['sh', '-c', f'yes 0123456789abcdef | head -c {cap + 4096}'], stdout=subprocess.PIPE)
+ fed = subprocess.run([binary, '-'], cwd=root, env=env, stdin=huge.stdout,
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=600)
+ huge.wait()
+ assert fed.returncode == 0, fed.stderr
+ assert serials() - before == {big_pane}
+ got = client.read(f'/pane/{big_pane}/body')
+ note = b'\n[pardes: the rest of stdin is cut: a pane holds at most a file\'s limit]\n'
+ assert got.endswith(note) and len(got) == cap + len(note), (len(got), got[-120:])
+ assert got[:cap] == (b'0123456789abcdef\n' * (cap // 17 + 1))[:cap]
+ del got, big
+ client.remove(f'/pane/{big_pane}')
+ # From a directory whose name could not be a ctl line: the
+ # session's directory's +Pager, the text whole, no stray +New.
+ odd = root / 'two\nlines'
+ odd.mkdir()
+ fed = subprocess.run([binary, '-'], cwd=odd, env=env, input=b'odd dir text\n',
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=10)
+ assert fed.returncode == 0, fed.stderr
+ odd_pane, = serials() - before
+ assert client.read(f'/pane/{odd_pane}/name') == f'{root}/+Pager\n'.encode()
+ assert client.read(f'/pane/{odd_pane}/body') == b'odd dir text\n'
+ client.remove(f'/pane/{odd_pane}')
+ # Nothing on stdin: no pane, and done.
+ fed = subprocess.run([binary, '-'], cwd=root, env=env, input=b'',
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=10)
+ assert fed.returncode == 0 and serials() == before, (fed, serials())
+ # A new name in a directory there but not writable: refused now,
+ # not a pane that only fails at Save.
+ shut = root / 'shut-dir'
+ shut.mkdir()
+ shut.chmod(0o500)
+ try:
+ refused = subprocess.run([binary, 'shut-dir/new.txt'], cwd=root, env=env,
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=10)
+ assert refused.returncode == 1, refused
+ assert b'may not be read or written' in refused.stderr, refused.stderr
+ assert serials() == before, (serials(), before)
+ finally:
+ shut.chmod(0o755)
+ for word, said in (('@p999:1', b'pardes: @p999:1: this session has no such pane'),
+ ('two\nlines.txt', b'pardes: two\\nlines.txt: a file name is one line')):
+ refused = subprocess.run([binary, word], cwd=root, env=env,
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=10)
+ assert refused.returncode == 1, refused
+ assert said in refused.stderr, refused.stderr
+ assert b'NotOneLine' not in refused.stderr and b'NoSuchPane' not in refused.stderr
+ assert serials() == before, (serials(), before)
+ looked = subprocess.run([binary, '@p1:1'], cwd=root, env=env,
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=10)
+ assert looked.returncode == 0, looked.stderr
+ assert serials() == before, (serials(), before)
+ orphan = launch('--wait')
+ assert orphan.poll() is None
+ assert orphan.wait(timeout=5) == 1
+
+ # `pardes -` outside a session: an editor whose first pane is a
+ # +Pager of stdin, as `vim -`; here a detached one, to read it.
+ outside_env = {k: v for k, v in os.environ.items() if not k.startswith('PARDES_')}
+ outside_env.update(HOME=str(root), XDG_RUNTIME_DIR=str(root), PARDES_NOTIME='1')
+ boot = subprocess.Popen([binary, '--detach=stdinboot', '-'], cwd=root, env=outside_env,
+ stdin=subprocess.PIPE, stdout=subprocess.DEVNULL, stderr=subprocess.PIPE,
+ start_new_session=True)
+ try:
+ boot.stdin.write(b'\x1b[32mfrom stdin\x1b[m\nsecond\n')
+ boot.stdin.close()
+ sock = root / 'pardes-9p-stdinboot.sock'
+ deadline = time.monotonic() + 10
+ while not sock.exists():
+ assert boot.poll() is None, boot.stderr.read()
+ assert time.monotonic() < deadline, 'the stdin boot never listened'
+ time.sleep(.05)
+ with Client(str(sock)) as booted:
+ first = booted.read('/index').split(b'\n')[0].split()
+ assert first[3] == f'{root}/+Pager'.encode(), first
+ assert booted.read(f'/pane/{first[0].decode()}/body') == b'from stdin\nsecond\n'
+ finally:
+ boot.terminate()
+ boot.wait(timeout=10)
+
+ # Killed with SIGTERM or SIGHUP, a tty editor puts its terminal
+ # back (main screen, cooked mode) before it dies: a nested one
+ # killed in a pane leaves that pane usable.
+ # ...and its 9P socket goes with it. One a dead editor left behind
+ # (no process has its pid) is swept at the next start; a live
+ # pid's, here this test's own, never is.
+ def unix_socket_file(path):
+ made = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
+ made.bind(str(path))
+ made.close()
+ for sig in (signal.SIGTERM, signal.SIGHUP):
+ dead_socket = root / 'pardes-9p-2147483647.sock'
+ live_socket = root / f'pardes-9p-{os.getpid()}.sock'
+ for path in (dead_socket, live_socket):
+ if not path.exists():
+ unix_socket_file(path)
+ master, slave = os.openpty()
+ fcntl.ioctl(slave, termios.TIOCSWINSZ, struct.pack('HHHH', 24, 80, 0, 0))
+ cooked = termios.tcgetattr(slave)
+ env = {k: v for k, v in os.environ.items() if not k.startswith('PARDES_')}
+ env.update(HOME=str(root), XDG_RUNTIME_DIR=str(root), TERM='xterm-256color', PARDES_NOTIME='1')
+ killed = subprocess.Popen([binary, '--tty', 'x.txt'], cwd=root, env=env,
+ stdin=slave, stdout=slave, stderr=subprocess.DEVNULL,
+ start_new_session=True,
+ preexec_fn=lambda: fcntl.ioctl(0, termios.TIOCSCTTY, 0))
+ seen = b''
+ try:
+ deadline = time.monotonic() + 10
+ while b'\x1b[?1049h' not in seen:
+ assert time.monotonic() < deadline, seen[-200:]
+ if select.select([master], [], [], .1)[0]:
+ seen += os.read(master, 65536)
+ time.sleep(.3)
+ own_socket = root / f'pardes-9p-{killed.pid}.sock'
+ assert own_socket.exists()
+ assert not dead_socket.exists()
+ assert live_socket.exists()
+ killed.send_signal(sig)
+ assert killed.wait(timeout=5) == -sig
+ assert not own_socket.exists(), own_socket
+ while select.select([master], [], [], .2)[0]:
+ try:
+ chunk = os.read(master, 65536)
+ except OSError:
+ break
+ if not chunk:
+ break
+ seen += chunk
+ tail = seen[seen.rindex(b'\x1b[?1049h'):]
+ assert b'\x1b[?1049l' in tail, tail[-200:]
+ assert termios.tcgetattr(slave)[3] & termios.ICANON == cooked[3] & termios.ICANON
+ finally:
+ if killed.poll() is None:
+ killed.kill()
+ killed.wait()
+ os.close(master)
+ os.close(slave)
+
+ # A launch with no terminal to draw on (a pty that is no one's
+ # controlling terminal) says so and exits 1, no error trace.
+ master, slave = os.openpty()
+ try:
+ env = {k: v for k, v in os.environ.items() if not k.startswith('PARDES_')}
+ env.update(HOME=str(root), XDG_RUNTIME_DIR=str(root), TERM='xterm-256color')
+ result = subprocess.run([binary, '--tty', 'x.txt'], cwd=root, env=env, stdin=slave, stdout=slave,
+ stderr=subprocess.PIPE, start_new_session=True, timeout=10)
+ finally:
+ os.close(master)
+ os.close(slave)
+ assert result.returncode == 1, result
+ assert b'pardes: no terminal to draw on' in result.stderr and b'.zig:' not in result.stderr, result.stderr
+
for tty in [False, True]:
name = 'lsp-tty' if tty else 'lsp-detached'
with session(binary, root, name, tty=tty) as (client, _):
@@ -548,7 +1951,7 @@ def test(binary, quic=False):
time.sleep(.005)
assert len(matches) == 1, matches
result = client.read(f'/pane/{matches[0]}/body')
- assert result.startswith(b'backend: zls-inproc+lsp-client\n'), result
+ assert result.startswith(b'backend: lsp-client\n'), result
assert b'protocol servers (lsp-client):' in result, result
assert client.read('/pane/1/body') == b'initial\n'
assert '+Lsp' in ''.join(cell[0] for cell in client.screen()['cells'])
@@ -568,7 +1971,11 @@ def test(binary, quic=False):
if start < 0:
continue
styles = [screen['styles'][cell[1]] for cell in cells[start:start + len(word)]]
- assert all(style['bold'] and style['fg'] == styles[0]['fg'] for style in styles), (word, styles)
+ # Weight is opt-in (SyntaxBold, off by default); colour is
+ # not, so the keyword must differ from the text beside it.
+ plain = screen['styles'][cells[start + len(word)][1]]
+ assert all(not style['bold'] and style['fg'] == styles[0]['fg'] for style in styles), (word, styles)
+ assert styles[0]['fg'] != plain['fg'], (word, styles[0], plain)
found.add(word)
assert found == {'fn', 'if'}, screen
@@ -586,6 +1993,7 @@ def test(binary, quic=False):
assert path.read_bytes() == b'written through long filename\n'
opened = look(client, '/n/os' + str(path))
assert client.read(f'/pane/{opened}/body') == path.read_bytes()
+ client.remove(f'/pane/{opened}') # a long name's tag takes rows
opened = look(client, '/n/os' + str(directory))
listing = client.read(f'/pane/{opened}/body')
for path in directory.iterdir():
@@ -618,7 +2026,7 @@ def quic_test(binary):
assert remote.read(body) == b'initial\n'
payload = 'saved café λ\n'.encode() + b'x' * (3 * 8192 + 27) + b'\n'
remote.write(body, payload, truncate=True)
- remote.write(f'/pane/{opened}/ctl', b'exec Save\n')
+ remote.write(f'/pane/{opened}/exec', b'Save\n')
assert unix.read_fid(unix_body) == payload[:unix.msize - 11]
assert tcp.read('/pane/1/body') == payload
tcp.write('/pane/1/body', b'TCP to QUIC Get\n', truncate=True)
@@ -629,7 +2037,12 @@ def quic_test(binary):
screen_pane = look(remote, '/n/peer/screen', source=control)
screen = json.loads(remote.read(f'/pane/{screen_pane}/body'))
assert len(screen['cells']) == screen['cols'] * screen['rows']
- assert 'TCP to QUIC Get' in ''.join(cell[0] for cell in screen['cells'])
+ # The peer's own screen, whole, over QUIC. Its pane's
+ # tag, not its text: where the view sits after the
+ # body shrank from a long wrapped line depends on
+ # whether a frame was drawn meanwhile (sometimes
+ # on the empty last line, ` 2`, text off-screen).
+ assert 'server.txt Save' in ''.join(cell[0] for cell in screen['cells'])
large = ('normal λ line\n' * 20000).encode()
fixture = root / 'large.txt'
fixture.write_bytes(large)
@@ -637,25 +2050,22 @@ def quic_test(binary):
assert remote.read(f'/pane/{large_pane}/body') == large
edited = b'QUIC file saved\n'
remote.write(f'/pane/{large_pane}/body', edited, truncate=True)
- remote.write(f'/pane/{large_pane}/ctl', b'exec Save\n')
+ remote.write(f'/pane/{large_pane}/exec', b'Save\n')
assert fixture.read_bytes() == edited
for pane in [opened, screen_pane, large_pane]:
- remote.write(f'/pane/{pane}/ctl', b'exec Del\n')
+ remote.write(f'/pane/{pane}/exec', b'Del\n')
execute(remote, control, 'Unmount peer')
roots = look(remote, '/n', source=control)
assert remote.read(f'/pane/{roots}/body') == b'/n/os/\n/n/self/\n'
assert unix.read_fid(unix_body) == b'TCP to QUIC Get\n'
assert tcp.read_fid(tcp_body) == b'TCP to QUIC Get\n'
- control = new_pane(unix, b'')
- execute(unix, control, 'Mount own ' + dial)
- own = look(unix, '/n/own/pane/1/body', source=control)
- assert unix.read(f'/pane/{own}/body') == b'TCP to QUIC Get\n'
- unix.write(f'/pane/{own}/body', b'same-session QUIC Save\n', truncate=True)
- unix.write(f'/pane/{own}/ctl', b'exec Save\n')
- assert unix.read_fid(unix_body) == b'same-session QUIC Save\n'
- assert tcp.read_fid(tcp_body) == b'same-session QUIC Save\n'
- unix.write(f'/pane/{own}/ctl', b'exec Del\n')
- execute(unix, control, 'Unmount own')
+ # Not checked: a session Looking at its OWN tree through
+ # a QUIC mount ('Mount own quic!...'). QUIC is still
+ # answered on the editor's thread (cloud9's QUIC adapter
+ # is not std.Io based), so that Look waits on the loop
+ # it is running in and opens nothing; features.txt lists
+ # it under "Left as they are". Unix and TCP self-mounts
+ # are covered by test/selfmount.py.
unix.close(unix_body)
tcp.close(tcp_body)
diff --git a/test/fs_bench.zig b/test/fs_bench.zig
index f9735ee2..a8a8fd8c 100644
--- a/test/fs_bench.zig
+++ b/test/fs_bench.zig
@@ -65,7 +65,7 @@ const Session = struct {
.file_id = id,
.file_serial = pane.serial,
.body_bytes = pane.file.?.content.len,
- .tag = try core.tagText(backing, pane),
+ .tag = try pardes.tagline.tagText(core, backing, pane),
};
}
@@ -113,7 +113,7 @@ fn checkReply(s: *Session, req: ctlfs.Req, reply: ctlfs.Reply) !void {
if (reply.payload != .staged or reply.payload.staged != bytes.len or bytes.len > req.size)
return error.IncorrectReply;
const pane = s.core.panes[s.file_id].?;
- if (req.node == @intFromEnum(ctlfs.TopFile.index)) {
+ if (req.node == @backingInt(ctlfs.TopFile.index)) {
var expected_buf: [4200]u8 = undefined;
const expected = try std.fmt.bufPrint(&expected_buf, "{d} text {d} {s}\n", .{ s.file_serial, @intFromBool(pane.file.?.revision != pane.file.?.saved_revision), pane.file.?.path });
if (!std.mem.eql(u8, expected, bytes)) return error.IncorrectReply;
@@ -123,7 +123,8 @@ fn checkReply(s: *Session, req: ctlfs.Req, reply: ctlfs.Reply) !void {
if (req.node == s.node(.ctl)) {
const tail = try checkNumbers(rest, &.{pane.cols});
if (!std.mem.startsWith(u8, tail, "default ")) return error.IncorrectReply;
- if ((try checkNumbers(tail[8..], &.{pardes.config.tab_width})).len != 0)
+ const current = try checkNumbers(tail[8..], &.{pardes.config.tab_width});
+ if (!std.mem.eql(u8, current, "current ") and !std.mem.eql(u8, current, "notcurrent "))
return error.IncorrectReply;
} else return error.UnmeasuredOperation;
}
@@ -132,8 +133,8 @@ fn checkReply(s: *Session, req: ctlfs.Req, reply: ctlfs.Reply) !void {
const bytes = s.core.fs.out.items;
if (reply.payload != .staged or reply.payload.staged != bytes.len or bytes.len > req.size)
return error.IncorrectReply;
- const names = [_][]const u8{ "README", "index", "ctl", "new", "log", "screen", "listeners", "pane", "os" };
- const nodes = [_]u64{ @intFromEnum(ctlfs.TopFile.README), @intFromEnum(ctlfs.TopFile.index), @intFromEnum(ctlfs.TopFile.ctl), @intFromEnum(ctlfs.TopFile.new), @intFromEnum(ctlfs.TopFile.log), @intFromEnum(ctlfs.TopFile.screen), @intFromEnum(ctlfs.TopFile.listeners), @intFromEnum(ctlfs.TopFile.pane), filesystem.os_root };
+ const names = [_][]const u8{ "README", "index", "status", "focus", "ctl", "commands", "look", "exec", "log", "screen", "listeners", "pane", "os" };
+ const nodes = [_]u64{ @backingInt(ctlfs.TopFile.README), @backingInt(ctlfs.TopFile.index), @backingInt(ctlfs.TopFile.status), @backingInt(ctlfs.TopFile.focus), @backingInt(ctlfs.TopFile.ctl), @backingInt(ctlfs.TopFile.commands), @backingInt(ctlfs.TopFile.look), @backingInt(ctlfs.TopFile.exec), @backingInt(ctlfs.TopFile.log), @backingInt(ctlfs.TopFile.screen), @backingInt(ctlfs.TopFile.listeners), @backingInt(ctlfs.TopFile.pane), filesystem.os_root };
var off: usize = 0;
var entry: usize = 0;
while (off < bytes.len) : (entry += 1) {
@@ -143,7 +144,7 @@ fn checkReply(s: *Session, req: ctlfs.Req, reply: ctlfs.Reply) !void {
const size: usize = bytes[off + 9];
off += 10;
if (dir > 1 or size == 0 or size > bytes.len - off) return error.IncorrectReply;
- if (entry < names.len and (node != nodes[entry] or dir != @intFromBool(entry >= 7) or
+ if (entry < names.len and (node != nodes[entry] or dir != @intFromBool(entry >= 11) or
!std.mem.eql(u8, names[entry], bytes[off..][0..size]))) return error.IncorrectReply;
off += size;
}
@@ -252,7 +253,7 @@ pub fn main(init: std.process.Init) !void {
try bench(&s, "read index", reps, .{
.tag = 6,
.op = .read,
- .node = @intFromEnum(ctlfs.TopFile.index),
+ .node = @backingInt(ctlfs.TopFile.index),
.size = 4096,
}, "one line per pane");
try bench(&s, "readdir root", reps, .{
@@ -271,7 +272,7 @@ pub fn main(init: std.process.Init) !void {
.tag = 9,
.op = .write,
.node = s.node(.body),
- .data = "x" ** 1024,
+ .data = &@as([1024]u8, @splat('x')),
.size = 1024,
}, "append: whole-body swap + undo snapshot");
@@ -281,11 +282,11 @@ pub fn main(init: std.process.Init) !void {
var keys = try Session.init(&counting, 32 * 1024);
defer keys.deinit();
const pane = keys.core.panes[keys.file_id].?;
- pane.mode = .insert;
+ pane.body.mode = .insert;
const initial_bytes = pane.file.?.content.len;
key_body_bytes = initial_bytes;
if (scripted) {
- keys.core.fs.panes[keys.file_id].readers = 1;
+ keys.core.panes[keys.file_id].?.fs.readers = 1;
keys.core.fs.listeners = 1;
}
counting.allocations = 0;
@@ -295,9 +296,9 @@ pub fn main(init: std.process.Init) !void {
while (keys.core.nextEffect()) |_| {}
}
const elapsed = nowNs() - start;
- if (pane.file.?.content.len != initial_bytes + key_reps or pane.cur_col != key_reps or
+ if (pane.file.?.content.len != initial_bytes + key_reps or pane.body.cur_col != key_reps or
!std.mem.allEqual(u8, pane.file.?.content[0..key_reps], 'x')) return error.MissingKeystroke;
- const events = &keys.core.fs.panes[keys.file_id].events;
+ const events = &keys.core.panes[keys.file_id].?.fs.events;
if (scripted) for (0..key_reps) |i| {
var buf: [64]u8 = undefined;
const expected = try std.fmt.bufPrint(&buf, "KI{d} {d} 0 1 x\n", .{ i, i + 1 });
@@ -326,7 +327,7 @@ pub fn main(init: std.process.Init) !void {
try w.writeAll("]}\n");
} else {
try w.print("{s:<26} {s:>9} {s:>8} {s}\n", .{ "request", "ns/op", "allocs", "note" });
- try w.print("{s:<26} {s:>9} {s:>8} {s}\n", .{ "-" ** 26, "-" ** 9, "-" ** 8, "-" ** 20 });
+ try w.print("{s:<26} {s:>9} {s:>8} {s}\n", .{ &@as([26]u8, @splat('-')), &@as([9]u8, @splat('-')), &@as([8]u8, @splat('-')), &@as([20]u8, @splat('-')) });
for (rows.items) |r|
try w.print("{s:<26} {d:>9} {d:>8} {s}\n", .{ r.name, r.ns, r.allocs, r.note });
}
diff --git a/test/fs_namespace.zig b/test/fs_namespace.zig
index 8b6f245e..30c656ca 100644
--- a/test/fs_namespace.zig
+++ b/test/fs_namespace.zig
@@ -6,9 +6,15 @@ test "runtime Mount and Unmount copy command arguments and change Look resolutio
const gpa = std.testing.allocator;
const p = try pardes.Pardes.init(gpa, .{ .tty_only = true });
defer p.deinit();
- var command = "Mount peer /tmp/a socket.sock".*;
- try std.testing.expect(p.executeBuiltinLine(0, &command));
- @memset(&command, 'x');
+ // No peer answers at the dial: Mount mounts nothing (it dials first).
+ try std.testing.expect(p.executeBuiltinLine(0, "Mount peer /tmp/a socket.sock"));
+ try std.testing.expectEqual(@as(usize, 0), p.fs.mounts.items.len);
+ // Mounted (as one that answered is), its arguments are copies.
+ var name = "peer".*;
+ var dial = "/tmp/a socket.sock".*;
+ try p.fs.mount(gpa, &name, &dial);
+ @memset(&name, 'x');
+ @memset(&dial, 'x');
try std.testing.expectEqual(@as(usize, 1), p.fs.mounts.items.len);
try std.testing.expectEqualStrings("peer", p.fs.mounts.items[0].name);
try std.testing.expectEqualStrings("/tmp/a socket.sock", p.fs.mounts.items[0].dial);
@@ -40,8 +46,8 @@ test "mounts survive dumps without borrowing inputs or silently overriding a sav
file.file.?.revision = 3;
gpa.free(file.file.?.path);
file.file.?.path = try gpa.dupe(u8, "/n/peer/os/file.txt");
- try p.dumpState();
- const restored = try pardes.Pardes.initFromDump(gpa, .{}, p.dump_out.?);
+ try pardes.dump.dumpState(p);
+ const restored = try pardes.dump.initFromDump(gpa, .{}, p.dump_out.?);
defer restored.deinit();
try std.testing.expectEqual(@as(usize, 1), restored.fs.mounts.items.len);
try std.testing.expectEqualStrings("peer", restored.fs.mounts.items[0].name);
@@ -50,13 +56,13 @@ test "mounts survive dumps without borrowing inputs or silently overriding a sav
try std.testing.expectEqualStrings("saved remote body\n", restored.panes[0].?.file.?.content);
try std.testing.expect(restored.panes[0].?.file.?.revision != restored.panes[0].?.file.?.saved_revision);
try std.testing.expectError(error.MountInUse, filesystem.unmount(restored, "peer"));
- const same = try pardes.Pardes.initFromDump(gpa, .{ .mounts = &.{.{ .name = "peer", .dial = "/tmp/peer.sock" }} }, p.dump_out.?);
+ const same = try pardes.dump.initFromDump(gpa, .{ .mounts = &.{.{ .name = "peer", .dial = "/tmp/peer.sock" }} }, p.dump_out.?);
defer same.deinit();
try std.testing.expectEqual(@as(usize, 1), same.fs.mounts.items.len);
- try std.testing.expectError(error.MountConflict, pardes.Pardes.initFromDump(gpa, .{
+ try std.testing.expectError(error.MountConflict, pardes.dump.initFromDump(gpa, .{
.mounts = &.{.{ .name = "peer", .dial = "/tmp/different.sock" }},
}, p.dump_out.?));
- const added = try pardes.Pardes.initFromDump(gpa, .{ .mounts = &.{.{ .name = "other", .dial = "/tmp/other.sock" }} }, p.dump_out.?);
+ const added = try pardes.dump.initFromDump(gpa, .{ .mounts = &.{.{ .name = "other", .dial = "/tmp/other.sock" }} }, p.dump_out.?);
defer added.deinit();
try std.testing.expectEqual(@as(usize, 2), added.fs.mounts.items.len);
}
@@ -69,8 +75,8 @@ test "removed startup mounts are not resurrected by dump restore" {
});
defer p.deinit();
try filesystem.unmount(p, "peer");
- try p.dumpState();
- const restored = try pardes.Pardes.initFromDump(gpa, p.opts, p.dump_out.?);
+ try pardes.dump.dumpState(p);
+ const restored = try pardes.dump.initFromDump(gpa, p.opts, p.dump_out.?);
defer restored.deinit();
try std.testing.expectEqual(@as(usize, 0), restored.fs.mounts.items.len);
}
@@ -81,30 +87,29 @@ test "transactional restore preserves host capabilities and advances pane identi
defer p.deinit();
const pane = try p.setTestFile("before\n");
p.lsp_seq = 41;
- p.pipe_seq = 73;
+ p.pipe.seq = 73;
if (@hasField(pardes.CellPixels, "w")) p.cell_pixels = .{ .w = 9, .h = 18 };
p.native_images = true;
p.fs.socket_path = "/tmp/session.sock";
p.fs.tcp_address = .{ .ip4 = .loopback(5640) };
p.fs.quic_address = .{ .ip6 = .loopback(5641) };
- try p.dumpState();
- const restored = try p.restore(p.dump_out.?);
+ try pardes.dump.dumpState(p);
+ const restored = try pardes.dump.restore(p, p.dump_out.?, "test");
defer restored.deinit();
try std.testing.expectEqual(@as(u32, 41), restored.lsp_seq);
- try std.testing.expectEqual(@as(u32, 73), restored.pipe_seq);
+ try std.testing.expectEqual(@as(u32, 73), restored.pipe.seq);
try std.testing.expectEqual(p.cell_pixels, restored.cell_pixels);
try std.testing.expect(restored.native_images);
try std.testing.expect(restored.panes[0].?.serial > p.next_serial);
try std.testing.expect(restored.paneBySerial(pane.serial) == null);
try std.testing.expectEqual(p.screen_w, restored.screen_w);
try std.testing.expectEqual(p.screen_h, restored.screen_h);
- try std.testing.expectEqualStrings(p.fs.socket_path, restored.fs.socket_path);
- try std.testing.expectEqualDeep(p.fs.tcp_address, restored.fs.tcp_address);
- try std.testing.expectEqualDeep(p.fs.quic_address, restored.fs.quic_address);
try std.testing.expect(p.panes[0] == pane);
try std.testing.expectEqualStrings("before\n", pane.file.?.content);
- try std.testing.expectError(error.BadDumpMagic, p.restore(
+ try std.testing.expectError(error.BadDumpMagic, pardes.dump.restore(
+ p,
".{ .magic = \"wrong\", .screen = .{.cols = 80, .rows = 24} }",
+ "test",
));
try std.testing.expect(p.panes[0] == pane);
try std.testing.expectEqualStrings("before\n", pane.file.?.content);
@@ -112,27 +117,6 @@ test "transactional restore preserves host capabilities and advances pane identi
try std.testing.expectEqualStrings("/tmp/session.sock", p.fs.socket_path);
}
-test "same-session identity is available before an initial mounted file is opened" {
- if (!filesystem.platform_has_fs) return error.SkipZigTest;
- const gpa = std.testing.allocator;
- var tmp = std.testing.tmpDir(.{});
- defer tmp.cleanup();
- try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "file.txt", .data = "no socket required\n" });
- var buf: [4096]u8 = undefined;
- const len = try tmp.dir.realPathFile(std.testing.io, "file.txt", &buf);
- const path = try std.fmt.allocPrint(gpa, "/n/own/os{s}", .{buf[0..len]});
- defer gpa.free(path);
- const p = try pardes.Pardes.init(gpa, .{
- .file = path,
- .mounts = &.{.{ .name = "own", .dial = "/tmp/not-listening.sock" }},
- .ninep_identity = .{ .socket_path = "/tmp/not-listening.sock" },
- });
- defer p.deinit();
- try std.testing.expectEqualStrings(path, p.panes[0].?.file.?.path);
- try std.testing.expectEqualStrings("no socket required\n", p.panes[0].?.file.?.content);
- try std.testing.expectEqualStrings("", p.opts.ninep_identity.socket_path);
-}
-
test "filesystem resolves OS first then virtual with explicit mounts and parent paths" {
if (!filesystem.platform_has_fs) return error.SkipZigTest;
const gpa = std.testing.allocator;
@@ -222,7 +206,8 @@ test "explicit OS file opens and restores keep their names and request watches"
.kind = .file,
.tag = path,
.body = "",
- .file = .{ .path = path, .content = "const unsaved = 2;\n" },
+ // Unsaved text: kept (a clean pane's is read from disk).
+ .file = .{ .path = path, .content = "const unsaved = 2;\n", .dirty = true },
});
try std.testing.expectEqualStrings(path, copy.file.?.path);
try std.testing.expectEqualStrings("const unsaved = 2;\n", copy.file.?.content);
@@ -245,22 +230,17 @@ test "virtual file opens do not request OS watches" {
while (p.nextEffect()) |effect| if (effect == .watch) return error.VirtualFileWatch;
}
-test "Look at the clone file reserves its own pane and failed opens release it" {
+test "Look at a virtual file opens one pane and failed opens release their slot" {
const p = try pardes.Pardes.init(std.testing.allocator, .{ .tty_only = true });
defer p.deinit();
- p.lookAt(0, "/virtual/new");
- var control_count: usize = 0;
- var scratch_count: usize = 0;
+ pardes.look.lookAt(p, 0, "/virtual/index");
+ var opened: usize = 0;
for (p.panes) |slot| {
const pane = slot orelse continue;
const file = pane.file orelse continue;
- if (std.mem.eql(u8, file.path, "/virtual/new")) control_count += 1;
- if (file.output) |output| if (output.from == .cmd and output.from.cmd == .New) {
- scratch_count += 1;
- };
+ if (std.mem.eql(u8, file.path, "/virtual/index")) opened += 1;
}
- try std.testing.expectEqual(@as(usize, 1), control_count);
- try std.testing.expectEqual(@as(usize, 1), scratch_count);
+ try std.testing.expectEqual(@as(usize, 1), opened);
const free = p.freeSlot().?;
try std.testing.expectError(error.FileNotFound, pardes.panes.File.open(p, free, "/n/self/does-not-exist", 0));
try std.testing.expect(p.panes[free] == null);
@@ -306,7 +286,7 @@ test "owned cwd failed file opens never publish a pane or retain a reservation"
try std.testing.expect(succeeded);
}
-test "images decode and dump through explicit filesystem mounts" {
+test "images decode through explicit filesystem mounts, and a dump reads one on disk from there" {
if (!filesystem.platform_has_fs) return error.SkipZigTest;
const gpa = std.testing.allocator;
pardes.image.start(std.testing.io, gpa);
@@ -328,8 +308,9 @@ test "images decode and dump through explicit filesystem mounts" {
const state = pane.image.?;
try std.testing.expectEqual(@as(usize, 1), state.iw);
try std.testing.expectEqual(@as(usize, 1), state.ih);
- const saved = try pardes.panes.Image.dumpPane(p, arena.allocator(), pane, "", "", 0, path, &.{});
- const decoded = try pardes.dump.decodeBytes(gpa, saved.image.?.bytes_b64);
- defer gpa.free(decoded);
- try std.testing.expectEqualStrings(bytes, decoded);
+ // On disk, the picture is no part of the dump: Restore reads it there.
+ const saved = try pardes.panes.Image.dumpPane(p, arena.allocator(), pane, "", "", 0, path, state.raw);
+ try std.testing.expectEqualStrings("", saved.image.?.bytes_b64);
+ const restored = try pardes.panes.Image.restore(p, p.freeSlot().?, saved);
+ try std.testing.expectEqualStrings(bytes, restored.image.?.raw);
}
diff --git a/test/fs_soak.py b/test/fs_soak.py
deleted file mode 100644
index 5569a7c7..00000000
--- a/test/fs_soak.py
+++ /dev/null
@@ -1,284 +0,0 @@
-#!/usr/bin/env python3
-import argparse
-import json
-import os
-from pathlib import Path
-import random
-import socket
-import struct
-import tempfile
-import time
-
-from fs import new_pane, session
-from ninep import Client
-
-
-BODY_LIMIT = 4096
-SCREEN_LIMIT = 4 * 1024 * 1024
-FRAGMENTS = [
- b'const value = 42;\n', b'fn check() void { if (true) return; }\n',
- b'\tspaces and tabs\n', 'λ 界 e\u0301 👩\u200d🚀\n'.encode(), b'x',
-]
-OPERATIONS = ['append', 'range', 'replace', 'read', 'save', 'reload',
- 'cycle', 'reconnect', 'screen']
-
-
-def emit(**record):
- print(json.dumps(record, separators=(',', ':')), flush=True)
-
-
-def payload(rng, limit=256):
- result = bytearray()
- for _ in range(rng.randint(1, 12)):
- fragment = rng.choice(FRAGMENTS)
- if len(result) + len(fragment) <= limit:
- result.extend(fragment)
- return bytes(result) or b'x'[:limit]
-
-
-def check_bytes(actual, expected, label):
- if actual == expected:
- return
- at = next((i for i, pair in enumerate(zip(actual, expected))
- if pair[0] != pair[1]), min(len(actual), len(expected)))
- raise AssertionError(f'{label}: mismatch at byte {at}; '
- f'length {len(actual)} != {len(expected)}; '
- f'{actual[at:at + 32]!r} != {expected[at:at + 32]!r}')
-
-
-def read_fid(client, fid, limit, count):
- result = bytearray()
- while chunk := client.read_fid(fid, len(result), count):
- result.extend(chunk)
- if len(result) > limit:
- raise AssertionError(f'read exceeded fixture limit {limit}')
- return bytes(result)
-
-
-def check_body(client, pane, count=4096):
- fid = client.open(f'/pane/{pane["serial"]}/body')
- try:
- actual = read_fid(client, fid, BODY_LIMIT, count)
- finally:
- client.close(fid)
- check_bytes(actual, pane['body'], f'pane {pane["serial"]}')
-
-
-def check_screen(data):
- screen = json.loads(data)
- cols, rows = screen['cols'], screen['rows']
- assert cols > 0 and rows > 0 and cols * rows <= 65536, (cols, rows)
- assert len(screen['cells']) == cols * rows
- styles = screen['styles']
- assert styles
- for cell in screen['cells']:
- assert len(cell) == 2 and isinstance(cell[0], str), cell
- assert isinstance(cell[1], int) and 0 <= cell[1] < len(styles), cell
-
-
-def session_pid(client):
- if not hasattr(socket, 'SO_PEERCRED'):
- return None
- pid, uid, _ = struct.unpack('3i', client.socket.getsockopt(
- socket.SOL_SOCKET, socket.SO_PEERCRED, struct.calcsize('3i')))
- assert pid > 0 and uid == os.getuid(), (pid, uid)
- return pid
-
-
-def check_session(client, control, pid):
- assert session_pid(control) == pid
- if pid is not None:
- actual = (session_pid(client) if client.socket.family == socket.AF_UNIX
- else int(client.read('/os/proc/self/stat').split()[0]))
- assert actual == pid, (actual, pid)
-
-
-def memory(pid):
- result = {'rss_bytes': None, 'cumulative_peak_rss_bytes': None}
- if pid is None:
- return result
- try:
- for line in Path(f'/proc/{pid}/status').read_text().splitlines():
- fields = line.split()
- if fields[0] == 'VmRSS:':
- result['rss_bytes'] = int(fields[1]) * 1024
- elif fields[0] == 'VmHWM:':
- result['cumulative_peak_rss_bytes'] = int(fields[1]) * 1024
- except OSError:
- pass
- return result
-
-
-def run(args):
- rng = random.Random(args.seed)
- started = time.monotonic()
- deadline = None
- batch = 0
- operation = 'start'
- operation_count = 0
- pid = None
- try:
- with tempfile.TemporaryDirectory(prefix='pardes-soak-') as directory:
- root = Path(directory)
- options = ['--9p-tcp=tcp!127.0.0.1!0'] if args.transport == 'tcp' else []
- with session(str(args.binary.resolve()), root, 'soak', *options,
- tty=args.tty) as (control, unix_address):
- pid = session_pid(control)
- address = unix_address
- if args.transport == 'tcp':
- listeners = [line.split('!') for line in
- control.read('/listeners').decode().splitlines()
- if line.startswith('tcp!')]
- assert len(listeners) == 1, listeners
- transport, host, port = listeners[0]
- assert transport == 'tcp' and host == '127.0.0.1' and 0 < int(port) < 65536, listeners
- address = (host, int(port))
- client = Client(address)
- panes = []
- try:
- check_session(client, control, pid)
- for slot in range(4):
- body = payload(rng)
- serial = 1 if slot == 0 else new_pane(client, body)
- base = f'/pane/{serial}'
- if slot == 0:
- client.write(base + '/body', body, truncate=True)
- path = root / f'pane-{slot}-0.zig'
- client.write(base + '/name', f'{path}\n'.encode())
- client.write(base + '/ctl', b'exec Save\n')
- panes.append({'serial': serial, 'body': body, 'path': path, 'variant': 0})
- emit(kind='start', seed=args.seed, session_pid=pid,
- transport=args.transport, host='tty' if args.tty else 'detached',
- batches=args.batches, duration_seconds=args.duration,
- interval_seconds=args.interval, body_limit_bytes=BODY_LIMIT,
- live_panes=len(panes), **memory(pid))
- if args.duration is not None:
- deadline = time.monotonic() + args.duration
- while (args.batches is None or batch < args.batches) and (
- deadline is None or time.monotonic() < deadline):
- batch_started = time.monotonic()
- operations = OPERATIONS * 2
- rng.shuffle(operations)
- for operation in operations:
- slot = rng.randrange(len(panes))
- pane = panes[slot]
- base = f'/pane/{pane["serial"]}'
- if operation == 'append':
- addition = payload(rng, min(256, BODY_LIMIT - len(pane['body'])))
- client.write(base + '/body', addition)
- pane['body'] += addition
- elif operation == 'range':
- body = pane['body']
- # Keep range endpoints outside combining and ZWJ clusters.
- boundaries = [0] + [i for i in range(1, len(body))
- if body[i - 1] < 128 and body[i] < 128] + [len(body)]
- lo, hi = sorted((rng.choice(boundaries), rng.choice(boundaries)))
- replacement = payload(rng, min(256, BODY_LIMIT - len(body) + hi - lo))
- if replacement:
- client.write(base + '/addr', f'#{lo},#{hi}'.encode())
- client.write(base + '/data', replacement)
- pane['body'] = body[:lo] + replacement + body[hi:]
- elif operation == 'replace':
- pane['body'] = payload(rng, BODY_LIMIT)
- client.write(base + '/body', pane['body'], truncate=True)
- elif operation == 'read':
- check_body(client, pane, rng.choice([97, 251, 1024, 4096]))
- elif operation == 'save':
- pane['variant'] ^= 1
- pane['path'] = root / f'pane-{slot}-{pane["variant"]}.zig'
- client.write(base + '/name', f'{pane["path"]}\n'.encode())
- client.write(base + '/ctl', b'exec Save\n')
- check_bytes(pane['path'].read_bytes(), pane['body'], 'saved file')
- check_bytes(client.read('/os' + str(pane['path'])), pane['body'], 'OS mount')
- elif operation == 'reload':
- pane['body'] = payload(rng)
- pane['path'].write_bytes(pane['body'])
- client.write(base + '/ctl', b'get\n')
- elif operation == 'cycle':
- old_serial = pane['serial']
- client.write(base + '/ctl', b'exec Del\n')
- pane['body'] = payload(rng)
- pane['serial'] = new_pane(client, pane['body'])
- assert pane['serial'] != old_serial
- base = f'/pane/{pane["serial"]}'
- client.write(base + '/name', f'{pane["path"]}\n'.encode())
- client.write(base + '/ctl', b'exec Save\n')
- elif operation == 'reconnect':
- client.socket.close()
- client = Client(address)
- check_session(client, control, pid)
- check_body(control, pane)
- elif operation == 'screen':
- frozen = client.open('/screen')
- try:
- before = read_fid(client, frozen, SCREEN_LIMIT, 4096)
- check_screen(before)
- addition = payload(rng, min(64, BODY_LIMIT - len(pane['body'])))
- client.write(base + '/body', addition)
- pane['body'] += addition
- after = read_fid(client, frozen, SCREEN_LIMIT, rng.choice([251, 1024]))
- check_bytes(after, before, 'frozen screen')
- finally:
- client.close(frozen)
- fresh = client.open('/screen')
- try:
- check_screen(read_fid(client, fresh, SCREEN_LIMIT, 4096))
- finally:
- client.close(fresh)
- operation_count += 1
- check_body(client, pane)
- expected = {str(pane['serial']) for pane in panes}
- assert set(client.list('/pane')) == expected
- assert set(control.list('/pane')) == expected
- for pane in panes:
- check_body(client, pane)
- check_body(control, pane)
- batch += 1
- emit(kind='batch', seed=args.seed, batch=batch,
- duration_seconds=time.monotonic() - batch_started,
- elapsed_seconds=time.monotonic() - started,
- operations=len(operations), total_operations=operation_count,
- model_bytes=sum(len(pane['body']) for pane in panes), **memory(pid))
- delay = args.interval - (time.monotonic() - batch_started)
- if deadline is not None:
- delay = min(delay, deadline - time.monotonic())
- if delay > 0:
- time.sleep(delay)
- finally:
- client.socket.close()
- emit(kind='summary', seed=args.seed, batches=batch,
- transport=args.transport, host='tty' if args.tty else 'detached',
- operations=operation_count, duration_seconds=time.monotonic() - started,
- status='passed')
- except BaseException as error:
- emit(kind='failure', seed=args.seed, batch=batch + 1, operation=operation,
- transport=args.transport, host='tty' if args.tty else 'detached',
- operations=operation_count, session_pid=pid,
- elapsed_seconds=time.monotonic() - started, error=str(error))
- raise
-
-
-def main():
- parser = argparse.ArgumentParser(description='Deterministic valid-operation editor/9P soak; writes JSONL.')
- parser.add_argument('binary', type=Path)
- parser.add_argument('--seed', type=int, default=4200)
- parser.add_argument('--transport', choices=['unix', 'tcp'], default='unix')
- parser.add_argument('--tty', action='store_true', help='run an owned TTY host instead of a detached host')
- limit = parser.add_mutually_exclusive_group()
- limit.add_argument('--batches', type=int)
- limit.add_argument('--duration', type=float, help='seconds, stopping after the current batch')
- parser.add_argument('--interval', type=float, default=0, help='minimum seconds between batch starts')
- args = parser.parse_args()
- if args.batches is None and args.duration is None:
- args.batches = 100
- if args.batches is not None and args.batches < 1:
- parser.error('--batches must be positive')
- if args.duration is not None and not 0 < args.duration < float('inf'):
- parser.error('--duration must be finite and positive')
- if not 0 <= args.interval < float('inf'):
- parser.error('--interval must be finite and nonnegative')
- run(args)
-
-
-if __name__ == '__main__':
- main()
diff --git a/test/gui-goldens.txt b/test/gui-goldens.txt
new file mode 100644
index 00000000..0d782af4
--- /dev/null
+++ b/test/gui-goldens.txt
@@ -0,0 +1,17 @@
+01-boot 6b879535ac5d120a468290175f508064a11f257a0f52924fee423df11686ffb3
+02-second-document e07139723a029c1bebcd5ca19da86f3e0cc2af20abc4cf540fc551ae8d65ad2b
+03-notice 8ad2e24e5cb5eb8ef9234a6ebd14916e5780764c5f8a2a119f3a8901dc1b042e
+04-context-rows-mid-thumb 19b1a173848a1b8895c39c58107df1512bf7b314a032d525ce815ba94180266a
+05-body-selection 533db971a21519eba77effc1c5d6222257348602131d24130d8dea62a44d698b
+06-tag-focus-selection 711220bcec560f6ba6204a694827ed58c374ecce8325c5c459154e8f2319f252
+07-prompt-notice 1d02541031d04d2a0a861102648295f6cd5b30d33b6c0dd4e55f6076d7a5c005
+08-wide-glyph-edges ddfe437d9cf36063bb09cddc36bac4bcd30b29c4bcb0d6453f9706c0c222b187
+09-collapsed-focus-tint d2f3edb45e23f84e5f3c792b388c77dd70e0e8a15a5b2bd85e0917f019de1421
+10-tagbottom 6347013122c19b7ee6505d3e7138d9fa353d8b9d8213fbb847615b75b0ddb0e5
+12-multiline-tag 48d4a0c0f45a1709d8e3dea3056e1147ab29bfe3fd6980b4568333b8183828d6
+13-image ca5c7d92e688b4c4b8a1d7f7075c55acb049bd89b49488effd2de74056f92bdf
+14-theme-ink a7cdb4de4a2a6ff3ee58040ff5052f36ac60ad1ab8d132d7832059692e96fd73
+15-theme-acme-light e3af35d1e5ae57cb74af807940a76beebf510ed04a2437f4be1f4a53133af48b
+16-debug ed971e715e45fa04f0ecddefd6b0d0b1285c912d6940ca9632a7defc377bbe61
+17-terminal a09b53740c0a6fecd354c4f9b67ef0131b19aef92af55488cdead77b030d1062
+18-mid-transition 7d09ffede92fde77722cebc91d68b6f800dd1f2bfba0afb9480ab926f001b894
diff --git a/test/gui_golden.py b/test/gui_golden.py
new file mode 100644
index 00000000..24fc5986
--- /dev/null
+++ b/test/gui_golden.py
@@ -0,0 +1,239 @@
+#!/usr/bin/env python3
+"""Hash settled SDL frames of a fixed set of scenes, to prove a GUI refactor
+left every pixel where it was.
+
+python3 -B test/gui_golden.py <pardes-gui binary> compare
+python3 -B test/gui_golden.py <pardes-gui binary> --update rewrite goldens
+
+The window is hidden (PARDES_TEST renders into an offscreen capture texture),
+and the capture carries PARDES_TEST_PAD leftover pixels so edge bugs show.
+GPU rasterisation differs between machines and drivers: the goldens in
+test/gui-goldens.txt are a LOCAL gate for one machine, never a CI one. Each
+scene waits until the window says it is idle (its status file) before it is
+hashed, so a loaded machine gives the same frames.
+"""
+import argparse
+import hashlib
+import os
+from pathlib import Path
+import tempfile
+import shutil
+import time
+
+from fs import session
+from ui_review import require, wait_for
+
+GOLDENS = Path(__file__).resolve().parent / 'gui-goldens.txt'
+
+ZIG = b'''const std = @import("std");
+
+pub const Shape = union(enum) {
+ circle: f32,
+ square: f32,
+
+ pub fn area(shape: Shape) f32 {
+ return switch (shape) {
+ .circle => |r| std.math.pi * r * r,
+ .square => |s| s * s,
+ };
+ }
+};
+
+pub fn main() void {
+ var total: f32 = 0;
+ const shapes = [_]Shape{ .{ .circle = 1 }, .{ .square = 2 } };
+ for (shapes) |shape| {
+''' + b''.join(b' total += shape.area() * %d; // line %d\n' % (n, n) for n in range(60)) + b''' }
+ std.debug.print("{d}\\n", .{total});
+}
+'''
+
+
+def ppm(width, height):
+ rows = []
+ for y in range(height):
+ rows.append(bytes(v for x in range(width) for v in ((x * 255) // width, (y * 255) // height, 128)))
+ return b'P6\n%d %d\n255\n' % (width, height) + b''.join(rows)
+
+
+def panes(client):
+ serials = [int(row.split()[0]) for row in client.read('/index').decode().splitlines() if row.strip()]
+ return {serial: client.read(f'/pane/{serial}/tag').decode(errors='replace') for serial in serials}
+
+
+def status(root):
+ """The window's (step, frames captured, idle), or None before the first."""
+ try:
+ step, frames, idle = (root / 'status').read_text().split()[:3]
+ return int(step), int(frames), idle == '1'
+ except (FileNotFoundError, ValueError):
+ return None
+
+
+def settled(root):
+ """The capture once the window says it is idle: a loop step past the one
+ current when this was asked, with nothing owing a frame (the window's
+ status file, gui.zig writeTestStatus). Every command before this call has
+ been served by then (a 9P write returns once the core has it), so the
+ frame is the scene's however loaded the machine is; the digest of it."""
+ deadline = time.monotonic() + 60
+ start = None
+ while time.monotonic() < deadline:
+ now = status(root)
+ if now is not None:
+ if start is None:
+ start = now[0]
+ elif now[0] >= start + 2 and now[2] and now[1] > 0:
+ data = (root / 'latest.ppm').read_bytes()
+ if data.startswith(b'P6'):
+ return hashlib.sha256(data).hexdigest()
+ time.sleep(.02)
+ raise RuntimeError('the window never went idle')
+
+
+def run(args):
+ results = []
+ # A fixed directory: the paths it holds are drawn in the tags.
+ root = Path(tempfile.gettempdir()) / 'pardes-gui-golden'
+ shutil.rmtree(root, ignore_errors=True)
+ root.mkdir(mode=0o700)
+ # Captures go outside the session's own directory: a file written there
+ # every frame is a change in the directory its panes look at, which
+ # would ask for another frame, and so on for ever.
+ captures = Path(tempfile.gettempdir()) / 'pardes-gui-golden-captures'
+ shutil.rmtree(captures, ignore_errors=True)
+ captures.mkdir(mode=0o700)
+ name = 'gui-golden'
+ config = root / 'config/pardes'
+ config.mkdir(parents=True)
+ # No linger: a dismissed message is gone, not caught part way, when a
+ # scene settles.
+ (config / 'init').write_text('Shell /bin/sh\nTheme forge\nMessageLinger 0\n')
+ source = root / 'shapes.zig'
+ source.write_bytes(ZIG)
+ notes = root / 'notes.txt'
+ notes.write_bytes(b'Pardes GUI golden\n\nA second document, opened by Look.\n' * 4)
+ wide = root / 'wide.txt'
+ # One of the two alignments puts a wide glyph across the body's right edge.
+ wide.write_bytes(('x' + '\u754c' * 80 + '\n' + '\u754c' * 80 + '\n').encode())
+ image = root / 'ramp.ppm'
+ image.write_bytes(ppm(96, 64))
+ # The session points XDG_RUNTIME_DIR at its own root, so the caller's
+ # Wayland socket is passed as an absolute path.
+ display = Path(os.environ.get('WAYLAND_DISPLAY', 'wayland-0'))
+ if not display.is_absolute():
+ display = Path(os.environ.get('XDG_RUNTIME_DIR', '/run/user/%d' % os.getuid())) / display
+ # The virtual clock: a transition's frames are the same frames on any
+ # machine, so one partway through can be hashed too.
+ inherited = {'PARDES_TEST': '1', 'PARDES_TEST_CLOCK': '1', 'PARDES_TEST_COLS': '120', 'PARDES_TEST_ROWS': '40',
+ 'PARDES_TEST_PAD': '7', 'PARDES_TEST_CAPTURE_DIR': str(captures),
+ 'SDL_VIDEODRIVER': 'wayland', 'WAYLAND_DISPLAY': str(display)}
+ launch = ['-c', 'stty cols 120 rows 40; exec "$@"', name, str(args.binary.resolve()),
+ '--9p=' + name, str(source)]
+ handles = {}
+ with session('/bin/sh', root, name, socket_name=name, tty=True,
+ launch=launch, inherited=inherited, terminal=handles) as (client, _):
+ first = require(wait_for(lambda: next((s for s, tag in panes(client).items()
+ if 'shapes.zig' in tag), None)), 'source pane missing')
+
+ def scene(label, frame='latest.ppm'):
+ settled(captures)
+ results.append((label, hashlib.sha256((captures / frame).read_bytes()).hexdigest()))
+ if args.keep:
+ args.keep.mkdir(parents=True, exist_ok=True)
+ shutil.copyfile(captures / frame, args.keep / (label + '.ppm'))
+ print(label, results[-1][1][:16], flush=True)
+
+ def mouse(kind, button, x, y):
+ # The test shell's stdin takes window-pixel mouse events.
+ os.write(handles['input_fd'], f'\x1b]777;mouse;{kind};{button};{x};{y}\x07'.encode())
+ time.sleep(.1)
+
+ def serial_of(word):
+ return require(wait_for(lambda: next((s for s, tag in panes(client).items() if word in tag), None)),
+ word + ' missing')
+
+ scene('01-boot')
+ client.write(f'/pane/{first}/look', f'{notes}\n'.encode())
+ notes_pane = serial_of('notes.txt')
+ scene('02-second-document')
+ client.write(f'/pane/{first}/ctl', b'Msg a golden notice\n')
+ scene('03-notice')
+ client.write(f'/pane/{first}/ctl', b'TreeContext\n')
+ client.write(f'/pane/{first}/dot', b'45\n')
+ scene('04-context-rows-mid-thumb')
+ client.write(f'/pane/{first}/dot', b'40,43\n')
+ scene('05-body-selection')
+ # A press and a drag along the source's tag: the tag takes the
+ # keyboard with a selection and a caret. The pointer then rests on
+ # empty body space, far right.
+ mouse('down', 1, 500, 87)
+ mouse('motion', 1, 620, 87)
+ mouse('up', 1, 620, 87)
+ mouse('motion', 0, 1880, 1300)
+ scene('06-tag-focus-selection')
+ os.write(handles['input_fd'], b'\x1b')
+ time.sleep(.2)
+ scratch = int(client.read('/pane/new'))
+ client.write(f'/pane/{scratch}/exec', b'Save\n')
+ scene('07-prompt-notice')
+ os.write(handles['input_fd'], b'\x1b')
+ time.sleep(.2)
+ client.write(f'/pane/{scratch}/exec', b'Del\n')
+ client.write(f'/pane/{first}/look', f'{wide}\n'.encode())
+ wide_pane = serial_of('wide.txt')
+ client.write(f'/pane/{wide_pane}/name', ('x' + '\u754c' * 70 + '\n').encode())
+ client.write('/ctl', b'Wrap off\n')
+ scene('08-wide-glyph-edges')
+ client.write('/ctl', b'Wrap on\n')
+ client.write(f'/pane/{wide_pane}/exec', b'Del\n')
+ client.write('/ctl', b'FocusTint on\n')
+ client.write(f'/pane/{notes_pane}/ctl', b'Collapse\n')
+ scene('09-collapsed-focus-tint')
+ client.write(f'/pane/{notes_pane}/ctl', b'Collapse\n')
+ client.write('/ctl', b'Tagbottom\n')
+ scene('10-tagbottom')
+ client.write('/ctl', b'Tagbottom\n')
+ client.write(f'/pane/{first}/tag', b' Second\nthird line of the tag')
+ scene('12-multiline-tag')
+ client.write(f'/pane/{first}/look', f'{image}\n'.encode())
+ serial_of('ramp.ppm')
+ scene('13-image')
+ client.write('/ctl', b'Theme ink\n')
+ scene('14-theme-ink')
+ client.write('/ctl', b'Theme acme\n')
+ scene('15-theme-acme-light')
+ client.write('/ctl', b'Debug\n')
+ scene('16-debug')
+ client.write('/ctl', b'Debug\n')
+ # A terminal pane: raw rows, ANSI colours, a hidden prompt.
+ before = set(panes(client))
+ client.write(f'/pane/{first}/exec', b'Tty\n')
+ terminal = require(wait_for(lambda: next((s for s in panes(client) if s not in before), None)), 'Tty missing')
+ client.write(f'/pane/{terminal}/pty/data', b"PS1='$ '; clear; printf '\\033[1;36mcolour\\033[0m plain \\033[32mgreen\\033[0m\\n'\r")
+ require(wait_for(lambda: b'green' in client.read(f'/pane/{terminal}/body')), 'terminal output missing')
+ scene('17-terminal')
+ # Partway through a transition: the panes, the picture among them,
+ # sliding over for a new column, frame 6 of PanelSlide's 12. Its
+ # chrome slides with each pane.
+ client.write('/ctl', b'PanelSlide\n')
+ client.write(f'/pane/{first}/exec', b'Newcol\n')
+ require(wait_for(lambda: (captures / 'transition-6.ppm').exists()), 'transition frame 6 never drawn')
+ scene('18-mid-transition', 'transition-6.ppm')
+ lines = ''.join(f'{label} {digest}\n' for label, digest in results)
+ if args.update:
+ GOLDENS.write_text(lines)
+ print('updated', GOLDENS)
+ return
+ expected = dict(line.split() for line in GOLDENS.read_text().splitlines() if line.strip())
+ bad = [label for label, digest in results if expected.get(label) != digest]
+ require(not bad, 'frames changed: ' + ', '.join(bad))
+ print(f'{len(results)} GUI frames byte-identical')
+
+
+if __name__ == '__main__':
+ parser = argparse.ArgumentParser(description=__doc__)
+ parser.add_argument('binary', type=Path)
+ parser.add_argument('--update', action='store_true')
+ parser.add_argument('--keep', type=Path, help='copy each hashed frame here as <scene>.ppm')
+ run(parser.parse_args())
diff --git a/test/gui_monkey.py b/test/gui_monkey.py
new file mode 100644
index 00000000..540c377a
--- /dev/null
+++ b/test/gui_monkey.py
@@ -0,0 +1,179 @@
+#!/usr/bin/env python3
+"""A monkey over the GUI's effects: for each Motion x Lift x Bloom, a hidden
+test window gets a random burst of clicks, drags, wheels, keys, new and
+joined columns, opened files and theme changes, then must settle (its
+frames stop changing) with no crash record and its process alive.
+
+gui_monkey.py <pardes-gui> [outdir] [--seed N] [--steps N]; `zig build
+monkey-gui -Dplatform=gui -- [--seed N] [--steps N]` runs it on the built
+window. Exits 1 when any combination failed; what failed is in outdir.
+"""
+import argparse
+import hashlib
+import itertools
+import os
+import random
+import shutil
+import sys
+import tempfile
+import time
+from pathlib import Path
+
+sys.path.insert(0, str(Path(__file__).resolve().parent))
+from fs import session # noqa: E402
+
+MOTIONS = ['off', 'crisp', 'smooth', 'bouncy', 'playful']
+LIFTS = ['off', 'shadow', 'rim', 'auto']
+BLOOMS = ['0', '2']
+THEMES = ['lapis', 'lapis_plain', 'forge', 'acme', 'dusk', 'daybreak']
+W, H = 1280, 840
+
+
+def settled(cap, timeout=20):
+ latest = cap / 'latest.ppm'
+ previous = None
+ deadline = time.monotonic() + timeout
+ while time.monotonic() < deadline:
+ time.sleep(.4)
+ try:
+ data = latest.read_bytes()
+ except FileNotFoundError:
+ continue
+ digest = hashlib.sha256(data).hexdigest()
+ if digest == previous:
+ return True
+ previous = digest
+ return False
+
+
+def run(binary, out, motion, lift, bloom, seed, steps):
+ rng = random.Random(seed)
+ root = Path(tempfile.mkdtemp(prefix='pardes-gui-monkey-'))
+ cap = root / 'cap'
+ cap.mkdir()
+ (root / 'config/pardes').mkdir(parents=True)
+ (root / 'config/pardes/init').write_text(
+ f'Shell /bin/sh\nMessageLinger 0\nMotion {motion}\nLift {lift}\nBloom {bloom}\nPanelSlide\nSelectionGlow on\nHoverGlow on\n')
+ src = root / 'a.zig'
+ src.write_text(''.join(f'pub fn f{n}(x: u32) u32 {{ return x * {n}; }} // a line\n' for n in range(200)))
+ for name in ('b.txt', 'c.txt'):
+ (root / name).write_text(''.join(f'{name} line {n} with some words\n' for n in range(80)))
+ display = Path(os.environ.get('XDG_RUNTIME_DIR', '/run/user/%d' % os.getuid())) / os.environ.get('WAYLAND_DISPLAY', 'wayland-0')
+ env = {'PARDES_TEST': '1', 'PARDES_TEST_CLOCK': '1', 'PARDES_TEST_COLS': '80', 'PARDES_TEST_ROWS': '28', 'PARDES_TEST_PAD': '0',
+ 'PARDES_TEST_CAPTURE_DIR': str(cap), 'SDL_VIDEODRIVER': 'wayland', 'WAYLAND_DISPLAY': str(display)}
+ name = 'monkey'
+ launch = ['-c', 'stty cols 80 rows 28; exec "$@"', name, str(binary.resolve()), '--9p=' + name, str(src)]
+ handles = {}
+ verdict = 'ok'
+ log = []
+ try:
+ with session('/bin/sh', root, name, socket_name=name, tty=True, launch=launch, inherited=env, terminal=handles) as (client, _):
+ fd = handles['input_fd']
+ time.sleep(1.0)
+
+ def mouse(kind, button, x, y):
+ os.write(fd, f'\x1b]777;mouse;{kind};{button};{x};{y}\x07'.encode())
+
+ def first():
+ rows = client.read('/index').decode().splitlines()
+ return int(rows[0].split()[0]) if rows else None
+
+ for _ in range(steps):
+ x, y = rng.randrange(W), rng.randrange(H)
+ action = rng.randrange(12)
+ try:
+ if action in (0, 1):
+ mouse('down', 1, x, y); mouse('up', 1, x, y); log.append(f'click {x},{y}')
+ elif action == 2:
+ x2, y2 = rng.randrange(W), rng.randrange(H)
+ mouse('down', 1, x, y)
+ for i in range(1, 6):
+ mouse('motion', 1, x + (x2 - x) * i // 5, y + (y2 - y) * i // 5)
+ mouse('up', 1, x2, y2); log.append(f'drag {x},{y}->{x2},{y2}')
+ elif action == 3:
+ amount = rng.choice([-6, -2, 2, 6])
+ os.write(fd, f'\x1b]777;mouse;wheel;{amount};{x};{y}\x07'.encode()); log.append(f'wheel {amount}')
+ elif action == 4:
+ mouse('motion', 0, x, y); log.append(f'hover {x},{y}')
+ elif action == 5:
+ client.write('/ctl', b'Newcol\n'); log.append('Newcol')
+ elif action == 6:
+ serial = first()
+ if serial is not None:
+ target = root / rng.choice(['b.txt', 'c.txt', 'a.zig'])
+ client.write(f'/pane/{serial}/look', f'{target}\n'.encode()); log.append(f'look {target.name}')
+ elif action == 7:
+ serial = first()
+ if serial is not None:
+ # Delcol too: the last column's going leaves an
+ # empty window now (acme's), not a quit.
+ word = rng.choice(['Joincol', 'Collapse', 'Delcol'])
+ try:
+ client.write(f'/pane/{serial}/exec', (word + '\n').encode())
+ except OSError:
+ pass
+ log.append(word)
+ else:
+ # An empty window: pane/new makes its column and a pane.
+ try:
+ client.read('/pane/new')
+ except OSError:
+ pass
+ log.append('pane/new (empty window)')
+ elif action == 8:
+ os.write(fd, rng.choice([b'j', b'k', b'10j', b'gg', b'w', b'%', b'v5j', b'\x1b']))
+ log.append('keys')
+ elif action == 9:
+ theme = rng.choice(THEMES)
+ client.write('/ctl', f'Theme {theme}\n'.encode()); log.append(f'Theme {theme}')
+ elif action == 10:
+ mouse('down', 3, x, y); mouse('up', 3, x, y); log.append(f'look-click {x},{y}')
+ else:
+ time.sleep(rng.choice([0, .05, .2])); log.append('pause')
+ except OSError as why:
+ log.append(f'refused: {why}')
+ time.sleep(.03)
+ if not settled(cap):
+ verdict = 'never settled'
+ try:
+ os.kill(handles['pid'], 0)
+ except OSError:
+ verdict = 'process gone'
+ client.read('/index')
+ except Exception as why: # noqa: BLE001
+ verdict = f'failed: {type(why).__name__}: {str(why)[:300]}'
+ crashes = list((root / 'config').rglob('*crash*'))
+ if crashes:
+ verdict = 'crash record: ' + ', '.join(str(c) for c in crashes)
+ label = f'{motion}-{lift}-bloom{bloom}'
+ if verdict != 'ok':
+ (out / f'{label}.log').write_text('\n'.join(log) + '\n' + verdict + '\n')
+ for c in crashes:
+ shutil.copy(c, out / f'{label}-{c.name}')
+ if (cap / 'latest.ppm').exists():
+ shutil.copy(cap / 'latest.ppm', out / f'{label}-last.ppm')
+ shutil.rmtree(root, ignore_errors=True)
+ return label, verdict
+
+
+def main():
+ ap = argparse.ArgumentParser()
+ ap.add_argument('binary', type=Path)
+ ap.add_argument('out', type=Path, nargs='?')
+ ap.add_argument('--seed', type=int, default=1)
+ ap.add_argument('--steps', type=int, default=60)
+ args = ap.parse_args()
+ if args.out is None:
+ args.out = Path(tempfile.mkdtemp(prefix='pardes-gui-monkey-out-'))
+ args.out.mkdir(parents=True, exist_ok=True)
+ bad = 0
+ for n, (motion, lift, bloom) in enumerate(itertools.product(MOTIONS, LIFTS, BLOOMS)):
+ label, verdict = run(args.binary, args.out, motion, lift, bloom, args.seed * 1000 + n, args.steps)
+ print(f'{label}: {verdict}', flush=True)
+ bad += verdict != 'ok'
+ print(f'{bad} of {len(MOTIONS) * len(LIFTS) * len(BLOOMS)} combinations failed; logs in {args.out}', flush=True)
+ sys.exit(1 if bad else 0)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/test/history.zig b/test/history.zig
index 5ce45239..d399f7aa 100644
--- a/test/history.zig
+++ b/test/history.zig
@@ -432,24 +432,24 @@ test "history benchmark cases are nonempty unique and matched by name" {
try std.testing.expectError(error.MissingField, readBenchmarks(arena, "{\"case\":\"first\"}"));
const before = try readBenchmarks(arena, benchmark_fixture);
const missing = try readBenchmarks(arena, "{\"case\":\"first\",\"bytes\":10,\"median_ns\":100,\"cold_ns\":100,\"allocations\":10,\"allocated_bytes\":1000}");
- try std.testing.expectError(error.DifferentBenchmarks, compareBenchmarks(.{before} ** 4, .{missing} ** 4, null, &report.writer));
+ try std.testing.expectError(error.DifferentBenchmarks, compareBenchmarks(@splat(before), @splat(missing), null, &report.writer));
const renamed =
\\{"case":"first","bytes":10,"median_ns":100,"cold_ns":100,"allocations":10,"allocated_bytes":1000}
\\{"case":"renamed","bytes":20,"median_ns":100,"cold_ns":100,"allocations":10,"allocated_bytes":1000}
;
const different = try readBenchmarks(arena, renamed);
- try std.testing.expectError(error.DifferentBenchmarks, compareBenchmarks(.{before} ** 4, .{different} ** 4, null, &report.writer));
+ try std.testing.expectError(error.DifferentBenchmarks, compareBenchmarks(@splat(before), @splat(different), null, &report.writer));
const reordered =
\\{"case":"last","bytes":20,"median_ns":100,"cold_ns":100,"allocations":10,"allocated_bytes":1000}
\\{"case":"first","bytes":10,"median_ns":100,"cold_ns":100,"allocations":10,"allocated_bytes":1000}
;
const same = try readBenchmarks(arena, reordered);
- try std.testing.expect(!try compareBenchmarks(.{before} ** 4, .{same} ** 4, 1, &report.writer));
+ try std.testing.expect(!try compareBenchmarks(@splat(before), @splat(same), 1, &report.writer));
var samples = [4][]Benchmark{ before, before, before, different };
- try std.testing.expectError(error.DifferentBenchmarks, compareBenchmarks(.{before} ** 4, samples, null, &report.writer));
+ try std.testing.expectError(error.DifferentBenchmarks, compareBenchmarks(@splat(before), samples, null, &report.writer));
samples[3] = try arena.dupe(Benchmark, before);
samples[3][0].bytes += 1;
- try std.testing.expectError(error.DifferentBenchmarkInputs, compareBenchmarks(.{before} ** 4, samples, null, &report.writer));
+ try std.testing.expectError(error.DifferentBenchmarkInputs, compareBenchmarks(@splat(before), samples, null, &report.writer));
}
test "history benchmark gate uses repeated process captures rather than the first process alone" {
diff --git a/test/hxcases/cases.jsonl b/test/hxcases/cases.jsonl
index b0a3aad4..b7fdc4c9 100644
--- a/test/hxcases/cases.jsonl
+++ b/test/hxcases/cases.jsonl
@@ -252,6 +252,9 @@
{"name": "add-nl-below", "pane": "file", "text": "aa\nbb\n", "keys": "]<space>"}
{"name": "add-nl-above", "pane": "file", "text": "aa\nbb\n", "keys": "j[<space>"}
{"name": "add-nl-count", "pane": "file", "text": "aa\nbb\n", "keys": "2]<space>"}
+{"name": "add-nl-above-sel", "pane": "file", "text": "aa\nbb\ncc\n", "keys": "vj[<space>"}
+{"name": "add-nl-below-sel", "pane": "file", "text": "aa\nbb\ncc\n", "keys": "jvk]<space>"}
+{"name": "add-nl-above-lines", "pane": "file", "text": "aa\nbb\ncc\n", "keys": "jxx[<space>"}
{"name": "d-word", "pane": "file", "text": "alpha beta\n", "keys": "wd"}
{"name": "d-bare-char", "pane": "file", "text": "abc\n", "keys": "d"}
{"name": "d-on-nl-joins", "pane": "file", "text": "ab\ncd\n", "keys": "lld"}
@@ -287,6 +290,8 @@
{"name": "r-cancel-esc", "pane": "file", "text": "abc\n", "keys": "r<esc>l"}
{"name": "R-inline", "pane": "file", "text": "alpha beta\n", "keys": "wyggR"}
{"name": "R-linewise", "pane": "file", "text": "one\ntwo\n", "keys": "xyjR"}
+{"name": "R-backward", "pane": "file", "text": "alpha beta\n", "keys": "wyebR"}
+{"name": "R-backward-linewise", "pane": "file", "text": "one\ntwo three\n", "keys": "xyjxbR"}
{"name": "tilde-sel-keeps", "pane": "file", "text": "abc\n", "keys": "vll~"}
{"name": "tilde-bare", "pane": "file", "text": "aBc\n", "keys": "~"}
{"name": "backtick-lower", "pane": "file", "text": "ABC\n", "keys": "vll`"}
@@ -297,6 +302,12 @@
{"name": "J-empty-next-nospace", "pane": "file", "text": "aa\n\nbb\n", "keys": "J"}
{"name": "J-last-line-eats-nl", "pane": "file", "text": "aa\nbb\n", "keys": "jJ"}
{"name": "J-count-ignored", "pane": "file", "text": "a\nb\nc\nd\n", "keys": "3J"}
+{"name": "msel-J-same-line", "pane": "file", "text": "aa bb\ncc\ndd\n", "keys": "wCJ"}
+{"name": "msel-J-shared-line", "pane": "file", "text": "ab\ncd\nef\n", "keys": "%s\\w<ret>J"}
+{"name": "alt-J-selects-space", "pane": "file", "text": "aa\n bb\ncc\n", "keys": "xx<A-J>"}
+{"name": "alt-J-each-range", "pane": "file", "text": "a\nb\nc\nd\n", "keys": "%<A-s><A-J>"}
+{"name": "alt-J-blank-no-space", "pane": "file", "text": "aa\n\nbb\n", "keys": "<A-J>"}
+{"name": "msel-J-two-lines", "pane": "file", "text": "aa bb\ncc\ndd\nee\n", "keys": "Cs\\w<ret>J"}
{"name": "indent-basic", "pane": "file", "text": "foo\nbar\n", "keys": "<gt>"}
{"name": "indent-realign", "pane": "file", "text": " x\n", "keys": "gs<gt>"}
{"name": "indent-cursor-maps", "pane": "file", "text": "foo\n", "keys": "ll<gt>"}
@@ -316,6 +327,9 @@
{"name": "ms-sel", "pane": "file", "text": "hello\n", "keys": "vllms("}
{"name": "ms-bare", "pane": "file", "text": "ab\n", "keys": "ms("}
{"name": "ms-quote-self", "pane": "file", "text": "ab cd\n", "keys": "wems'"}
+{"name": "ms-backward", "pane": "file", "text": "ab cd\n", "keys": "wbms("}
+{"name": "ms-backward-lines", "pane": "file", "text": "ab\ncd\nef\n", "keys": "jjlvkkms["}
+{"name": "msel-ms-backward", "pane": "file", "text": "id 1,x 2\n", "keys": "%s\\d<ret>dhbms`"}
{"name": "md-basic", "pane": "file", "text": "a(bcd)e\n", "keys": "3lmd("}
{"name": "md-quote", "pane": "file", "text": "a 'bc' d\n", "keys": "3lmd'"}
{"name": "mr-basic", "pane": "file", "text": "a(bcd)e\n", "keys": "3lmr(["}
@@ -330,6 +344,21 @@
{"name": "i-keeps-sel-start", "pane": "file", "text": "alpha beta\n", "keys": "wi"}
{"name": "wa-sel-end", "pane": "file", "text": "alpha beta\n", "keys": "wa"}
{"name": "wiX-edit-drops-sel", "pane": "file", "text": "alpha beta\n", "keys": "wiX<esc>"}
+{"name": "reg-selection-insert", "pane": "file", "text": "ab\n", "keys": "vli<C-r>.<esc>"}
+{"name": "ins-sel-backspace", "pane": "file", "text": "alpha beta\n", "keys": "wi<backspace><esc>"}
+{"name": "ins-append-enter", "pane": "file", "text": "ab cd\n", "keys": "wa<ret>x<esc>"}
+{"name": "ins-append-backspace", "pane": "file", "text": "ab cd\n", "keys": "ea<backspace><backspace><esc>"}
+{"name": "ins-sel-delete", "pane": "file", "text": "ab cd\n", "keys": "wi<del><esc>"}
+{"name": "ins-sel-arrow-collapses", "pane": "file", "text": "ab cd\n", "keys": "wi<right><esc>"}
+{"name": "msel-insert-keeps-ranges", "pane": "file", "text": "ab cd\nab cd\n", "keys": "wCiX<esc>"}
+{"name": "msel-append-lines", "pane": "file", "text": "aa\nbb\n", "keys": "%<A-s>a!<esc>"}
+{"name": "ins-append-bare", "pane": "file", "text": "ab\n", "keys": "axy<esc>"}
+{"name": "ins-change-then-type", "pane": "file", "text": "ab cd\n", "keys": "wcX<esc>"}
+{"name": "ins-open-below-sel", "pane": "file", "text": "ab\ncd\n", "keys": "xoX<esc>"}
+{"name": "ins-enter-trims-blanks", "pane": "file", "text": "ab cd\n", "keys": "5li<ret><esc>"}
+{"name": "ins-enter-in-indent", "pane": "file", "text": " ab\n", "keys": "2li<ret><esc>"}
+{"name": "ins-enter-after-open", "pane": "file", "text": " ab\n", "keys": "o<ret>x<esc>"}
+{"name": "msel-ins-enter", "pane": "file", "text": "ab cd\nab cd\n", "keys": "wCa<ret><esc>"}
{"name": "a-esc-restore", "pane": "file", "text": "abc\n", "keys": "a<esc>"}
{"name": "ax-restore", "pane": "file", "text": "abc\n", "keys": "ax<esc>"}
{"name": "lax-restore", "pane": "file", "text": "abc\n", "keys": "lax<esc>"}
@@ -341,6 +370,11 @@
{"name": "ins-enter-indent", "pane": "file", "text": " foo\n", "keys": "A<ret>x<esc>"}
{"name": "ins-backspace", "pane": "file", "text": "abc\n", "keys": "lli<backspace><esc>"}
{"name": "ins-backspace-join", "pane": "file", "text": "ab\ncd\n", "keys": "ji<backspace><esc>"}
+{"name": "ins-backspace-indent-unit", "pane": "file", "text": " x\n", "keys": "8li<backspace>"}
+{"name": "ins-backspace-indent-partial", "pane": "file", "text": " x\n", "keys": "6li<backspace>"}
+{"name": "ins-backspace-indent-tab", "pane": "file", "text": "\t\tx\n", "keys": "2li<backspace>"}
+{"name": "ins-backspace-open-indent", "pane": "file", "text": " ab\n", "keys": "O<backspace>"}
+{"name": "ins-backspace-after-text", "pane": "file", "text": " a x\n", "keys": "7li<backspace>"}
{"name": "ins-ctrl-w", "pane": "file", "text": "one two\n", "keys": "A<C-w><esc>"}
{"name": "ins-ctrl-w-col0-join", "pane": "file", "text": "ab\ncd\n", "keys": "ji<C-w><esc>"}
{"name": "ins-alt-bs", "pane": "file", "text": "one two\n", "keys": "A<A-backspace><esc>"}
@@ -390,6 +424,56 @@
{"name": "msel-trim", "pane": "file", "text": " ab \n", "keys": "%_"}
{"name": "msel-trim-all-ws", "pane": "file", "text": " \n", "keys": "%_"}
{"name": "msel-trim-multi", "pane": "file", "text": " ab \n cd \n", "keys": "x<A-x>C_"}
+{"name": "msel-rotate-contents-fwd", "pane": "file", "text": "a b c\n", "keys": "%s\\w<ret><A-)>"}
+{"name": "msel-rotate-contents-back", "pane": "file", "text": "a b c\n", "keys": "%s\\w<ret><A-(>"}
+{"name": "msel-rotate-contents-count", "pane": "file", "text": "a b c d\n", "keys": "%s\\w<ret>2<A-)>"}
+{"name": "msel-rotate-contents-lengths", "pane": "file", "text": "one to three\n", "keys": "%s\\w+<ret>)<A-(>"}
+{"name": "msel-rotate-contents-backward", "pane": "file", "text": "ab cde\n", "keys": "%s\\w+<ret><A-;><A-)>"}
+{"name": "msel-rotate-contents-lines", "pane": "file", "text": "aa\nbbb\n", "keys": "%<A-s><A-)>"}
+{"name": "sel-many-ranges", "pane": "file", "text": "w w w w w w w w w w w w w w w w w w w w\nw w w w w w w w w w w w w w w w w w w w\nw w w w w w w w w w w w w w w w w w w w\nw w w w w w w w w w w w w w w w w w w w\nw w w w w w w w w w w w w w w w w w w w\nw w w w w w w w w w w w w w w w w w w w\nw w w w w w w w w w w w w w w w w w w w\nw w w w w w w w w w w w w w w w w w w w\nw w w w w w w w w w w w w w w w w w w w\nw w w w w w w w w w w w w w w w w w w w\n", "keys": "%sw<ret>"}
+{"name": "sel-many-ranges-edit", "pane": "file", "text": "w w w w w w w w w w w w w w w w w w w w\nw w w w w w w w w w w w w w w w w w w w\nw w w w w w w w w w w w w w w w w w w w\nw w w w w w w w w w w w w w w w w w w w\nw w w w w w w w w w w w w w w w w w w w\nw w w w w w w w w w w w w w w w w w w w\nw w w w w w w w w w w w w w w w w w w w\nw w w w w w w w w w w w w w w w w w w w\nw w w w w w w w w w w w w w w w w w w w\nw w w w w w w w w w w w w w w w w w w w\n", "keys": "%sw<ret>cxy<esc>"}
+{"name": "keep-regex", "pane": "file", "text": "foo bar baz\n", "keys": "%s\\w+<ret>Kba<ret>"}
+{"name": "remove-regex", "pane": "file", "text": "foo bar baz\n", "keys": "%s\\w+<ret><A-K>ba<ret>"}
+{"name": "keep-regex-none", "pane": "file", "text": "foo bar\n", "keys": "%s\\w+<ret>Kzz<ret>"}
+{"name": "keep-regex-primary", "pane": "file", "text": "a1 b2 a3\n", "keys": "%s\\w+<ret>))Ka<ret>"}
+{"name": "keep-regex-esc", "pane": "file", "text": "foo bar\n", "keys": "%s\\w+<ret>Kfo<esc>"}
+{"name": "keep-regex-lines", "pane": "file", "text": "foo\nbar\nbaz\n", "keys": "%<A-s>K^b<ret>"}
+{"name": "ensure-forward", "pane": "file", "text": "ab cd\n", "keys": "%s\\w+<ret><A-;><A-:>"}
+{"name": "ensure-forward-one", "pane": "file", "text": "abc\n", "keys": "vll<A-;><A-:>"}
+{"name": "node-keys-plain-text", "pane": "file", "text": "ab cd\n", "keys": "w<A-o><A-i><A-p><A-right><A-a><A-I><A-e><A-b>"}
+{"name": "goto-last-mod", "pane": "file", "text": "ab\ncd\nef\n", "keys": "jliXY<esc>gg"}
+{"name": "goto-last-mod-go", "pane": "file", "text": "ab\ncd\nef\n", "keys": "jliXY<esc>ggg."}
+{"name": "goto-last-mod-delete", "pane": "file", "text": "abc\ndef\n", "keys": "jlxdgg"}
+{"name": "goto-last-mod-delete-go", "pane": "file", "text": "abc\ndef\n", "keys": "jldggg."}
+{"name": "goto-last-mod-select", "pane": "file", "text": "ab\ncd\nef\n", "keys": "jjiX<esc>ggvg."}
+{"name": "alt-u-undo", "pane": "file", "text": "ab\n", "keys": "iX<esc><A-u>"}
+{"name": "alt-U-redo", "pane": "file", "text": "ab\n", "keys": "iX<esc>u<A-U>"}
+{"name": "ins-checkpoint-undo", "pane": "file", "text": "ab\n", "keys": "iX<C-s>Y<esc>u"}
+{"name": "ins-checkpoint-undo-twice", "pane": "file", "text": "ab\n", "keys": "iX<C-s>Y<esc>uu"}
+{"name": "ins-checkpoint-redo", "pane": "file", "text": "ab\n", "keys": "iX<C-s>Y<esc>uuU"}
+{"name": "msel-ins-checkpoint", "pane": "file", "text": "ab\nab\n", "keys": "CiX<C-s>Y<esc>u"}
+{"name": "ins-tab-after-text-plain", "pane": "file", "text": "ab cd\n", "keys": "2li<tab>X<esc>"}
+{"name": "ins-shift-tab", "pane": "file", "text": "ab cd\n", "keys": "2li<S-tab>X<esc>"}
+{"name": "sticky-view-scroll", "pane": "file", "text": "line 0\nline 1\nline 2\nline 3\nline 4\nline 5\nline 6\nline 7\nline 8\nline 9\nline 10\nline 11\nline 12\nline 13\nline 14\nline 15\nline 16\nline 17\nline 18\nline 19\nline 20\nline 21\nline 22\nline 23\nline 24\nline 25\nline 26\nline 27\nline 28\nline 29\nline 30\nline 31\nline 32\nline 33\nline 34\nline 35\nline 36\nline 37\nline 38\nline 39\nline 40\nline 41\nline 42\nline 43\nline 44\nline 45\nline 46\nline 47\nline 48\nline 49\nline 50\nline 51\nline 52\nline 53\nline 54\nline 55\nline 56\nline 57\nline 58\nline 59\n", "keys": "Zjjj<esc>"}
+{"name": "sticky-view-then-move", "pane": "file", "text": "line 0\nline 1\nline 2\nline 3\nline 4\nline 5\nline 6\nline 7\nline 8\nline 9\nline 10\nline 11\nline 12\nline 13\nline 14\nline 15\nline 16\nline 17\nline 18\nline 19\nline 20\nline 21\nline 22\nline 23\nline 24\nline 25\nline 26\nline 27\nline 28\nline 29\nline 30\nline 31\nline 32\nline 33\nline 34\nline 35\nline 36\nline 37\nline 38\nline 39\nline 40\nline 41\nline 42\nline 43\nline 44\nline 45\nline 46\nline 47\nline 48\nline 49\nline 50\nline 51\nline 52\nline 53\nline 54\nline 55\nline 56\nline 57\nline 58\nline 59\n", "keys": "Zjj<esc>j"}
+{"name": "sticky-view-ignores", "pane": "file", "text": "line 0\nline 1\nline 2\nline 3\nline 4\nline 5\nline 6\nline 7\nline 8\nline 9\nline 10\nline 11\nline 12\nline 13\nline 14\nline 15\nline 16\nline 17\nline 18\nline 19\nline 20\nline 21\nline 22\nline 23\nline 24\nline 25\nline 26\nline 27\nline 28\nline 29\nline 30\nline 31\nline 32\nline 33\nline 34\nline 35\nline 36\nline 37\nline 38\nline 39\nline 40\nline 41\nline 42\nline 43\nline 44\nline 45\nline 46\nline 47\nline 48\nline 49\nline 50\nline 51\nline 52\nline 53\nline 54\nline 55\nline 56\nline 57\nline 58\nline 59\n", "keys": "Zjxj<esc>"}
+{"name": "view-middle", "pane": "file", "text": "abcdef\n", "keys": "3lzm"}
+{"name": "view-z-not-sticky", "pane": "file", "text": "line 0\nline 1\nline 2\nline 3\nline 4\nline 5\nline 6\nline 7\nline 8\nline 9\nline 10\nline 11\nline 12\nline 13\nline 14\nline 15\nline 16\nline 17\nline 18\nline 19\nline 20\nline 21\nline 22\nline 23\nline 24\nline 25\nline 26\nline 27\nline 28\nline 29\nline 30\nline 31\nline 32\nline 33\nline 34\nline 35\nline 36\nline 37\nline 38\nline 39\nline 40\nline 41\nline 42\nline 43\nline 44\nline 45\nline 46\nline 47\nline 48\nline 49\nline 50\nline 51\nline 52\nline 53\nline 54\nline 55\nline 56\nline 57\nline 58\nline 59\n", "keys": "zjj"}
+{"name": "goto-word-first", "pane": "file", "text": "alpha beta gamma\ndelta x\n", "keys": "gwaa"}
+{"name": "goto-word-second", "pane": "file", "text": "alpha beta gamma\ndelta x\n", "keys": "gwab"}
+{"name": "goto-word-back", "pane": "file", "text": "alpha beta gamma\ndelta x\n", "keys": "jwgwab"}
+{"name": "goto-word-cancel", "pane": "file", "text": "alpha beta gamma\n", "keys": "gwzl"}
+{"name": "goto-word-bad-second", "pane": "file", "text": "alpha beta\n", "keys": "gwa9l"}
+{"name": "goto-word-extend", "pane": "file", "text": "alpha beta gamma\n", "keys": "wvgwab"}
+{"name": "goto-word-mid", "pane": "file", "text": "one two three four five\n", "keys": "2wgwaa"}
+{"name": "msel-align-basic", "pane": "file", "text": "a=1\nbbb=2\n", "keys": "%s=<ret>&"}
+{"name": "msel-align-columns", "pane": "file", "text": "a,b,c\nccc,d,e\n", "keys": "%s,<ret>&"}
+{"name": "msel-align-uneven", "pane": "file", "text": "a,b\nccc,d,eee,f\n", "keys": "%s,<ret>&"}
+{"name": "msel-align-words", "pane": "file", "text": "x = 1\nlonger = 22\n", "keys": "%s\\w+<ret>&"}
+{"name": "msel-align-backward", "pane": "file", "text": "x = 11\nlonger = 222\n", "keys": "%s\\d+<ret><A-;>&"}
+{"name": "align-multiline-refused", "pane": "file", "text": "ab\ncd\n", "keys": "vj&"}
+{"name": "msel-align-select-mode", "pane": "file", "text": "a=1\nbbb=2\n", "keys": "%s=<ret>v&"}
+{"name": "rotate-contents-one", "pane": "file", "text": "ab\n", "keys": "vl<A-)>"}
{"name": "msel-insert", "pane": "file", "text": "aa\nbb\n", "keys": "Cix<esc>"}
{"name": "msel-insert-tty", "pane": "tty", "text": "aa\nbb\n", "keys": "Cix<esc>"}
{"name": "msel-append", "pane": "file", "text": "aa\nbb\n", "keys": "Caz<esc>"}
@@ -409,6 +493,35 @@
{"name": "msel-collapse", "pane": "file", "text": "abcd\nabcd\n", "keys": "vllC;"}
{"name": "msel-flip", "pane": "file", "text": "abcd\nabcd\n", "keys": "vllC<A-;>"}
{"name": "msel-yank-paste", "pane": "file", "text": "ab\ncd\n", "keys": "Cyp"}
+{"name": "reg-named-yank-paste", "pane": "file", "text": "ab cd\n", "keys": "\"ayw\"ap"}
+{"name": "reg-named-keeps-default", "pane": "file", "text": "ab cd\n", "keys": "yw\"ay\"_dp"}
+{"name": "reg-blackhole-delete", "pane": "file", "text": "ab cd\n", "keys": "yw\"_dP"}
+{"name": "msel-reg-paste-per-range", "pane": "file", "text": "ab\ncd\n", "keys": "Cyl2Pp"}
+{"name": "msel-reg-fewer-values", "pane": "file", "text": "ab\ncd\nef\n", "keys": "yCCp"}
+{"name": "msel-reg-replace-per-range", "pane": "file", "text": "ab\ncd\n", "keys": "Cy<A-(>Ry"}
+{"name": "msel-reg-more-values-one-range", "pane": "file", "text": "ab\ncd\n", "keys": "Cy,p"}
+{"name": "reg-index-insert", "pane": "file", "text": "x\nx\nx\n", "keys": "%<A-s>i<C-r>#<esc>"}
+{"name": "reg-search-paste", "pane": "file", "text": "ab\n", "keys": "%sb<ret>\"/p"}
+{"name": "reg-count-before-quote", "pane": "file", "text": "ab\n", "keys": "y2\"ap"}
+{"name": "reg-count-after-quote", "pane": "file", "text": "ab\n", "keys": "\"ay\"a3p"}
+{"name": "reg-ctrl-r-named", "pane": "file", "text": "ab\n", "keys": "\"ayli<C-r>a<esc>"}
+{"name": "reg-ctrl-r-esc", "pane": "file", "text": "ab\n", "keys": "i<C-r><esc>x"}
+{"name": "macro-record-replay", "pane": "file", "text": "a\nb\nc\n", "keys": "QA!<esc>jQq"}
+{"name": "macro-count", "pane": "file", "text": "a\nb\nc\nd\n", "keys": "QA!<esc>jQ2q"}
+{"name": "macro-named", "pane": "file", "text": "a\nb\nc\n", "keys": "\"aQA!<esc>jQ\"aq"}
+{"name": "macro-register-text", "pane": "file", "text": "a\nb\n", "keys": "QA!<esc>jQ\"@P"}
+{"name": "macro-with-prompt", "pane": "file", "text": "a,b\nc,d\n", "keys": "QxS,<ret>d<esc>jQq"}
+{"name": "macro-esc-in-normal", "pane": "file", "text": "ab\ncd\n", "keys": "Qvl<esc>jQq"}
+{"name": "macro-empty", "pane": "file", "text": "ab\n", "keys": "QQq"}
+{"name": "dot-insert", "pane": "file", "text": "ab\ncd\n", "keys": "iX<esc>j.."}
+{"name": "dot-append-count", "pane": "file", "text": "ab\ncd\n", "keys": "aYZ<esc>j3."}
+{"name": "dot-change", "pane": "file", "text": "ab cd\nef gh\n", "keys": "wcX<esc>jb."}
+{"name": "dot-open-below", "pane": "file", "text": "a\nb\n", "keys": "oX<esc>j."}
+{"name": "dot-counted-command", "pane": "file", "text": "abcd\n", "keys": "2lixy<esc>."}
+{"name": "dot-multi", "pane": "file", "text": "ab\nab\n", "keys": "CiX<esc>."}
+{"name": "dot-nothing", "pane": "file", "text": "ab\n", "keys": ".x"}
+{"name": "append-at-end-adds-newline", "pane": "file", "text": "ab\n", "keys": "jaX<esc>"}
+{"name": "append-at-end-no-newline", "pane": "file", "text": "ab", "keys": "laX<esc>"}
{"name": "msel-esc-keeps", "pane": "file", "text": "aa\nbb\n", "keys": "C<esc>"}
{"name": "msel-select-mode", "pane": "file", "text": "abcd\nabcd\n", "keys": "Cvl"}
{"name": "msel-open-count", "pane": "file", "text": "ab\n", "keys": "2O"}
@@ -479,3 +592,67 @@
{"name": "comment-then-insert", "pane": "file", "text": "alpha\n", "keys": "<C-c>iz<esc>"}
{"name": "comment-after-sel-regex", "pane": "file", "text": "alpha\nbeta\ngamma\n", "keys": "%sa<ret><C-c>"}
{"name": "comment-after-split-regex", "pane": "file", "text": "a,b\nc,d\n", "keys": "%S,<ret><C-c>"}
+{"name": "search-repeat-next", "pane": "file", "text": "one one one\n", "keys": "w*n"}
+{"name": "search-repeat-next-tty", "pane": "tty", "text": "one one one\n", "keys": "w*n"}
+{"name": "search-repeat-prev", "pane": "file", "text": "one one one\n", "keys": "w*N"}
+{"name": "search-repeat-prev-tty", "pane": "tty", "text": "one one one\n", "keys": "w*N"}
+{"name": "search-repeat-wrap", "pane": "file", "text": "one one one\n", "keys": "w*3n"}
+{"name": "search-repeat-wrap-tty", "pane": "tty", "text": "one one one\n", "keys": "w*3n"}
+{"name": "search-repeat-count", "pane": "file", "text": "one one one\n", "keys": "w*2n"}
+{"name": "search-repeat-count-tty", "pane": "tty", "text": "one one one\n", "keys": "w*2n"}
+{"name": "search-repeat-reverse-count", "pane": "file", "text": "one one one\n", "keys": "w*2N"}
+{"name": "search-repeat-reverse-count-tty", "pane": "tty", "text": "one one one\n", "keys": "w*2N"}
+{"name": "search-repeat-select", "pane": "file", "text": "one one one\n", "keys": "w*vn"}
+{"name": "search-repeat-select-tty", "pane": "tty", "text": "one one one\n", "keys": "w*vn"}
+{"name": "search-repeat-select-count", "pane": "file", "text": "one one one\n", "keys": "w*v2n"}
+{"name": "search-repeat-select-count-tty", "pane": "tty", "text": "one one one\n", "keys": "w*v2n"}
+{"name": "search-repeat-select-back", "pane": "file", "text": "one one one\n", "keys": "w*vN"}
+{"name": "search-repeat-select-back-tty", "pane": "tty", "text": "one one one\n", "keys": "w*vN"}
+{"name": "search-repeat-keep-secondary", "pane": "file", "text": "one one one\n", "keys": "%sone<ret>n"}
+{"name": "search-repeat-keep-secondary-tty", "pane": "tty", "text": "one one one\n", "keys": "%sone<ret>n"}
+{"name": "search-repeat-reverse-selection", "pane": "file", "text": "one one one\n", "keys": "w*<A-;>n"}
+{"name": "search-repeat-reverse-selection-tty", "pane": "tty", "text": "one one one\n", "keys": "w*<A-;>n"}
+{"name": "search-repeat-smart-case", "pane": "file", "text": "one ONE one\n", "keys": "%sone<ret>,n"}
+{"name": "search-repeat-smart-case-tty", "pane": "tty", "text": "one ONE one\n", "keys": "%sone<ret>,n"}
+{"name": "search-repeat-upper-case", "pane": "file", "text": "one ONE ONE\n", "keys": "%sONE<ret>,n"}
+{"name": "search-repeat-upper-case-tty", "pane": "tty", "text": "one ONE ONE\n", "keys": "%sONE<ret>,n"}
+{"name": "search-repeat-named", "pane": "file", "text": "one one one\n", "keys": "w\"a*\"an"}
+{"name": "search-repeat-named-tty", "pane": "tty", "text": "one one one\n", "keys": "w\"a*\"an"}
+{"name": "search-repeat-remember-named", "pane": "file", "text": "one one one\n", "keys": "w\"a*n"}
+{"name": "search-repeat-remember-named-tty", "pane": "tty", "text": "one one one\n", "keys": "w\"a*n"}
+{"name": "search-repeat-literal", "pane": "file", "text": "a.b a.b axb\n", "keys": "3l<A-*>n"}
+{"name": "search-repeat-literal-tty", "pane": "tty", "text": "a.b a.b axb\n", "keys": "3l<A-*>n"}
+{"name": "search-repeat-newline", "pane": "file", "text": "alpha\nbeta\nalpha\nbeta\n", "keys": "%salpha<ret>,n"}
+{"name": "search-repeat-newline-tty", "pane": "tty", "text": "alpha\nbeta\nalpha\nbeta\n", "keys": "%salpha<ret>,n"}
+{"name": "search-repeat-no-reg", "pane": "file", "text": "one one one\n", "keys": "n"}
+{"name": "search-repeat-no-reg-tty", "pane": "tty", "text": "one one one\n", "keys": "n"}
+{"name": "search-repeat-missing", "pane": "file", "text": "one one one\n", "keys": "\"an"}
+{"name": "search-repeat-missing-tty", "pane": "tty", "text": "one one one\n", "keys": "\"an"}
+{"name": "search-repeat-regexp", "pane": "file", "text": "a1 a2 a3\n", "keys": "%sa[0-9]<ret>,n"}
+{"name": "search-repeat-regexp-tty", "pane": "tty", "text": "a1 a2 a3\n", "keys": "%sa[0-9]<ret>,n"}
+{"name": "search-repeat-zero", "pane": "file", "text": "abc abc\n", "keys": "%s$<ret>,n"}
+{"name": "search-repeat-zero-tty", "pane": "tty", "text": "abc abc\n", "keys": "%s$<ret>,n"}
+{"name": "search-repeat-unicode", "pane": "file", "text": "界 界 界\n", "keys": "w*n"}
+{"name": "search-repeat-unicode-tty", "pane": "tty", "text": "界 界 界\n", "keys": "w*n"}
+{"name": "search-repeat-combining", "pane": "file", "text": "á á á\n", "keys": "w*n"}
+{"name": "search-repeat-combining-tty", "pane": "tty", "text": "á á á\n", "keys": "w*n"}
+{"name": "search-repeat-word-boundary", "pane": "file", "text": "one oneself one\n", "keys": "e<A-*>n"}
+{"name": "search-repeat-word-boundary-tty", "pane": "tty", "text": "one oneself one\n", "keys": "e<A-*>n"}
+{"name": "search-repeat-word-normal", "pane": "file", "text": "one oneself one\n", "keys": "e*n"}
+{"name": "search-repeat-word-normal-tty", "pane": "tty", "text": "one oneself one\n", "keys": "e*n"}
+{"name": "search-repeat-word-extend-wrap", "pane": "file", "text": "one one one\n", "keys": "e*v4n"}
+{"name": "search-repeat-word-extend-wrap-tty", "pane": "tty", "text": "one one one\n", "keys": "e*v4n"}
+{"name": "search-repeat-word-reverse-wrap", "pane": "file", "text": "one one one\n", "keys": "e*4N"}
+{"name": "search-repeat-word-reverse-wrap-tty", "pane": "tty", "text": "one one one\n", "keys": "e*4N"}
+{"name": "search-repeat-unicode-boundary", "pane": "file", "text": "界 界界 界\n", "keys": "e*n"}
+{"name": "search-repeat-unicode-boundary-tty", "pane": "tty", "text": "界 界界 界\n", "keys": "e*n"}
+{"name": "search-repeat-unicode-alternatives", "pane": "file", "text": "界 語 界 語\n", "keys": "%s[界語]<ret>*n"}
+{"name": "search-repeat-unicode-alternatives-tty", "pane": "tty", "text": "界 語 界 語\n", "keys": "%s[界語]<ret>*n"}
+{"name": "search-repeat-multisel-extend", "pane": "file", "text": "one two one two\n", "keys": "%sone|two<ret>*vn"}
+{"name": "search-repeat-multisel-extend-tty", "pane": "tty", "text": "one two one two\n", "keys": "%sone|two<ret>*vn"}
+{"name": "search-repeat-backward-zero", "pane": "file", "text": "abc abc\n", "keys": "%s$<ret>,2N"}
+{"name": "search-repeat-backward-zero-tty", "pane": "tty", "text": "abc abc\n", "keys": "%s$<ret>,2N"}
+{"name": "search-repeat-adjacent", "pane": "file", "text": "aaa\n", "keys": "*2n"}
+{"name": "search-repeat-adjacent-tty", "pane": "tty", "text": "aaa\n", "keys": "*2n"}
+{"name": "search-repeat-direction-extend", "pane": "file", "text": "one one one\n", "keys": "e*<A-;>vn"}
+{"name": "search-repeat-direction-extend-tty", "pane": "tty", "text": "one one one\n", "keys": "e*<A-;>vn"}
diff --git a/test/hxcases/goldens.jsonl b/test/hxcases/goldens.jsonl
index eee7294b..bfa479be 100644
--- a/test/hxcases/goldens.jsonl
+++ b/test/hxcases/goldens.jsonl
@@ -252,6 +252,9 @@
{"name":"add-nl-below","text":"aa\n\nbb\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}
{"name":"add-nl-above","text":"aa\n\nbb\n","mode":"normal","cursor":{"row":2,"col":0},"anchor":{"row":2,"col":0}}
{"name":"add-nl-count","text":"aa\n\n\nbb\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}
+{"name":"add-nl-above-sel","text":"\naa\nbb\ncc\n","mode":"select","cursor":{"row":2,"col":0},"anchor":{"row":1,"col":0}}
+{"name":"add-nl-below-sel","text":"aa\nbb\n\ncc\n","mode":"select","cursor":{"row":0,"col":0},"anchor":{"row":1,"col":0}}
+{"name":"add-nl-above-lines","text":"aa\n\nbb\ncc\n","mode":"normal","cursor":{"row":3,"col":2},"anchor":{"row":2,"col":0}}
{"name":"d-word","text":"beta\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}
{"name":"d-bare-char","text":"bc\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}
{"name":"d-on-nl-joins","text":"abcd\n","mode":"normal","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":2}}
@@ -287,6 +290,8 @@
{"name":"r-cancel-esc","text":"abc\n","mode":"normal","cursor":{"row":0,"col":1},"anchor":{"row":0,"col":1}}
{"name":"R-inline","text":"alpha lpha beta\n","mode":"normal","cursor":{"row":0,"col":5},"anchor":{"row":0,"col":0}}
{"name":"R-linewise","text":"one\ntwoone\n","mode":"normal","cursor":{"row":1,"col":6},"anchor":{"row":1,"col":3}}
+{"name":"R-backward","text":"alpha alpha \n","mode":"normal","cursor":{"row":0,"col":6},"anchor":{"row":0,"col":11}}
+{"name":"R-backward-linewise","text":"one\ntwo one\n\n","mode":"normal","cursor":{"row":1,"col":4},"anchor":{"row":1,"col":7}}
{"name":"tilde-sel-keeps","text":"ABC\n","mode":"normal","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":0}}
{"name":"tilde-bare","text":"ABc\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}
{"name":"backtick-lower","text":"abc\n","mode":"normal","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":0}}
@@ -297,6 +302,12 @@
{"name":"J-empty-next-nospace","text":"aa\nbb\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}
{"name":"J-last-line-eats-nl","text":"aa\nbb","mode":"normal","cursor":{"row":1,"col":0},"anchor":{"row":1,"col":0}}
{"name":"J-count-ignored","text":"a b\nc\nd\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}
+{"name":"msel-J-same-line","text":"aa bb cc dd\n","mode":"normal","cursor":{"row":0,"col":8},"anchor":{"row":0,"col":6},"sels":[{"cursor":{"row":0,"col":2},"anchor":{"row":0,"col":0}},{"cursor":{"row":0,"col":8},"anchor":{"row":0,"col":6}}],"primary":1}
+{"name":"msel-J-shared-line","text":"ab cd ef","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0},"sels":[{"cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}},{"cursor":{"row":0,"col":1},"anchor":{"row":0,"col":1}},{"cursor":{"row":0,"col":3},"anchor":{"row":0,"col":3}},{"cursor":{"row":0,"col":4},"anchor":{"row":0,"col":4}},{"cursor":{"row":0,"col":6},"anchor":{"row":0,"col":6}},{"cursor":{"row":0,"col":7},"anchor":{"row":0,"col":7}}],"primary":0}
+{"name":"alt-J-selects-space","text":"aa bb\ncc\n","mode":"normal","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":2}}
+{"name":"alt-J-each-range","text":"a b c d","mode":"normal","cursor":{"row":0,"col":1},"anchor":{"row":0,"col":1},"sels":[{"cursor":{"row":0,"col":1},"anchor":{"row":0,"col":1}},{"cursor":{"row":0,"col":3},"anchor":{"row":0,"col":3}},{"cursor":{"row":0,"col":5},"anchor":{"row":0,"col":5}}],"primary":0}
+{"name":"alt-J-blank-no-space","text":"aa\nbb\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}
+{"name":"msel-J-two-lines","text":"aa bb cc dd\nee\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0},"sels":[{"cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}},{"cursor":{"row":0,"col":6},"anchor":{"row":0,"col":6}}],"primary":0}
{"name":"indent-basic","text":" foo\nbar\n","mode":"normal","cursor":{"row":0,"col":4},"anchor":{"row":0,"col":4}}
{"name":"indent-realign","text":" x\n","mode":"normal","cursor":{"row":0,"col":8},"anchor":{"row":0,"col":8}}
{"name":"indent-cursor-maps","text":" foo\n","mode":"normal","cursor":{"row":0,"col":6},"anchor":{"row":0,"col":6}}
@@ -316,6 +327,9 @@
{"name":"ms-sel","text":"(hel)lo\n","mode":"normal","cursor":{"row":0,"col":4},"anchor":{"row":0,"col":0}}
{"name":"ms-bare","text":"(a)b\n","mode":"normal","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":0}}
{"name":"ms-quote-self","text":"ab' cd'\n","mode":"normal","cursor":{"row":0,"col":6},"anchor":{"row":0,"col":2}}
+{"name":"ms-backward","text":"(ab )cd\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":4}}
+{"name":"ms-backward-lines","text":"a[b\ncd\nef]\n","mode":"normal","cursor":{"row":0,"col":1},"anchor":{"row":2,"col":2}}
+{"name":"msel-ms-backward","text":"`id `,`x `\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":4},"sels":[{"cursor":{"row":0,"col":0},"anchor":{"row":0,"col":4}},{"cursor":{"row":0,"col":6},"anchor":{"row":0,"col":9}}],"primary":0}
{"name":"md-basic","text":"abcde\n","mode":"normal","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":2}}
{"name":"md-quote","text":"a bc d\n","mode":"normal","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":2}}
{"name":"mr-basic","text":"a[bcd]e\n","mode":"normal","cursor":{"row":0,"col":3},"anchor":{"row":0,"col":3}}
@@ -330,6 +344,21 @@
{"name":"i-keeps-sel-start","text":"alpha beta\n","mode":"insert","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":5}}
{"name":"wa-sel-end","text":"alpha beta\n","mode":"insert","cursor":{"row":0,"col":6},"anchor":{"row":0,"col":0}}
{"name":"wiX-edit-drops-sel","text":"Xalpha beta\n","mode":"normal","cursor":{"row":0,"col":1},"anchor":{"row":0,"col":6}}
+{"name":"reg-selection-insert","text":"abab\n","mode":"normal","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":3}}
+{"name":"ins-sel-backspace","text":"alpha beta\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":5}}
+{"name":"ins-append-enter","text":"ab\nxcd\n","mode":"normal","cursor":{"row":1,"col":0},"anchor":{"row":0,"col":0}}
+{"name":"ins-append-backspace","text":" cd\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}
+{"name":"ins-sel-delete","text":"b cd\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":1}}
+{"name":"ins-sel-arrow-collapses","text":"ab cd\n","mode":"normal","cursor":{"row":0,"col":1},"anchor":{"row":0,"col":1}}
+{"name":"msel-insert-keeps-ranges","text":"Xab cd\nXab cd\n","mode":"normal","cursor":{"row":1,"col":1},"anchor":{"row":1,"col":3},"sels":[{"cursor":{"row":0,"col":1},"anchor":{"row":0,"col":3}},{"cursor":{"row":1,"col":1},"anchor":{"row":1,"col":3}}],"primary":1}
+{"name":"msel-append-lines","text":"aa!\nbb!\n","mode":"normal","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":0},"sels":[{"cursor":{"row":0,"col":2},"anchor":{"row":0,"col":0}},{"cursor":{"row":1,"col":2},"anchor":{"row":1,"col":0}}],"primary":0}
+{"name":"ins-append-bare","text":"axyb\n","mode":"normal","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":0}}
+{"name":"ins-change-then-type","text":"Xcd\n","mode":"normal","cursor":{"row":0,"col":1},"anchor":{"row":0,"col":1}}
+{"name":"ins-open-below-sel","text":"ab\nX\ncd\n","mode":"normal","cursor":{"row":1,"col":1},"anchor":{"row":1,"col":1}}
+{"name":"ins-enter-trims-blanks","text":"ab\ncd\n","mode":"normal","cursor":{"row":1,"col":0},"anchor":{"row":1,"col":0}}
+{"name":"ins-enter-in-indent","text":"\n ab\n","mode":"normal","cursor":{"row":1,"col":2},"anchor":{"row":1,"col":2}}
+{"name":"ins-enter-after-open","text":" ab\n\n x\n","mode":"normal","cursor":{"row":2,"col":5},"anchor":{"row":2,"col":5}}
+{"name":"msel-ins-enter","text":"ab\ncd\nab\ncd\n","mode":"normal","cursor":{"row":2,"col":2},"anchor":{"row":2,"col":0},"sels":[{"cursor":{"row":0,"col":2},"anchor":{"row":0,"col":0}},{"cursor":{"row":2,"col":2},"anchor":{"row":2,"col":0}}],"primary":1}
{"name":"a-esc-restore","text":"abc\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}
{"name":"ax-restore","text":"axbc\n","mode":"normal","cursor":{"row":0,"col":1},"anchor":{"row":0,"col":0}}
{"name":"lax-restore","text":"abxc\n","mode":"normal","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":1}}
@@ -341,6 +370,11 @@
{"name":"ins-enter-indent","text":" foo\n x\n","mode":"normal","cursor":{"row":1,"col":5},"anchor":{"row":1,"col":5}}
{"name":"ins-backspace","text":"ac\n","mode":"normal","cursor":{"row":0,"col":1},"anchor":{"row":0,"col":1}}
{"name":"ins-backspace-join","text":"abcd\n","mode":"normal","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":2}}
+{"name":"ins-backspace-indent-unit","text":" x\n","mode":"insert","cursor":{"row":0,"col":4},"anchor":{"row":0,"col":4}}
+{"name":"ins-backspace-indent-partial","text":" x\n","mode":"insert","cursor":{"row":0,"col":4},"anchor":{"row":0,"col":4}}
+{"name":"ins-backspace-indent-tab","text":"\tx\n","mode":"insert","cursor":{"row":0,"col":1},"anchor":{"row":0,"col":1}}
+{"name":"ins-backspace-open-indent","text":"\n ab\n","mode":"insert","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}
+{"name":"ins-backspace-after-text","text":" a x\n","mode":"insert","cursor":{"row":0,"col":6},"anchor":{"row":0,"col":6}}
{"name":"ins-ctrl-w","text":"one \n","mode":"normal","cursor":{"row":0,"col":4},"anchor":{"row":0,"col":4}}
{"name":"ins-ctrl-w-col0-join","text":"cd\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}
{"name":"ins-alt-bs","text":"one \n","mode":"normal","cursor":{"row":0,"col":4},"anchor":{"row":0,"col":4}}
@@ -390,6 +424,56 @@
{"name":"msel-trim","text":" ab \n","mode":"normal","cursor":{"row":0,"col":3},"anchor":{"row":0,"col":2}}
{"name":"msel-trim-all-ws","text":" \n","mode":"normal","cursor":{"row":0,"col":3},"anchor":{"row":0,"col":3}}
{"name":"msel-trim-multi","text":" ab \n cd \n","mode":"normal","cursor":{"row":1,"col":2},"anchor":{"row":1,"col":1},"sels":[{"cursor":{"row":0,"col":2},"anchor":{"row":0,"col":1}},{"cursor":{"row":1,"col":2},"anchor":{"row":1,"col":1}}],"primary":1}
+{"name":"msel-rotate-contents-fwd","text":"c a b\n","mode":"normal","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":2},"sels":[{"cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}},{"cursor":{"row":0,"col":2},"anchor":{"row":0,"col":2}},{"cursor":{"row":0,"col":4},"anchor":{"row":0,"col":4}}],"primary":1}
+{"name":"msel-rotate-contents-back","text":"b c a\n","mode":"normal","cursor":{"row":0,"col":4},"anchor":{"row":0,"col":4},"sels":[{"cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}},{"cursor":{"row":0,"col":2},"anchor":{"row":0,"col":2}},{"cursor":{"row":0,"col":4},"anchor":{"row":0,"col":4}}],"primary":2}
+{"name":"msel-rotate-contents-count","text":"c d a b\n","mode":"normal","cursor":{"row":0,"col":4},"anchor":{"row":0,"col":4},"sels":[{"cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}},{"cursor":{"row":0,"col":2},"anchor":{"row":0,"col":2}},{"cursor":{"row":0,"col":4},"anchor":{"row":0,"col":4}},{"cursor":{"row":0,"col":6},"anchor":{"row":0,"col":6}}],"primary":2}
+{"name":"msel-rotate-contents-lengths","text":"to three one\n","mode":"normal","cursor":{"row":0,"col":1},"anchor":{"row":0,"col":0},"sels":[{"cursor":{"row":0,"col":1},"anchor":{"row":0,"col":0}},{"cursor":{"row":0,"col":7},"anchor":{"row":0,"col":3}},{"cursor":{"row":0,"col":11},"anchor":{"row":0,"col":9}}],"primary":0}
+{"name":"msel-rotate-contents-backward","text":"cde ab\n","mode":"normal","cursor":{"row":0,"col":4},"anchor":{"row":0,"col":5},"sels":[{"cursor":{"row":0,"col":0},"anchor":{"row":0,"col":2}},{"cursor":{"row":0,"col":4},"anchor":{"row":0,"col":5}}],"primary":1}
+{"name":"msel-rotate-contents-lines","text":"bbb\naa\n","mode":"normal","cursor":{"row":1,"col":1},"anchor":{"row":1,"col":0},"sels":[{"cursor":{"row":0,"col":2},"anchor":{"row":0,"col":0}},{"cursor":{"row":1,"col":1},"anchor":{"row":1,"col":0}}],"primary":1}
+{"name":"sel-many-ranges","text":"w w w w w w w w w w w w w w w w w w w w\nw w w w w w w w w w w w w w w w w w w w\nw w w w w w w w w w w w w w w w w w w w\nw w w w w w w w w w w w w w w w w w w w\nw w w w w w w w w w w w w w w w w w w w\nw w w w w w w w w w w w w w w w w w w w\nw w w w w w w w w w w w w w w w w w w w\nw w w w w w w w w w w w w w w w w w w w\nw w w w w w w w w w w w w w w w w w w w\nw w w w w w w w w w w w w w w w w w w w\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0},"sels":[{"cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}},{"cursor":{"row":0,"col":2},"anchor":{"row":0,"col":2}},{"cursor":{"row":0,"col":4},"anchor":{"row":0,"col":4}},{"cursor":{"row":0,"col":6},"anchor":{"row":0,"col":6}},{"cursor":{"row":0,"col":8},"anchor":{"row":0,"col":8}},{"cursor":{"row":0,"col":10},"anchor":{"row":0,"col":10}},{"cursor":{"row":0,"col":12},"anchor":{"row":0,"col":12}},{"cursor":{"row":0,"col":14},"anchor":{"row":0,"col":14}},{"cursor":{"row":0,"col":16},"anchor":{"row":0,"col":16}},{"cursor":{"row":0,"col":18},"anchor":{"row":0,"col":18}},{"cursor":{"row":0,"col":20},"anchor":{"row":0,"col":20}},{"cursor":{"row":0,"col":22},"anchor":{"row":0,"col":22}},{"cursor":{"row":0,"col":24},"anchor":{"row":0,"col":24}},{"cursor":{"row":0,"col":26},"anchor":{"row":0,"col":26}},{"cursor":{"row":0,"col":28},"anchor":{"row":0,"col":28}},{"cursor":{"row":0,"col":30},"anchor":{"row":0,"col":30}},{"cursor":{"row":0,"col":32},"anchor":{"row":0,"col":32}},{"cursor":{"row":0,"col":34},"anchor":{"row":0,"col":34}},{"cursor":{"row":0,"col":36},"anchor":{"row":0,"col":36}},{"cursor":{"row":0,"col":38},"anchor":{"row":0,"col":38}},{"cursor":{"row":1,"col":0},"anchor":{"row":1,"col":0}},{"cursor":{"row":1,"col":2},"anchor":{"row":1,"col":2}},{"cursor":{"row":1,"col":4},"anchor":{"row":1,"col":4}},{"cursor":{"row":1,"col":6},"anchor":{"row":1,"col":6}},{"cursor":{"row":1,"col":8},"anchor":{"row":1,"col":8}},{"cursor":{"row":1,"col":10},"anchor":{"row":1,"col":10}},{"cursor":{"row":1,"col":12},"anchor":{"row":1,"col":12}},{"cursor":{"row":1,"col":14},"anchor":{"row":1,"col":14}},{"cursor":{"row":1,"col":16},"anchor":{"row":1,"col":16}},{"cursor":{"row":1,"col":18},"anchor":{"row":1,"col":18}},{"cursor":{"row":1,"col":20},"anchor":{"row":1,"col":20}},{"cursor":{"row":1,"col":22},"anchor":{"row":1,"col":22}},{"cursor":{"row":1,"col":24},"anchor":{"row":1,"col":24}},{"cursor":{"row":1,"col":26},"anchor":{"row":1,"col":26}},{"cursor":{"row":1,"col":28},"anchor":{"row":1,"col":28}},{"cursor":{"row":1,"col":30},"anchor":{"row":1,"col":30}},{"cursor":{"row":1,"col":32},"anchor":{"row":1,"col":32}},{"cursor":{"row":1,"col":34},"anchor":{"row":1,"col":34}},{"cursor":{"row":1,"col":36},"anchor":{"row":1,"col":36}},{"cursor":{"row":1,"col":38},"anchor":{"row":1,"col":38}},{"cursor":{"row":2,"col":0},"anchor":{"row":2,"col":0}},{"cursor":{"row":2,"col":2},"anchor":{"row":2,"col":2}},{"cursor":{"row":2,"col":4},"anchor":{"row":2,"col":4}},{"cursor":{"row":2,"col":6},"anchor":{"row":2,"col":6}},{"cursor":{"row":2,"col":8},"anchor":{"row":2,"col":8}},{"cursor":{"row":2,"col":10},"anchor":{"row":2,"col":10}},{"cursor":{"row":2,"col":12},"anchor":{"row":2,"col":12}},{"cursor":{"row":2,"col":14},"anchor":{"row":2,"col":14}},{"cursor":{"row":2,"col":16},"anchor":{"row":2,"col":16}},{"cursor":{"row":2,"col":18},"anchor":{"row":2,"col":18}},{"cursor":{"row":2,"col":20},"anchor":{"row":2,"col":20}},{"cursor":{"row":2,"col":22},"anchor":{"row":2,"col":22}},{"cursor":{"row":2,"col":24},"anchor":{"row":2,"col":24}},{"cursor":{"row":2,"col":26},"anchor":{"row":2,"col":26}},{"cursor":{"row":2,"col":28},"anchor":{"row":2,"col":28}},{"cursor":{"row":2,"col":30},"anchor":{"row":2,"col":30}},{"cursor":{"row":2,"col":32},"anchor":{"row":2,"col":32}},{"cursor":{"row":2,"col":34},"anchor":{"row":2,"col":34}},{"cursor":{"row":2,"col":36},"anchor":{"row":2,"col":36}},{"cursor":{"row":2,"col":38},"anchor":{"row":2,"col":38}},{"cursor":{"row":3,"col":0},"anchor":{"row":3,"col":0}},{"cursor":{"row":3,"col":2},"anchor":{"row":3,"col":2}},{"cursor":{"row":3,"col":4},"anchor":{"row":3,"col":4}},{"cursor":{"row":3,"col":6},"anchor":{"row":3,"col":6}},{"cursor":{"row":3,"col":8},"anchor":{"row":3,"col":8}},{"cursor":{"row":3,"col":10},"anchor":{"row":3,"col":10}},{"cursor":{"row":3,"col":12},"anchor":{"row":3,"col":12}},{"cursor":{"row":3,"col":14},"anchor":{"row":3,"col":14}},{"cursor":{"row":3,"col":16},"anchor":{"row":3,"col":16}},{"cursor":{"row":3,"col":18},"anchor":{"row":3,"col":18}},{"cursor":{"row":3,"col":20},"anchor":{"row":3,"col":20}},{"cursor":{"row":3,"col":22},"anchor":{"row":3,"col":22}},{"cursor":{"row":3,"col":24},"anchor":{"row":3,"col":24}},{"cursor":{"row":3,"col":26},"anchor":{"row":3,"col":26}},{"cursor":{"row":3,"col":28},"anchor":{"row":3,"col":28}},{"cursor":{"row":3,"col":30},"anchor":{"row":3,"col":30}},{"cursor":{"row":3,"col":32},"anchor":{"row":3,"col":32}},{"cursor":{"row":3,"col":34},"anchor":{"row":3,"col":34}},{"cursor":{"row":3,"col":36},"anchor":{"row":3,"col":36}},{"cursor":{"row":3,"col":38},"anchor":{"row":3,"col":38}},{"cursor":{"row":4,"col":0},"anchor":{"row":4,"col":0}},{"cursor":{"row":4,"col":2},"anchor":{"row":4,"col":2}},{"cursor":{"row":4,"col":4},"anchor":{"row":4,"col":4}},{"cursor":{"row":4,"col":6},"anchor":{"row":4,"col":6}},{"cursor":{"row":4,"col":8},"anchor":{"row":4,"col":8}},{"cursor":{"row":4,"col":10},"anchor":{"row":4,"col":10}},{"cursor":{"row":4,"col":12},"anchor":{"row":4,"col":12}},{"cursor":{"row":4,"col":14},"anchor":{"row":4,"col":14}},{"cursor":{"row":4,"col":16},"anchor":{"row":4,"col":16}},{"cursor":{"row":4,"col":18},"anchor":{"row":4,"col":18}},{"cursor":{"row":4,"col":20},"anchor":{"row":4,"col":20}},{"cursor":{"row":4,"col":22},"anchor":{"row":4,"col":22}},{"cursor":{"row":4,"col":24},"anchor":{"row":4,"col":24}},{"cursor":{"row":4,"col":26},"anchor":{"row":4,"col":26}},{"cursor":{"row":4,"col":28},"anchor":{"row":4,"col":28}},{"cursor":{"row":4,"col":30},"anchor":{"row":4,"col":30}},{"cursor":{"row":4,"col":32},"anchor":{"row":4,"col":32}},{"cursor":{"row":4,"col":34},"anchor":{"row":4,"col":34}},{"cursor":{"row":4,"col":36},"anchor":{"row":4,"col":36}},{"cursor":{"row":4,"col":38},"anchor":{"row":4,"col":38}},{"cursor":{"row":5,"col":0},"anchor":{"row":5,"col":0}},{"cursor":{"row":5,"col":2},"anchor":{"row":5,"col":2}},{"cursor":{"row":5,"col":4},"anchor":{"row":5,"col":4}},{"cursor":{"row":5,"col":6},"anchor":{"row":5,"col":6}},{"cursor":{"row":5,"col":8},"anchor":{"row":5,"col":8}},{"cursor":{"row":5,"col":10},"anchor":{"row":5,"col":10}},{"cursor":{"row":5,"col":12},"anchor":{"row":5,"col":12}},{"cursor":{"row":5,"col":14},"anchor":{"row":5,"col":14}},{"cursor":{"row":5,"col":16},"anchor":{"row":5,"col":16}},{"cursor":{"row":5,"col":18},"anchor":{"row":5,"col":18}},{"cursor":{"row":5,"col":20},"anchor":{"row":5,"col":20}},{"cursor":{"row":5,"col":22},"anchor":{"row":5,"col":22}},{"cursor":{"row":5,"col":24},"anchor":{"row":5,"col":24}},{"cursor":{"row":5,"col":26},"anchor":{"row":5,"col":26}},{"cursor":{"row":5,"col":28},"anchor":{"row":5,"col":28}},{"cursor":{"row":5,"col":30},"anchor":{"row":5,"col":30}},{"cursor":{"row":5,"col":32},"anchor":{"row":5,"col":32}},{"cursor":{"row":5,"col":34},"anchor":{"row":5,"col":34}},{"cursor":{"row":5,"col":36},"anchor":{"row":5,"col":36}},{"cursor":{"row":5,"col":38},"anchor":{"row":5,"col":38}},{"cursor":{"row":6,"col":0},"anchor":{"row":6,"col":0}},{"cursor":{"row":6,"col":2},"anchor":{"row":6,"col":2}},{"cursor":{"row":6,"col":4},"anchor":{"row":6,"col":4}},{"cursor":{"row":6,"col":6},"anchor":{"row":6,"col":6}},{"cursor":{"row":6,"col":8},"anchor":{"row":6,"col":8}},{"cursor":{"row":6,"col":10},"anchor":{"row":6,"col":10}},{"cursor":{"row":6,"col":12},"anchor":{"row":6,"col":12}},{"cursor":{"row":6,"col":14},"anchor":{"row":6,"col":14}},{"cursor":{"row":6,"col":16},"anchor":{"row":6,"col":16}},{"cursor":{"row":6,"col":18},"anchor":{"row":6,"col":18}},{"cursor":{"row":6,"col":20},"anchor":{"row":6,"col":20}},{"cursor":{"row":6,"col":22},"anchor":{"row":6,"col":22}},{"cursor":{"row":6,"col":24},"anchor":{"row":6,"col":24}},{"cursor":{"row":6,"col":26},"anchor":{"row":6,"col":26}},{"cursor":{"row":6,"col":28},"anchor":{"row":6,"col":28}},{"cursor":{"row":6,"col":30},"anchor":{"row":6,"col":30}},{"cursor":{"row":6,"col":32},"anchor":{"row":6,"col":32}},{"cursor":{"row":6,"col":34},"anchor":{"row":6,"col":34}},{"cursor":{"row":6,"col":36},"anchor":{"row":6,"col":36}},{"cursor":{"row":6,"col":38},"anchor":{"row":6,"col":38}},{"cursor":{"row":7,"col":0},"anchor":{"row":7,"col":0}},{"cursor":{"row":7,"col":2},"anchor":{"row":7,"col":2}},{"cursor":{"row":7,"col":4},"anchor":{"row":7,"col":4}},{"cursor":{"row":7,"col":6},"anchor":{"row":7,"col":6}},{"cursor":{"row":7,"col":8},"anchor":{"row":7,"col":8}},{"cursor":{"row":7,"col":10},"anchor":{"row":7,"col":10}},{"cursor":{"row":7,"col":12},"anchor":{"row":7,"col":12}},{"cursor":{"row":7,"col":14},"anchor":{"row":7,"col":14}},{"cursor":{"row":7,"col":16},"anchor":{"row":7,"col":16}},{"cursor":{"row":7,"col":18},"anchor":{"row":7,"col":18}},{"cursor":{"row":7,"col":20},"anchor":{"row":7,"col":20}},{"cursor":{"row":7,"col":22},"anchor":{"row":7,"col":22}},{"cursor":{"row":7,"col":24},"anchor":{"row":7,"col":24}},{"cursor":{"row":7,"col":26},"anchor":{"row":7,"col":26}},{"cursor":{"row":7,"col":28},"anchor":{"row":7,"col":28}},{"cursor":{"row":7,"col":30},"anchor":{"row":7,"col":30}},{"cursor":{"row":7,"col":32},"anchor":{"row":7,"col":32}},{"cursor":{"row":7,"col":34},"anchor":{"row":7,"col":34}},{"cursor":{"row":7,"col":36},"anchor":{"row":7,"col":36}},{"cursor":{"row":7,"col":38},"anchor":{"row":7,"col":38}},{"cursor":{"row":8,"col":0},"anchor":{"row":8,"col":0}},{"cursor":{"row":8,"col":2},"anchor":{"row":8,"col":2}},{"cursor":{"row":8,"col":4},"anchor":{"row":8,"col":4}},{"cursor":{"row":8,"col":6},"anchor":{"row":8,"col":6}},{"cursor":{"row":8,"col":8},"anchor":{"row":8,"col":8}},{"cursor":{"row":8,"col":10},"anchor":{"row":8,"col":10}},{"cursor":{"row":8,"col":12},"anchor":{"row":8,"col":12}},{"cursor":{"row":8,"col":14},"anchor":{"row":8,"col":14}},{"cursor":{"row":8,"col":16},"anchor":{"row":8,"col":16}},{"cursor":{"row":8,"col":18},"anchor":{"row":8,"col":18}},{"cursor":{"row":8,"col":20},"anchor":{"row":8,"col":20}},{"cursor":{"row":8,"col":22},"anchor":{"row":8,"col":22}},{"cursor":{"row":8,"col":24},"anchor":{"row":8,"col":24}},{"cursor":{"row":8,"col":26},"anchor":{"row":8,"col":26}},{"cursor":{"row":8,"col":28},"anchor":{"row":8,"col":28}},{"cursor":{"row":8,"col":30},"anchor":{"row":8,"col":30}},{"cursor":{"row":8,"col":32},"anchor":{"row":8,"col":32}},{"cursor":{"row":8,"col":34},"anchor":{"row":8,"col":34}},{"cursor":{"row":8,"col":36},"anchor":{"row":8,"col":36}},{"cursor":{"row":8,"col":38},"anchor":{"row":8,"col":38}},{"cursor":{"row":9,"col":0},"anchor":{"row":9,"col":0}},{"cursor":{"row":9,"col":2},"anchor":{"row":9,"col":2}},{"cursor":{"row":9,"col":4},"anchor":{"row":9,"col":4}},{"cursor":{"row":9,"col":6},"anchor":{"row":9,"col":6}},{"cursor":{"row":9,"col":8},"anchor":{"row":9,"col":8}},{"cursor":{"row":9,"col":10},"anchor":{"row":9,"col":10}},{"cursor":{"row":9,"col":12},"anchor":{"row":9,"col":12}},{"cursor":{"row":9,"col":14},"anchor":{"row":9,"col":14}},{"cursor":{"row":9,"col":16},"anchor":{"row":9,"col":16}},{"cursor":{"row":9,"col":18},"anchor":{"row":9,"col":18}},{"cursor":{"row":9,"col":20},"anchor":{"row":9,"col":20}},{"cursor":{"row":9,"col":22},"anchor":{"row":9,"col":22}},{"cursor":{"row":9,"col":24},"anchor":{"row":9,"col":24}},{"cursor":{"row":9,"col":26},"anchor":{"row":9,"col":26}},{"cursor":{"row":9,"col":28},"anchor":{"row":9,"col":28}},{"cursor":{"row":9,"col":30},"anchor":{"row":9,"col":30}},{"cursor":{"row":9,"col":32},"anchor":{"row":9,"col":32}},{"cursor":{"row":9,"col":34},"anchor":{"row":9,"col":34}},{"cursor":{"row":9,"col":36},"anchor":{"row":9,"col":36}},{"cursor":{"row":9,"col":38},"anchor":{"row":9,"col":38}}],"primary":0}
+{"name":"sel-many-ranges-edit","text":"xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy\nxy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy\nxy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy\nxy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy\nxy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy\nxy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy\nxy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy\nxy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy\nxy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy\nxy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy xy\n","mode":"normal","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":2},"sels":[{"cursor":{"row":0,"col":2},"anchor":{"row":0,"col":2}},{"cursor":{"row":0,"col":5},"anchor":{"row":0,"col":5}},{"cursor":{"row":0,"col":8},"anchor":{"row":0,"col":8}},{"cursor":{"row":0,"col":11},"anchor":{"row":0,"col":11}},{"cursor":{"row":0,"col":14},"anchor":{"row":0,"col":14}},{"cursor":{"row":0,"col":17},"anchor":{"row":0,"col":17}},{"cursor":{"row":0,"col":20},"anchor":{"row":0,"col":20}},{"cursor":{"row":0,"col":23},"anchor":{"row":0,"col":23}},{"cursor":{"row":0,"col":26},"anchor":{"row":0,"col":26}},{"cursor":{"row":0,"col":29},"anchor":{"row":0,"col":29}},{"cursor":{"row":0,"col":32},"anchor":{"row":0,"col":32}},{"cursor":{"row":0,"col":35},"anchor":{"row":0,"col":35}},{"cursor":{"row":0,"col":38},"anchor":{"row":0,"col":38}},{"cursor":{"row":0,"col":41},"anchor":{"row":0,"col":41}},{"cursor":{"row":0,"col":44},"anchor":{"row":0,"col":44}},{"cursor":{"row":0,"col":47},"anchor":{"row":0,"col":47}},{"cursor":{"row":0,"col":50},"anchor":{"row":0,"col":50}},{"cursor":{"row":0,"col":53},"anchor":{"row":0,"col":53}},{"cursor":{"row":0,"col":56},"anchor":{"row":0,"col":56}},{"cursor":{"row":0,"col":59},"anchor":{"row":0,"col":59}},{"cursor":{"row":1,"col":2},"anchor":{"row":1,"col":2}},{"cursor":{"row":1,"col":5},"anchor":{"row":1,"col":5}},{"cursor":{"row":1,"col":8},"anchor":{"row":1,"col":8}},{"cursor":{"row":1,"col":11},"anchor":{"row":1,"col":11}},{"cursor":{"row":1,"col":14},"anchor":{"row":1,"col":14}},{"cursor":{"row":1,"col":17},"anchor":{"row":1,"col":17}},{"cursor":{"row":1,"col":20},"anchor":{"row":1,"col":20}},{"cursor":{"row":1,"col":23},"anchor":{"row":1,"col":23}},{"cursor":{"row":1,"col":26},"anchor":{"row":1,"col":26}},{"cursor":{"row":1,"col":29},"anchor":{"row":1,"col":29}},{"cursor":{"row":1,"col":32},"anchor":{"row":1,"col":32}},{"cursor":{"row":1,"col":35},"anchor":{"row":1,"col":35}},{"cursor":{"row":1,"col":38},"anchor":{"row":1,"col":38}},{"cursor":{"row":1,"col":41},"anchor":{"row":1,"col":41}},{"cursor":{"row":1,"col":44},"anchor":{"row":1,"col":44}},{"cursor":{"row":1,"col":47},"anchor":{"row":1,"col":47}},{"cursor":{"row":1,"col":50},"anchor":{"row":1,"col":50}},{"cursor":{"row":1,"col":53},"anchor":{"row":1,"col":53}},{"cursor":{"row":1,"col":56},"anchor":{"row":1,"col":56}},{"cursor":{"row":1,"col":59},"anchor":{"row":1,"col":59}},{"cursor":{"row":2,"col":2},"anchor":{"row":2,"col":2}},{"cursor":{"row":2,"col":5},"anchor":{"row":2,"col":5}},{"cursor":{"row":2,"col":8},"anchor":{"row":2,"col":8}},{"cursor":{"row":2,"col":11},"anchor":{"row":2,"col":11}},{"cursor":{"row":2,"col":14},"anchor":{"row":2,"col":14}},{"cursor":{"row":2,"col":17},"anchor":{"row":2,"col":17}},{"cursor":{"row":2,"col":20},"anchor":{"row":2,"col":20}},{"cursor":{"row":2,"col":23},"anchor":{"row":2,"col":23}},{"cursor":{"row":2,"col":26},"anchor":{"row":2,"col":26}},{"cursor":{"row":2,"col":29},"anchor":{"row":2,"col":29}},{"cursor":{"row":2,"col":32},"anchor":{"row":2,"col":32}},{"cursor":{"row":2,"col":35},"anchor":{"row":2,"col":35}},{"cursor":{"row":2,"col":38},"anchor":{"row":2,"col":38}},{"cursor":{"row":2,"col":41},"anchor":{"row":2,"col":41}},{"cursor":{"row":2,"col":44},"anchor":{"row":2,"col":44}},{"cursor":{"row":2,"col":47},"anchor":{"row":2,"col":47}},{"cursor":{"row":2,"col":50},"anchor":{"row":2,"col":50}},{"cursor":{"row":2,"col":53},"anchor":{"row":2,"col":53}},{"cursor":{"row":2,"col":56},"anchor":{"row":2,"col":56}},{"cursor":{"row":2,"col":59},"anchor":{"row":2,"col":59}},{"cursor":{"row":3,"col":2},"anchor":{"row":3,"col":2}},{"cursor":{"row":3,"col":5},"anchor":{"row":3,"col":5}},{"cursor":{"row":3,"col":8},"anchor":{"row":3,"col":8}},{"cursor":{"row":3,"col":11},"anchor":{"row":3,"col":11}},{"cursor":{"row":3,"col":14},"anchor":{"row":3,"col":14}},{"cursor":{"row":3,"col":17},"anchor":{"row":3,"col":17}},{"cursor":{"row":3,"col":20},"anchor":{"row":3,"col":20}},{"cursor":{"row":3,"col":23},"anchor":{"row":3,"col":23}},{"cursor":{"row":3,"col":26},"anchor":{"row":3,"col":26}},{"cursor":{"row":3,"col":29},"anchor":{"row":3,"col":29}},{"cursor":{"row":3,"col":32},"anchor":{"row":3,"col":32}},{"cursor":{"row":3,"col":35},"anchor":{"row":3,"col":35}},{"cursor":{"row":3,"col":38},"anchor":{"row":3,"col":38}},{"cursor":{"row":3,"col":41},"anchor":{"row":3,"col":41}},{"cursor":{"row":3,"col":44},"anchor":{"row":3,"col":44}},{"cursor":{"row":3,"col":47},"anchor":{"row":3,"col":47}},{"cursor":{"row":3,"col":50},"anchor":{"row":3,"col":50}},{"cursor":{"row":3,"col":53},"anchor":{"row":3,"col":53}},{"cursor":{"row":3,"col":56},"anchor":{"row":3,"col":56}},{"cursor":{"row":3,"col":59},"anchor":{"row":3,"col":59}},{"cursor":{"row":4,"col":2},"anchor":{"row":4,"col":2}},{"cursor":{"row":4,"col":5},"anchor":{"row":4,"col":5}},{"cursor":{"row":4,"col":8},"anchor":{"row":4,"col":8}},{"cursor":{"row":4,"col":11},"anchor":{"row":4,"col":11}},{"cursor":{"row":4,"col":14},"anchor":{"row":4,"col":14}},{"cursor":{"row":4,"col":17},"anchor":{"row":4,"col":17}},{"cursor":{"row":4,"col":20},"anchor":{"row":4,"col":20}},{"cursor":{"row":4,"col":23},"anchor":{"row":4,"col":23}},{"cursor":{"row":4,"col":26},"anchor":{"row":4,"col":26}},{"cursor":{"row":4,"col":29},"anchor":{"row":4,"col":29}},{"cursor":{"row":4,"col":32},"anchor":{"row":4,"col":32}},{"cursor":{"row":4,"col":35},"anchor":{"row":4,"col":35}},{"cursor":{"row":4,"col":38},"anchor":{"row":4,"col":38}},{"cursor":{"row":4,"col":41},"anchor":{"row":4,"col":41}},{"cursor":{"row":4,"col":44},"anchor":{"row":4,"col":44}},{"cursor":{"row":4,"col":47},"anchor":{"row":4,"col":47}},{"cursor":{"row":4,"col":50},"anchor":{"row":4,"col":50}},{"cursor":{"row":4,"col":53},"anchor":{"row":4,"col":53}},{"cursor":{"row":4,"col":56},"anchor":{"row":4,"col":56}},{"cursor":{"row":4,"col":59},"anchor":{"row":4,"col":59}},{"cursor":{"row":5,"col":2},"anchor":{"row":5,"col":2}},{"cursor":{"row":5,"col":5},"anchor":{"row":5,"col":5}},{"cursor":{"row":5,"col":8},"anchor":{"row":5,"col":8}},{"cursor":{"row":5,"col":11},"anchor":{"row":5,"col":11}},{"cursor":{"row":5,"col":14},"anchor":{"row":5,"col":14}},{"cursor":{"row":5,"col":17},"anchor":{"row":5,"col":17}},{"cursor":{"row":5,"col":20},"anchor":{"row":5,"col":20}},{"cursor":{"row":5,"col":23},"anchor":{"row":5,"col":23}},{"cursor":{"row":5,"col":26},"anchor":{"row":5,"col":26}},{"cursor":{"row":5,"col":29},"anchor":{"row":5,"col":29}},{"cursor":{"row":5,"col":32},"anchor":{"row":5,"col":32}},{"cursor":{"row":5,"col":35},"anchor":{"row":5,"col":35}},{"cursor":{"row":5,"col":38},"anchor":{"row":5,"col":38}},{"cursor":{"row":5,"col":41},"anchor":{"row":5,"col":41}},{"cursor":{"row":5,"col":44},"anchor":{"row":5,"col":44}},{"cursor":{"row":5,"col":47},"anchor":{"row":5,"col":47}},{"cursor":{"row":5,"col":50},"anchor":{"row":5,"col":50}},{"cursor":{"row":5,"col":53},"anchor":{"row":5,"col":53}},{"cursor":{"row":5,"col":56},"anchor":{"row":5,"col":56}},{"cursor":{"row":5,"col":59},"anchor":{"row":5,"col":59}},{"cursor":{"row":6,"col":2},"anchor":{"row":6,"col":2}},{"cursor":{"row":6,"col":5},"anchor":{"row":6,"col":5}},{"cursor":{"row":6,"col":8},"anchor":{"row":6,"col":8}},{"cursor":{"row":6,"col":11},"anchor":{"row":6,"col":11}},{"cursor":{"row":6,"col":14},"anchor":{"row":6,"col":14}},{"cursor":{"row":6,"col":17},"anchor":{"row":6,"col":17}},{"cursor":{"row":6,"col":20},"anchor":{"row":6,"col":20}},{"cursor":{"row":6,"col":23},"anchor":{"row":6,"col":23}},{"cursor":{"row":6,"col":26},"anchor":{"row":6,"col":26}},{"cursor":{"row":6,"col":29},"anchor":{"row":6,"col":29}},{"cursor":{"row":6,"col":32},"anchor":{"row":6,"col":32}},{"cursor":{"row":6,"col":35},"anchor":{"row":6,"col":35}},{"cursor":{"row":6,"col":38},"anchor":{"row":6,"col":38}},{"cursor":{"row":6,"col":41},"anchor":{"row":6,"col":41}},{"cursor":{"row":6,"col":44},"anchor":{"row":6,"col":44}},{"cursor":{"row":6,"col":47},"anchor":{"row":6,"col":47}},{"cursor":{"row":6,"col":50},"anchor":{"row":6,"col":50}},{"cursor":{"row":6,"col":53},"anchor":{"row":6,"col":53}},{"cursor":{"row":6,"col":56},"anchor":{"row":6,"col":56}},{"cursor":{"row":6,"col":59},"anchor":{"row":6,"col":59}},{"cursor":{"row":7,"col":2},"anchor":{"row":7,"col":2}},{"cursor":{"row":7,"col":5},"anchor":{"row":7,"col":5}},{"cursor":{"row":7,"col":8},"anchor":{"row":7,"col":8}},{"cursor":{"row":7,"col":11},"anchor":{"row":7,"col":11}},{"cursor":{"row":7,"col":14},"anchor":{"row":7,"col":14}},{"cursor":{"row":7,"col":17},"anchor":{"row":7,"col":17}},{"cursor":{"row":7,"col":20},"anchor":{"row":7,"col":20}},{"cursor":{"row":7,"col":23},"anchor":{"row":7,"col":23}},{"cursor":{"row":7,"col":26},"anchor":{"row":7,"col":26}},{"cursor":{"row":7,"col":29},"anchor":{"row":7,"col":29}},{"cursor":{"row":7,"col":32},"anchor":{"row":7,"col":32}},{"cursor":{"row":7,"col":35},"anchor":{"row":7,"col":35}},{"cursor":{"row":7,"col":38},"anchor":{"row":7,"col":38}},{"cursor":{"row":7,"col":41},"anchor":{"row":7,"col":41}},{"cursor":{"row":7,"col":44},"anchor":{"row":7,"col":44}},{"cursor":{"row":7,"col":47},"anchor":{"row":7,"col":47}},{"cursor":{"row":7,"col":50},"anchor":{"row":7,"col":50}},{"cursor":{"row":7,"col":53},"anchor":{"row":7,"col":53}},{"cursor":{"row":7,"col":56},"anchor":{"row":7,"col":56}},{"cursor":{"row":7,"col":59},"anchor":{"row":7,"col":59}},{"cursor":{"row":8,"col":2},"anchor":{"row":8,"col":2}},{"cursor":{"row":8,"col":5},"anchor":{"row":8,"col":5}},{"cursor":{"row":8,"col":8},"anchor":{"row":8,"col":8}},{"cursor":{"row":8,"col":11},"anchor":{"row":8,"col":11}},{"cursor":{"row":8,"col":14},"anchor":{"row":8,"col":14}},{"cursor":{"row":8,"col":17},"anchor":{"row":8,"col":17}},{"cursor":{"row":8,"col":20},"anchor":{"row":8,"col":20}},{"cursor":{"row":8,"col":23},"anchor":{"row":8,"col":23}},{"cursor":{"row":8,"col":26},"anchor":{"row":8,"col":26}},{"cursor":{"row":8,"col":29},"anchor":{"row":8,"col":29}},{"cursor":{"row":8,"col":32},"anchor":{"row":8,"col":32}},{"cursor":{"row":8,"col":35},"anchor":{"row":8,"col":35}},{"cursor":{"row":8,"col":38},"anchor":{"row":8,"col":38}},{"cursor":{"row":8,"col":41},"anchor":{"row":8,"col":41}},{"cursor":{"row":8,"col":44},"anchor":{"row":8,"col":44}},{"cursor":{"row":8,"col":47},"anchor":{"row":8,"col":47}},{"cursor":{"row":8,"col":50},"anchor":{"row":8,"col":50}},{"cursor":{"row":8,"col":53},"anchor":{"row":8,"col":53}},{"cursor":{"row":8,"col":56},"anchor":{"row":8,"col":56}},{"cursor":{"row":8,"col":59},"anchor":{"row":8,"col":59}},{"cursor":{"row":9,"col":2},"anchor":{"row":9,"col":2}},{"cursor":{"row":9,"col":5},"anchor":{"row":9,"col":5}},{"cursor":{"row":9,"col":8},"anchor":{"row":9,"col":8}},{"cursor":{"row":9,"col":11},"anchor":{"row":9,"col":11}},{"cursor":{"row":9,"col":14},"anchor":{"row":9,"col":14}},{"cursor":{"row":9,"col":17},"anchor":{"row":9,"col":17}},{"cursor":{"row":9,"col":20},"anchor":{"row":9,"col":20}},{"cursor":{"row":9,"col":23},"anchor":{"row":9,"col":23}},{"cursor":{"row":9,"col":26},"anchor":{"row":9,"col":26}},{"cursor":{"row":9,"col":29},"anchor":{"row":9,"col":29}},{"cursor":{"row":9,"col":32},"anchor":{"row":9,"col":32}},{"cursor":{"row":9,"col":35},"anchor":{"row":9,"col":35}},{"cursor":{"row":9,"col":38},"anchor":{"row":9,"col":38}},{"cursor":{"row":9,"col":41},"anchor":{"row":9,"col":41}},{"cursor":{"row":9,"col":44},"anchor":{"row":9,"col":44}},{"cursor":{"row":9,"col":47},"anchor":{"row":9,"col":47}},{"cursor":{"row":9,"col":50},"anchor":{"row":9,"col":50}},{"cursor":{"row":9,"col":53},"anchor":{"row":9,"col":53}},{"cursor":{"row":9,"col":56},"anchor":{"row":9,"col":56}},{"cursor":{"row":9,"col":59},"anchor":{"row":9,"col":59}}],"primary":0}
+{"name":"keep-regex","text":"foo bar baz\n","mode":"normal","cursor":{"row":0,"col":6},"anchor":{"row":0,"col":4},"sels":[{"cursor":{"row":0,"col":6},"anchor":{"row":0,"col":4}},{"cursor":{"row":0,"col":10},"anchor":{"row":0,"col":8}}],"primary":0}
+{"name":"remove-regex","text":"foo bar baz\n","mode":"normal","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":0}}
+{"name":"keep-regex-none","text":"foo bar\n","mode":"normal","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":0},"sels":[{"cursor":{"row":0,"col":2},"anchor":{"row":0,"col":0}},{"cursor":{"row":0,"col":6},"anchor":{"row":0,"col":4}}],"primary":0}
+{"name":"keep-regex-primary","text":"a1 b2 a3\n","mode":"normal","cursor":{"row":0,"col":1},"anchor":{"row":0,"col":0},"sels":[{"cursor":{"row":0,"col":1},"anchor":{"row":0,"col":0}},{"cursor":{"row":0,"col":7},"anchor":{"row":0,"col":6}}],"primary":0}
+{"name":"keep-regex-esc","text":"foo bar\n","mode":"normal","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":0},"sels":[{"cursor":{"row":0,"col":2},"anchor":{"row":0,"col":0}},{"cursor":{"row":0,"col":6},"anchor":{"row":0,"col":4}}],"primary":0}
+{"name":"keep-regex-lines","text":"foo\nbar\nbaz\n","mode":"normal","cursor":{"row":1,"col":2},"anchor":{"row":1,"col":0},"sels":[{"cursor":{"row":1,"col":2},"anchor":{"row":1,"col":0}},{"cursor":{"row":2,"col":2},"anchor":{"row":2,"col":0}}],"primary":0}
+{"name":"ensure-forward","text":"ab cd\n","mode":"normal","cursor":{"row":0,"col":1},"anchor":{"row":0,"col":0},"sels":[{"cursor":{"row":0,"col":1},"anchor":{"row":0,"col":0}},{"cursor":{"row":0,"col":4},"anchor":{"row":0,"col":3}}],"primary":0}
+{"name":"ensure-forward-one","text":"abc\n","mode":"select","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":0}}
+{"name":"node-keys-plain-text","text":"ab cd\n","mode":"normal","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":0}}
+{"name":"goto-last-mod","text":"ab\ncXYd\nef\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}
+{"name":"goto-last-mod-go","text":"ab\ncXYd\nef\n","mode":"normal","cursor":{"row":1,"col":3},"anchor":{"row":1,"col":3}}
+{"name":"goto-last-mod-delete","text":"abc\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}
+{"name":"goto-last-mod-delete-go","text":"abc\ndf\n","mode":"normal","cursor":{"row":1,"col":1},"anchor":{"row":1,"col":1}}
+{"name":"goto-last-mod-select","text":"ab\ncd\nXef\n","mode":"select","cursor":{"row":2,"col":1},"anchor":{"row":0,"col":0}}
+{"name":"alt-u-undo","text":"ab\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}
+{"name":"alt-U-redo","text":"Xab\n","mode":"normal","cursor":{"row":0,"col":1},"anchor":{"row":0,"col":1}}
+{"name":"ins-checkpoint-undo","text":"Xab\n","mode":"normal","cursor":{"row":0,"col":1},"anchor":{"row":0,"col":1}}
+{"name":"ins-checkpoint-undo-twice","text":"ab\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}
+{"name":"ins-checkpoint-redo","text":"Xab\n","mode":"normal","cursor":{"row":0,"col":1},"anchor":{"row":0,"col":1}}
+{"name":"msel-ins-checkpoint","text":"Xab\nXab\n","mode":"normal","cursor":{"row":1,"col":1},"anchor":{"row":1,"col":1},"sels":[{"cursor":{"row":0,"col":1},"anchor":{"row":0,"col":1}},{"cursor":{"row":1,"col":1},"anchor":{"row":1,"col":1}}],"primary":1}
+{"name":"ins-tab-after-text-plain","text":"ab X cd\n","mode":"normal","cursor":{"row":0,"col":5},"anchor":{"row":0,"col":5}}
+{"name":"ins-shift-tab","text":"ab X cd\n","mode":"normal","cursor":{"row":0,"col":5},"anchor":{"row":0,"col":5}}
+{"name":"sticky-view-scroll","text":"line 0\nline 1\nline 2\nline 3\nline 4\nline 5\nline 6\nline 7\nline 8\nline 9\nline 10\nline 11\nline 12\nline 13\nline 14\nline 15\nline 16\nline 17\nline 18\nline 19\nline 20\nline 21\nline 22\nline 23\nline 24\nline 25\nline 26\nline 27\nline 28\nline 29\nline 30\nline 31\nline 32\nline 33\nline 34\nline 35\nline 36\nline 37\nline 38\nline 39\nline 40\nline 41\nline 42\nline 43\nline 44\nline 45\nline 46\nline 47\nline 48\nline 49\nline 50\nline 51\nline 52\nline 53\nline 54\nline 55\nline 56\nline 57\nline 58\nline 59\n","mode":"normal","cursor":{"row":6,"col":0},"anchor":{"row":6,"col":0}}
+{"name":"sticky-view-then-move","text":"line 0\nline 1\nline 2\nline 3\nline 4\nline 5\nline 6\nline 7\nline 8\nline 9\nline 10\nline 11\nline 12\nline 13\nline 14\nline 15\nline 16\nline 17\nline 18\nline 19\nline 20\nline 21\nline 22\nline 23\nline 24\nline 25\nline 26\nline 27\nline 28\nline 29\nline 30\nline 31\nline 32\nline 33\nline 34\nline 35\nline 36\nline 37\nline 38\nline 39\nline 40\nline 41\nline 42\nline 43\nline 44\nline 45\nline 46\nline 47\nline 48\nline 49\nline 50\nline 51\nline 52\nline 53\nline 54\nline 55\nline 56\nline 57\nline 58\nline 59\n","mode":"normal","cursor":{"row":6,"col":0},"anchor":{"row":6,"col":0}}
+{"name":"sticky-view-ignores","text":"line 0\nline 1\nline 2\nline 3\nline 4\nline 5\nline 6\nline 7\nline 8\nline 9\nline 10\nline 11\nline 12\nline 13\nline 14\nline 15\nline 16\nline 17\nline 18\nline 19\nline 20\nline 21\nline 22\nline 23\nline 24\nline 25\nline 26\nline 27\nline 28\nline 29\nline 30\nline 31\nline 32\nline 33\nline 34\nline 35\nline 36\nline 37\nline 38\nline 39\nline 40\nline 41\nline 42\nline 43\nline 44\nline 45\nline 46\nline 47\nline 48\nline 49\nline 50\nline 51\nline 52\nline 53\nline 54\nline 55\nline 56\nline 57\nline 58\nline 59\n","mode":"normal","cursor":{"row":5,"col":0},"anchor":{"row":5,"col":0}}
+{"name":"view-middle","text":"abcdef\n","mode":"normal","cursor":{"row":0,"col":3},"anchor":{"row":0,"col":3}}
+{"name":"view-z-not-sticky","text":"line 0\nline 1\nline 2\nline 3\nline 4\nline 5\nline 6\nline 7\nline 8\nline 9\nline 10\nline 11\nline 12\nline 13\nline 14\nline 15\nline 16\nline 17\nline 18\nline 19\nline 20\nline 21\nline 22\nline 23\nline 24\nline 25\nline 26\nline 27\nline 28\nline 29\nline 30\nline 31\nline 32\nline 33\nline 34\nline 35\nline 36\nline 37\nline 38\nline 39\nline 40\nline 41\nline 42\nline 43\nline 44\nline 45\nline 46\nline 47\nline 48\nline 49\nline 50\nline 51\nline 52\nline 53\nline 54\nline 55\nline 56\nline 57\nline 58\nline 59\n","mode":"normal","cursor":{"row":5,"col":0},"anchor":{"row":5,"col":0}}
+{"name":"goto-word-first","text":"alpha beta gamma\ndelta x\n","mode":"normal","cursor":{"row":0,"col":9},"anchor":{"row":0,"col":6}}
+{"name":"goto-word-second","text":"alpha beta gamma\ndelta x\n","mode":"normal","cursor":{"row":0,"col":15},"anchor":{"row":0,"col":11}}
+{"name":"goto-word-back","text":"alpha beta gamma\ndelta x\n","mode":"normal","cursor":{"row":0,"col":15},"anchor":{"row":0,"col":11}}
+{"name":"goto-word-cancel","text":"alpha beta gamma\n","mode":"normal","cursor":{"row":0,"col":1},"anchor":{"row":0,"col":1}}
+{"name":"goto-word-bad-second","text":"alpha beta\n","mode":"normal","cursor":{"row":0,"col":1},"anchor":{"row":0,"col":1}}
+{"name":"goto-word-extend","text":"alpha beta gamma\n","mode":"select","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":5}}
+{"name":"goto-word-mid","text":"one two three four five\n","mode":"normal","cursor":{"row":0,"col":12},"anchor":{"row":0,"col":8}}
+{"name":"msel-align-basic","text":"a =1\nbbb=2\n","mode":"normal","cursor":{"row":0,"col":3},"anchor":{"row":0,"col":3},"sels":[{"cursor":{"row":0,"col":3},"anchor":{"row":0,"col":3}},{"cursor":{"row":1,"col":3},"anchor":{"row":1,"col":3}}],"primary":0}
+{"name":"msel-align-columns","text":"a ,b,c\nccc,d,e\n","mode":"normal","cursor":{"row":0,"col":3},"anchor":{"row":0,"col":3},"sels":[{"cursor":{"row":0,"col":3},"anchor":{"row":0,"col":3}},{"cursor":{"row":0,"col":5},"anchor":{"row":0,"col":5}},{"cursor":{"row":1,"col":3},"anchor":{"row":1,"col":3}},{"cursor":{"row":1,"col":5},"anchor":{"row":1,"col":5}}],"primary":0}
+{"name":"msel-align-uneven","text":"a ,b\nccc,d,eee,f\n","mode":"normal","cursor":{"row":0,"col":3},"anchor":{"row":0,"col":3},"sels":[{"cursor":{"row":0,"col":3},"anchor":{"row":0,"col":3}},{"cursor":{"row":1,"col":3},"anchor":{"row":1,"col":3}},{"cursor":{"row":1,"col":5},"anchor":{"row":1,"col":5}},{"cursor":{"row":1,"col":9},"anchor":{"row":1,"col":9}}],"primary":0}
+{"name":"msel-align-words","text":" x = 1\nlonger = 22\n","mode":"normal","cursor":{"row":0,"col":5},"anchor":{"row":0,"col":5},"sels":[{"cursor":{"row":0,"col":5},"anchor":{"row":0,"col":5}},{"cursor":{"row":0,"col":10},"anchor":{"row":0,"col":10}},{"cursor":{"row":1,"col":5},"anchor":{"row":1,"col":0}},{"cursor":{"row":1,"col":10},"anchor":{"row":1,"col":9}}],"primary":0}
+{"name":"msel-align-backward","text":"x = 11\nlonger = 222\n","mode":"normal","cursor":{"row":0,"col":9},"anchor":{"row":0,"col":10},"sels":[{"cursor":{"row":0,"col":9},"anchor":{"row":0,"col":10}},{"cursor":{"row":1,"col":9},"anchor":{"row":1,"col":11}}],"primary":0}
+{"name":"align-multiline-refused","text":"ab\ncd\n","mode":"select","cursor":{"row":1,"col":0},"anchor":{"row":0,"col":0}}
+{"name":"msel-align-select-mode","text":"a =1\nbbb=2\n","mode":"normal","cursor":{"row":0,"col":3},"anchor":{"row":0,"col":3},"sels":[{"cursor":{"row":0,"col":3},"anchor":{"row":0,"col":3}},{"cursor":{"row":1,"col":3},"anchor":{"row":1,"col":3}}],"primary":0}
+{"name":"rotate-contents-one","text":"ab\n","mode":"select","cursor":{"row":0,"col":1},"anchor":{"row":0,"col":0}}
{"name":"msel-insert","text":"xaa\nxbb\n","mode":"normal","cursor":{"row":1,"col":1},"anchor":{"row":1,"col":1},"sels":[{"cursor":{"row":0,"col":1},"anchor":{"row":0,"col":1}},{"cursor":{"row":1,"col":1},"anchor":{"row":1,"col":1}}],"primary":1}
{"name":"msel-insert-tty","text":"xaa\nxbb\n","mode":"normal","cursor":{"row":1,"col":1},"anchor":{"row":1,"col":1},"sels":[{"cursor":{"row":0,"col":1},"anchor":{"row":0,"col":1}},{"cursor":{"row":1,"col":1},"anchor":{"row":1,"col":1}}],"primary":1}
{"name":"msel-append","text":"aza\nbzb\n","mode":"normal","cursor":{"row":1,"col":1},"anchor":{"row":1,"col":0},"sels":[{"cursor":{"row":0,"col":1},"anchor":{"row":0,"col":0}},{"cursor":{"row":1,"col":1},"anchor":{"row":1,"col":0}}],"primary":1}
@@ -409,6 +493,35 @@
{"name":"msel-collapse","text":"abcd\nabcd\n","mode":"select","cursor":{"row":1,"col":2},"anchor":{"row":1,"col":2},"sels":[{"cursor":{"row":0,"col":2},"anchor":{"row":0,"col":2}},{"cursor":{"row":1,"col":2},"anchor":{"row":1,"col":2}}],"primary":1}
{"name":"msel-flip","text":"abcd\nabcd\n","mode":"select","cursor":{"row":1,"col":0},"anchor":{"row":1,"col":2},"sels":[{"cursor":{"row":0,"col":0},"anchor":{"row":0,"col":2}},{"cursor":{"row":1,"col":0},"anchor":{"row":1,"col":2}}],"primary":1}
{"name":"msel-yank-paste","text":"aab\nccd\n","mode":"normal","cursor":{"row":1,"col":1},"anchor":{"row":1,"col":1},"sels":[{"cursor":{"row":0,"col":1},"anchor":{"row":0,"col":1}},{"cursor":{"row":1,"col":1},"anchor":{"row":1,"col":1}}],"primary":1}
+{"name":"reg-named-yank-paste","text":"ab acd\n","mode":"normal","cursor":{"row":0,"col":3},"anchor":{"row":0,"col":3}}
+{"name":"reg-named-keeps-default","text":"cad\n","mode":"normal","cursor":{"row":0,"col":1},"anchor":{"row":0,"col":1}}
+{"name":"reg-blackhole-delete","text":"acd\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}
+{"name":"msel-reg-paste-per-range","text":"aaaab\nccccd\n","mode":"normal","cursor":{"row":1,"col":3},"anchor":{"row":1,"col":3},"sels":[{"cursor":{"row":0,"col":3},"anchor":{"row":0,"col":3}},{"cursor":{"row":1,"col":3},"anchor":{"row":1,"col":3}}],"primary":1}
+{"name":"msel-reg-fewer-values","text":"aab\ncad\neaf\n","mode":"normal","cursor":{"row":2,"col":1},"anchor":{"row":2,"col":1},"sels":[{"cursor":{"row":0,"col":1},"anchor":{"row":0,"col":1}},{"cursor":{"row":1,"col":1},"anchor":{"row":1,"col":1}},{"cursor":{"row":2,"col":1},"anchor":{"row":2,"col":1}}],"primary":2}
+{"name":"msel-reg-replace-per-range","text":"ab\ncd\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0},"sels":[{"cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}},{"cursor":{"row":1,"col":0},"anchor":{"row":1,"col":0}}],"primary":0}
+{"name":"msel-reg-more-values-one-range","text":"ab\ncad\n","mode":"normal","cursor":{"row":1,"col":1},"anchor":{"row":1,"col":1}}
+{"name":"reg-index-insert","text":"1x\n2x\n3x\n","mode":"normal","cursor":{"row":0,"col":1},"anchor":{"row":0,"col":1},"sels":[{"cursor":{"row":0,"col":1},"anchor":{"row":0,"col":1}},{"cursor":{"row":1,"col":1},"anchor":{"row":1,"col":1}},{"cursor":{"row":2,"col":1},"anchor":{"row":2,"col":1}}],"primary":0}
+{"name":"reg-search-paste","text":"abb\n","mode":"normal","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":2}}
+{"name":"reg-count-before-quote","text":"ab\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}
+{"name":"reg-count-after-quote","text":"aaaab\n","mode":"normal","cursor":{"row":0,"col":3},"anchor":{"row":0,"col":1}}
+{"name":"reg-ctrl-r-named","text":"aab\n","mode":"normal","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":2}}
+{"name":"reg-ctrl-r-esc","text":"xab\n","mode":"insert","cursor":{"row":0,"col":1},"anchor":{"row":0,"col":1}}
+{"name":"macro-record-replay","text":"a!\nb!\nc\n","mode":"normal","cursor":{"row":2,"col":1},"anchor":{"row":2,"col":1}}
+{"name":"macro-count","text":"a!\nb!\nc!\nd\n","mode":"normal","cursor":{"row":3,"col":1},"anchor":{"row":3,"col":1}}
+{"name":"macro-named","text":"a!\nb!\nc\n","mode":"normal","cursor":{"row":2,"col":1},"anchor":{"row":2,"col":1}}
+{"name":"macro-register-text","text":"a!\nbA!<esc>j\n","mode":"normal","cursor":{"row":1,"col":8},"anchor":{"row":1,"col":1}}
+{"name":"macro-with-prompt","text":",c,d\n","mode":"normal","cursor":{"row":1,"col":0},"anchor":{"row":1,"col":0}}
+{"name":"macro-esc-in-normal","text":"ab\ncd\n","mode":"normal","cursor":{"row":2,"col":0},"anchor":{"row":2,"col":0}}
+{"name":"macro-empty","text":"ab\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}
+{"name":"dot-insert","text":"Xab\ncXXd\n","mode":"normal","cursor":{"row":1,"col":3},"anchor":{"row":1,"col":3}}
+{"name":"dot-append-count","text":"aYZb\ncd\nYZYZYZ\n","mode":"normal","cursor":{"row":2,"col":5},"anchor":{"row":1,"col":2}}
+{"name":"dot-change","text":"Xcd\nX gh\n","mode":"normal","cursor":{"row":1,"col":1},"anchor":{"row":1,"col":1}}
+{"name":"dot-open-below","text":"a\nX\nb\nX\n","mode":"normal","cursor":{"row":3,"col":1},"anchor":{"row":3,"col":1}}
+{"name":"dot-counted-command","text":"abxyxycd\n","mode":"normal","cursor":{"row":0,"col":6},"anchor":{"row":0,"col":6}}
+{"name":"dot-multi","text":"XXab\nXXab\n","mode":"normal","cursor":{"row":1,"col":2},"anchor":{"row":1,"col":2},"sels":[{"cursor":{"row":0,"col":2},"anchor":{"row":0,"col":2}},{"cursor":{"row":1,"col":2},"anchor":{"row":1,"col":2}}],"primary":1}
+{"name":"dot-nothing","text":"ab\n","mode":"normal","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":0}}
+{"name":"append-at-end-adds-newline","text":"ab\nX","mode":"normal","cursor":{"row":1,"col":1},"anchor":{"row":1,"col":1}}
+{"name":"append-at-end-no-newline","text":"abX\n","mode":"normal","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":1}}
{"name":"msel-esc-keeps","text":"aa\nbb\n","mode":"normal","cursor":{"row":1,"col":0},"anchor":{"row":1,"col":0},"sels":[{"cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}},{"cursor":{"row":1,"col":0},"anchor":{"row":1,"col":0}}],"primary":1}
{"name":"msel-select-mode","text":"abcd\nabcd\n","mode":"select","cursor":{"row":1,"col":1},"anchor":{"row":1,"col":0},"sels":[{"cursor":{"row":0,"col":1},"anchor":{"row":0,"col":0}},{"cursor":{"row":1,"col":1},"anchor":{"row":1,"col":0}}],"primary":1}
{"name":"msel-open-count","text":"\n\nab\n","mode":"insert","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0},"sels":[{"cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}},{"cursor":{"row":1,"col":0},"anchor":{"row":1,"col":0}}],"primary":0}
@@ -479,3 +592,67 @@
{"name":"comment-then-insert","text":"# zalpha\n","mode":"normal","cursor":{"row":0,"col":3},"anchor":{"row":0,"col":3}}
{"name":"comment-after-sel-regex","text":"# alpha\n# beta\n# gamma\n","mode":"normal","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":2},"sels":[{"cursor":{"row":0,"col":2},"anchor":{"row":0,"col":2}},{"cursor":{"row":0,"col":6},"anchor":{"row":0,"col":6}},{"cursor":{"row":1,"col":5},"anchor":{"row":1,"col":5}},{"cursor":{"row":2,"col":3},"anchor":{"row":2,"col":3}},{"cursor":{"row":2,"col":6},"anchor":{"row":2,"col":6}}],"primary":0}
{"name":"comment-after-split-regex","text":"# a,b\n# c,d\n","mode":"normal","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":2},"sels":[{"cursor":{"row":0,"col":2},"anchor":{"row":0,"col":2}},{"cursor":{"row":1,"col":2},"anchor":{"row":0,"col":4}},{"cursor":{"row":1,"col":5},"anchor":{"row":1,"col":4}}],"primary":0}
+{"name":"search-repeat-next","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}
+{"name":"search-repeat-next-tty","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}
+{"name":"search-repeat-prev","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}
+{"name":"search-repeat-prev-tty","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}
+{"name":"search-repeat-wrap","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}
+{"name":"search-repeat-wrap-tty","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}
+{"name":"search-repeat-count","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":3},"anchor":{"row":0,"col":0}}
+{"name":"search-repeat-count-tty","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":3},"anchor":{"row":0,"col":0}}
+{"name":"search-repeat-reverse-count","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":3},"anchor":{"row":0,"col":0}}
+{"name":"search-repeat-reverse-count-tty","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":3},"anchor":{"row":0,"col":0}}
+{"name":"search-repeat-select","text":"one one one\n","mode":"select","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4},"sels":[{"cursor":{"row":0,"col":3},"anchor":{"row":0,"col":0}},{"cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}],"primary":1}
+{"name":"search-repeat-select-tty","text":"one one one\n","mode":"select","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4},"sels":[{"cursor":{"row":0,"col":3},"anchor":{"row":0,"col":0}},{"cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}],"primary":1}
+{"name":"search-repeat-select-count","text":"one one one\n","mode":"select","cursor":{"row":0,"col":3},"anchor":{"row":0,"col":0},"sels":[{"cursor":{"row":0,"col":3},"anchor":{"row":0,"col":0}},{"cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}],"primary":0}
+{"name":"search-repeat-select-count-tty","text":"one one one\n","mode":"select","cursor":{"row":0,"col":3},"anchor":{"row":0,"col":0},"sels":[{"cursor":{"row":0,"col":3},"anchor":{"row":0,"col":0}},{"cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}],"primary":0}
+{"name":"search-repeat-select-back","text":"one one one\n","mode":"select","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4},"sels":[{"cursor":{"row":0,"col":3},"anchor":{"row":0,"col":0}},{"cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}],"primary":1}
+{"name":"search-repeat-select-back-tty","text":"one one one\n","mode":"select","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4},"sels":[{"cursor":{"row":0,"col":3},"anchor":{"row":0,"col":0}},{"cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}],"primary":1}
+{"name":"search-repeat-keep-secondary","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":6},"anchor":{"row":0,"col":4},"sels":[{"cursor":{"row":0,"col":6},"anchor":{"row":0,"col":4}},{"cursor":{"row":0,"col":10},"anchor":{"row":0,"col":8}}],"primary":0}
+{"name":"search-repeat-keep-secondary-tty","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":6},"anchor":{"row":0,"col":4},"sels":[{"cursor":{"row":0,"col":6},"anchor":{"row":0,"col":4}},{"cursor":{"row":0,"col":10},"anchor":{"row":0,"col":8}}],"primary":0}
+{"name":"search-repeat-reverse-selection","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":4},"anchor":{"row":0,"col":7}}
+{"name":"search-repeat-reverse-selection-tty","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":4},"anchor":{"row":0,"col":7}}
+{"name":"search-repeat-smart-case","text":"one ONE one\n","mode":"normal","cursor":{"row":0,"col":6},"anchor":{"row":0,"col":4}}
+{"name":"search-repeat-smart-case-tty","text":"one ONE one\n","mode":"normal","cursor":{"row":0,"col":6},"anchor":{"row":0,"col":4}}
+{"name":"search-repeat-upper-case","text":"one ONE ONE\n","mode":"normal","cursor":{"row":0,"col":10},"anchor":{"row":0,"col":8}}
+{"name":"search-repeat-upper-case-tty","text":"one ONE ONE\n","mode":"normal","cursor":{"row":0,"col":10},"anchor":{"row":0,"col":8}}
+{"name":"search-repeat-named","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}
+{"name":"search-repeat-named-tty","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}
+{"name":"search-repeat-remember-named","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}
+{"name":"search-repeat-remember-named-tty","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}
+{"name":"search-repeat-literal","text":"a.b a.b axb\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":7}}
+{"name":"search-repeat-literal-tty","text":"a.b a.b axb\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":7}}
+{"name":"search-repeat-newline","text":"alpha\nbeta\nalpha\nbeta\n","mode":"normal","cursor":{"row":2,"col":4},"anchor":{"row":2,"col":0}}
+{"name":"search-repeat-newline-tty","text":"alpha\nbeta\nalpha\nbeta\n","mode":"normal","cursor":{"row":2,"col":4},"anchor":{"row":2,"col":0}}
+{"name":"search-repeat-no-reg","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}
+{"name":"search-repeat-no-reg-tty","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}
+{"name":"search-repeat-missing","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}
+{"name":"search-repeat-missing-tty","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}
+{"name":"search-repeat-regexp","text":"a1 a2 a3\n","mode":"normal","cursor":{"row":0,"col":4},"anchor":{"row":0,"col":3}}
+{"name":"search-repeat-regexp-tty","text":"a1 a2 a3\n","mode":"normal","cursor":{"row":0,"col":4},"anchor":{"row":0,"col":3}}
+{"name":"search-repeat-zero","text":"abc abc\n","mode":"normal","cursor":{"row":1,"col":0},"anchor":{"row":1,"col":0}}
+{"name":"search-repeat-zero-tty","text":"abc abc\n","mode":"normal","cursor":{"row":1,"col":0},"anchor":{"row":1,"col":0}}
+{"name":"search-repeat-unicode","text":"界 界 界\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}
+{"name":"search-repeat-unicode-tty","text":"界 界 界\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}
+{"name":"search-repeat-combining","text":"á á á\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}
+{"name":"search-repeat-combining-tty","text":"á á á\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}
+{"name":"search-repeat-word-boundary","text":"one oneself one\n","mode":"normal","cursor":{"row":0,"col":6},"anchor":{"row":0,"col":4}}
+{"name":"search-repeat-word-boundary-tty","text":"one oneself one\n","mode":"normal","cursor":{"row":0,"col":6},"anchor":{"row":0,"col":4}}
+{"name":"search-repeat-word-normal","text":"one oneself one\n","mode":"normal","cursor":{"row":0,"col":14},"anchor":{"row":0,"col":12}}
+{"name":"search-repeat-word-normal-tty","text":"one oneself one\n","mode":"normal","cursor":{"row":0,"col":14},"anchor":{"row":0,"col":12}}
+{"name":"search-repeat-word-extend-wrap","text":"one one one\n","mode":"select","cursor":{"row":0,"col":6},"anchor":{"row":0,"col":4},"sels":[{"cursor":{"row":0,"col":2},"anchor":{"row":0,"col":0}},{"cursor":{"row":0,"col":6},"anchor":{"row":0,"col":4}},{"cursor":{"row":0,"col":10},"anchor":{"row":0,"col":8}}],"primary":1}
+{"name":"search-repeat-word-extend-wrap-tty","text":"one one one\n","mode":"select","cursor":{"row":0,"col":6},"anchor":{"row":0,"col":4},"sels":[{"cursor":{"row":0,"col":2},"anchor":{"row":0,"col":0}},{"cursor":{"row":0,"col":6},"anchor":{"row":0,"col":4}},{"cursor":{"row":0,"col":10},"anchor":{"row":0,"col":8}}],"primary":1}
+{"name":"search-repeat-word-reverse-wrap","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":10},"anchor":{"row":0,"col":8}}
+{"name":"search-repeat-word-reverse-wrap-tty","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":10},"anchor":{"row":0,"col":8}}
+{"name":"search-repeat-unicode-boundary","text":"界 界界 界\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":3}}
+{"name":"search-repeat-unicode-boundary-tty","text":"界 界界 界\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":3}}
+{"name":"search-repeat-unicode-alternatives","text":"界 語 界 語\n","mode":"normal","cursor":{"row":0,"col":4},"anchor":{"row":0,"col":4},"sels":[{"cursor":{"row":0,"col":4},"anchor":{"row":0,"col":4}},{"cursor":{"row":0,"col":8},"anchor":{"row":0,"col":8}},{"cursor":{"row":0,"col":12},"anchor":{"row":0,"col":12}}],"primary":0}
+{"name":"search-repeat-unicode-alternatives-tty","text":"界 語 界 語\n","mode":"normal","cursor":{"row":0,"col":4},"anchor":{"row":0,"col":4},"sels":[{"cursor":{"row":0,"col":4},"anchor":{"row":0,"col":4}},{"cursor":{"row":0,"col":8},"anchor":{"row":0,"col":8}},{"cursor":{"row":0,"col":12},"anchor":{"row":0,"col":12}}],"primary":0}
+{"name":"search-repeat-multisel-extend","text":"one two one two\n","mode":"select","cursor":{"row":0,"col":6},"anchor":{"row":0,"col":4},"sels":[{"cursor":{"row":0,"col":2},"anchor":{"row":0,"col":0}},{"cursor":{"row":0,"col":6},"anchor":{"row":0,"col":4}},{"cursor":{"row":0,"col":10},"anchor":{"row":0,"col":8}},{"cursor":{"row":0,"col":14},"anchor":{"row":0,"col":12}}],"primary":1}
+{"name":"search-repeat-multisel-extend-tty","text":"one two one two\n","mode":"select","cursor":{"row":0,"col":6},"anchor":{"row":0,"col":4},"sels":[{"cursor":{"row":0,"col":2},"anchor":{"row":0,"col":0}},{"cursor":{"row":0,"col":6},"anchor":{"row":0,"col":4}},{"cursor":{"row":0,"col":10},"anchor":{"row":0,"col":8}},{"cursor":{"row":0,"col":14},"anchor":{"row":0,"col":12}}],"primary":1}
+{"name":"search-repeat-backward-zero","text":"abc abc\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":7}}
+{"name":"search-repeat-backward-zero-tty","text":"abc abc\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":7}}
+{"name":"search-repeat-adjacent","text":"aaa\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}
+{"name":"search-repeat-adjacent-tty","text":"aaa\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}
+{"name":"search-repeat-direction-extend","text":"one one one\n","mode":"select","cursor":{"row":0,"col":4},"anchor":{"row":0,"col":6},"sels":[{"cursor":{"row":0,"col":0},"anchor":{"row":0,"col":2}},{"cursor":{"row":0,"col":4},"anchor":{"row":0,"col":6}}],"primary":1}
+{"name":"search-repeat-direction-extend-tty","text":"one one one\n","mode":"select","cursor":{"row":0,"col":4},"anchor":{"row":0,"col":6},"sels":[{"cursor":{"row":0,"col":0},"anchor":{"row":0,"col":2}},{"cursor":{"row":0,"col":4},"anchor":{"row":0,"col":6}}],"primary":1}
diff --git a/test/hxcases/golf-goldens.jsonl b/test/hxcases/golf-goldens.jsonl
new file mode 100644
index 00000000..d2d77302
--- /dev/null
+++ b/test/hxcases/golf-goldens.jsonl
@@ -0,0 +1,124 @@
+{"name":"golf-csv-to-sql-01","text":"id 1,Item 1,cost 1,location 1\nid 2,Item 2,cost 2,location 2\nid 10,Item 10,cost 10,location 10\n","mode":"normal","cursor":{"row":2,"col":33},"anchor":{"row":0,"col":0}}
+{"name":"golf-csv-to-sql-02","text":"id 1,Item 1,cost 1,location 1\nid 2,Item 2,cost 2,location 2\nid 10,Item 10,cost 10,location 10\n","mode":"normal","cursor":{"row":0,"col":28},"anchor":{"row":0,"col":0},"sels":[{"cursor":{"row":0,"col":28},"anchor":{"row":0,"col":0}},{"cursor":{"row":1,"col":28},"anchor":{"row":1,"col":0}},{"cursor":{"row":2,"col":32},"anchor":{"row":2,"col":0}}],"primary":0}
+{"name":"golf-csv-to-sql-03","text":"id 1,Item 1,cost 1,location 1\nid 2,Item 2,cost 2,location 2\nid 10,Item 10,cost 10,location 10\n","mode":"normal","cursor":{"row":0,"col":28},"anchor":{"row":0,"col":0},"sels":[{"cursor":{"row":0,"col":28},"anchor":{"row":0,"col":0}},{"cursor":{"row":1,"col":28},"anchor":{"row":1,"col":0}},{"cursor":{"row":2,"col":32},"anchor":{"row":2,"col":0}}],"primary":0}
+{"name":"golf-csv-to-sql-04","text":"id 1,Item 1,cost 1,location 1\nid 2,Item 2,cost 2,location 2\nid 10,Item 10,cost 10,location 10\n","mode":"normal","cursor":{"row":0,"col":3},"anchor":{"row":0,"col":3},"sels":[{"cursor":{"row":0,"col":3},"anchor":{"row":0,"col":3}},{"cursor":{"row":0,"col":10},"anchor":{"row":0,"col":10}},{"cursor":{"row":0,"col":17},"anchor":{"row":0,"col":17}},{"cursor":{"row":0,"col":28},"anchor":{"row":0,"col":28}},{"cursor":{"row":1,"col":3},"anchor":{"row":1,"col":3}},{"cursor":{"row":1,"col":10},"anchor":{"row":1,"col":10}},{"cursor":{"row":1,"col":17},"anchor":{"row":1,"col":17}},{"cursor":{"row":1,"col":28},"anchor":{"row":1,"col":28}},{"cursor":{"row":2,"col":3},"anchor":{"row":2,"col":3}},{"cursor":{"row":2,"col":4},"anchor":{"row":2,"col":4}},{"cursor":{"row":2,"col":11},"anchor":{"row":2,"col":11}},{"cursor":{"row":2,"col":12},"anchor":{"row":2,"col":12}},{"cursor":{"row":2,"col":19},"anchor":{"row":2,"col":19}},{"cursor":{"row":2,"col":20},"anchor":{"row":2,"col":20}},{"cursor":{"row":2,"col":31},"anchor":{"row":2,"col":31}},{"cursor":{"row":2,"col":32},"anchor":{"row":2,"col":32}}],"primary":0}
+{"name":"golf-csv-to-sql-05","text":"id ,Item ,cost ,location \nid ,Item ,cost ,location \nid ,Item ,cost ,location \n","mode":"normal","cursor":{"row":0,"col":3},"anchor":{"row":0,"col":3},"sels":[{"cursor":{"row":0,"col":3},"anchor":{"row":0,"col":3}},{"cursor":{"row":0,"col":9},"anchor":{"row":0,"col":9}},{"cursor":{"row":0,"col":15},"anchor":{"row":0,"col":15}},{"cursor":{"row":0,"col":25},"anchor":{"row":0,"col":25}},{"cursor":{"row":1,"col":3},"anchor":{"row":1,"col":3}},{"cursor":{"row":1,"col":9},"anchor":{"row":1,"col":9}},{"cursor":{"row":1,"col":15},"anchor":{"row":1,"col":15}},{"cursor":{"row":1,"col":25},"anchor":{"row":1,"col":25}},{"cursor":{"row":2,"col":3},"anchor":{"row":2,"col":3}},{"cursor":{"row":2,"col":9},"anchor":{"row":2,"col":9}},{"cursor":{"row":2,"col":15},"anchor":{"row":2,"col":15}},{"cursor":{"row":2,"col":25},"anchor":{"row":2,"col":25}}],"primary":0}
+{"name":"golf-csv-to-sql-06","text":"id ,Item ,cost ,location \nid ,Item ,cost ,location \nid ,Item ,cost ,location \n","mode":"normal","cursor":{"row":0,"col":1},"anchor":{"row":0,"col":1},"sels":[{"cursor":{"row":0,"col":1},"anchor":{"row":0,"col":1}},{"cursor":{"row":0,"col":7},"anchor":{"row":0,"col":7}},{"cursor":{"row":0,"col":13},"anchor":{"row":0,"col":13}},{"cursor":{"row":0,"col":23},"anchor":{"row":0,"col":23}},{"cursor":{"row":1,"col":1},"anchor":{"row":1,"col":1}},{"cursor":{"row":1,"col":7},"anchor":{"row":1,"col":7}},{"cursor":{"row":1,"col":13},"anchor":{"row":1,"col":13}},{"cursor":{"row":1,"col":23},"anchor":{"row":1,"col":23}},{"cursor":{"row":2,"col":1},"anchor":{"row":2,"col":1}},{"cursor":{"row":2,"col":7},"anchor":{"row":2,"col":7}},{"cursor":{"row":2,"col":13},"anchor":{"row":2,"col":13}},{"cursor":{"row":2,"col":23},"anchor":{"row":2,"col":23}}],"primary":0}
+{"name":"golf-csv-to-sql-07","text":"id ,Item ,cost ,location \nid ,Item ,cost ,location \nid ,Item ,cost ,location \n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":1},"sels":[{"cursor":{"row":0,"col":0},"anchor":{"row":0,"col":1}},{"cursor":{"row":0,"col":4},"anchor":{"row":0,"col":7}},{"cursor":{"row":0,"col":10},"anchor":{"row":0,"col":13}},{"cursor":{"row":0,"col":16},"anchor":{"row":0,"col":23}},{"cursor":{"row":1,"col":0},"anchor":{"row":1,"col":1}},{"cursor":{"row":1,"col":4},"anchor":{"row":1,"col":7}},{"cursor":{"row":1,"col":10},"anchor":{"row":1,"col":13}},{"cursor":{"row":1,"col":16},"anchor":{"row":1,"col":23}},{"cursor":{"row":2,"col":0},"anchor":{"row":2,"col":1}},{"cursor":{"row":2,"col":4},"anchor":{"row":2,"col":7}},{"cursor":{"row":2,"col":10},"anchor":{"row":2,"col":13}},{"cursor":{"row":2,"col":16},"anchor":{"row":2,"col":23}}],"primary":0}
+{"name":"golf-csv-to-sql-08","text":"`id` ,`Item` ,`cost` ,`location` \n`id` ,`Item` ,`cost` ,`location` \n`id` ,`Item` ,`cost` ,`location` \n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":3},"sels":[{"cursor":{"row":0,"col":0},"anchor":{"row":0,"col":3}},{"cursor":{"row":0,"col":6},"anchor":{"row":0,"col":11}},{"cursor":{"row":0,"col":14},"anchor":{"row":0,"col":19}},{"cursor":{"row":0,"col":22},"anchor":{"row":0,"col":31}},{"cursor":{"row":1,"col":0},"anchor":{"row":1,"col":3}},{"cursor":{"row":1,"col":6},"anchor":{"row":1,"col":11}},{"cursor":{"row":1,"col":14},"anchor":{"row":1,"col":19}},{"cursor":{"row":1,"col":22},"anchor":{"row":1,"col":31}},{"cursor":{"row":2,"col":0},"anchor":{"row":2,"col":3}},{"cursor":{"row":2,"col":6},"anchor":{"row":2,"col":11}},{"cursor":{"row":2,"col":14},"anchor":{"row":2,"col":19}},{"cursor":{"row":2,"col":22},"anchor":{"row":2,"col":31}}],"primary":0}
+{"name":"golf-csv-to-sql-09","text":"`id` ,`item` ,`cost` ,`location` \n`id` ,`item` ,`cost` ,`location` \n`id` ,`item` ,`cost` ,`location` \n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":3},"sels":[{"cursor":{"row":0,"col":0},"anchor":{"row":0,"col":3}},{"cursor":{"row":0,"col":6},"anchor":{"row":0,"col":11}},{"cursor":{"row":0,"col":14},"anchor":{"row":0,"col":19}},{"cursor":{"row":0,"col":22},"anchor":{"row":0,"col":31}},{"cursor":{"row":1,"col":0},"anchor":{"row":1,"col":3}},{"cursor":{"row":1,"col":6},"anchor":{"row":1,"col":11}},{"cursor":{"row":1,"col":14},"anchor":{"row":1,"col":19}},{"cursor":{"row":1,"col":22},"anchor":{"row":1,"col":31}},{"cursor":{"row":2,"col":0},"anchor":{"row":2,"col":3}},{"cursor":{"row":2,"col":6},"anchor":{"row":2,"col":11}},{"cursor":{"row":2,"col":14},"anchor":{"row":2,"col":19}},{"cursor":{"row":2,"col":22},"anchor":{"row":2,"col":31}}],"primary":0}
+{"name":"golf-csv-to-sql-10","text":"`id` ,`item` ,`cost` ,`location` \n`id` ,`item` ,`cost` ,`location` \n`id` ,`item` ,`cost` ,`location` \n","mode":"normal","cursor":{"row":0,"col":31},"anchor":{"row":0,"col":0},"sels":[{"cursor":{"row":0,"col":31},"anchor":{"row":0,"col":0}},{"cursor":{"row":1,"col":31},"anchor":{"row":1,"col":0}},{"cursor":{"row":2,"col":31},"anchor":{"row":2,"col":0}}],"primary":0}
+{"name":"golf-csv-to-sql-11","text":"(`id` ,`item` ,`cost` ,`location`) \n(`id` ,`item` ,`cost` ,`location`) \n(`id` ,`item` ,`cost` ,`location`) \n","mode":"normal","cursor":{"row":0,"col":33},"anchor":{"row":0,"col":0},"sels":[{"cursor":{"row":0,"col":33},"anchor":{"row":0,"col":0}},{"cursor":{"row":1,"col":33},"anchor":{"row":1,"col":0}},{"cursor":{"row":2,"col":33},"anchor":{"row":2,"col":0}}],"primary":0}
+{"name":"golf-csv-to-sql-12","text":"(`id` ,`item` ,`cost` ,`location`) \n(`id` ,`item` ,`cost` ,`location`) \n(`id` ,`item` ,`cost` ,`location`) \n","mode":"insert","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0},"sels":[{"cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}},{"cursor":{"row":1,"col":0},"anchor":{"row":1,"col":0}},{"cursor":{"row":2,"col":0},"anchor":{"row":2,"col":0}}],"primary":0}
+{"name":"golf-csv-to-sql-13","text":"INSERT INTO `database(`id` ,`item` ,`cost` ,`location`) \nINSERT INTO `database(`id` ,`item` ,`cost` ,`location`) \nINSERT INTO `database(`id` ,`item` ,`cost` ,`location`) \n","mode":"insert","cursor":{"row":0,"col":21},"anchor":{"row":0,"col":21},"sels":[{"cursor":{"row":0,"col":21},"anchor":{"row":0,"col":21}},{"cursor":{"row":1,"col":21},"anchor":{"row":1,"col":21}},{"cursor":{"row":2,"col":21},"anchor":{"row":2,"col":21}}],"primary":0}
+{"name":"golf-csv-to-sql-14","text":"INSERT INTO `database(`id` ,`item` ,`cost` ,`location`) \nINSERT INTO `database(`id` ,`item` ,`cost` ,`location`) \nINSERT INTO `database(`id` ,`item` ,`cost` ,`location`) \n","mode":"normal","cursor":{"row":0,"col":21},"anchor":{"row":0,"col":21},"sels":[{"cursor":{"row":0,"col":21},"anchor":{"row":0,"col":21}},{"cursor":{"row":1,"col":21},"anchor":{"row":1,"col":21}},{"cursor":{"row":2,"col":21},"anchor":{"row":2,"col":21}}],"primary":0}
+{"name":"golf-csv-to-sql-15","text":"INSERT INTO `database(.`table`id` ,`item` ,`cost` ,`location`) \nINSERT INTO `database(.`table`id` ,`item` ,`cost` ,`location`) \nINSERT INTO `database(.`table`id` ,`item` ,`cost` ,`location`) \n","mode":"insert","cursor":{"row":0,"col":29},"anchor":{"row":0,"col":21},"sels":[{"cursor":{"row":0,"col":29},"anchor":{"row":0,"col":21}},{"cursor":{"row":1,"col":29},"anchor":{"row":1,"col":21}},{"cursor":{"row":2,"col":29},"anchor":{"row":2,"col":21}}],"primary":0}
+{"name":"golf-csv-to-sql-16","text":"INSERT INTO `database(.`table`id` ,`item` ,`cost` ,`location`) \nINSERT INTO `database(.`table`id` ,`item` ,`cost` ,`location`) \nINSERT INTO `database(.`table`id` ,`item` ,`cost` ,`location`) \n","mode":"insert","cursor":{"row":0,"col":30},"anchor":{"row":0,"col":29},"sels":[{"cursor":{"row":0,"col":30},"anchor":{"row":0,"col":29}},{"cursor":{"row":1,"col":30},"anchor":{"row":1,"col":29}},{"cursor":{"row":2,"col":30},"anchor":{"row":2,"col":29}}],"primary":0}
+{"name":"golf-csv-to-sql-17","text":"INSERT INTO `database(.`table` id` ,`item` ,`cost` ,`location`) \nINSERT INTO `database(.`table` id` ,`item` ,`cost` ,`location`) \nINSERT INTO `database(.`table` id` ,`item` ,`cost` ,`location`) \n","mode":"normal","cursor":{"row":0,"col":30},"anchor":{"row":0,"col":29},"sels":[{"cursor":{"row":0,"col":30},"anchor":{"row":0,"col":29}},{"cursor":{"row":1,"col":30},"anchor":{"row":1,"col":29}},{"cursor":{"row":2,"col":30},"anchor":{"row":2,"col":29}}],"primary":0}
+{"name":"golf-csv-to-sql-18","text":"INSERT INTO `database(.`table` id` ,`item` ,`cost` ,`location`) VALUES (\nINSERT INTO `database(.`table` id` ,`item` ,`cost` ,`location`) VALUES (\nINSERT INTO `database(.`table` id` ,`item` ,`cost` ,`location`) VALUES (\n","mode":"insert","cursor":{"row":0,"col":72},"anchor":{"row":0,"col":72},"sels":[{"cursor":{"row":0,"col":72},"anchor":{"row":0,"col":72}},{"cursor":{"row":1,"col":72},"anchor":{"row":1,"col":72}},{"cursor":{"row":2,"col":72},"anchor":{"row":2,"col":72}}],"primary":0}
+{"name":"golf-csv-to-sql-19","text":"INSERT INTO `database(.`table` id` ,`item` ,`cost` ,`location`) VALUES (\nINSERT INTO `database(.`table` id` ,`item` ,`cost` ,`location`) VALUES (\nINSERT INTO `database(.`table` id` ,`item` ,`cost` ,`location`) VALUES (\n","mode":"normal","cursor":{"row":0,"col":72},"anchor":{"row":0,"col":72},"sels":[{"cursor":{"row":0,"col":72},"anchor":{"row":0,"col":72}},{"cursor":{"row":1,"col":72},"anchor":{"row":1,"col":72}},{"cursor":{"row":2,"col":72},"anchor":{"row":2,"col":72}}],"primary":0}
+{"name":"golf-csv-to-sql-20","text":"INSERT INTO `database(.`table` id` ,`item` ,`cost` ,`location`) VALUES (id 1,Item 1,cost 1,location 1\nINSERT INTO `database(.`table` id` ,`item` ,`cost` ,`location`) VALUES (id 2,Item 2,cost 2,location 2\nINSERT INTO `database(.`table` id` ,`item` ,`cost` ,`location`) VALUES (id 10,Item 10,cost 10,location 10\n","mode":"normal","cursor":{"row":0,"col":100},"anchor":{"row":0,"col":72},"sels":[{"cursor":{"row":0,"col":100},"anchor":{"row":0,"col":72}},{"cursor":{"row":1,"col":100},"anchor":{"row":1,"col":72}},{"cursor":{"row":2,"col":104},"anchor":{"row":2,"col":72}}],"primary":0}
+{"name":"golf-csv-to-sql-21","text":"INSERT INTO `database(.`table` id` ,`item` ,`cost` ,`location`) VALUES (id 1,Item 1,cost 1,location 1\nINSERT INTO `database(.`table` id` ,`item` ,`cost` ,`location`) VALUES (id 2,Item 2,cost 2,location 2\nINSERT INTO `database(.`table` id` ,`item` ,`cost` ,`location`) VALUES (id 10,Item 10,cost 10,location 10\n","mode":"normal","cursor":{"row":0,"col":75},"anchor":{"row":0,"col":72},"sels":[{"cursor":{"row":0,"col":75},"anchor":{"row":0,"col":72}},{"cursor":{"row":0,"col":82},"anchor":{"row":0,"col":77}},{"cursor":{"row":0,"col":89},"anchor":{"row":0,"col":84}},{"cursor":{"row":0,"col":100},"anchor":{"row":0,"col":91}},{"cursor":{"row":1,"col":75},"anchor":{"row":1,"col":72}},{"cursor":{"row":1,"col":82},"anchor":{"row":1,"col":77}},{"cursor":{"row":1,"col":89},"anchor":{"row":1,"col":84}},{"cursor":{"row":1,"col":100},"anchor":{"row":1,"col":91}},{"cursor":{"row":2,"col":76},"anchor":{"row":2,"col":72}},{"cursor":{"row":2,"col":84},"anchor":{"row":2,"col":78}},{"cursor":{"row":2,"col":92},"anchor":{"row":2,"col":86}},{"cursor":{"row":2,"col":104},"anchor":{"row":2,"col":94}}],"primary":0}
+{"name":"golf-csv-to-sql-22","text":"INSERT INTO `database(.`table` id` ,`item` ,`cost` ,`location`) VALUES ('id 1','Item 1','cost 1','location 1'\nINSERT INTO `database(.`table` id` ,`item` ,`cost` ,`location`) VALUES ('id 2','Item 2','cost 2','location 2'\nINSERT INTO `database(.`table` id` ,`item` ,`cost` ,`location`) VALUES ('id 10','Item 10','cost 10','location 10'\n","mode":"normal","cursor":{"row":0,"col":77},"anchor":{"row":0,"col":72},"sels":[{"cursor":{"row":0,"col":77},"anchor":{"row":0,"col":72}},{"cursor":{"row":0,"col":86},"anchor":{"row":0,"col":79}},{"cursor":{"row":0,"col":95},"anchor":{"row":0,"col":88}},{"cursor":{"row":0,"col":108},"anchor":{"row":0,"col":97}},{"cursor":{"row":1,"col":77},"anchor":{"row":1,"col":72}},{"cursor":{"row":1,"col":86},"anchor":{"row":1,"col":79}},{"cursor":{"row":1,"col":95},"anchor":{"row":1,"col":88}},{"cursor":{"row":1,"col":108},"anchor":{"row":1,"col":97}},{"cursor":{"row":2,"col":78},"anchor":{"row":2,"col":72}},{"cursor":{"row":2,"col":88},"anchor":{"row":2,"col":80}},{"cursor":{"row":2,"col":98},"anchor":{"row":2,"col":90}},{"cursor":{"row":2,"col":112},"anchor":{"row":2,"col":100}}],"primary":0}
+{"name":"golf-csv-to-sql-23","text":"INSERT INTO `database(.`table` id` ,`item` ,`cost` ,`location`) VALUES ('id 1','Item 1','cost 1','location 1';\nINSERT INTO `database(.`table` id` ,`item` ,`cost` ,`location`) VALUES ('id 2','Item 2','cost 2','location 2';\nINSERT INTO `database(.`table` id` ,`item` ,`cost` ,`location`) VALUES ('id 10','Item 10','cost 10','location 10';\n","mode":"insert","cursor":{"row":0,"col":110},"anchor":{"row":0,"col":110},"sels":[{"cursor":{"row":0,"col":110},"anchor":{"row":0,"col":110}},{"cursor":{"row":1,"col":110},"anchor":{"row":1,"col":110}},{"cursor":{"row":2,"col":114},"anchor":{"row":2,"col":114}}],"primary":0}
+{"name":"golf-csv-to-sql-24","text":"INSERT INTO `database(.`table` id` ,`item` ,`cost` ,`location`) VALUES ('id 1','Item 1','cost 1','location 1';\nINSERT INTO `database(.`table` id` ,`item` ,`cost` ,`location`) VALUES ('id 2','Item 2','cost 2','location 2';\nINSERT INTO `database(.`table` id` ,`item` ,`cost` ,`location`) VALUES ('id 10','Item 10','cost 10','location 10';\n","mode":"normal","cursor":{"row":0,"col":98},"anchor":{"row":0,"col":110},"sels":[{"cursor":{"row":0,"col":98},"anchor":{"row":0,"col":110}},{"cursor":{"row":1,"col":98},"anchor":{"row":1,"col":110}},{"cursor":{"row":2,"col":101},"anchor":{"row":2,"col":114}}],"primary":0}
+{"name":"golf-csv-to-sql-25","text":"INSERT INTO `database(.`table` id` ,`item` ,`cost` ,`location`) VALUES ('id 1','Item 1','cost 1','location 1';\nINSERT INTO `database(.`table` id` ,`item` ,`cost` ,`location`) VALUES ('id 2','Item 2','cost 2','location 2';\nINSERT INTO `database(.`table` id` ,`item` ,`cost` ,`location`) VALUES ('id 10','Item 10','cost 10','location 10';\n","mode":"normal","cursor":{"row":0,"col":98},"anchor":{"row":0,"col":98},"sels":[{"cursor":{"row":0,"col":98},"anchor":{"row":0,"col":98}},{"cursor":{"row":1,"col":98},"anchor":{"row":1,"col":98}},{"cursor":{"row":2,"col":101},"anchor":{"row":2,"col":101}}],"primary":0}
+{"name":"golf-csv-to-sql","text":"INSERT INTO `database(.`table` id` ,`item` ,`cost` ,`location`) VALUES ('id 1','Item 1','cost 1','Location 1';\nINSERT INTO `database(.`table` id` ,`item` ,`cost` ,`location`) VALUES ('id 2','Item 2','cost 2','Location 2';\nINSERT INTO `database(.`table` id` ,`item` ,`cost` ,`location`) VALUES ('id 10','Item 10','cost 10','Location 10';\n","mode":"normal","cursor":{"row":0,"col":98},"anchor":{"row":0,"col":98},"sels":[{"cursor":{"row":0,"col":98},"anchor":{"row":0,"col":98}},{"cursor":{"row":1,"col":98},"anchor":{"row":1,"col":98}},{"cursor":{"row":2,"col":101},"anchor":{"row":2,"col":101}}],"primary":0}
+{"name":"golf-enumerate-and-align-01","text":"[\n { word: \"a\", count: 2565 },\n { word: \"and\", count: 1777 },\n { word: \"of\", count: 1331 },\n { word: \"that\", count: 1263 },\n { word: \"to\", count: 1030 },\n { word: \"in\", count: 1027 },\n { word: \"it\", count: 754 },\n { word: \"as\", count: 730 },\n { word: \"was\", count: 687 },\n { word: \"you\", count: 652 },\n { word: \"for\", count: 630 },\n];\n","mode":"normal","cursor":{"row":12,"col":2},"anchor":{"row":0,"col":0}}
+{"name":"golf-enumerate-and-align-02","text":"[\n { word: \"a\", count: 2565 },\n { word: \"and\", count: 1777 },\n { word: \"of\", count: 1331 },\n { word: \"that\", count: 1263 },\n { word: \"to\", count: 1030 },\n { word: \"in\", count: 1027 },\n { word: \"it\", count: 754 },\n { word: \"as\", count: 730 },\n { word: \"was\", count: 687 },\n { word: \"you\", count: 652 },\n { word: \"for\", count: 630 },\n];\n","mode":"normal","cursor":{"row":12,"col":2},"anchor":{"row":0,"col":0}}
+{"name":"golf-enumerate-and-align-03","text":"[\n { word: \"a\", count: 2565 },\n { word: \"and\", count: 1777 },\n { word: \"of\", count: 1331 },\n { word: \"that\", count: 1263 },\n { word: \"to\", count: 1030 },\n { word: \"in\", count: 1027 },\n { word: \"it\", count: 754 },\n { word: \"as\", count: 730 },\n { word: \"was\", count: 687 },\n { word: \"you\", count: 652 },\n { word: \"for\", count: 630 },\n];\n","mode":"normal","cursor":{"row":1,"col":2},"anchor":{"row":1,"col":2},"sels":[{"cursor":{"row":1,"col":2},"anchor":{"row":1,"col":2}},{"cursor":{"row":2,"col":2},"anchor":{"row":2,"col":2}},{"cursor":{"row":3,"col":2},"anchor":{"row":3,"col":2}},{"cursor":{"row":4,"col":2},"anchor":{"row":4,"col":2}},{"cursor":{"row":5,"col":2},"anchor":{"row":5,"col":2}},{"cursor":{"row":6,"col":2},"anchor":{"row":6,"col":2}},{"cursor":{"row":7,"col":2},"anchor":{"row":7,"col":2}},{"cursor":{"row":8,"col":2},"anchor":{"row":8,"col":2}},{"cursor":{"row":9,"col":2},"anchor":{"row":9,"col":2}},{"cursor":{"row":10,"col":2},"anchor":{"row":10,"col":2}},{"cursor":{"row":11,"col":2},"anchor":{"row":11,"col":2}}],"primary":0}
+{"name":"golf-enumerate-and-align-04","text":"[\n { word: \"a\", count: 2565 },\n { word: \"and\", count: 1777 },\n { word: \"of\", count: 1331 },\n { word: \"that\", count: 1263 },\n { word: \"to\", count: 1030 },\n { word: \"in\", count: 1027 },\n { word: \"it\", count: 754 },\n { word: \"as\", count: 730 },\n { word: \"was\", count: 687 },\n { word: \"you\", count: 652 },\n { word: \"for\", count: 630 },\n];\n","mode":"insert","cursor":{"row":1,"col":4},"anchor":{"row":1,"col":2},"sels":[{"cursor":{"row":1,"col":4},"anchor":{"row":1,"col":2}},{"cursor":{"row":2,"col":4},"anchor":{"row":2,"col":2}},{"cursor":{"row":3,"col":4},"anchor":{"row":3,"col":2}},{"cursor":{"row":4,"col":4},"anchor":{"row":4,"col":2}},{"cursor":{"row":5,"col":4},"anchor":{"row":5,"col":2}},{"cursor":{"row":6,"col":4},"anchor":{"row":6,"col":2}},{"cursor":{"row":7,"col":4},"anchor":{"row":7,"col":2}},{"cursor":{"row":8,"col":4},"anchor":{"row":8,"col":2}},{"cursor":{"row":9,"col":4},"anchor":{"row":9,"col":2}},{"cursor":{"row":10,"col":4},"anchor":{"row":10,"col":2}},{"cursor":{"row":11,"col":4},"anchor":{"row":11,"col":2}}],"primary":0}
+{"name":"golf-enumerate-and-align-05","text":"[\n { rank: word: \"a\", count: 2565 },\n { rank: word: \"and\", count: 1777 },\n { rank: word: \"of\", count: 1331 },\n { rank: word: \"that\", count: 1263 },\n { rank: word: \"to\", count: 1030 },\n { rank: word: \"in\", count: 1027 },\n { rank: word: \"it\", count: 754 },\n { rank: word: \"as\", count: 730 },\n { rank: word: \"was\", count: 687 },\n { rank: word: \"you\", count: 652 },\n { rank: word: \"for\", count: 630 },\n];\n","mode":"insert","cursor":{"row":1,"col":10},"anchor":{"row":1,"col":2},"sels":[{"cursor":{"row":1,"col":10},"anchor":{"row":1,"col":2}},{"cursor":{"row":2,"col":10},"anchor":{"row":2,"col":2}},{"cursor":{"row":3,"col":10},"anchor":{"row":3,"col":2}},{"cursor":{"row":4,"col":10},"anchor":{"row":4,"col":2}},{"cursor":{"row":5,"col":10},"anchor":{"row":5,"col":2}},{"cursor":{"row":6,"col":10},"anchor":{"row":6,"col":2}},{"cursor":{"row":7,"col":10},"anchor":{"row":7,"col":2}},{"cursor":{"row":8,"col":10},"anchor":{"row":8,"col":2}},{"cursor":{"row":9,"col":10},"anchor":{"row":9,"col":2}},{"cursor":{"row":10,"col":10},"anchor":{"row":10,"col":2}},{"cursor":{"row":11,"col":10},"anchor":{"row":11,"col":2}}],"primary":0}
+{"name":"golf-enumerate-and-align-06","text":"[\n { rank: 1 word: \"a\", count: 2565 },\n { rank: 2 word: \"and\", count: 1777 },\n { rank: 3 word: \"of\", count: 1331 },\n { rank: 4 word: \"that\", count: 1263 },\n { rank: 5 word: \"to\", count: 1030 },\n { rank: 6 word: \"in\", count: 1027 },\n { rank: 7 word: \"it\", count: 754 },\n { rank: 8 word: \"as\", count: 730 },\n { rank: 9 word: \"was\", count: 687 },\n { rank: 10 word: \"you\", count: 652 },\n { rank: 11 word: \"for\", count: 630 },\n];\n","mode":"insert","cursor":{"row":1,"col":11},"anchor":{"row":1,"col":2},"sels":[{"cursor":{"row":1,"col":11},"anchor":{"row":1,"col":2}},{"cursor":{"row":2,"col":11},"anchor":{"row":2,"col":2}},{"cursor":{"row":3,"col":11},"anchor":{"row":3,"col":2}},{"cursor":{"row":4,"col":11},"anchor":{"row":4,"col":2}},{"cursor":{"row":5,"col":11},"anchor":{"row":5,"col":2}},{"cursor":{"row":6,"col":11},"anchor":{"row":6,"col":2}},{"cursor":{"row":7,"col":11},"anchor":{"row":7,"col":2}},{"cursor":{"row":8,"col":11},"anchor":{"row":8,"col":2}},{"cursor":{"row":9,"col":11},"anchor":{"row":9,"col":2}},{"cursor":{"row":10,"col":12},"anchor":{"row":10,"col":2}},{"cursor":{"row":11,"col":12},"anchor":{"row":11,"col":2}}],"primary":0}
+{"name":"golf-enumerate-and-align-07","text":"[\n { rank: 1, word: \"a\", count: 2565 },\n { rank: 2, word: \"and\", count: 1777 },\n { rank: 3, word: \"of\", count: 1331 },\n { rank: 4, word: \"that\", count: 1263 },\n { rank: 5, word: \"to\", count: 1030 },\n { rank: 6, word: \"in\", count: 1027 },\n { rank: 7, word: \"it\", count: 754 },\n { rank: 8, word: \"as\", count: 730 },\n { rank: 9, word: \"was\", count: 687 },\n { rank: 10, word: \"you\", count: 652 },\n { rank: 11, word: \"for\", count: 630 },\n];\n","mode":"insert","cursor":{"row":1,"col":12},"anchor":{"row":1,"col":2},"sels":[{"cursor":{"row":1,"col":12},"anchor":{"row":1,"col":2}},{"cursor":{"row":2,"col":12},"anchor":{"row":2,"col":2}},{"cursor":{"row":3,"col":12},"anchor":{"row":3,"col":2}},{"cursor":{"row":4,"col":12},"anchor":{"row":4,"col":2}},{"cursor":{"row":5,"col":12},"anchor":{"row":5,"col":2}},{"cursor":{"row":6,"col":12},"anchor":{"row":6,"col":2}},{"cursor":{"row":7,"col":12},"anchor":{"row":7,"col":2}},{"cursor":{"row":8,"col":12},"anchor":{"row":8,"col":2}},{"cursor":{"row":9,"col":12},"anchor":{"row":9,"col":2}},{"cursor":{"row":10,"col":13},"anchor":{"row":10,"col":2}},{"cursor":{"row":11,"col":13},"anchor":{"row":11,"col":2}}],"primary":0}
+{"name":"golf-enumerate-and-align-08","text":"[\n { rank: 1, word: \"a\", count: 2565 },\n { rank: 2, word: \"and\", count: 1777 },\n { rank: 3, word: \"of\", count: 1331 },\n { rank: 4, word: \"that\", count: 1263 },\n { rank: 5, word: \"to\", count: 1030 },\n { rank: 6, word: \"in\", count: 1027 },\n { rank: 7, word: \"it\", count: 754 },\n { rank: 8, word: \"as\", count: 730 },\n { rank: 9, word: \"was\", count: 687 },\n { rank: 10, word: \"you\", count: 652 },\n { rank: 11, word: \"for\", count: 630 },\n];\n","mode":"normal","cursor":{"row":1,"col":11},"anchor":{"row":1,"col":2},"sels":[{"cursor":{"row":1,"col":11},"anchor":{"row":1,"col":2}},{"cursor":{"row":2,"col":11},"anchor":{"row":2,"col":2}},{"cursor":{"row":3,"col":11},"anchor":{"row":3,"col":2}},{"cursor":{"row":4,"col":11},"anchor":{"row":4,"col":2}},{"cursor":{"row":5,"col":11},"anchor":{"row":5,"col":2}},{"cursor":{"row":6,"col":11},"anchor":{"row":6,"col":2}},{"cursor":{"row":7,"col":11},"anchor":{"row":7,"col":2}},{"cursor":{"row":8,"col":11},"anchor":{"row":8,"col":2}},{"cursor":{"row":9,"col":11},"anchor":{"row":9,"col":2}},{"cursor":{"row":10,"col":12},"anchor":{"row":10,"col":2}},{"cursor":{"row":11,"col":12},"anchor":{"row":11,"col":2}}],"primary":0}
+{"name":"golf-enumerate-and-align-09","text":"[\n { rank: 1, word: \"a\", count: 2565 },\n { rank: 2, word: \"and\", count: 1777 },\n { rank: 3, word: \"of\", count: 1331 },\n { rank: 4, word: \"that\", count: 1263 },\n { rank: 5, word: \"to\", count: 1030 },\n { rank: 6, word: \"in\", count: 1027 },\n { rank: 7, word: \"it\", count: 754 },\n { rank: 8, word: \"as\", count: 730 },\n { rank: 9, word: \"was\", count: 687 },\n { rank: 10, word: \"you\", count: 652 },\n { rank: 11, word: \"for\", count: 630 },\n];\n","mode":"normal","cursor":{"row":12,"col":2},"anchor":{"row":0,"col":0}}
+{"name":"golf-enumerate-and-align-10","text":"[\n { rank: 1, word: \"a\", count: 2565 },\n { rank: 2, word: \"and\", count: 1777 },\n { rank: 3, word: \"of\", count: 1331 },\n { rank: 4, word: \"that\", count: 1263 },\n { rank: 5, word: \"to\", count: 1030 },\n { rank: 6, word: \"in\", count: 1027 },\n { rank: 7, word: \"it\", count: 754 },\n { rank: 8, word: \"as\", count: 730 },\n { rank: 9, word: \"was\", count: 687 },\n { rank: 10, word: \"you\", count: 652 },\n { rank: 11, word: \"for\", count: 630 },\n];\n","mode":"normal","cursor":{"row":1,"col":0},"anchor":{"row":1,"col":0},"sels":[{"cursor":{"row":1,"col":0},"anchor":{"row":1,"col":0}},{"cursor":{"row":1,"col":1},"anchor":{"row":1,"col":1}},{"cursor":{"row":1,"col":3},"anchor":{"row":1,"col":3}},{"cursor":{"row":1,"col":9},"anchor":{"row":1,"col":9}},{"cursor":{"row":1,"col":10},"anchor":{"row":1,"col":10}},{"cursor":{"row":1,"col":12},"anchor":{"row":1,"col":12}},{"cursor":{"row":1,"col":18},"anchor":{"row":1,"col":18}},{"cursor":{"row":1,"col":23},"anchor":{"row":1,"col":23}},{"cursor":{"row":1,"col":30},"anchor":{"row":1,"col":30}},{"cursor":{"row":1,"col":34},"anchor":{"row":1,"col":31}},{"cursor":{"row":1,"col":35},"anchor":{"row":1,"col":35}},{"cursor":{"row":2,"col":0},"anchor":{"row":2,"col":0}},{"cursor":{"row":2,"col":1},"anchor":{"row":2,"col":1}},{"cursor":{"row":2,"col":3},"anchor":{"row":2,"col":3}},{"cursor":{"row":2,"col":9},"anchor":{"row":2,"col":9}},{"cursor":{"row":2,"col":10},"anchor":{"row":2,"col":10}},{"cursor":{"row":2,"col":12},"anchor":{"row":2,"col":12}},{"cursor":{"row":2,"col":18},"anchor":{"row":2,"col":18}},{"cursor":{"row":2,"col":25},"anchor":{"row":2,"col":25}},{"cursor":{"row":2,"col":32},"anchor":{"row":2,"col":32}},{"cursor":{"row":2,"col":36},"anchor":{"row":2,"col":33}},{"cursor":{"row":2,"col":37},"anchor":{"row":2,"col":37}},{"cursor":{"row":3,"col":0},"anchor":{"row":3,"col":0}},{"cursor":{"row":3,"col":1},"anchor":{"row":3,"col":1}},{"cursor":{"row":3,"col":3},"anchor":{"row":3,"col":3}},{"cursor":{"row":3,"col":9},"anchor":{"row":3,"col":9}},{"cursor":{"row":3,"col":10},"anchor":{"row":3,"col":10}},{"cursor":{"row":3,"col":12},"anchor":{"row":3,"col":12}},{"cursor":{"row":3,"col":18},"anchor":{"row":3,"col":18}},{"cursor":{"row":3,"col":24},"anchor":{"row":3,"col":24}},{"cursor":{"row":3,"col":31},"anchor":{"row":3,"col":31}},{"cursor":{"row":3,"col":35},"anchor":{"row":3,"col":32}},{"cursor":{"row":3,"col":36},"anchor":{"row":3,"col":36}},{"cursor":{"row":4,"col":0},"anchor":{"row":4,"col":0}},{"cursor":{"row":4,"col":1},"anchor":{"row":4,"col":1}},{"cursor":{"row":4,"col":3},"anchor":{"row":4,"col":3}},{"cursor":{"row":4,"col":9},"anchor":{"row":4,"col":9}},{"cursor":{"row":4,"col":10},"anchor":{"row":4,"col":10}},{"cursor":{"row":4,"col":12},"anchor":{"row":4,"col":12}},{"cursor":{"row":4,"col":18},"anchor":{"row":4,"col":18}},{"cursor":{"row":4,"col":26},"anchor":{"row":4,"col":26}},{"cursor":{"row":4,"col":33},"anchor":{"row":4,"col":33}},{"cursor":{"row":4,"col":37},"anchor":{"row":4,"col":34}},{"cursor":{"row":4,"col":38},"anchor":{"row":4,"col":38}},{"cursor":{"row":5,"col":0},"anchor":{"row":5,"col":0}},{"cursor":{"row":5,"col":1},"anchor":{"row":5,"col":1}},{"cursor":{"row":5,"col":3},"anchor":{"row":5,"col":3}},{"cursor":{"row":5,"col":9},"anchor":{"row":5,"col":9}},{"cursor":{"row":5,"col":10},"anchor":{"row":5,"col":10}},{"cursor":{"row":5,"col":12},"anchor":{"row":5,"col":12}},{"cursor":{"row":5,"col":18},"anchor":{"row":5,"col":18}},{"cursor":{"row":5,"col":24},"anchor":{"row":5,"col":24}},{"cursor":{"row":5,"col":31},"anchor":{"row":5,"col":31}},{"cursor":{"row":5,"col":35},"anchor":{"row":5,"col":32}},{"cursor":{"row":5,"col":36},"anchor":{"row":5,"col":36}},{"cursor":{"row":6,"col":0},"anchor":{"row":6,"col":0}},{"cursor":{"row":6,"col":1},"anchor":{"row":6,"col":1}},{"cursor":{"row":6,"col":3},"anchor":{"row":6,"col":3}},{"cursor":{"row":6,"col":9},"anchor":{"row":6,"col":9}},{"cursor":{"row":6,"col":10},"anchor":{"row":6,"col":10}},{"cursor":{"row":6,"col":12},"anchor":{"row":6,"col":12}},{"cursor":{"row":6,"col":18},"anchor":{"row":6,"col":18}},{"cursor":{"row":6,"col":24},"anchor":{"row":6,"col":24}},{"cursor":{"row":6,"col":31},"anchor":{"row":6,"col":31}},{"cursor":{"row":6,"col":35},"anchor":{"row":6,"col":32}},{"cursor":{"row":6,"col":36},"anchor":{"row":6,"col":36}},{"cursor":{"row":7,"col":0},"anchor":{"row":7,"col":0}},{"cursor":{"row":7,"col":1},"anchor":{"row":7,"col":1}},{"cursor":{"row":7,"col":3},"anchor":{"row":7,"col":3}},{"cursor":{"row":7,"col":9},"anchor":{"row":7,"col":9}},{"cursor":{"row":7,"col":10},"anchor":{"row":7,"col":10}},{"cursor":{"row":7,"col":12},"anchor":{"row":7,"col":12}},{"cursor":{"row":7,"col":18},"anchor":{"row":7,"col":18}},{"cursor":{"row":7,"col":24},"anchor":{"row":7,"col":24}},{"cursor":{"row":7,"col":31},"anchor":{"row":7,"col":31}},{"cursor":{"row":7,"col":34},"anchor":{"row":7,"col":32}},{"cursor":{"row":7,"col":35},"anchor":{"row":7,"col":35}},{"cursor":{"row":8,"col":0},"anchor":{"row":8,"col":0}},{"cursor":{"row":8,"col":1},"anchor":{"row":8,"col":1}},{"cursor":{"row":8,"col":3},"anchor":{"row":8,"col":3}},{"cursor":{"row":8,"col":9},"anchor":{"row":8,"col":9}},{"cursor":{"row":8,"col":10},"anchor":{"row":8,"col":10}},{"cursor":{"row":8,"col":12},"anchor":{"row":8,"col":12}},{"cursor":{"row":8,"col":18},"anchor":{"row":8,"col":18}},{"cursor":{"row":8,"col":24},"anchor":{"row":8,"col":24}},{"cursor":{"row":8,"col":31},"anchor":{"row":8,"col":31}},{"cursor":{"row":8,"col":34},"anchor":{"row":8,"col":32}},{"cursor":{"row":8,"col":35},"anchor":{"row":8,"col":35}},{"cursor":{"row":9,"col":0},"anchor":{"row":9,"col":0}},{"cursor":{"row":9,"col":1},"anchor":{"row":9,"col":1}},{"cursor":{"row":9,"col":3},"anchor":{"row":9,"col":3}},{"cursor":{"row":9,"col":9},"anchor":{"row":9,"col":9}},{"cursor":{"row":9,"col":10},"anchor":{"row":9,"col":10}},{"cursor":{"row":9,"col":12},"anchor":{"row":9,"col":12}},{"cursor":{"row":9,"col":18},"anchor":{"row":9,"col":18}},{"cursor":{"row":9,"col":25},"anchor":{"row":9,"col":25}},{"cursor":{"row":9,"col":32},"anchor":{"row":9,"col":32}},{"cursor":{"row":9,"col":35},"anchor":{"row":9,"col":33}},{"cursor":{"row":9,"col":36},"anchor":{"row":9,"col":36}},{"cursor":{"row":10,"col":0},"anchor":{"row":10,"col":0}},{"cursor":{"row":10,"col":1},"anchor":{"row":10,"col":1}},{"cursor":{"row":10,"col":3},"anchor":{"row":10,"col":3}},{"cursor":{"row":10,"col":9},"anchor":{"row":10,"col":9}},{"cursor":{"row":10,"col":11},"anchor":{"row":10,"col":10}},{"cursor":{"row":10,"col":13},"anchor":{"row":10,"col":13}},{"cursor":{"row":10,"col":19},"anchor":{"row":10,"col":19}},{"cursor":{"row":10,"col":26},"anchor":{"row":10,"col":26}},{"cursor":{"row":10,"col":33},"anchor":{"row":10,"col":33}},{"cursor":{"row":10,"col":36},"anchor":{"row":10,"col":34}},{"cursor":{"row":10,"col":37},"anchor":{"row":10,"col":37}},{"cursor":{"row":11,"col":0},"anchor":{"row":11,"col":0}},{"cursor":{"row":11,"col":1},"anchor":{"row":11,"col":1}},{"cursor":{"row":11,"col":3},"anchor":{"row":11,"col":3}},{"cursor":{"row":11,"col":9},"anchor":{"row":11,"col":9}},{"cursor":{"row":11,"col":11},"anchor":{"row":11,"col":10}},{"cursor":{"row":11,"col":13},"anchor":{"row":11,"col":13}},{"cursor":{"row":11,"col":19},"anchor":{"row":11,"col":19}},{"cursor":{"row":11,"col":26},"anchor":{"row":11,"col":26}},{"cursor":{"row":11,"col":33},"anchor":{"row":11,"col":33}},{"cursor":{"row":11,"col":36},"anchor":{"row":11,"col":34}},{"cursor":{"row":11,"col":37},"anchor":{"row":11,"col":37}}],"primary":0}
+{"name":"golf-enumerate-and-align","text":"[\n { rank: 1, word: \"a\", count: 2565 },\n { rank: 2, word: \"and\", count: 1777 },\n { rank: 3, word: \"of\", count: 1331 },\n { rank: 4, word: \"that\", count: 1263 },\n { rank: 5, word: \"to\", count: 1030 },\n { rank: 6, word: \"in\", count: 1027 },\n { rank: 7, word: \"it\", count: 754 },\n { rank: 8, word: \"as\", count: 730 },\n { rank: 9, word: \"was\", count: 687 },\n { rank: 10, word: \"you\", count: 652 },\n { rank: 11, word: \"for\", count: 630 },\n];\n","mode":"normal","cursor":{"row":1,"col":0},"anchor":{"row":1,"col":0},"sels":[{"cursor":{"row":1,"col":0},"anchor":{"row":1,"col":0}},{"cursor":{"row":1,"col":1},"anchor":{"row":1,"col":1}},{"cursor":{"row":1,"col":3},"anchor":{"row":1,"col":3}},{"cursor":{"row":1,"col":9},"anchor":{"row":1,"col":9}},{"cursor":{"row":1,"col":11},"anchor":{"row":1,"col":11}},{"cursor":{"row":1,"col":13},"anchor":{"row":1,"col":13}},{"cursor":{"row":1,"col":19},"anchor":{"row":1,"col":19}},{"cursor":{"row":1,"col":27},"anchor":{"row":1,"col":27}},{"cursor":{"row":1,"col":34},"anchor":{"row":1,"col":34}},{"cursor":{"row":1,"col":38},"anchor":{"row":1,"col":35}},{"cursor":{"row":1,"col":39},"anchor":{"row":1,"col":39}},{"cursor":{"row":2,"col":0},"anchor":{"row":2,"col":0}},{"cursor":{"row":2,"col":1},"anchor":{"row":2,"col":1}},{"cursor":{"row":2,"col":3},"anchor":{"row":2,"col":3}},{"cursor":{"row":2,"col":9},"anchor":{"row":2,"col":9}},{"cursor":{"row":2,"col":11},"anchor":{"row":2,"col":11}},{"cursor":{"row":2,"col":13},"anchor":{"row":2,"col":13}},{"cursor":{"row":2,"col":19},"anchor":{"row":2,"col":19}},{"cursor":{"row":2,"col":27},"anchor":{"row":2,"col":27}},{"cursor":{"row":2,"col":34},"anchor":{"row":2,"col":34}},{"cursor":{"row":2,"col":38},"anchor":{"row":2,"col":35}},{"cursor":{"row":2,"col":39},"anchor":{"row":2,"col":39}},{"cursor":{"row":3,"col":0},"anchor":{"row":3,"col":0}},{"cursor":{"row":3,"col":1},"anchor":{"row":3,"col":1}},{"cursor":{"row":3,"col":3},"anchor":{"row":3,"col":3}},{"cursor":{"row":3,"col":9},"anchor":{"row":3,"col":9}},{"cursor":{"row":3,"col":11},"anchor":{"row":3,"col":11}},{"cursor":{"row":3,"col":13},"anchor":{"row":3,"col":13}},{"cursor":{"row":3,"col":19},"anchor":{"row":3,"col":19}},{"cursor":{"row":3,"col":27},"anchor":{"row":3,"col":27}},{"cursor":{"row":3,"col":34},"anchor":{"row":3,"col":34}},{"cursor":{"row":3,"col":38},"anchor":{"row":3,"col":35}},{"cursor":{"row":3,"col":39},"anchor":{"row":3,"col":39}},{"cursor":{"row":4,"col":0},"anchor":{"row":4,"col":0}},{"cursor":{"row":4,"col":1},"anchor":{"row":4,"col":1}},{"cursor":{"row":4,"col":3},"anchor":{"row":4,"col":3}},{"cursor":{"row":4,"col":9},"anchor":{"row":4,"col":9}},{"cursor":{"row":4,"col":11},"anchor":{"row":4,"col":11}},{"cursor":{"row":4,"col":13},"anchor":{"row":4,"col":13}},{"cursor":{"row":4,"col":19},"anchor":{"row":4,"col":19}},{"cursor":{"row":4,"col":27},"anchor":{"row":4,"col":27}},{"cursor":{"row":4,"col":34},"anchor":{"row":4,"col":34}},{"cursor":{"row":4,"col":38},"anchor":{"row":4,"col":35}},{"cursor":{"row":4,"col":39},"anchor":{"row":4,"col":39}},{"cursor":{"row":5,"col":0},"anchor":{"row":5,"col":0}},{"cursor":{"row":5,"col":1},"anchor":{"row":5,"col":1}},{"cursor":{"row":5,"col":3},"anchor":{"row":5,"col":3}},{"cursor":{"row":5,"col":9},"anchor":{"row":5,"col":9}},{"cursor":{"row":5,"col":11},"anchor":{"row":5,"col":11}},{"cursor":{"row":5,"col":13},"anchor":{"row":5,"col":13}},{"cursor":{"row":5,"col":19},"anchor":{"row":5,"col":19}},{"cursor":{"row":5,"col":27},"anchor":{"row":5,"col":27}},{"cursor":{"row":5,"col":34},"anchor":{"row":5,"col":34}},{"cursor":{"row":5,"col":38},"anchor":{"row":5,"col":35}},{"cursor":{"row":5,"col":39},"anchor":{"row":5,"col":39}},{"cursor":{"row":6,"col":0},"anchor":{"row":6,"col":0}},{"cursor":{"row":6,"col":1},"anchor":{"row":6,"col":1}},{"cursor":{"row":6,"col":3},"anchor":{"row":6,"col":3}},{"cursor":{"row":6,"col":9},"anchor":{"row":6,"col":9}},{"cursor":{"row":6,"col":11},"anchor":{"row":6,"col":11}},{"cursor":{"row":6,"col":13},"anchor":{"row":6,"col":13}},{"cursor":{"row":6,"col":19},"anchor":{"row":6,"col":19}},{"cursor":{"row":6,"col":27},"anchor":{"row":6,"col":27}},{"cursor":{"row":6,"col":34},"anchor":{"row":6,"col":34}},{"cursor":{"row":6,"col":38},"anchor":{"row":6,"col":35}},{"cursor":{"row":6,"col":39},"anchor":{"row":6,"col":39}},{"cursor":{"row":7,"col":0},"anchor":{"row":7,"col":0}},{"cursor":{"row":7,"col":1},"anchor":{"row":7,"col":1}},{"cursor":{"row":7,"col":3},"anchor":{"row":7,"col":3}},{"cursor":{"row":7,"col":9},"anchor":{"row":7,"col":9}},{"cursor":{"row":7,"col":11},"anchor":{"row":7,"col":11}},{"cursor":{"row":7,"col":13},"anchor":{"row":7,"col":13}},{"cursor":{"row":7,"col":19},"anchor":{"row":7,"col":19}},{"cursor":{"row":7,"col":27},"anchor":{"row":7,"col":27}},{"cursor":{"row":7,"col":34},"anchor":{"row":7,"col":34}},{"cursor":{"row":7,"col":38},"anchor":{"row":7,"col":36}},{"cursor":{"row":7,"col":39},"anchor":{"row":7,"col":39}},{"cursor":{"row":8,"col":0},"anchor":{"row":8,"col":0}},{"cursor":{"row":8,"col":1},"anchor":{"row":8,"col":1}},{"cursor":{"row":8,"col":3},"anchor":{"row":8,"col":3}},{"cursor":{"row":8,"col":9},"anchor":{"row":8,"col":9}},{"cursor":{"row":8,"col":11},"anchor":{"row":8,"col":11}},{"cursor":{"row":8,"col":13},"anchor":{"row":8,"col":13}},{"cursor":{"row":8,"col":19},"anchor":{"row":8,"col":19}},{"cursor":{"row":8,"col":27},"anchor":{"row":8,"col":27}},{"cursor":{"row":8,"col":34},"anchor":{"row":8,"col":34}},{"cursor":{"row":8,"col":38},"anchor":{"row":8,"col":36}},{"cursor":{"row":8,"col":39},"anchor":{"row":8,"col":39}},{"cursor":{"row":9,"col":0},"anchor":{"row":9,"col":0}},{"cursor":{"row":9,"col":1},"anchor":{"row":9,"col":1}},{"cursor":{"row":9,"col":3},"anchor":{"row":9,"col":3}},{"cursor":{"row":9,"col":9},"anchor":{"row":9,"col":9}},{"cursor":{"row":9,"col":11},"anchor":{"row":9,"col":11}},{"cursor":{"row":9,"col":13},"anchor":{"row":9,"col":13}},{"cursor":{"row":9,"col":19},"anchor":{"row":9,"col":19}},{"cursor":{"row":9,"col":27},"anchor":{"row":9,"col":27}},{"cursor":{"row":9,"col":34},"anchor":{"row":9,"col":34}},{"cursor":{"row":9,"col":38},"anchor":{"row":9,"col":36}},{"cursor":{"row":9,"col":39},"anchor":{"row":9,"col":39}},{"cursor":{"row":10,"col":0},"anchor":{"row":10,"col":0}},{"cursor":{"row":10,"col":1},"anchor":{"row":10,"col":1}},{"cursor":{"row":10,"col":3},"anchor":{"row":10,"col":3}},{"cursor":{"row":10,"col":9},"anchor":{"row":10,"col":9}},{"cursor":{"row":10,"col":11},"anchor":{"row":10,"col":10}},{"cursor":{"row":10,"col":13},"anchor":{"row":10,"col":13}},{"cursor":{"row":10,"col":19},"anchor":{"row":10,"col":19}},{"cursor":{"row":10,"col":27},"anchor":{"row":10,"col":27}},{"cursor":{"row":10,"col":34},"anchor":{"row":10,"col":34}},{"cursor":{"row":10,"col":38},"anchor":{"row":10,"col":36}},{"cursor":{"row":10,"col":39},"anchor":{"row":10,"col":39}},{"cursor":{"row":11,"col":0},"anchor":{"row":11,"col":0}},{"cursor":{"row":11,"col":1},"anchor":{"row":11,"col":1}},{"cursor":{"row":11,"col":3},"anchor":{"row":11,"col":3}},{"cursor":{"row":11,"col":9},"anchor":{"row":11,"col":9}},{"cursor":{"row":11,"col":11},"anchor":{"row":11,"col":10}},{"cursor":{"row":11,"col":13},"anchor":{"row":11,"col":13}},{"cursor":{"row":11,"col":19},"anchor":{"row":11,"col":19}},{"cursor":{"row":11,"col":27},"anchor":{"row":11,"col":27}},{"cursor":{"row":11,"col":34},"anchor":{"row":11,"col":34}},{"cursor":{"row":11,"col":38},"anchor":{"row":11,"col":36}},{"cursor":{"row":11,"col":39},"anchor":{"row":11,"col":39}}],"primary":0}
+{"name":"golf-enumerate-and-align-from09-09","text":"[\n { rank: 1, word: \"a\", count: 2565 },\n { rank: 2, word: \"and\", count: 1777 },\n { rank: 3, word: \"of\", count: 1331 },\n { rank: 4, word: \"that\", count: 1263 },\n { rank: 5, word: \"to\", count: 1030 },\n { rank: 6, word: \"in\", count: 1027 },\n { rank: 7, word: \"it\", count: 754 },\n { rank: 8, word: \"as\", count: 730 },\n { rank: 9, word: \"was\", count: 687 },\n { rank: 10, word: \"you\", count: 652 },\n { rank: 11, word: \"for\", count: 630 },\n];\n","mode":"normal","cursor":{"row":12,"col":2},"anchor":{"row":0,"col":0}}
+{"name":"golf-enumerate-and-align-from09-10","text":"[\n { rank: 1, word: \"a\", count: 2565 },\n { rank: 2, word: \"and\", count: 1777 },\n { rank: 3, word: \"of\", count: 1331 },\n { rank: 4, word: \"that\", count: 1263 },\n { rank: 5, word: \"to\", count: 1030 },\n { rank: 6, word: \"in\", count: 1027 },\n { rank: 7, word: \"it\", count: 754 },\n { rank: 8, word: \"as\", count: 730 },\n { rank: 9, word: \"was\", count: 687 },\n { rank: 10, word: \"you\", count: 652 },\n { rank: 11, word: \"for\", count: 630 },\n];\n","mode":"normal","cursor":{"row":1,"col":0},"anchor":{"row":1,"col":0},"sels":[{"cursor":{"row":1,"col":0},"anchor":{"row":1,"col":0}},{"cursor":{"row":1,"col":1},"anchor":{"row":1,"col":1}},{"cursor":{"row":1,"col":3},"anchor":{"row":1,"col":3}},{"cursor":{"row":1,"col":9},"anchor":{"row":1,"col":9}},{"cursor":{"row":1,"col":10},"anchor":{"row":1,"col":10}},{"cursor":{"row":1,"col":12},"anchor":{"row":1,"col":12}},{"cursor":{"row":1,"col":18},"anchor":{"row":1,"col":18}},{"cursor":{"row":1,"col":23},"anchor":{"row":1,"col":23}},{"cursor":{"row":1,"col":30},"anchor":{"row":1,"col":30}},{"cursor":{"row":1,"col":34},"anchor":{"row":1,"col":31}},{"cursor":{"row":1,"col":35},"anchor":{"row":1,"col":35}},{"cursor":{"row":2,"col":0},"anchor":{"row":2,"col":0}},{"cursor":{"row":2,"col":1},"anchor":{"row":2,"col":1}},{"cursor":{"row":2,"col":3},"anchor":{"row":2,"col":3}},{"cursor":{"row":2,"col":9},"anchor":{"row":2,"col":9}},{"cursor":{"row":2,"col":10},"anchor":{"row":2,"col":10}},{"cursor":{"row":2,"col":12},"anchor":{"row":2,"col":12}},{"cursor":{"row":2,"col":18},"anchor":{"row":2,"col":18}},{"cursor":{"row":2,"col":25},"anchor":{"row":2,"col":25}},{"cursor":{"row":2,"col":32},"anchor":{"row":2,"col":32}},{"cursor":{"row":2,"col":36},"anchor":{"row":2,"col":33}},{"cursor":{"row":2,"col":37},"anchor":{"row":2,"col":37}},{"cursor":{"row":3,"col":0},"anchor":{"row":3,"col":0}},{"cursor":{"row":3,"col":1},"anchor":{"row":3,"col":1}},{"cursor":{"row":3,"col":3},"anchor":{"row":3,"col":3}},{"cursor":{"row":3,"col":9},"anchor":{"row":3,"col":9}},{"cursor":{"row":3,"col":10},"anchor":{"row":3,"col":10}},{"cursor":{"row":3,"col":12},"anchor":{"row":3,"col":12}},{"cursor":{"row":3,"col":18},"anchor":{"row":3,"col":18}},{"cursor":{"row":3,"col":24},"anchor":{"row":3,"col":24}},{"cursor":{"row":3,"col":31},"anchor":{"row":3,"col":31}},{"cursor":{"row":3,"col":35},"anchor":{"row":3,"col":32}},{"cursor":{"row":3,"col":36},"anchor":{"row":3,"col":36}},{"cursor":{"row":4,"col":0},"anchor":{"row":4,"col":0}},{"cursor":{"row":4,"col":1},"anchor":{"row":4,"col":1}},{"cursor":{"row":4,"col":3},"anchor":{"row":4,"col":3}},{"cursor":{"row":4,"col":9},"anchor":{"row":4,"col":9}},{"cursor":{"row":4,"col":10},"anchor":{"row":4,"col":10}},{"cursor":{"row":4,"col":12},"anchor":{"row":4,"col":12}},{"cursor":{"row":4,"col":18},"anchor":{"row":4,"col":18}},{"cursor":{"row":4,"col":26},"anchor":{"row":4,"col":26}},{"cursor":{"row":4,"col":33},"anchor":{"row":4,"col":33}},{"cursor":{"row":4,"col":37},"anchor":{"row":4,"col":34}},{"cursor":{"row":4,"col":38},"anchor":{"row":4,"col":38}},{"cursor":{"row":5,"col":0},"anchor":{"row":5,"col":0}},{"cursor":{"row":5,"col":1},"anchor":{"row":5,"col":1}},{"cursor":{"row":5,"col":3},"anchor":{"row":5,"col":3}},{"cursor":{"row":5,"col":9},"anchor":{"row":5,"col":9}},{"cursor":{"row":5,"col":10},"anchor":{"row":5,"col":10}},{"cursor":{"row":5,"col":12},"anchor":{"row":5,"col":12}},{"cursor":{"row":5,"col":18},"anchor":{"row":5,"col":18}},{"cursor":{"row":5,"col":24},"anchor":{"row":5,"col":24}},{"cursor":{"row":5,"col":31},"anchor":{"row":5,"col":31}},{"cursor":{"row":5,"col":35},"anchor":{"row":5,"col":32}},{"cursor":{"row":5,"col":36},"anchor":{"row":5,"col":36}},{"cursor":{"row":6,"col":0},"anchor":{"row":6,"col":0}},{"cursor":{"row":6,"col":1},"anchor":{"row":6,"col":1}},{"cursor":{"row":6,"col":3},"anchor":{"row":6,"col":3}},{"cursor":{"row":6,"col":9},"anchor":{"row":6,"col":9}},{"cursor":{"row":6,"col":10},"anchor":{"row":6,"col":10}},{"cursor":{"row":6,"col":12},"anchor":{"row":6,"col":12}},{"cursor":{"row":6,"col":18},"anchor":{"row":6,"col":18}},{"cursor":{"row":6,"col":24},"anchor":{"row":6,"col":24}},{"cursor":{"row":6,"col":31},"anchor":{"row":6,"col":31}},{"cursor":{"row":6,"col":35},"anchor":{"row":6,"col":32}},{"cursor":{"row":6,"col":36},"anchor":{"row":6,"col":36}},{"cursor":{"row":7,"col":0},"anchor":{"row":7,"col":0}},{"cursor":{"row":7,"col":1},"anchor":{"row":7,"col":1}},{"cursor":{"row":7,"col":3},"anchor":{"row":7,"col":3}},{"cursor":{"row":7,"col":9},"anchor":{"row":7,"col":9}},{"cursor":{"row":7,"col":10},"anchor":{"row":7,"col":10}},{"cursor":{"row":7,"col":12},"anchor":{"row":7,"col":12}},{"cursor":{"row":7,"col":18},"anchor":{"row":7,"col":18}},{"cursor":{"row":7,"col":24},"anchor":{"row":7,"col":24}},{"cursor":{"row":7,"col":31},"anchor":{"row":7,"col":31}},{"cursor":{"row":7,"col":34},"anchor":{"row":7,"col":32}},{"cursor":{"row":7,"col":35},"anchor":{"row":7,"col":35}},{"cursor":{"row":8,"col":0},"anchor":{"row":8,"col":0}},{"cursor":{"row":8,"col":1},"anchor":{"row":8,"col":1}},{"cursor":{"row":8,"col":3},"anchor":{"row":8,"col":3}},{"cursor":{"row":8,"col":9},"anchor":{"row":8,"col":9}},{"cursor":{"row":8,"col":10},"anchor":{"row":8,"col":10}},{"cursor":{"row":8,"col":12},"anchor":{"row":8,"col":12}},{"cursor":{"row":8,"col":18},"anchor":{"row":8,"col":18}},{"cursor":{"row":8,"col":24},"anchor":{"row":8,"col":24}},{"cursor":{"row":8,"col":31},"anchor":{"row":8,"col":31}},{"cursor":{"row":8,"col":34},"anchor":{"row":8,"col":32}},{"cursor":{"row":8,"col":35},"anchor":{"row":8,"col":35}},{"cursor":{"row":9,"col":0},"anchor":{"row":9,"col":0}},{"cursor":{"row":9,"col":1},"anchor":{"row":9,"col":1}},{"cursor":{"row":9,"col":3},"anchor":{"row":9,"col":3}},{"cursor":{"row":9,"col":9},"anchor":{"row":9,"col":9}},{"cursor":{"row":9,"col":10},"anchor":{"row":9,"col":10}},{"cursor":{"row":9,"col":12},"anchor":{"row":9,"col":12}},{"cursor":{"row":9,"col":18},"anchor":{"row":9,"col":18}},{"cursor":{"row":9,"col":25},"anchor":{"row":9,"col":25}},{"cursor":{"row":9,"col":32},"anchor":{"row":9,"col":32}},{"cursor":{"row":9,"col":35},"anchor":{"row":9,"col":33}},{"cursor":{"row":9,"col":36},"anchor":{"row":9,"col":36}},{"cursor":{"row":10,"col":0},"anchor":{"row":10,"col":0}},{"cursor":{"row":10,"col":1},"anchor":{"row":10,"col":1}},{"cursor":{"row":10,"col":3},"anchor":{"row":10,"col":3}},{"cursor":{"row":10,"col":9},"anchor":{"row":10,"col":9}},{"cursor":{"row":10,"col":11},"anchor":{"row":10,"col":10}},{"cursor":{"row":10,"col":13},"anchor":{"row":10,"col":13}},{"cursor":{"row":10,"col":19},"anchor":{"row":10,"col":19}},{"cursor":{"row":10,"col":26},"anchor":{"row":10,"col":26}},{"cursor":{"row":10,"col":33},"anchor":{"row":10,"col":33}},{"cursor":{"row":10,"col":36},"anchor":{"row":10,"col":34}},{"cursor":{"row":10,"col":37},"anchor":{"row":10,"col":37}},{"cursor":{"row":11,"col":0},"anchor":{"row":11,"col":0}},{"cursor":{"row":11,"col":1},"anchor":{"row":11,"col":1}},{"cursor":{"row":11,"col":3},"anchor":{"row":11,"col":3}},{"cursor":{"row":11,"col":9},"anchor":{"row":11,"col":9}},{"cursor":{"row":11,"col":11},"anchor":{"row":11,"col":10}},{"cursor":{"row":11,"col":13},"anchor":{"row":11,"col":13}},{"cursor":{"row":11,"col":19},"anchor":{"row":11,"col":19}},{"cursor":{"row":11,"col":26},"anchor":{"row":11,"col":26}},{"cursor":{"row":11,"col":33},"anchor":{"row":11,"col":33}},{"cursor":{"row":11,"col":36},"anchor":{"row":11,"col":34}},{"cursor":{"row":11,"col":37},"anchor":{"row":11,"col":37}}],"primary":0}
+{"name":"golf-enumerate-and-align-from09","text":"[\n { rank: 1, word: \"a\", count: 2565 },\n { rank: 2, word: \"and\", count: 1777 },\n { rank: 3, word: \"of\", count: 1331 },\n { rank: 4, word: \"that\", count: 1263 },\n { rank: 5, word: \"to\", count: 1030 },\n { rank: 6, word: \"in\", count: 1027 },\n { rank: 7, word: \"it\", count: 754 },\n { rank: 8, word: \"as\", count: 730 },\n { rank: 9, word: \"was\", count: 687 },\n { rank: 10, word: \"you\", count: 652 },\n { rank: 11, word: \"for\", count: 630 },\n];\n","mode":"normal","cursor":{"row":1,"col":0},"anchor":{"row":1,"col":0},"sels":[{"cursor":{"row":1,"col":0},"anchor":{"row":1,"col":0}},{"cursor":{"row":1,"col":1},"anchor":{"row":1,"col":1}},{"cursor":{"row":1,"col":3},"anchor":{"row":1,"col":3}},{"cursor":{"row":1,"col":9},"anchor":{"row":1,"col":9}},{"cursor":{"row":1,"col":11},"anchor":{"row":1,"col":11}},{"cursor":{"row":1,"col":13},"anchor":{"row":1,"col":13}},{"cursor":{"row":1,"col":19},"anchor":{"row":1,"col":19}},{"cursor":{"row":1,"col":27},"anchor":{"row":1,"col":27}},{"cursor":{"row":1,"col":34},"anchor":{"row":1,"col":34}},{"cursor":{"row":1,"col":38},"anchor":{"row":1,"col":35}},{"cursor":{"row":1,"col":39},"anchor":{"row":1,"col":39}},{"cursor":{"row":2,"col":0},"anchor":{"row":2,"col":0}},{"cursor":{"row":2,"col":1},"anchor":{"row":2,"col":1}},{"cursor":{"row":2,"col":3},"anchor":{"row":2,"col":3}},{"cursor":{"row":2,"col":9},"anchor":{"row":2,"col":9}},{"cursor":{"row":2,"col":11},"anchor":{"row":2,"col":11}},{"cursor":{"row":2,"col":13},"anchor":{"row":2,"col":13}},{"cursor":{"row":2,"col":19},"anchor":{"row":2,"col":19}},{"cursor":{"row":2,"col":27},"anchor":{"row":2,"col":27}},{"cursor":{"row":2,"col":34},"anchor":{"row":2,"col":34}},{"cursor":{"row":2,"col":38},"anchor":{"row":2,"col":35}},{"cursor":{"row":2,"col":39},"anchor":{"row":2,"col":39}},{"cursor":{"row":3,"col":0},"anchor":{"row":3,"col":0}},{"cursor":{"row":3,"col":1},"anchor":{"row":3,"col":1}},{"cursor":{"row":3,"col":3},"anchor":{"row":3,"col":3}},{"cursor":{"row":3,"col":9},"anchor":{"row":3,"col":9}},{"cursor":{"row":3,"col":11},"anchor":{"row":3,"col":11}},{"cursor":{"row":3,"col":13},"anchor":{"row":3,"col":13}},{"cursor":{"row":3,"col":19},"anchor":{"row":3,"col":19}},{"cursor":{"row":3,"col":27},"anchor":{"row":3,"col":27}},{"cursor":{"row":3,"col":34},"anchor":{"row":3,"col":34}},{"cursor":{"row":3,"col":38},"anchor":{"row":3,"col":35}},{"cursor":{"row":3,"col":39},"anchor":{"row":3,"col":39}},{"cursor":{"row":4,"col":0},"anchor":{"row":4,"col":0}},{"cursor":{"row":4,"col":1},"anchor":{"row":4,"col":1}},{"cursor":{"row":4,"col":3},"anchor":{"row":4,"col":3}},{"cursor":{"row":4,"col":9},"anchor":{"row":4,"col":9}},{"cursor":{"row":4,"col":11},"anchor":{"row":4,"col":11}},{"cursor":{"row":4,"col":13},"anchor":{"row":4,"col":13}},{"cursor":{"row":4,"col":19},"anchor":{"row":4,"col":19}},{"cursor":{"row":4,"col":27},"anchor":{"row":4,"col":27}},{"cursor":{"row":4,"col":34},"anchor":{"row":4,"col":34}},{"cursor":{"row":4,"col":38},"anchor":{"row":4,"col":35}},{"cursor":{"row":4,"col":39},"anchor":{"row":4,"col":39}},{"cursor":{"row":5,"col":0},"anchor":{"row":5,"col":0}},{"cursor":{"row":5,"col":1},"anchor":{"row":5,"col":1}},{"cursor":{"row":5,"col":3},"anchor":{"row":5,"col":3}},{"cursor":{"row":5,"col":9},"anchor":{"row":5,"col":9}},{"cursor":{"row":5,"col":11},"anchor":{"row":5,"col":11}},{"cursor":{"row":5,"col":13},"anchor":{"row":5,"col":13}},{"cursor":{"row":5,"col":19},"anchor":{"row":5,"col":19}},{"cursor":{"row":5,"col":27},"anchor":{"row":5,"col":27}},{"cursor":{"row":5,"col":34},"anchor":{"row":5,"col":34}},{"cursor":{"row":5,"col":38},"anchor":{"row":5,"col":35}},{"cursor":{"row":5,"col":39},"anchor":{"row":5,"col":39}},{"cursor":{"row":6,"col":0},"anchor":{"row":6,"col":0}},{"cursor":{"row":6,"col":1},"anchor":{"row":6,"col":1}},{"cursor":{"row":6,"col":3},"anchor":{"row":6,"col":3}},{"cursor":{"row":6,"col":9},"anchor":{"row":6,"col":9}},{"cursor":{"row":6,"col":11},"anchor":{"row":6,"col":11}},{"cursor":{"row":6,"col":13},"anchor":{"row":6,"col":13}},{"cursor":{"row":6,"col":19},"anchor":{"row":6,"col":19}},{"cursor":{"row":6,"col":27},"anchor":{"row":6,"col":27}},{"cursor":{"row":6,"col":34},"anchor":{"row":6,"col":34}},{"cursor":{"row":6,"col":38},"anchor":{"row":6,"col":35}},{"cursor":{"row":6,"col":39},"anchor":{"row":6,"col":39}},{"cursor":{"row":7,"col":0},"anchor":{"row":7,"col":0}},{"cursor":{"row":7,"col":1},"anchor":{"row":7,"col":1}},{"cursor":{"row":7,"col":3},"anchor":{"row":7,"col":3}},{"cursor":{"row":7,"col":9},"anchor":{"row":7,"col":9}},{"cursor":{"row":7,"col":11},"anchor":{"row":7,"col":11}},{"cursor":{"row":7,"col":13},"anchor":{"row":7,"col":13}},{"cursor":{"row":7,"col":19},"anchor":{"row":7,"col":19}},{"cursor":{"row":7,"col":27},"anchor":{"row":7,"col":27}},{"cursor":{"row":7,"col":34},"anchor":{"row":7,"col":34}},{"cursor":{"row":7,"col":38},"anchor":{"row":7,"col":36}},{"cursor":{"row":7,"col":39},"anchor":{"row":7,"col":39}},{"cursor":{"row":8,"col":0},"anchor":{"row":8,"col":0}},{"cursor":{"row":8,"col":1},"anchor":{"row":8,"col":1}},{"cursor":{"row":8,"col":3},"anchor":{"row":8,"col":3}},{"cursor":{"row":8,"col":9},"anchor":{"row":8,"col":9}},{"cursor":{"row":8,"col":11},"anchor":{"row":8,"col":11}},{"cursor":{"row":8,"col":13},"anchor":{"row":8,"col":13}},{"cursor":{"row":8,"col":19},"anchor":{"row":8,"col":19}},{"cursor":{"row":8,"col":27},"anchor":{"row":8,"col":27}},{"cursor":{"row":8,"col":34},"anchor":{"row":8,"col":34}},{"cursor":{"row":8,"col":38},"anchor":{"row":8,"col":36}},{"cursor":{"row":8,"col":39},"anchor":{"row":8,"col":39}},{"cursor":{"row":9,"col":0},"anchor":{"row":9,"col":0}},{"cursor":{"row":9,"col":1},"anchor":{"row":9,"col":1}},{"cursor":{"row":9,"col":3},"anchor":{"row":9,"col":3}},{"cursor":{"row":9,"col":9},"anchor":{"row":9,"col":9}},{"cursor":{"row":9,"col":11},"anchor":{"row":9,"col":11}},{"cursor":{"row":9,"col":13},"anchor":{"row":9,"col":13}},{"cursor":{"row":9,"col":19},"anchor":{"row":9,"col":19}},{"cursor":{"row":9,"col":27},"anchor":{"row":9,"col":27}},{"cursor":{"row":9,"col":34},"anchor":{"row":9,"col":34}},{"cursor":{"row":9,"col":38},"anchor":{"row":9,"col":36}},{"cursor":{"row":9,"col":39},"anchor":{"row":9,"col":39}},{"cursor":{"row":10,"col":0},"anchor":{"row":10,"col":0}},{"cursor":{"row":10,"col":1},"anchor":{"row":10,"col":1}},{"cursor":{"row":10,"col":3},"anchor":{"row":10,"col":3}},{"cursor":{"row":10,"col":9},"anchor":{"row":10,"col":9}},{"cursor":{"row":10,"col":11},"anchor":{"row":10,"col":10}},{"cursor":{"row":10,"col":13},"anchor":{"row":10,"col":13}},{"cursor":{"row":10,"col":19},"anchor":{"row":10,"col":19}},{"cursor":{"row":10,"col":27},"anchor":{"row":10,"col":27}},{"cursor":{"row":10,"col":34},"anchor":{"row":10,"col":34}},{"cursor":{"row":10,"col":38},"anchor":{"row":10,"col":36}},{"cursor":{"row":10,"col":39},"anchor":{"row":10,"col":39}},{"cursor":{"row":11,"col":0},"anchor":{"row":11,"col":0}},{"cursor":{"row":11,"col":1},"anchor":{"row":11,"col":1}},{"cursor":{"row":11,"col":3},"anchor":{"row":11,"col":3}},{"cursor":{"row":11,"col":9},"anchor":{"row":11,"col":9}},{"cursor":{"row":11,"col":11},"anchor":{"row":11,"col":10}},{"cursor":{"row":11,"col":13},"anchor":{"row":11,"col":13}},{"cursor":{"row":11,"col":19},"anchor":{"row":11,"col":19}},{"cursor":{"row":11,"col":27},"anchor":{"row":11,"col":27}},{"cursor":{"row":11,"col":34},"anchor":{"row":11,"col":34}},{"cursor":{"row":11,"col":38},"anchor":{"row":11,"col":36}},{"cursor":{"row":11,"col":39},"anchor":{"row":11,"col":39}}],"primary":0}
+{"name":"golf-export-from-mod-01","text":"mod generate_demos;\nmod mdbook_preprocessor;\nmod validate;\n","mode":"normal","cursor":{"row":2,"col":13},"anchor":{"row":0,"col":0}}
+{"name":"golf-export-from-mod-02","text":"mod generate_demos;\nmod mdbook_preprocessor;\nmod validate;\nmod generate_demos;\nmod mdbook_preprocessor;\nmod validate;\n","mode":"normal","cursor":{"row":5,"col":13},"anchor":{"row":3,"col":0}}
+{"name":"golf-export-from-mod-03","text":"mod generate_demos;\nmod mdbook_preprocessor;\nmod validate;\n\nmod generate_demos;\nmod mdbook_preprocessor;\nmod validate;\n","mode":"normal","cursor":{"row":6,"col":13},"anchor":{"row":4,"col":0}}
+{"name":"golf-export-from-mod-04","text":"mod generate_demos;\nmod mdbook_preprocessor;\nmod validate;\n\nmod generate_demos;\nmod mdbook_preprocessor;\nmod validate;\n","mode":"normal","cursor":{"row":4,"col":2},"anchor":{"row":4,"col":0},"sels":[{"cursor":{"row":4,"col":2},"anchor":{"row":4,"col":0}},{"cursor":{"row":5,"col":2},"anchor":{"row":5,"col":0}},{"cursor":{"row":6,"col":2},"anchor":{"row":6,"col":0}}],"primary":0}
+{"name":"golf-export-from-mod-05","text":"mod generate_demos;\nmod mdbook_preprocessor;\nmod validate;\n\npub use generate_demos;\npub use mdbook_preprocessor;\npub use validate;\n","mode":"normal","cursor":{"row":4,"col":7},"anchor":{"row":4,"col":7},"sels":[{"cursor":{"row":4,"col":7},"anchor":{"row":4,"col":7}},{"cursor":{"row":5,"col":7},"anchor":{"row":5,"col":7}},{"cursor":{"row":6,"col":7},"anchor":{"row":6,"col":7}}],"primary":0}
+{"name":"golf-export-from-mod-06","text":"mod generate_demos;\nmod mdbook_preprocessor;\nmod validate;\n\npub use generate_demos;\npub use mdbook_preprocessor;\npub use validate;\n","mode":"normal","cursor":{"row":4,"col":21},"anchor":{"row":4,"col":8},"sels":[{"cursor":{"row":4,"col":21},"anchor":{"row":4,"col":8}},{"cursor":{"row":5,"col":26},"anchor":{"row":5,"col":8}},{"cursor":{"row":6,"col":15},"anchor":{"row":6,"col":8}}],"primary":0}
+{"name":"golf-export-from-mod-07","text":"mod generate_demos;\nmod mdbook_preprocessor;\nmod validate;\n\npub use generate_demosgenerate_demos;\npub use mdbook_preprocessormdbook_preprocessor;\npub use validatevalidate;\n","mode":"normal","cursor":{"row":4,"col":35},"anchor":{"row":4,"col":22},"sels":[{"cursor":{"row":4,"col":35},"anchor":{"row":4,"col":22}},{"cursor":{"row":5,"col":45},"anchor":{"row":5,"col":27}},{"cursor":{"row":6,"col":23},"anchor":{"row":6,"col":16}}],"primary":0}
+{"name":"golf-export-from-mod","text":"mod generate_demos;\nmod mdbook_preprocessor;\nmod validate;\n\npub use generate_demos::generate_demos;\npub use mdbook_preprocessor::mdbook_preprocessor;\npub use validate::validate;\n","mode":"insert","cursor":{"row":4,"col":24},"anchor":{"row":4,"col":37},"sels":[{"cursor":{"row":4,"col":24},"anchor":{"row":4,"col":37}},{"cursor":{"row":5,"col":29},"anchor":{"row":5,"col":47}},{"cursor":{"row":6,"col":18},"anchor":{"row":6,"col":25}}],"primary":0}
+{"name":"golf-function-into-class-01","text":"def calculate_area(length, width):\n result = length * width\n return result\n\ndef calculate_perimiter(length, width):\n result = 2 * (length + width)\n return result\n\ndef calculate_volume(length, width, height):\n result = length * width * height\n return result\n","mode":"normal","cursor":{"row":10,"col":17},"anchor":{"row":0,"col":0}}
+{"name":"golf-function-into-class-02","text":"def calculate_area(length, width):\n result = length * width\n return result\n\ndef calculate_perimiter(length, width):\n result = 2 * (length + width)\n return result\n\ndef calculate_volume(length, width, height):\n result = length * width * height\n return result\n","mode":"normal","cursor":{"row":0,"col":12},"anchor":{"row":0,"col":4},"sels":[{"cursor":{"row":0,"col":12},"anchor":{"row":0,"col":4}},{"cursor":{"row":4,"col":12},"anchor":{"row":4,"col":4}},{"cursor":{"row":8,"col":12},"anchor":{"row":8,"col":4}}],"primary":0}
+{"name":"golf-function-into-class-03","text":"def get_area(length, width):\n result = length * width\n return result\n\ndef get_perimiter(length, width):\n result = 2 * (length + width)\n return result\n\ndef get_volume(length, width, height):\n result = length * width * height\n return result\n","mode":"insert","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":7},"sels":[{"cursor":{"row":0,"col":7},"anchor":{"row":0,"col":7}},{"cursor":{"row":4,"col":7},"anchor":{"row":4,"col":7}},{"cursor":{"row":8,"col":7},"anchor":{"row":8,"col":7}}],"primary":0}
+{"name":"golf-function-into-class-04","text":"def get_area(length, width):\n result = length * width\n return result\n\ndef get_perimiter(length, width):\n result = 2 * (length + width)\n return result\n\ndef get_volume(length, width, height):\n result = length * width * height\n return result\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":7},"sels":[{"cursor":{"row":0,"col":7},"anchor":{"row":0,"col":7}},{"cursor":{"row":4,"col":7},"anchor":{"row":4,"col":7}},{"cursor":{"row":8,"col":7},"anchor":{"row":8,"col":7}}],"primary":0}
+{"name":"golf-function-into-class-05","text":"@staticmethod\ndef get_area(length, width):\n result = length * width\n return result\n\n@staticmethod\ndef get_perimiter(length, width):\n result = 2 * (length + width)\n return result\n\n@staticmethod\ndef get_volume(length, width, height):\n result = length * width * height\n return result\n","mode":"insert","cursor":{"row":0,"col":13},"anchor":{"row":0,"col":13},"sels":[{"cursor":{"row":0,"col":13},"anchor":{"row":0,"col":13}},{"cursor":{"row":5,"col":13},"anchor":{"row":5,"col":13}},{"cursor":{"row":10,"col":13},"anchor":{"row":10,"col":13}}],"primary":0}
+{"name":"golf-function-into-class-06","text":"@staticmethod\ndef get_area(length, width):\n result = length * width\n return result\n\n@staticmethod\ndef get_perimiter(length, width):\n result = 2 * (length + width)\n return result\n\n@staticmethod\ndef get_volume(length, width, height):\n result = length * width * height\n return result\n","mode":"normal","cursor":{"row":0,"col":13},"anchor":{"row":0,"col":13},"sels":[{"cursor":{"row":0,"col":13},"anchor":{"row":0,"col":13}},{"cursor":{"row":5,"col":13},"anchor":{"row":5,"col":13}},{"cursor":{"row":10,"col":13},"anchor":{"row":10,"col":13}}],"primary":0}
+{"name":"golf-function-into-class-07","text":"@staticmethod\ndef get_area(length, width):\n result = length * width\n return result\n\n@staticmethod\ndef get_perimiter(length, width):\n result = 2 * (length + width)\n return result\n\n@staticmethod\ndef get_volume(length, width, height):\n result = length * width * height\n return result\n","mode":"normal","cursor":{"row":2,"col":13},"anchor":{"row":2,"col":13},"sels":[{"cursor":{"row":2,"col":13},"anchor":{"row":2,"col":13}},{"cursor":{"row":7,"col":13},"anchor":{"row":7,"col":13}},{"cursor":{"row":12,"col":13},"anchor":{"row":12,"col":13}}],"primary":0}
+{"name":"golf-function-into-class-08","text":"@staticmethod\ndef get_area(length, width):\n result = length * width\n return result\n\n@staticmethod\ndef get_perimiter(length, width):\n result = 2 * (length + width)\n return result\n\n@staticmethod\ndef get_volume(length, width, height):\n result = length * width * height\n return result\n","mode":"select","cursor":{"row":2,"col":26},"anchor":{"row":2,"col":13},"sels":[{"cursor":{"row":2,"col":26},"anchor":{"row":2,"col":13}},{"cursor":{"row":7,"col":32},"anchor":{"row":7,"col":13}},{"cursor":{"row":12,"col":35},"anchor":{"row":12,"col":13}}],"primary":0}
+{"name":"golf-function-into-class-09","text":"@staticmethod\ndef get_area(length, width):\n result = length * width\n return result\n\n@staticmethod\ndef get_perimiter(length, width):\n result = 2 * (length + width)\n return result\n\n@staticmethod\ndef get_volume(length, width, height):\n result = length * width * height\n return result\n","mode":"normal","cursor":{"row":2,"col":26},"anchor":{"row":2,"col":13},"sels":[{"cursor":{"row":2,"col":26},"anchor":{"row":2,"col":13}},{"cursor":{"row":7,"col":32},"anchor":{"row":7,"col":13}},{"cursor":{"row":12,"col":35},"anchor":{"row":12,"col":13}}],"primary":0}
+{"name":"golf-function-into-class-10","text":"@staticmethod\ndef get_area(length, width):\n return result\n\n@staticmethod\ndef get_perimiter(length, width):\n return result\n\n@staticmethod\ndef get_volume(length, width, height):\n return result\n","mode":"normal","cursor":{"row":2,"col":0},"anchor":{"row":2,"col":0},"sels":[{"cursor":{"row":2,"col":0},"anchor":{"row":2,"col":0}},{"cursor":{"row":6,"col":0},"anchor":{"row":6,"col":0}},{"cursor":{"row":10,"col":0},"anchor":{"row":10,"col":0}}],"primary":0}
+{"name":"golf-function-into-class-11","text":"@staticmethod\ndef get_area(length, width):\n return result\n\n@staticmethod\ndef get_perimiter(length, width):\n return result\n\n@staticmethod\ndef get_volume(length, width, height):\n return result\n","mode":"normal","cursor":{"row":2,"col":11},"anchor":{"row":2,"col":16},"sels":[{"cursor":{"row":2,"col":11},"anchor":{"row":2,"col":16}},{"cursor":{"row":6,"col":11},"anchor":{"row":6,"col":16}},{"cursor":{"row":10,"col":11},"anchor":{"row":10,"col":16}}],"primary":0}
+{"name":"golf-function-into-class-12","text":"@staticmethod\ndef get_area(length, width):\n return length * width\n\n@staticmethod\ndef get_perimiter(length, width):\n return 2 * (length + width)\n\n@staticmethod\ndef get_volume(length, width, height):\n return length * width * height\n","mode":"normal","cursor":{"row":2,"col":11},"anchor":{"row":2,"col":24},"sels":[{"cursor":{"row":2,"col":11},"anchor":{"row":2,"col":24}},{"cursor":{"row":6,"col":11},"anchor":{"row":6,"col":30}},{"cursor":{"row":10,"col":11},"anchor":{"row":10,"col":33}}],"primary":0}
+{"name":"golf-function-into-class-13","text":"@staticmethod\ndef get_area(length, width):\n return length * width\n\n@staticmethod\ndef get_perimiter(length, width):\n return 2 * (length + width)\n\n@staticmethod\ndef get_volume(length, width, height):\n return length * width * height\n","mode":"normal","cursor":{"row":2,"col":25},"anchor":{"row":1,"col":0},"sels":[{"cursor":{"row":2,"col":25},"anchor":{"row":1,"col":0}},{"cursor":{"row":6,"col":31},"anchor":{"row":5,"col":0}},{"cursor":{"row":10,"col":34},"anchor":{"row":9,"col":0}}],"primary":0}
+{"name":"golf-function-into-class-14","text":"@staticmethod\ndef get_area(length, width):\n return length * width\n\n@staticmethod\ndef get_perimiter(length, width):\n return 2 * (length + width)\n\n@staticmethod\ndef get_volume(length, width, height):\n return length * width * height\n","mode":"normal","cursor":{"row":1,"col":18},"anchor":{"row":1,"col":13},"sels":[{"cursor":{"row":1,"col":18},"anchor":{"row":1,"col":13}},{"cursor":{"row":1,"col":25},"anchor":{"row":1,"col":21}},{"cursor":{"row":2,"col":16},"anchor":{"row":2,"col":11}},{"cursor":{"row":2,"col":24},"anchor":{"row":2,"col":20}},{"cursor":{"row":5,"col":23},"anchor":{"row":5,"col":18}},{"cursor":{"row":5,"col":30},"anchor":{"row":5,"col":26}},{"cursor":{"row":6,"col":21},"anchor":{"row":6,"col":16}},{"cursor":{"row":6,"col":29},"anchor":{"row":6,"col":25}},{"cursor":{"row":9,"col":20},"anchor":{"row":9,"col":15}},{"cursor":{"row":9,"col":27},"anchor":{"row":9,"col":23}},{"cursor":{"row":9,"col":35},"anchor":{"row":9,"col":30}},{"cursor":{"row":10,"col":16},"anchor":{"row":10,"col":11}},{"cursor":{"row":10,"col":24},"anchor":{"row":10,"col":20}},{"cursor":{"row":10,"col":33},"anchor":{"row":10,"col":28}}],"primary":0}
+{"name":"golf-function-into-class-15","text":"@staticmethod\ndef get_area(length, width):\n return length * width\n\n@staticmethod\ndef get_perimiter(length, width):\n return 2 * (length + width)\n\n@staticmethod\ndef get_volume(length, width, height):\n return length * width * height\n","mode":"normal","cursor":{"row":1,"col":13},"anchor":{"row":1,"col":18},"sels":[{"cursor":{"row":1,"col":13},"anchor":{"row":1,"col":18}},{"cursor":{"row":1,"col":21},"anchor":{"row":1,"col":25}},{"cursor":{"row":2,"col":11},"anchor":{"row":2,"col":16}},{"cursor":{"row":2,"col":20},"anchor":{"row":2,"col":24}},{"cursor":{"row":5,"col":18},"anchor":{"row":5,"col":23}},{"cursor":{"row":5,"col":26},"anchor":{"row":5,"col":30}},{"cursor":{"row":6,"col":16},"anchor":{"row":6,"col":21}},{"cursor":{"row":6,"col":25},"anchor":{"row":6,"col":29}},{"cursor":{"row":9,"col":15},"anchor":{"row":9,"col":20}},{"cursor":{"row":9,"col":23},"anchor":{"row":9,"col":27}},{"cursor":{"row":9,"col":30},"anchor":{"row":9,"col":35}},{"cursor":{"row":10,"col":11},"anchor":{"row":10,"col":16}},{"cursor":{"row":10,"col":20},"anchor":{"row":10,"col":24}},{"cursor":{"row":10,"col":28},"anchor":{"row":10,"col":33}}],"primary":0}
+{"name":"golf-function-into-class-16","text":"@staticmethod\ndef get_area(length, width):\n return length * width\n\n@staticmethod\ndef get_perimiter(length, width):\n return 2 * (length + width)\n\n@staticmethod\ndef get_volume(length, width, height):\n return length * width * height\n","mode":"normal","cursor":{"row":1,"col":16},"anchor":{"row":1,"col":16},"sels":[{"cursor":{"row":1,"col":16},"anchor":{"row":1,"col":16}},{"cursor":{"row":1,"col":24},"anchor":{"row":1,"col":24}},{"cursor":{"row":2,"col":14},"anchor":{"row":2,"col":14}},{"cursor":{"row":2,"col":23},"anchor":{"row":2,"col":23}},{"cursor":{"row":5,"col":21},"anchor":{"row":5,"col":21}},{"cursor":{"row":5,"col":29},"anchor":{"row":5,"col":29}},{"cursor":{"row":6,"col":19},"anchor":{"row":6,"col":19}},{"cursor":{"row":6,"col":28},"anchor":{"row":6,"col":28}},{"cursor":{"row":9,"col":18},"anchor":{"row":9,"col":18}},{"cursor":{"row":9,"col":26},"anchor":{"row":9,"col":26}},{"cursor":{"row":9,"col":33},"anchor":{"row":9,"col":33}},{"cursor":{"row":10,"col":14},"anchor":{"row":10,"col":14}},{"cursor":{"row":10,"col":23},"anchor":{"row":10,"col":23}},{"cursor":{"row":10,"col":31},"anchor":{"row":10,"col":31}}],"primary":0}
+{"name":"golf-function-into-class-17","text":"@staticmethod\ndef get_area(len, wid):\n return len * wid\n\n@staticmethod\ndef get_perimiter(len, wid):\n return 2 * (len + wid)\n\n@staticmethod\ndef get_volume(len, wid, hei):\n return len * wid * hei\n","mode":"normal","cursor":{"row":1,"col":16},"anchor":{"row":1,"col":16},"sels":[{"cursor":{"row":1,"col":16},"anchor":{"row":1,"col":16}},{"cursor":{"row":1,"col":21},"anchor":{"row":1,"col":21}},{"cursor":{"row":2,"col":14},"anchor":{"row":2,"col":14}},{"cursor":{"row":2,"col":20},"anchor":{"row":2,"col":20}},{"cursor":{"row":5,"col":21},"anchor":{"row":5,"col":21}},{"cursor":{"row":5,"col":26},"anchor":{"row":5,"col":26}},{"cursor":{"row":6,"col":19},"anchor":{"row":6,"col":19}},{"cursor":{"row":6,"col":25},"anchor":{"row":6,"col":25}},{"cursor":{"row":9,"col":18},"anchor":{"row":9,"col":18}},{"cursor":{"row":9,"col":23},"anchor":{"row":9,"col":23}},{"cursor":{"row":9,"col":28},"anchor":{"row":9,"col":28}},{"cursor":{"row":10,"col":14},"anchor":{"row":10,"col":14}},{"cursor":{"row":10,"col":20},"anchor":{"row":10,"col":20}},{"cursor":{"row":10,"col":26},"anchor":{"row":10,"col":26}}],"primary":0}
+{"name":"golf-function-into-class-18","text":" @staticmethod\n def get_area(len, wid):\n return len * wid\n\n @staticmethod\n def get_perimiter(len, wid):\n return 2 * (len + wid)\n\n @staticmethod\n def get_volume(len, wid, hei):\n return len * wid * hei\n","mode":"normal","cursor":{"row":10,"col":30},"anchor":{"row":0,"col":4}}
+{"name":"golf-function-into-class-19","text":"\n @staticmethod\n def get_area(len, wid):\n return len * wid\n\n @staticmethod\n def get_perimiter(len, wid):\n return 2 * (len + wid)\n\n @staticmethod\n def get_volume(len, wid, hei):\n return len * wid * hei\n","mode":"insert","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}
+{"name":"golf-function-into-class","text":"class Calculator:\n @staticmethod\n def get_area(len, wid):\n return len * wid\n\n @staticmethod\n def get_perimiter(len, wid):\n return 2 * (len + wid)\n\n @staticmethod\n def get_volume(len, wid, hei):\n return len * wid * hei\n","mode":"insert","cursor":{"row":0,"col":17},"anchor":{"row":0,"col":17}}
+{"name":"golf-function-into-class-from18-18","text":" @staticmethod\n def get_area(len, wid):\n return len * wid\n\n @staticmethod\n def get_perimiter(len, wid):\n return 2 * (len + wid)\n\n @staticmethod\n def get_volume(len, wid, hei):\n return len * wid * hei\n","mode":"normal","cursor":{"row":10,"col":30},"anchor":{"row":0,"col":4}}
+{"name":"golf-function-into-class-from18-19","text":"\n @staticmethod\n def get_area(len, wid):\n return len * wid\n\n @staticmethod\n def get_perimiter(len, wid):\n return 2 * (len + wid)\n\n @staticmethod\n def get_volume(len, wid, hei):\n return len * wid * hei\n","mode":"insert","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}
+{"name":"golf-function-into-class-from18","text":"class Calculator:\n @staticmethod\n def get_area(len, wid):\n return len * wid\n\n @staticmethod\n def get_perimiter(len, wid):\n return 2 * (len + wid)\n\n @staticmethod\n def get_volume(len, wid, hei):\n return len * wid * hei\n","mode":"insert","cursor":{"row":0,"col":17},"anchor":{"row":0,"col":17}}
+{"name":"golf-invert-dictionary-01","text":"var color_to_points = {\n \"red\" = 0,\n \"orange\" = 5,\n \"yellow\" = 10,\n \"green\" = 15,\n \"blue\" = 20,\n \"purple\" = 30,\n \"black\" = 50,\n}\n","mode":"normal","cursor":{"row":0,"col":4},"anchor":{"row":0,"col":18}}
+{"name":"golf-invert-dictionary-02","text":"var color_to_points = {\n \"red\" = 0,\n \"orange\" = 5,\n \"yellow\" = 10,\n \"green\" = 15,\n \"blue\" = 20,\n \"purple\" = 30,\n \"black\" = 50,\n}\n","mode":"normal","cursor":{"row":0,"col":8},"anchor":{"row":0,"col":4},"sels":[{"cursor":{"row":0,"col":8},"anchor":{"row":0,"col":4}},{"cursor":{"row":0,"col":18},"anchor":{"row":0,"col":13}}],"primary":0}
+{"name":"golf-invert-dictionary-03","text":"var points_to_color = {\n \"red\" = 0,\n \"orange\" = 5,\n \"yellow\" = 10,\n \"green\" = 15,\n \"blue\" = 20,\n \"purple\" = 30,\n \"black\" = 50,\n}\n","mode":"normal","cursor":{"row":0,"col":18},"anchor":{"row":0,"col":14},"sels":[{"cursor":{"row":0,"col":9},"anchor":{"row":0,"col":4}},{"cursor":{"row":0,"col":18},"anchor":{"row":0,"col":14}}],"primary":1}
+{"name":"golf-invert-dictionary-04","text":"var points_to_color = {\n \"red\" = 0,\n \"orange\" = 5,\n \"yellow\" = 10,\n \"green\" = 15,\n \"blue\" = 20,\n \"purple\" = 30,\n \"black\" = 50,\n}\n","mode":"normal","cursor":{"row":0,"col":18},"anchor":{"row":0,"col":14},"sels":[{"cursor":{"row":0,"col":9},"anchor":{"row":0,"col":4}},{"cursor":{"row":0,"col":18},"anchor":{"row":0,"col":14}}],"primary":1}
+{"name":"golf-invert-dictionary-05","text":"var points_to_color = {\n \"red\" = 0,\n \"orange\" = 5,\n \"yellow\" = 10,\n \"green\" = 15,\n \"blue\" = 20,\n \"purple\" = 30,\n \"black\" = 50,\n}\n","mode":"normal","cursor":{"row":0,"col":23},"anchor":{"row":0,"col":0}}
+{"name":"golf-invert-dictionary-06","text":"var points_to_color = {\n \"red\" = 0,\n \"orange\" = 5,\n \"yellow\" = 10,\n \"green\" = 15,\n \"blue\" = 20,\n \"purple\" = 30,\n \"black\" = 50,\n}\n","mode":"normal","cursor":{"row":1,"col":12},"anchor":{"row":0,"col":23}}
+{"name":"golf-invert-dictionary-07","text":"var points_to_color = {\n \"red\" = 0,\n \"orange\" = 5,\n \"yellow\" = 10,\n \"green\" = 15,\n \"blue\" = 20,\n \"purple\" = 30,\n \"black\" = 50,\n}\n","mode":"normal","cursor":{"row":1,"col":9},"anchor":{"row":0,"col":23},"sels":[{"cursor":{"row":1,"col":9},"anchor":{"row":0,"col":23}},{"cursor":{"row":1,"col":12},"anchor":{"row":1,"col":11}}],"primary":0}
+{"name":"golf-invert-dictionary-08","text":"var points_to_color = {\n \"red\" = 0,\n \"orange\" = 5,\n \"yellow\" = 10,\n \"green\" = 15,\n \"blue\" = 20,\n \"purple\" = 30,\n \"black\" = 50,\n}\n","mode":"normal","cursor":{"row":1,"col":8},"anchor":{"row":1,"col":4},"sels":[{"cursor":{"row":1,"col":8},"anchor":{"row":1,"col":4}},{"cursor":{"row":1,"col":12},"anchor":{"row":1,"col":12}}],"primary":0}
+{"name":"golf-invert-dictionary-09","text":"var points_to_color = {\n 0 = \"red\",\n \"orange\" = 5,\n \"yellow\" = 10,\n \"green\" = 15,\n \"blue\" = 20,\n \"purple\" = 30,\n \"black\" = 50,\n}\n","mode":"normal","cursor":{"row":1,"col":12},"anchor":{"row":1,"col":8},"sels":[{"cursor":{"row":1,"col":4},"anchor":{"row":1,"col":4}},{"cursor":{"row":1,"col":12},"anchor":{"row":1,"col":8}}],"primary":1}
+{"name":"golf-invert-dictionary-10","text":"var points_to_color = {\n 0 = \"red\",\n \"orange\" = 5,\n \"yellow\" = 10,\n \"green\" = 15,\n \"blue\" = 20,\n \"purple\" = 30,\n \"black\" = 50,\n}\n","mode":"normal","cursor":{"row":1,"col":12},"anchor":{"row":1,"col":8},"sels":[{"cursor":{"row":1,"col":4},"anchor":{"row":1,"col":4}},{"cursor":{"row":1,"col":12},"anchor":{"row":1,"col":8}}],"primary":1}
+{"name":"golf-invert-dictionary","text":"var points_to_color = {\n 0 = \"red\",\n 5 = \"orange\",\n 10 = \"yellow\",\n 15 = \"green\",\n 20 = \"blue\",\n 30 = \"purple\",\n 50 = \"black\",\n}\n","mode":"normal","cursor":{"row":7,"col":15},"anchor":{"row":7,"col":9},"sels":[{"cursor":{"row":7,"col":5},"anchor":{"row":7,"col":4}},{"cursor":{"row":7,"col":15},"anchor":{"row":7,"col":9}}],"primary":1}
+{"name":"golf-invert-dictionary-2-01","text":"var color_to_points = {\n \"red\" = 0,\n \"orange\" = 5,\n \"yellow\" = 10,\n \"green\" = 15,\n \"blue\" = 20,\n \"purple\" = 30,\n \"black\" = 50,\n}\n","mode":"normal","cursor":{"row":0,"col":4},"anchor":{"row":0,"col":18}}
+{"name":"golf-invert-dictionary-2-02","text":"var color_to_points = {\n \"red\" = 0,\n \"orange\" = 5,\n \"yellow\" = 10,\n \"green\" = 15,\n \"blue\" = 20,\n \"purple\" = 30,\n \"black\" = 50,\n}\n","mode":"normal","cursor":{"row":0,"col":8},"anchor":{"row":0,"col":4},"sels":[{"cursor":{"row":0,"col":8},"anchor":{"row":0,"col":4}},{"cursor":{"row":0,"col":18},"anchor":{"row":0,"col":13}}],"primary":0}
+{"name":"golf-invert-dictionary-2-03","text":"var points_to_color = {\n \"red\" = 0,\n \"orange\" = 5,\n \"yellow\" = 10,\n \"green\" = 15,\n \"blue\" = 20,\n \"purple\" = 30,\n \"black\" = 50,\n}\n","mode":"normal","cursor":{"row":0,"col":18},"anchor":{"row":0,"col":14},"sels":[{"cursor":{"row":0,"col":9},"anchor":{"row":0,"col":4}},{"cursor":{"row":0,"col":18},"anchor":{"row":0,"col":14}}],"primary":1}
+{"name":"golf-invert-dictionary-2-04","text":"var points_to_color = {\n \"red\" = 0,\n \"orange\" = 5,\n \"yellow\" = 10,\n \"green\" = 15,\n \"blue\" = 20,\n \"purple\" = 30,\n \"black\" = 50,\n}\n","mode":"normal","cursor":{"row":0,"col":23},"anchor":{"row":0,"col":0}}
+{"name":"golf-invert-dictionary-2-05","text":"var points_to_color = {\n \"red\" = 0,\n \"orange\" = 5,\n \"yellow\" = 10,\n \"green\" = 15,\n \"blue\" = 20,\n \"purple\" = 30,\n \"black\" = 50,\n}\n","mode":"normal","cursor":{"row":7,"col":17},"anchor":{"row":0,"col":23}}
+{"name":"golf-invert-dictionary-2-06","text":"var points_to_color = {\n \"red\" = 0,\n \"orange\" = 5,\n \"yellow\" = 10,\n \"green\" = 15,\n \"blue\" = 20,\n \"purple\" = 30,\n \"black\" = 50,\n}\n","mode":"normal","cursor":{"row":1,"col":9},"anchor":{"row":0,"col":23},"sels":[{"cursor":{"row":1,"col":9},"anchor":{"row":0,"col":23}},{"cursor":{"row":1,"col":12},"anchor":{"row":1,"col":11}},{"cursor":{"row":2,"col":12},"anchor":{"row":1,"col":14}},{"cursor":{"row":2,"col":15},"anchor":{"row":2,"col":14}},{"cursor":{"row":3,"col":12},"anchor":{"row":2,"col":17}},{"cursor":{"row":3,"col":16},"anchor":{"row":3,"col":14}},{"cursor":{"row":4,"col":11},"anchor":{"row":3,"col":18}},{"cursor":{"row":4,"col":15},"anchor":{"row":4,"col":13}},{"cursor":{"row":5,"col":10},"anchor":{"row":4,"col":17}},{"cursor":{"row":5,"col":14},"anchor":{"row":5,"col":12}},{"cursor":{"row":6,"col":12},"anchor":{"row":5,"col":16}},{"cursor":{"row":6,"col":16},"anchor":{"row":6,"col":14}},{"cursor":{"row":7,"col":11},"anchor":{"row":6,"col":18}},{"cursor":{"row":7,"col":15},"anchor":{"row":7,"col":13}},{"cursor":{"row":7,"col":17},"anchor":{"row":7,"col":17}}],"primary":0}
+{"name":"golf-invert-dictionary-2-07","text":"var points_to_color = {\n \"red\" = 0,\n \"orange\" = 5,\n \"yellow\" = 10,\n \"green\" = 15,\n \"blue\" = 20,\n \"purple\" = 30,\n \"black\" = 50,\n}\n","mode":"normal","cursor":{"row":1,"col":8},"anchor":{"row":1,"col":4},"sels":[{"cursor":{"row":1,"col":8},"anchor":{"row":1,"col":4}},{"cursor":{"row":1,"col":12},"anchor":{"row":1,"col":12}},{"cursor":{"row":2,"col":11},"anchor":{"row":2,"col":4}},{"cursor":{"row":2,"col":15},"anchor":{"row":2,"col":15}},{"cursor":{"row":3,"col":11},"anchor":{"row":3,"col":4}},{"cursor":{"row":3,"col":16},"anchor":{"row":3,"col":15}},{"cursor":{"row":4,"col":10},"anchor":{"row":4,"col":4}},{"cursor":{"row":4,"col":15},"anchor":{"row":4,"col":14}},{"cursor":{"row":5,"col":9},"anchor":{"row":5,"col":4}},{"cursor":{"row":5,"col":14},"anchor":{"row":5,"col":13}},{"cursor":{"row":6,"col":11},"anchor":{"row":6,"col":4}},{"cursor":{"row":6,"col":16},"anchor":{"row":6,"col":15}},{"cursor":{"row":7,"col":10},"anchor":{"row":7,"col":4}},{"cursor":{"row":7,"col":15},"anchor":{"row":7,"col":14}}],"primary":0}
+{"name":"golf-invert-dictionary-2","text":"var points_to_color = {\n \"orange\" = 5,\n \"yellow\" = 10,\n \"green\" = 15,\n \"blue\" = 20,\n \"purple\" = 30,\n \"black\" = 50,\n \"red\" = 0,\n}\n","mode":"normal","cursor":{"row":7,"col":8},"anchor":{"row":7,"col":4},"sels":[{"cursor":{"row":1,"col":11},"anchor":{"row":1,"col":4}},{"cursor":{"row":1,"col":15},"anchor":{"row":1,"col":15}},{"cursor":{"row":2,"col":11},"anchor":{"row":2,"col":4}},{"cursor":{"row":2,"col":16},"anchor":{"row":2,"col":15}},{"cursor":{"row":3,"col":10},"anchor":{"row":3,"col":4}},{"cursor":{"row":3,"col":15},"anchor":{"row":3,"col":14}},{"cursor":{"row":4,"col":9},"anchor":{"row":4,"col":4}},{"cursor":{"row":4,"col":14},"anchor":{"row":4,"col":13}},{"cursor":{"row":5,"col":11},"anchor":{"row":5,"col":4}},{"cursor":{"row":5,"col":16},"anchor":{"row":5,"col":15}},{"cursor":{"row":6,"col":10},"anchor":{"row":6,"col":4}},{"cursor":{"row":6,"col":15},"anchor":{"row":6,"col":14}},{"cursor":{"row":7,"col":8},"anchor":{"row":7,"col":4}},{"cursor":{"row":7,"col":12},"anchor":{"row":7,"col":12}}],"primary":12}
+{"name":"golf-object-into-array-01","text":"const palette = {\n apricot: \"#f47868\",\n lightning: \"#ffcd1c\",\n delta: \"6f44f0\",\n};\n","mode":"normal","cursor":{"row":1,"col":0},"anchor":{"row":1,"col":0}}
+{"name":"golf-object-into-array-02","text":"const palette = [\n apricot: \"#f47868\",\n lightning: \"#ffcd1c\",\n delta: \"6f44f0\",\n];\n","mode":"normal","cursor":{"row":1,"col":0},"anchor":{"row":1,"col":0}}
+{"name":"golf-object-into-array-03","text":"const palette = [\n apricot: \"#f47868\",\n lightning: \"#ffcd1c\",\n delta: \"6f44f0\",\n];\n","mode":"normal","cursor":{"row":3,"col":18},"anchor":{"row":0,"col":17}}
+{"name":"golf-object-into-array-04","text":"const palette = [\n apricot: \"#f47868\",\n lightning: \"#ffcd1c\",\n delta: \"6f44f0\",\n];\n","mode":"normal","cursor":{"row":3,"col":18},"anchor":{"row":0,"col":17}}
+{"name":"golf-object-into-array-05","text":"const palette = [\n apricot: \"#f47868\",\n lightning: \"#ffcd1c\",\n delta: \"6f44f0\",\n];\n","mode":"normal","cursor":{"row":1,"col":9},"anchor":{"row":1,"col":9},"sels":[{"cursor":{"row":1,"col":9},"anchor":{"row":1,"col":9}},{"cursor":{"row":2,"col":11},"anchor":{"row":2,"col":11}},{"cursor":{"row":3,"col":7},"anchor":{"row":3,"col":7}}],"primary":0}
+{"name":"golf-object-into-array-06","text":"const palette = [\n apricot, \"#f47868\",\n lightning, \"#ffcd1c\",\n delta, \"6f44f0\",\n];\n","mode":"normal","cursor":{"row":1,"col":9},"anchor":{"row":1,"col":9},"sels":[{"cursor":{"row":1,"col":9},"anchor":{"row":1,"col":9}},{"cursor":{"row":2,"col":11},"anchor":{"row":2,"col":11}},{"cursor":{"row":3,"col":7},"anchor":{"row":3,"col":7}}],"primary":0}
+{"name":"golf-object-into-array-07","text":"const palette = [\n apricot, \"#f47868\",\n lightning, \"#ffcd1c\",\n delta, \"6f44f0\",\n];\n","mode":"normal","cursor":{"row":1,"col":8},"anchor":{"row":1,"col":2},"sels":[{"cursor":{"row":1,"col":8},"anchor":{"row":1,"col":2}},{"cursor":{"row":2,"col":10},"anchor":{"row":2,"col":2}},{"cursor":{"row":3,"col":6},"anchor":{"row":3,"col":2}}],"primary":0}
+{"name":"golf-object-into-array-08","text":"const palette = [\n \"apricot\", \"#f47868\",\n \"lightning\", \"#ffcd1c\",\n \"delta\", \"6f44f0\",\n];\n","mode":"normal","cursor":{"row":1,"col":10},"anchor":{"row":1,"col":2},"sels":[{"cursor":{"row":1,"col":10},"anchor":{"row":1,"col":2}},{"cursor":{"row":2,"col":12},"anchor":{"row":2,"col":2}},{"cursor":{"row":3,"col":8},"anchor":{"row":3,"col":2}}],"primary":0}
+{"name":"golf-object-into-array-09","text":"const palette = [\n \"apricot\", \"#f47868\",\n \"lightning\", \"#ffcd1c\",\n \"delta\", \"6f44f0\",\n];\n","mode":"select","cursor":{"row":1,"col":21},"anchor":{"row":1,"col":2},"sels":[{"cursor":{"row":1,"col":21},"anchor":{"row":1,"col":2}},{"cursor":{"row":2,"col":23},"anchor":{"row":2,"col":2}},{"cursor":{"row":3,"col":18},"anchor":{"row":3,"col":2}}],"primary":0}
+{"name":"golf-object-into-array","text":"const palette = [\n [\"apricot\", \"#f47868\"],\n [\"lightning\", \"#ffcd1c\"],\n [\"delta\", \"6f44f0\"],\n];\n","mode":"normal","cursor":{"row":1,"col":23},"anchor":{"row":1,"col":2},"sels":[{"cursor":{"row":1,"col":23},"anchor":{"row":1,"col":2}},{"cursor":{"row":2,"col":25},"anchor":{"row":2,"col":2}},{"cursor":{"row":3,"col":20},"anchor":{"row":3,"col":2}}],"primary":0}
+{"name":"golf-reverse-golf-example-01","text":"# snake_case to camelCase\n\nRename all fields to be camelCase.\n\n## Before\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n\n## After\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n","mode":"normal","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":11}}
+{"name":"golf-reverse-golf-example-02","text":"# snake_case to camelCase\n\nRename all fields to be camelCase.\n\n## Before\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n\n## After\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n","mode":"normal","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":11}}
+{"name":"golf-reverse-golf-example-03","text":"# snake_case to camelCase\n\nRename all fields to be camelCase.\n\n## Before\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n\n## After\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n","mode":"normal","cursor":{"row":0,"col":16},"anchor":{"row":0,"col":24}}
+{"name":"golf-reverse-golf-example-04","text":"# snake_case to camelCase\n\nRename all fields to be camelCase.\n\n## Before\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n\n## After\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n","mode":"normal","cursor":{"row":0,"col":16},"anchor":{"row":0,"col":24}}
+{"name":"golf-reverse-golf-example-05","text":"# snake_case to snake_case\n\nRename all fields to be camelCase.\n\n## Before\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n\n## After\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n","mode":"normal","cursor":{"row":0,"col":16},"anchor":{"row":0,"col":25}}
+{"name":"golf-reverse-golf-example-06","text":"# snake_case to snake_case\n\nRename all fields to be camelCase.\n\n## Before\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n\n## After\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n","mode":"select","cursor":{"row":0,"col":16},"anchor":{"row":0,"col":25}}
+{"name":"golf-reverse-golf-example-07","text":"# snake_case to snake_case\n\nRename all fields to be camelCase.\n\n## Before\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n\n## After\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n","mode":"select","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":11},"sels":[{"cursor":{"row":0,"col":2},"anchor":{"row":0,"col":11}},{"cursor":{"row":0,"col":16},"anchor":{"row":0,"col":25}}],"primary":0}
+{"name":"golf-reverse-golf-example-08","text":"# snake_case to snake_case\n\nRename all fields to be camelCase.\n\n## Before\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n\n## After\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n","mode":"select","cursor":{"row":2,"col":24},"anchor":{"row":2,"col":32},"sels":[{"cursor":{"row":0,"col":2},"anchor":{"row":0,"col":11}},{"cursor":{"row":0,"col":16},"anchor":{"row":0,"col":25}},{"cursor":{"row":2,"col":24},"anchor":{"row":2,"col":32}}],"primary":2}
+{"name":"golf-reverse-golf-example-09","text":"# camelCase to snake_case\n\nRename all fields to be snake_case.\n\n## Before\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n\n## After\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n","mode":"select","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":10},"sels":[{"cursor":{"row":0,"col":2},"anchor":{"row":0,"col":10}},{"cursor":{"row":0,"col":15},"anchor":{"row":0,"col":24}},{"cursor":{"row":2,"col":24},"anchor":{"row":2,"col":33}}],"primary":0}
+{"name":"golf-reverse-golf-example-10","text":"# camelCase to snake_case\n\nRename all fields to be snake_case.\n\n## Before\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n\n## After\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n","mode":"select","cursor":{"row":14,"col":3},"anchor":{"row":0,"col":0}}
+{"name":"golf-reverse-golf-example-11","text":"# camelCase to snake_case\n\nRename all fields to be snake_case.\n\n## Before\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n\n## After\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n","mode":"select","cursor":{"row":6,"col":3},"anchor":{"row":6,"col":0},"sels":[{"cursor":{"row":6,"col":3},"anchor":{"row":6,"col":0}},{"cursor":{"row":12,"col":3},"anchor":{"row":12,"col":0}}],"primary":0}
+{"name":"golf-reverse-golf-example-12","text":"# camelCase to snake_case\n\nRename all fields to be snake_case.\n\n## Before\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n\n## After\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n","mode":"select","cursor":{"row":7,"col":41},"anchor":{"row":6,"col":0},"sels":[{"cursor":{"row":7,"col":41},"anchor":{"row":6,"col":0}},{"cursor":{"row":13,"col":39},"anchor":{"row":12,"col":0}}],"primary":0}
+{"name":"golf-reverse-golf-example","text":"# camelCase to snake_case\n\nRename all fields to be snake_case.\n\n## Before\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n\n## After\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n","mode":"select","cursor":{"row":13,"col":41},"anchor":{"row":12,"col":0},"sels":[{"cursor":{"row":7,"col":39},"anchor":{"row":6,"col":0}},{"cursor":{"row":13,"col":41},"anchor":{"row":12,"col":0}}],"primary":1}
+{"name":"golf-snake-case-to-camel-case-01","text":"const user_profile = {\n first_name: \"John\",\n last_name: \"Doe\",\n birth_date: \"1990-05-15\",\n email_address: \"[email protected]\",\n phone_number: \"555-123-4567\",\n mailing_address: {\n street_name: \"Main Street\",\n house_number: 123,\n apartment_unit: \"4B\",\n zip_code: \"10001\",\n city_name: \"New York\",\n },\n};\n","mode":"normal","cursor":{"row":13,"col":2},"anchor":{"row":0,"col":0}}
+{"name":"golf-snake-case-to-camel-case-02","text":"const user_profile = {\n first_name: \"John\",\n last_name: \"Doe\",\n birth_date: \"1990-05-15\",\n email_address: \"[email protected]\",\n phone_number: \"555-123-4567\",\n mailing_address: {\n street_name: \"Main Street\",\n house_number: 123,\n apartment_unit: \"4B\",\n zip_code: \"10001\",\n city_name: \"New York\",\n },\n};\n","mode":"normal","cursor":{"row":0,"col":10},"anchor":{"row":0,"col":10},"sels":[{"cursor":{"row":0,"col":10},"anchor":{"row":0,"col":10}},{"cursor":{"row":1,"col":7},"anchor":{"row":1,"col":7}},{"cursor":{"row":2,"col":6},"anchor":{"row":2,"col":6}},{"cursor":{"row":3,"col":7},"anchor":{"row":3,"col":7}},{"cursor":{"row":4,"col":7},"anchor":{"row":4,"col":7}},{"cursor":{"row":4,"col":22},"anchor":{"row":4,"col":22}},{"cursor":{"row":5,"col":7},"anchor":{"row":5,"col":7}},{"cursor":{"row":6,"col":9},"anchor":{"row":6,"col":9}},{"cursor":{"row":7,"col":10},"anchor":{"row":7,"col":10}},{"cursor":{"row":8,"col":9},"anchor":{"row":8,"col":9}},{"cursor":{"row":9,"col":13},"anchor":{"row":9,"col":13}},{"cursor":{"row":10,"col":7},"anchor":{"row":10,"col":7}},{"cursor":{"row":11,"col":8},"anchor":{"row":11,"col":8}}],"primary":0}
+{"name":"golf-snake-case-to-camel-case-03","text":"const user_profile = {\n first_name: \"John\",\n last_name: \"Doe\",\n birth_date: \"1990-05-15\",\n email_address: \"[email protected]\",\n phone_number: \"555-123-4567\",\n mailing_address: {\n street_name: \"Main Street\",\n house_number: 123,\n apartment_unit: \"4B\",\n zip_code: \"10001\",\n city_name: \"New York\",\n },\n};\n","mode":"normal","cursor":{"row":4,"col":22},"anchor":{"row":4,"col":22},"sels":[{"cursor":{"row":0,"col":10},"anchor":{"row":0,"col":10}},{"cursor":{"row":1,"col":7},"anchor":{"row":1,"col":7}},{"cursor":{"row":2,"col":6},"anchor":{"row":2,"col":6}},{"cursor":{"row":3,"col":7},"anchor":{"row":3,"col":7}},{"cursor":{"row":4,"col":7},"anchor":{"row":4,"col":7}},{"cursor":{"row":4,"col":22},"anchor":{"row":4,"col":22}},{"cursor":{"row":5,"col":7},"anchor":{"row":5,"col":7}},{"cursor":{"row":6,"col":9},"anchor":{"row":6,"col":9}},{"cursor":{"row":7,"col":10},"anchor":{"row":7,"col":10}},{"cursor":{"row":8,"col":9},"anchor":{"row":8,"col":9}},{"cursor":{"row":9,"col":13},"anchor":{"row":9,"col":13}},{"cursor":{"row":10,"col":7},"anchor":{"row":10,"col":7}},{"cursor":{"row":11,"col":8},"anchor":{"row":11,"col":8}}],"primary":5}
+{"name":"golf-snake-case-to-camel-case-04","text":"const user_profile = {\n first_name: \"John\",\n last_name: \"Doe\",\n birth_date: \"1990-05-15\",\n email_address: \"[email protected]\",\n phone_number: \"555-123-4567\",\n mailing_address: {\n street_name: \"Main Street\",\n house_number: 123,\n apartment_unit: \"4B\",\n zip_code: \"10001\",\n city_name: \"New York\",\n },\n};\n","mode":"normal","cursor":{"row":5,"col":7},"anchor":{"row":5,"col":7},"sels":[{"cursor":{"row":0,"col":10},"anchor":{"row":0,"col":10}},{"cursor":{"row":1,"col":7},"anchor":{"row":1,"col":7}},{"cursor":{"row":2,"col":6},"anchor":{"row":2,"col":6}},{"cursor":{"row":3,"col":7},"anchor":{"row":3,"col":7}},{"cursor":{"row":4,"col":7},"anchor":{"row":4,"col":7}},{"cursor":{"row":5,"col":7},"anchor":{"row":5,"col":7}},{"cursor":{"row":6,"col":9},"anchor":{"row":6,"col":9}},{"cursor":{"row":7,"col":10},"anchor":{"row":7,"col":10}},{"cursor":{"row":8,"col":9},"anchor":{"row":8,"col":9}},{"cursor":{"row":9,"col":13},"anchor":{"row":9,"col":13}},{"cursor":{"row":10,"col":7},"anchor":{"row":10,"col":7}},{"cursor":{"row":11,"col":8},"anchor":{"row":11,"col":8}}],"primary":5}
+{"name":"golf-snake-case-to-camel-case-05","text":"const userprofile = {\n firstname: \"John\",\n lastname: \"Doe\",\n birthdate: \"1990-05-15\",\n emailaddress: \"[email protected]\",\n phonenumber: \"555-123-4567\",\n mailingaddress: {\n streetname: \"Main Street\",\n housenumber: 123,\n apartmentunit: \"4B\",\n zipcode: \"10001\",\n cityname: \"New York\",\n },\n};\n","mode":"normal","cursor":{"row":5,"col":7},"anchor":{"row":5,"col":7},"sels":[{"cursor":{"row":0,"col":10},"anchor":{"row":0,"col":10}},{"cursor":{"row":1,"col":7},"anchor":{"row":1,"col":7}},{"cursor":{"row":2,"col":6},"anchor":{"row":2,"col":6}},{"cursor":{"row":3,"col":7},"anchor":{"row":3,"col":7}},{"cursor":{"row":4,"col":7},"anchor":{"row":4,"col":7}},{"cursor":{"row":5,"col":7},"anchor":{"row":5,"col":7}},{"cursor":{"row":6,"col":9},"anchor":{"row":6,"col":9}},{"cursor":{"row":7,"col":10},"anchor":{"row":7,"col":10}},{"cursor":{"row":8,"col":9},"anchor":{"row":8,"col":9}},{"cursor":{"row":9,"col":13},"anchor":{"row":9,"col":13}},{"cursor":{"row":10,"col":7},"anchor":{"row":10,"col":7}},{"cursor":{"row":11,"col":8},"anchor":{"row":11,"col":8}}],"primary":5}
+{"name":"golf-snake-case-to-camel-case","text":"const userProfile = {\n firstName: \"John\",\n lastName: \"Doe\",\n birthDate: \"1990-05-15\",\n emailAddress: \"[email protected]\",\n phoneNumber: \"555-123-4567\",\n mailingAddress: {\n streetName: \"Main Street\",\n houseNumber: 123,\n apartmentUnit: \"4B\",\n zipCode: \"10001\",\n cityName: \"New York\",\n },\n};\n","mode":"normal","cursor":{"row":5,"col":7},"anchor":{"row":5,"col":7},"sels":[{"cursor":{"row":0,"col":10},"anchor":{"row":0,"col":10}},{"cursor":{"row":1,"col":7},"anchor":{"row":1,"col":7}},{"cursor":{"row":2,"col":6},"anchor":{"row":2,"col":6}},{"cursor":{"row":3,"col":7},"anchor":{"row":3,"col":7}},{"cursor":{"row":4,"col":7},"anchor":{"row":4,"col":7}},{"cursor":{"row":5,"col":7},"anchor":{"row":5,"col":7}},{"cursor":{"row":6,"col":9},"anchor":{"row":6,"col":9}},{"cursor":{"row":7,"col":10},"anchor":{"row":7,"col":10}},{"cursor":{"row":8,"col":9},"anchor":{"row":8,"col":9}},{"cursor":{"row":9,"col":13},"anchor":{"row":9,"col":13}},{"cursor":{"row":10,"col":7},"anchor":{"row":10,"col":7}},{"cursor":{"row":11,"col":8},"anchor":{"row":11,"col":8}}],"primary":5}
+{"name":"golf-text-into-array-01","text":"Hello\nThis\nIs\nHelix\n","mode":"normal","cursor":{"row":3,"col":5},"anchor":{"row":0,"col":0}}
+{"name":"golf-text-into-array-02","text":"Hello\nThis\nIs\nHelix\n","mode":"normal","cursor":{"row":0,"col":4},"anchor":{"row":0,"col":0},"sels":[{"cursor":{"row":0,"col":4},"anchor":{"row":0,"col":0}},{"cursor":{"row":1,"col":3},"anchor":{"row":1,"col":0}},{"cursor":{"row":2,"col":1},"anchor":{"row":2,"col":0}},{"cursor":{"row":3,"col":4},"anchor":{"row":3,"col":0}}],"primary":0}
+{"name":"golf-text-into-array-03","text":"\"Hello\"\n\"This\"\n\"Is\"\n\"Helix\"\n","mode":"normal","cursor":{"row":0,"col":6},"anchor":{"row":0,"col":0},"sels":[{"cursor":{"row":0,"col":6},"anchor":{"row":0,"col":0}},{"cursor":{"row":1,"col":5},"anchor":{"row":1,"col":0}},{"cursor":{"row":2,"col":3},"anchor":{"row":2,"col":0}},{"cursor":{"row":3,"col":6},"anchor":{"row":3,"col":0}}],"primary":0}
+{"name":"golf-text-into-array-04","text":"\"Hello\", \"This\", \"Is\", \"Helix\"","mode":"insert","cursor":{"row":0,"col":8},"anchor":{"row":0,"col":8},"sels":[{"cursor":{"row":0,"col":8},"anchor":{"row":0,"col":8}},{"cursor":{"row":0,"col":16},"anchor":{"row":0,"col":16}},{"cursor":{"row":0,"col":22},"anchor":{"row":0,"col":22}}],"primary":0}
+{"name":"golf-text-into-array","text":"[\"Hello\", \"This\", \"Is\", \"Helix\"]","mode":"normal","cursor":{"row":0,"col":31},"anchor":{"row":0,"col":0}}
diff --git a/test/hxcases/golf-waivers.jsonl b/test/hxcases/golf-waivers.jsonl
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/hxcases/golf-waivers.jsonl
diff --git a/test/hxcases/golf.jsonl b/test/hxcases/golf.jsonl
new file mode 100644
index 00000000..f327eaf1
--- /dev/null
+++ b/test/hxcases/golf.jsonl
@@ -0,0 +1,124 @@
+{"name": "golf-csv-to-sql-01", "pane": "file", "text": "id 1,Item 1,cost 1,location 1\nid 2,Item 2,cost 2,location 2\nid 10,Item 10,cost 10,location 10\n", "keys": "%"}
+{"name": "golf-csv-to-sql-02", "pane": "file", "text": "id 1,Item 1,cost 1,location 1\nid 2,Item 2,cost 2,location 2\nid 10,Item 10,cost 10,location 10\n", "keys": "%<A-s>"}
+{"name": "golf-csv-to-sql-03", "pane": "file", "text": "id 1,Item 1,cost 1,location 1\nid 2,Item 2,cost 2,location 2\nid 10,Item 10,cost 10,location 10\n", "keys": "%<A-s>\"yy"}
+{"name": "golf-csv-to-sql-04", "pane": "file", "text": "id 1,Item 1,cost 1,location 1\nid 2,Item 2,cost 2,location 2\nid 10,Item 10,cost 10,location 10\n", "keys": "%<A-s>\"yys\\d<ret>"}
+{"name": "golf-csv-to-sql-05", "pane": "file", "text": "id 1,Item 1,cost 1,location 1\nid 2,Item 2,cost 2,location 2\nid 10,Item 10,cost 10,location 10\n", "keys": "%<A-s>\"yys\\d<ret>d"}
+{"name": "golf-csv-to-sql-06", "pane": "file", "text": "id 1,Item 1,cost 1,location 1\nid 2,Item 2,cost 2,location 2\nid 10,Item 10,cost 10,location 10\n", "keys": "%<A-s>\"yys\\d<ret>dhh"}
+{"name": "golf-csv-to-sql-07", "pane": "file", "text": "id 1,Item 1,cost 1,location 1\nid 2,Item 2,cost 2,location 2\nid 10,Item 10,cost 10,location 10\n", "keys": "%<A-s>\"yys\\d<ret>dhhb"}
+{"name": "golf-csv-to-sql-08", "pane": "file", "text": "id 1,Item 1,cost 1,location 1\nid 2,Item 2,cost 2,location 2\nid 10,Item 10,cost 10,location 10\n", "keys": "%<A-s>\"yys\\d<ret>dhhbms`"}
+{"name": "golf-csv-to-sql-09", "pane": "file", "text": "id 1,Item 1,cost 1,location 1\nid 2,Item 2,cost 2,location 2\nid 10,Item 10,cost 10,location 10\n", "keys": "%<A-s>\"yys\\d<ret>dhhbms``"}
+{"name": "golf-csv-to-sql-10", "pane": "file", "text": "id 1,Item 1,cost 1,location 1\nid 2,Item 2,cost 2,location 2\nid 10,Item 10,cost 10,location 10\n", "keys": "%<A-s>\"yys\\d<ret>dhhbms``x_"}
+{"name": "golf-csv-to-sql-11", "pane": "file", "text": "id 1,Item 1,cost 1,location 1\nid 2,Item 2,cost 2,location 2\nid 10,Item 10,cost 10,location 10\n", "keys": "%<A-s>\"yys\\d<ret>dhhbms``x_ms("}
+{"name": "golf-csv-to-sql-12", "pane": "file", "text": "id 1,Item 1,cost 1,location 1\nid 2,Item 2,cost 2,location 2\nid 10,Item 10,cost 10,location 10\n", "keys": "%<A-s>\"yys\\d<ret>dhhbms``x_ms(I"}
+{"name": "golf-csv-to-sql-13", "pane": "file", "text": "id 1,Item 1,cost 1,location 1\nid 2,Item 2,cost 2,location 2\nid 10,Item 10,cost 10,location 10\n", "keys": "%<A-s>\"yys\\d<ret>dhhbms``x_ms(IINSERT INTO `database"}
+{"name": "golf-csv-to-sql-14", "pane": "file", "text": "id 1,Item 1,cost 1,location 1\nid 2,Item 2,cost 2,location 2\nid 10,Item 10,cost 10,location 10\n", "keys": "%<A-s>\"yys\\d<ret>dhhbms``x_ms(IINSERT INTO `database<esc>"}
+{"name": "golf-csv-to-sql-15", "pane": "file", "text": "id 1,Item 1,cost 1,location 1\nid 2,Item 2,cost 2,location 2\nid 10,Item 10,cost 10,location 10\n", "keys": "%<A-s>\"yys\\d<ret>dhhbms``x_ms(IINSERT INTO `database<esc>a.`table"}
+{"name": "golf-csv-to-sql-16", "pane": "file", "text": "id 1,Item 1,cost 1,location 1\nid 2,Item 2,cost 2,location 2\nid 10,Item 10,cost 10,location 10\n", "keys": "%<A-s>\"yys\\d<ret>dhhbms``x_ms(IINSERT INTO `database<esc>a.`table<esc>la"}
+{"name": "golf-csv-to-sql-17", "pane": "file", "text": "id 1,Item 1,cost 1,location 1\nid 2,Item 2,cost 2,location 2\nid 10,Item 10,cost 10,location 10\n", "keys": "%<A-s>\"yys\\d<ret>dhhbms``x_ms(IINSERT INTO `database<esc>a.`table<esc>la <esc>"}
+{"name": "golf-csv-to-sql-18", "pane": "file", "text": "id 1,Item 1,cost 1,location 1\nid 2,Item 2,cost 2,location 2\nid 10,Item 10,cost 10,location 10\n", "keys": "%<A-s>\"yys\\d<ret>dhhbms``x_ms(IINSERT INTO `database<esc>a.`table<esc>la <esc>AVALUES ("}
+{"name": "golf-csv-to-sql-19", "pane": "file", "text": "id 1,Item 1,cost 1,location 1\nid 2,Item 2,cost 2,location 2\nid 10,Item 10,cost 10,location 10\n", "keys": "%<A-s>\"yys\\d<ret>dhhbms``x_ms(IINSERT INTO `database<esc>a.`table<esc>la <esc>AVALUES (<esc>"}
+{"name": "golf-csv-to-sql-20", "pane": "file", "text": "id 1,Item 1,cost 1,location 1\nid 2,Item 2,cost 2,location 2\nid 10,Item 10,cost 10,location 10\n", "keys": "%<A-s>\"yys\\d<ret>dhhbms``x_ms(IINSERT INTO `database<esc>a.`table<esc>la <esc>AVALUES (<esc>\"yP"}
+{"name": "golf-csv-to-sql-21", "pane": "file", "text": "id 1,Item 1,cost 1,location 1\nid 2,Item 2,cost 2,location 2\nid 10,Item 10,cost 10,location 10\n", "keys": "%<A-s>\"yys\\d<ret>dhhbms``x_ms(IINSERT INTO `database<esc>a.`table<esc>la <esc>AVALUES (<esc>\"yPS,<ret>"}
+{"name": "golf-csv-to-sql-22", "pane": "file", "text": "id 1,Item 1,cost 1,location 1\nid 2,Item 2,cost 2,location 2\nid 10,Item 10,cost 10,location 10\n", "keys": "%<A-s>\"yys\\d<ret>dhhbms``x_ms(IINSERT INTO `database<esc>a.`table<esc>la <esc>AVALUES (<esc>\"yPS,<ret>ms'"}
+{"name": "golf-csv-to-sql-23", "pane": "file", "text": "id 1,Item 1,cost 1,location 1\nid 2,Item 2,cost 2,location 2\nid 10,Item 10,cost 10,location 10\n", "keys": "%<A-s>\"yys\\d<ret>dhhbms``x_ms(IINSERT INTO `database<esc>a.`table<esc>la <esc>AVALUES (<esc>\"yPS,<ret>ms'A;"}
+{"name": "golf-csv-to-sql-24", "pane": "file", "text": "id 1,Item 1,cost 1,location 1\nid 2,Item 2,cost 2,location 2\nid 10,Item 10,cost 10,location 10\n", "keys": "%<A-s>\"yys\\d<ret>dhhbms``x_ms(IINSERT INTO `database<esc>a.`table<esc>la <esc>AVALUES (<esc>\"yPS,<ret>ms'A;<esc>Fl"}
+{"name": "golf-csv-to-sql-25", "pane": "file", "text": "id 1,Item 1,cost 1,location 1\nid 2,Item 2,cost 2,location 2\nid 10,Item 10,cost 10,location 10\n", "keys": "%<A-s>\"yys\\d<ret>dhhbms``x_ms(IINSERT INTO `database<esc>a.`table<esc>la <esc>AVALUES (<esc>\"yPS,<ret>ms'A;<esc>Fl;"}
+{"name": "golf-csv-to-sql", "pane": "file", "text": "id 1,Item 1,cost 1,location 1\nid 2,Item 2,cost 2,location 2\nid 10,Item 10,cost 10,location 10\n", "keys": "%<A-s>\"yys\\d<ret>dhhbms``x_ms(IINSERT INTO `database<esc>a.`table<esc>la <esc>AVALUES (<esc>\"yPS,<ret>ms'A;<esc>Fl;~"}
+{"name": "golf-enumerate-and-align-01", "pane": "file", "text": "[\n { word: \"a\", count: 2565 },\n { word: \"and\", count: 1777 },\n { word: \"of\", count: 1331 },\n { word: \"that\", count: 1263 },\n { word: \"to\", count: 1030 },\n { word: \"in\", count: 1027 },\n { word: \"it\", count: 754 },\n { word: \"as\", count: 730 },\n { word: \"was\", count: 687 },\n { word: \"you\", count: 652 },\n { word: \"for\", count: 630 },\n];\n", "keys": "%"}
+{"name": "golf-enumerate-and-align-02", "pane": "file", "text": "[\n { word: \"a\", count: 2565 },\n { word: \"and\", count: 1777 },\n { word: \"of\", count: 1331 },\n { word: \"that\", count: 1263 },\n { word: \"to\", count: 1030 },\n { word: \"in\", count: 1027 },\n { word: \"it\", count: 754 },\n { word: \"as\", count: 730 },\n { word: \"was\", count: 687 },\n { word: \"you\", count: 652 },\n { word: \"for\", count: 630 },\n];\n", "keys": "%s"}
+{"name": "golf-enumerate-and-align-03", "pane": "file", "text": "[\n { word: \"a\", count: 2565 },\n { word: \"and\", count: 1777 },\n { word: \"of\", count: 1331 },\n { word: \"that\", count: 1263 },\n { word: \"to\", count: 1030 },\n { word: \"in\", count: 1027 },\n { word: \"it\", count: 754 },\n { word: \"as\", count: 730 },\n { word: \"was\", count: 687 },\n { word: \"you\", count: 652 },\n { word: \"for\", count: 630 },\n];\n", "keys": "%s\\{<ret>"}
+{"name": "golf-enumerate-and-align-04", "pane": "file", "text": "[\n { word: \"a\", count: 2565 },\n { word: \"and\", count: 1777 },\n { word: \"of\", count: 1331 },\n { word: \"that\", count: 1263 },\n { word: \"to\", count: 1030 },\n { word: \"in\", count: 1027 },\n { word: \"it\", count: 754 },\n { word: \"as\", count: 730 },\n { word: \"was\", count: 687 },\n { word: \"you\", count: 652 },\n { word: \"for\", count: 630 },\n];\n", "keys": "%s\\{<ret>a "}
+{"name": "golf-enumerate-and-align-05", "pane": "file", "text": "[\n { word: \"a\", count: 2565 },\n { word: \"and\", count: 1777 },\n { word: \"of\", count: 1331 },\n { word: \"that\", count: 1263 },\n { word: \"to\", count: 1030 },\n { word: \"in\", count: 1027 },\n { word: \"it\", count: 754 },\n { word: \"as\", count: 730 },\n { word: \"was\", count: 687 },\n { word: \"you\", count: 652 },\n { word: \"for\", count: 630 },\n];\n", "keys": "%s\\{<ret>a rank: "}
+{"name": "golf-enumerate-and-align-06", "pane": "file", "text": "[\n { word: \"a\", count: 2565 },\n { word: \"and\", count: 1777 },\n { word: \"of\", count: 1331 },\n { word: \"that\", count: 1263 },\n { word: \"to\", count: 1030 },\n { word: \"in\", count: 1027 },\n { word: \"it\", count: 754 },\n { word: \"as\", count: 730 },\n { word: \"was\", count: 687 },\n { word: \"you\", count: 652 },\n { word: \"for\", count: 630 },\n];\n", "keys": "%s\\{<ret>a rank: <C-r>#"}
+{"name": "golf-enumerate-and-align-07", "pane": "file", "text": "[\n { word: \"a\", count: 2565 },\n { word: \"and\", count: 1777 },\n { word: \"of\", count: 1331 },\n { word: \"that\", count: 1263 },\n { word: \"to\", count: 1030 },\n { word: \"in\", count: 1027 },\n { word: \"it\", count: 754 },\n { word: \"as\", count: 730 },\n { word: \"was\", count: 687 },\n { word: \"you\", count: 652 },\n { word: \"for\", count: 630 },\n];\n", "keys": "%s\\{<ret>a rank: <C-r>#,"}
+{"name": "golf-enumerate-and-align-08", "pane": "file", "text": "[\n { word: \"a\", count: 2565 },\n { word: \"and\", count: 1777 },\n { word: \"of\", count: 1331 },\n { word: \"that\", count: 1263 },\n { word: \"to\", count: 1030 },\n { word: \"in\", count: 1027 },\n { word: \"it\", count: 754 },\n { word: \"as\", count: 730 },\n { word: \"was\", count: 687 },\n { word: \"you\", count: 652 },\n { word: \"for\", count: 630 },\n];\n", "keys": "%s\\{<ret>a rank: <C-r>#,<esc>"}
+{"name": "golf-enumerate-and-align-09", "pane": "file", "text": "[\n { word: \"a\", count: 2565 },\n { word: \"and\", count: 1777 },\n { word: \"of\", count: 1331 },\n { word: \"that\", count: 1263 },\n { word: \"to\", count: 1030 },\n { word: \"in\", count: 1027 },\n { word: \"it\", count: 754 },\n { word: \"as\", count: 730 },\n { word: \"was\", count: 687 },\n { word: \"you\", count: 652 },\n { word: \"for\", count: 630 },\n];\n", "keys": "%s\\{<ret>a rank: <C-r>#,<esc>%s"}
+{"name": "golf-enumerate-and-align-10", "pane": "file", "text": "[\n { word: \"a\", count: 2565 },\n { word: \"and\", count: 1777 },\n { word: \"of\", count: 1331 },\n { word: \"that\", count: 1263 },\n { word: \"to\", count: 1030 },\n { word: \"in\", count: 1027 },\n { word: \"it\", count: 754 },\n { word: \"as\", count: 730 },\n { word: \"was\", count: 687 },\n { word: \"you\", count: 652 },\n { word: \"for\", count: 630 },\n];\n", "keys": "%s\\{<ret>a rank: <C-r>#,<esc>%s |\\d+<ret>"}
+{"name": "golf-enumerate-and-align", "pane": "file", "text": "[\n { word: \"a\", count: 2565 },\n { word: \"and\", count: 1777 },\n { word: \"of\", count: 1331 },\n { word: \"that\", count: 1263 },\n { word: \"to\", count: 1030 },\n { word: \"in\", count: 1027 },\n { word: \"it\", count: 754 },\n { word: \"as\", count: 730 },\n { word: \"was\", count: 687 },\n { word: \"you\", count: 652 },\n { word: \"for\", count: 630 },\n];\n", "keys": "%s\\{<ret>a rank: <C-r>#,<esc>%s |\\d+<ret>&"}
+{"name": "golf-enumerate-and-align-from09-09", "pane": "file", "text": "[\n { rank: 1, word: \"a\", count: 2565 },\n { rank: 2, word: \"and\", count: 1777 },\n { rank: 3, word: \"of\", count: 1331 },\n { rank: 4, word: \"that\", count: 1263 },\n { rank: 5, word: \"to\", count: 1030 },\n { rank: 6, word: \"in\", count: 1027 },\n { rank: 7, word: \"it\", count: 754 },\n { rank: 8, word: \"as\", count: 730 },\n { rank: 9, word: \"was\", count: 687 },\n { rank: 10, word: \"you\", count: 652 },\n { rank: 11, word: \"for\", count: 630 },\n];\n", "keys": "%s"}
+{"name": "golf-enumerate-and-align-from09-10", "pane": "file", "text": "[\n { rank: 1, word: \"a\", count: 2565 },\n { rank: 2, word: \"and\", count: 1777 },\n { rank: 3, word: \"of\", count: 1331 },\n { rank: 4, word: \"that\", count: 1263 },\n { rank: 5, word: \"to\", count: 1030 },\n { rank: 6, word: \"in\", count: 1027 },\n { rank: 7, word: \"it\", count: 754 },\n { rank: 8, word: \"as\", count: 730 },\n { rank: 9, word: \"was\", count: 687 },\n { rank: 10, word: \"you\", count: 652 },\n { rank: 11, word: \"for\", count: 630 },\n];\n", "keys": "%s |\\d+<ret>"}
+{"name": "golf-enumerate-and-align-from09", "pane": "file", "text": "[\n { rank: 1, word: \"a\", count: 2565 },\n { rank: 2, word: \"and\", count: 1777 },\n { rank: 3, word: \"of\", count: 1331 },\n { rank: 4, word: \"that\", count: 1263 },\n { rank: 5, word: \"to\", count: 1030 },\n { rank: 6, word: \"in\", count: 1027 },\n { rank: 7, word: \"it\", count: 754 },\n { rank: 8, word: \"as\", count: 730 },\n { rank: 9, word: \"was\", count: 687 },\n { rank: 10, word: \"you\", count: 652 },\n { rank: 11, word: \"for\", count: 630 },\n];\n", "keys": "%s |\\d+<ret>&"}
+{"name": "golf-export-from-mod-01", "pane": "file", "text": "mod generate_demos;\nmod mdbook_preprocessor;\nmod validate;\n", "keys": "%"}
+{"name": "golf-export-from-mod-02", "pane": "file", "text": "mod generate_demos;\nmod mdbook_preprocessor;\nmod validate;\n", "keys": "%yp"}
+{"name": "golf-export-from-mod-03", "pane": "file", "text": "mod generate_demos;\nmod mdbook_preprocessor;\nmod validate;\n", "keys": "%yp[<space>"}
+{"name": "golf-export-from-mod-04", "pane": "file", "text": "mod generate_demos;\nmod mdbook_preprocessor;\nmod validate;\n", "keys": "%yp[<space><A-s>gse"}
+{"name": "golf-export-from-mod-05", "pane": "file", "text": "mod generate_demos;\nmod mdbook_preprocessor;\nmod validate;\n", "keys": "%yp[<space><A-s>gsecpub use<esc>"}
+{"name": "golf-export-from-mod-06", "pane": "file", "text": "mod generate_demos;\nmod mdbook_preprocessor;\nmod validate;\n", "keys": "%yp[<space><A-s>gsecpub use<esc>ley"}
+{"name": "golf-export-from-mod-07", "pane": "file", "text": "mod generate_demos;\nmod mdbook_preprocessor;\nmod validate;\n", "keys": "%yp[<space><A-s>gsecpub use<esc>leyp"}
+{"name": "golf-export-from-mod", "pane": "file", "text": "mod generate_demos;\nmod mdbook_preprocessor;\nmod validate;\n", "keys": "%yp[<space><A-s>gsecpub use<esc>leypi::"}
+{"name": "golf-function-into-class-01", "pane": "file", "text": "def calculate_area(length, width):\n result = length * width\n return result\n\ndef calculate_perimiter(length, width):\n result = 2 * (length + width)\n return result\n\ndef calculate_volume(length, width, height):\n result = length * width * height\n return result\n", "keys": "%"}
+{"name": "golf-function-into-class-02", "pane": "file", "text": "def calculate_area(length, width):\n result = length * width\n return result\n\ndef calculate_perimiter(length, width):\n result = 2 * (length + width)\n return result\n\ndef calculate_volume(length, width, height):\n result = length * width * height\n return result\n", "keys": "%scalculate<ret>"}
+{"name": "golf-function-into-class-03", "pane": "file", "text": "def calculate_area(length, width):\n result = length * width\n return result\n\ndef calculate_perimiter(length, width):\n result = 2 * (length + width)\n return result\n\ndef calculate_volume(length, width, height):\n result = length * width * height\n return result\n", "keys": "%scalculate<ret>cget"}
+{"name": "golf-function-into-class-04", "pane": "file", "text": "def calculate_area(length, width):\n result = length * width\n return result\n\ndef calculate_perimiter(length, width):\n result = 2 * (length + width)\n return result\n\ndef calculate_volume(length, width, height):\n result = length * width * height\n return result\n", "keys": "%scalculate<ret>cget<esc>"}
+{"name": "golf-function-into-class-05", "pane": "file", "text": "def calculate_area(length, width):\n result = length * width\n return result\n\ndef calculate_perimiter(length, width):\n result = 2 * (length + width)\n return result\n\ndef calculate_volume(length, width, height):\n result = length * width * height\n return result\n", "keys": "%scalculate<ret>cget<esc>O@staticmethod"}
+{"name": "golf-function-into-class-06", "pane": "file", "text": "def calculate_area(length, width):\n result = length * width\n return result\n\ndef calculate_perimiter(length, width):\n result = 2 * (length + width)\n return result\n\ndef calculate_volume(length, width, height):\n result = length * width * height\n return result\n", "keys": "%scalculate<ret>cget<esc>O@staticmethod<esc>"}
+{"name": "golf-function-into-class-07", "pane": "file", "text": "def calculate_area(length, width):\n result = length * width\n return result\n\ndef calculate_perimiter(length, width):\n result = 2 * (length + width)\n return result\n\ndef calculate_volume(length, width, height):\n result = length * width * height\n return result\n", "keys": "%scalculate<ret>cget<esc>O@staticmethod<esc>jj"}
+{"name": "golf-function-into-class-08", "pane": "file", "text": "def calculate_area(length, width):\n result = length * width\n return result\n\ndef calculate_perimiter(length, width):\n result = 2 * (length + width)\n return result\n\ndef calculate_volume(length, width, height):\n result = length * width * height\n return result\n", "keys": "%scalculate<ret>cget<esc>O@staticmethod<esc>jjvgl"}
+{"name": "golf-function-into-class-09", "pane": "file", "text": "def calculate_area(length, width):\n result = length * width\n return result\n\ndef calculate_perimiter(length, width):\n result = 2 * (length + width)\n return result\n\ndef calculate_volume(length, width, height):\n result = length * width * height\n return result\n", "keys": "%scalculate<ret>cget<esc>O@staticmethod<esc>jjvgly"}
+{"name": "golf-function-into-class-10", "pane": "file", "text": "def calculate_area(length, width):\n result = length * width\n return result\n\ndef calculate_perimiter(length, width):\n result = 2 * (length + width)\n return result\n\ndef calculate_volume(length, width, height):\n result = length * width * height\n return result\n", "keys": "%scalculate<ret>cget<esc>O@staticmethod<esc>jjvglyx<A-d>"}
+{"name": "golf-function-into-class-11", "pane": "file", "text": "def calculate_area(length, width):\n result = length * width\n return result\n\ndef calculate_perimiter(length, width):\n result = 2 * (length + width)\n return result\n\ndef calculate_volume(length, width, height):\n result = length * width * height\n return result\n", "keys": "%scalculate<ret>cget<esc>O@staticmethod<esc>jjvglyx<A-d>xb"}
+{"name": "golf-function-into-class-12", "pane": "file", "text": "def calculate_area(length, width):\n result = length * width\n return result\n\ndef calculate_perimiter(length, width):\n result = 2 * (length + width)\n return result\n\ndef calculate_volume(length, width, height):\n result = length * width * height\n return result\n", "keys": "%scalculate<ret>cget<esc>O@staticmethod<esc>jjvglyx<A-d>xbR"}
+{"name": "golf-function-into-class-13", "pane": "file", "text": "def calculate_area(length, width):\n result = length * width\n return result\n\ndef calculate_perimiter(length, width):\n result = 2 * (length + width)\n return result\n\ndef calculate_volume(length, width, height):\n result = length * width * height\n return result\n", "keys": "%scalculate<ret>cget<esc>O@staticmethod<esc>jjvglyx<A-d>xbRkxx"}
+{"name": "golf-function-into-class-14", "pane": "file", "text": "def calculate_area(length, width):\n result = length * width\n return result\n\ndef calculate_perimiter(length, width):\n result = 2 * (length + width)\n return result\n\ndef calculate_volume(length, width, height):\n result = length * width * height\n return result\n", "keys": "%scalculate<ret>cget<esc>O@staticmethod<esc>jjvglyx<A-d>xbRkxxslength|width|height<ret>"}
+{"name": "golf-function-into-class-15", "pane": "file", "text": "def calculate_area(length, width):\n result = length * width\n return result\n\ndef calculate_perimiter(length, width):\n result = 2 * (length + width)\n return result\n\ndef calculate_volume(length, width, height):\n result = length * width * height\n return result\n", "keys": "%scalculate<ret>cget<esc>O@staticmethod<esc>jjvglyx<A-d>xbRkxxslength|width|height<ret>b"}
+{"name": "golf-function-into-class-16", "pane": "file", "text": "def calculate_area(length, width):\n result = length * width\n return result\n\ndef calculate_perimiter(length, width):\n result = 2 * (length + width)\n return result\n\ndef calculate_volume(length, width, height):\n result = length * width * height\n return result\n", "keys": "%scalculate<ret>cget<esc>O@staticmethod<esc>jjvglyx<A-d>xbRkxxslength|width|height<ret>blll"}
+{"name": "golf-function-into-class-17", "pane": "file", "text": "def calculate_area(length, width):\n result = length * width\n return result\n\ndef calculate_perimiter(length, width):\n result = 2 * (length + width)\n return result\n\ndef calculate_volume(length, width, height):\n result = length * width * height\n return result\n", "keys": "%scalculate<ret>cget<esc>O@staticmethod<esc>jjvglyx<A-d>xbRkxxslength|width|height<ret>bllled"}
+{"name": "golf-function-into-class-18", "pane": "file", "text": "def calculate_area(length, width):\n result = length * width\n return result\n\ndef calculate_perimiter(length, width):\n result = 2 * (length + width)\n return result\n\ndef calculate_volume(length, width, height):\n result = length * width * height\n return result\n", "keys": "%scalculate<ret>cget<esc>O@staticmethod<esc>jjvglyx<A-d>xbRkxxslength|width|height<ret>bllled%<gt>"}
+{"name": "golf-function-into-class-19", "pane": "file", "text": "def calculate_area(length, width):\n result = length * width\n return result\n\ndef calculate_perimiter(length, width):\n result = 2 * (length + width)\n return result\n\ndef calculate_volume(length, width, height):\n result = length * width * height\n return result\n", "keys": "%scalculate<ret>cget<esc>O@staticmethod<esc>jjvglyx<A-d>xbRkxxslength|width|height<ret>bllled%<gt>O<backspace>"}
+{"name": "golf-function-into-class", "pane": "file", "text": "def calculate_area(length, width):\n result = length * width\n return result\n\ndef calculate_perimiter(length, width):\n result = 2 * (length + width)\n return result\n\ndef calculate_volume(length, width, height):\n result = length * width * height\n return result\n", "keys": "%scalculate<ret>cget<esc>O@staticmethod<esc>jjvglyx<A-d>xbRkxxslength|width|height<ret>bllled%<gt>O<backspace>class Calculator:"}
+{"name": "golf-function-into-class-from18-18", "pane": "file", "text": "@staticmethod\ndef get_area(len, wid):\n return len * wid\n\n@staticmethod\ndef get_perimiter(len, wid):\n return 2 * (len + wid)\n\n@staticmethod\ndef get_volume(len, wid, hei):\n return len * wid * hei\n", "keys": "%<gt>"}
+{"name": "golf-function-into-class-from18-19", "pane": "file", "text": "@staticmethod\ndef get_area(len, wid):\n return len * wid\n\n@staticmethod\ndef get_perimiter(len, wid):\n return 2 * (len + wid)\n\n@staticmethod\ndef get_volume(len, wid, hei):\n return len * wid * hei\n", "keys": "%<gt>O<backspace>"}
+{"name": "golf-function-into-class-from18", "pane": "file", "text": "@staticmethod\ndef get_area(len, wid):\n return len * wid\n\n@staticmethod\ndef get_perimiter(len, wid):\n return 2 * (len + wid)\n\n@staticmethod\ndef get_volume(len, wid, hei):\n return len * wid * hei\n", "keys": "%<gt>O<backspace>class Calculator:"}
+{"name": "golf-invert-dictionary-01", "pane": "file", "text": "var color_to_points = {\n \"red\" = 0,\n \"orange\" = 5,\n \"yellow\" = 10,\n \"green\" = 15,\n \"blue\" = 20,\n \"purple\" = 30,\n \"black\" = 50,\n}\n", "keys": "web"}
+{"name": "golf-invert-dictionary-02", "pane": "file", "text": "var color_to_points = {\n \"red\" = 0,\n \"orange\" = 5,\n \"yellow\" = 10,\n \"green\" = 15,\n \"blue\" = 20,\n \"purple\" = 30,\n \"black\" = 50,\n}\n", "keys": "webS_to_<ret>"}
+{"name": "golf-invert-dictionary-03", "pane": "file", "text": "var color_to_points = {\n \"red\" = 0,\n \"orange\" = 5,\n \"yellow\" = 10,\n \"green\" = 15,\n \"blue\" = 20,\n \"purple\" = 30,\n \"black\" = 50,\n}\n", "keys": "webS_to_<ret><A-(>"}
+{"name": "golf-invert-dictionary-04", "pane": "file", "text": "var color_to_points = {\n \"red\" = 0,\n \"orange\" = 5,\n \"yellow\" = 10,\n \"green\" = 15,\n \"blue\" = 20,\n \"purple\" = 30,\n \"black\" = 50,\n}\n", "keys": "webS_to_<ret><A-(>Q"}
+{"name": "golf-invert-dictionary-05", "pane": "file", "text": "var color_to_points = {\n \"red\" = 0,\n \"orange\" = 5,\n \"yellow\" = 10,\n \"green\" = 15,\n \"blue\" = 20,\n \"purple\" = 30,\n \"black\" = 50,\n}\n", "keys": "webS_to_<ret><A-(>Qx"}
+{"name": "golf-invert-dictionary-06", "pane": "file", "text": "var color_to_points = {\n \"red\" = 0,\n \"orange\" = 5,\n \"yellow\" = 10,\n \"green\" = 15,\n \"blue\" = 20,\n \"purple\" = 30,\n \"black\" = 50,\n}\n", "keys": "webS_to_<ret><A-(>Qxt,"}
+{"name": "golf-invert-dictionary-07", "pane": "file", "text": "var color_to_points = {\n \"red\" = 0,\n \"orange\" = 5,\n \"yellow\" = 10,\n \"green\" = 15,\n \"blue\" = 20,\n \"purple\" = 30,\n \"black\" = 50,\n}\n", "keys": "webS_to_<ret><A-(>Qxt,S=<ret>"}
+{"name": "golf-invert-dictionary-08", "pane": "file", "text": "var color_to_points = {\n \"red\" = 0,\n \"orange\" = 5,\n \"yellow\" = 10,\n \"green\" = 15,\n \"blue\" = 20,\n \"purple\" = 30,\n \"black\" = 50,\n}\n", "keys": "webS_to_<ret><A-(>Qxt,S=<ret>_"}
+{"name": "golf-invert-dictionary-09", "pane": "file", "text": "var color_to_points = {\n \"red\" = 0,\n \"orange\" = 5,\n \"yellow\" = 10,\n \"green\" = 15,\n \"blue\" = 20,\n \"purple\" = 30,\n \"black\" = 50,\n}\n", "keys": "webS_to_<ret><A-(>Qxt,S=<ret>_<A-(>"}
+{"name": "golf-invert-dictionary-10", "pane": "file", "text": "var color_to_points = {\n \"red\" = 0,\n \"orange\" = 5,\n \"yellow\" = 10,\n \"green\" = 15,\n \"blue\" = 20,\n \"purple\" = 30,\n \"black\" = 50,\n}\n", "keys": "webS_to_<ret><A-(>Qxt,S=<ret>_<A-(>Q"}
+{"name": "golf-invert-dictionary", "pane": "file", "text": "var color_to_points = {\n \"red\" = 0,\n \"orange\" = 5,\n \"yellow\" = 10,\n \"green\" = 15,\n \"blue\" = 20,\n \"purple\" = 30,\n \"black\" = 50,\n}\n", "keys": "webS_to_<ret><A-(>Qxt,S=<ret>_<A-(>Q6q"}
+{"name": "golf-invert-dictionary-2-01", "pane": "file", "text": "var color_to_points = {\n \"red\" = 0,\n \"orange\" = 5,\n \"yellow\" = 10,\n \"green\" = 15,\n \"blue\" = 20,\n \"purple\" = 30,\n \"black\" = 50,\n}\n", "keys": "web"}
+{"name": "golf-invert-dictionary-2-02", "pane": "file", "text": "var color_to_points = {\n \"red\" = 0,\n \"orange\" = 5,\n \"yellow\" = 10,\n \"green\" = 15,\n \"blue\" = 20,\n \"purple\" = 30,\n \"black\" = 50,\n}\n", "keys": "webS_to_<ret>"}
+{"name": "golf-invert-dictionary-2-03", "pane": "file", "text": "var color_to_points = {\n \"red\" = 0,\n \"orange\" = 5,\n \"yellow\" = 10,\n \"green\" = 15,\n \"blue\" = 20,\n \"purple\" = 30,\n \"black\" = 50,\n}\n", "keys": "webS_to_<ret><A-(>"}
+{"name": "golf-invert-dictionary-2-04", "pane": "file", "text": "var color_to_points = {\n \"red\" = 0,\n \"orange\" = 5,\n \"yellow\" = 10,\n \"green\" = 15,\n \"blue\" = 20,\n \"purple\" = 30,\n \"black\" = 50,\n}\n", "keys": "webS_to_<ret><A-(>x"}
+{"name": "golf-invert-dictionary-2-05", "pane": "file", "text": "var color_to_points = {\n \"red\" = 0,\n \"orange\" = 5,\n \"yellow\" = 10,\n \"green\" = 15,\n \"blue\" = 20,\n \"purple\" = 30,\n \"black\" = 50,\n}\n", "keys": "webS_to_<ret><A-(>xt}"}
+{"name": "golf-invert-dictionary-2-06", "pane": "file", "text": "var color_to_points = {\n \"red\" = 0,\n \"orange\" = 5,\n \"yellow\" = 10,\n \"green\" = 15,\n \"blue\" = 20,\n \"purple\" = 30,\n \"black\" = 50,\n}\n", "keys": "webS_to_<ret><A-(>xt}S,|=<ret>"}
+{"name": "golf-invert-dictionary-2-07", "pane": "file", "text": "var color_to_points = {\n \"red\" = 0,\n \"orange\" = 5,\n \"yellow\" = 10,\n \"green\" = 15,\n \"blue\" = 20,\n \"purple\" = 30,\n \"black\" = 50,\n}\n", "keys": "webS_to_<ret><A-(>xt}S,|=<ret>_"}
+{"name": "golf-invert-dictionary-2", "pane": "file", "text": "var color_to_points = {\n \"red\" = 0,\n \"orange\" = 5,\n \"yellow\" = 10,\n \"green\" = 15,\n \"blue\" = 20,\n \"purple\" = 30,\n \"black\" = 50,\n}\n", "keys": "webS_to_<ret><A-(>xt}S,|=<ret>_2<A-(>"}
+{"name": "golf-object-into-array-01", "pane": "file", "text": "const palette = {\n apricot: \"#f47868\",\n lightning: \"#ffcd1c\",\n delta: \"6f44f0\",\n};\n", "keys": "j"}
+{"name": "golf-object-into-array-02", "pane": "file", "text": "const palette = {\n apricot: \"#f47868\",\n lightning: \"#ffcd1c\",\n delta: \"6f44f0\",\n};\n", "keys": "jmr{["}
+{"name": "golf-object-into-array-03", "pane": "file", "text": "const palette = {\n apricot: \"#f47868\",\n lightning: \"#ffcd1c\",\n delta: \"6f44f0\",\n};\n", "keys": "jmr{[mi["}
+{"name": "golf-object-into-array-04", "pane": "file", "text": "const palette = {\n apricot: \"#f47868\",\n lightning: \"#ffcd1c\",\n delta: \"6f44f0\",\n};\n", "keys": "jmr{[mi[s"}
+{"name": "golf-object-into-array-05", "pane": "file", "text": "const palette = {\n apricot: \"#f47868\",\n lightning: \"#ffcd1c\",\n delta: \"6f44f0\",\n};\n", "keys": "jmr{[mi[s:<ret>"}
+{"name": "golf-object-into-array-06", "pane": "file", "text": "const palette = {\n apricot: \"#f47868\",\n lightning: \"#ffcd1c\",\n delta: \"6f44f0\",\n};\n", "keys": "jmr{[mi[s:<ret>r,"}
+{"name": "golf-object-into-array-07", "pane": "file", "text": "const palette = {\n apricot: \"#f47868\",\n lightning: \"#ffcd1c\",\n delta: \"6f44f0\",\n};\n", "keys": "jmr{[mi[s:<ret>r,be"}
+{"name": "golf-object-into-array-08", "pane": "file", "text": "const palette = {\n apricot: \"#f47868\",\n lightning: \"#ffcd1c\",\n delta: \"6f44f0\",\n};\n", "keys": "jmr{[mi[s:<ret>r,bems\""}
+{"name": "golf-object-into-array-09", "pane": "file", "text": "const palette = {\n apricot: \"#f47868\",\n lightning: \"#ffcd1c\",\n delta: \"6f44f0\",\n};\n", "keys": "jmr{[mi[s:<ret>r,bems\"vt,"}
+{"name": "golf-object-into-array", "pane": "file", "text": "const palette = {\n apricot: \"#f47868\",\n lightning: \"#ffcd1c\",\n delta: \"6f44f0\",\n};\n", "keys": "jmr{[mi[s:<ret>r,bems\"vt,ms["}
+{"name": "golf-reverse-golf-example-01", "pane": "file", "text": "# snake_case to camelCase\n\nRename all fields to be camelCase.\n\n## Before\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n\n## After\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n", "keys": "eb"}
+{"name": "golf-reverse-golf-example-02", "pane": "file", "text": "# snake_case to camelCase\n\nRename all fields to be camelCase.\n\n## Before\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n\n## After\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n", "keys": "eby"}
+{"name": "golf-reverse-golf-example-03", "pane": "file", "text": "# snake_case to camelCase\n\nRename all fields to be camelCase.\n\n## Before\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n\n## After\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n", "keys": "ebyxb"}
+{"name": "golf-reverse-golf-example-04", "pane": "file", "text": "# snake_case to camelCase\n\nRename all fields to be camelCase.\n\n## Before\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n\n## After\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n", "keys": "ebyxb*"}
+{"name": "golf-reverse-golf-example-05", "pane": "file", "text": "# snake_case to camelCase\n\nRename all fields to be camelCase.\n\n## Before\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n\n## After\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n", "keys": "ebyxb*R"}
+{"name": "golf-reverse-golf-example-06", "pane": "file", "text": "# snake_case to camelCase\n\nRename all fields to be camelCase.\n\n## Before\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n\n## After\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n", "keys": "ebyxb*Rv"}
+{"name": "golf-reverse-golf-example-07", "pane": "file", "text": "# snake_case to camelCase\n\nRename all fields to be camelCase.\n\n## Before\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n\n## After\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n", "keys": "ebyxb*Rv\"\"N"}
+{"name": "golf-reverse-golf-example-08", "pane": "file", "text": "# snake_case to camelCase\n\nRename all fields to be camelCase.\n\n## Before\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n\n## After\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n", "keys": "ebyxb*Rv\"\"Nn"}
+{"name": "golf-reverse-golf-example-09", "pane": "file", "text": "# snake_case to camelCase\n\nRename all fields to be camelCase.\n\n## Before\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n\n## After\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n", "keys": "ebyxb*Rv\"\"Nn<A-)>"}
+{"name": "golf-reverse-golf-example-10", "pane": "file", "text": "# snake_case to camelCase\n\nRename all fields to be camelCase.\n\n## Before\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n\n## After\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n", "keys": "ebyxb*Rv\"\"Nn<A-)>%"}
+{"name": "golf-reverse-golf-example-11", "pane": "file", "text": "# snake_case to camelCase\n\nRename all fields to be camelCase.\n\n## Before\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n\n## After\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n", "keys": "ebyxb*Rv\"\"Nn<A-)>%s`+j<ret>"}
+{"name": "golf-reverse-golf-example-12", "pane": "file", "text": "# snake_case to camelCase\n\nRename all fields to be camelCase.\n\n## Before\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n\n## After\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n", "keys": "ebyxb*Rv\"\"Nn<A-)>%s`+j<ret>f;"}
+{"name": "golf-reverse-golf-example", "pane": "file", "text": "# snake_case to camelCase\n\nRename all fields to be camelCase.\n\n## Before\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n\n## After\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n", "keys": "ebyxb*Rv\"\"Nn<A-)>%s`+j<ret>f;<A-(>"}
+{"name": "golf-snake-case-to-camel-case-01", "pane": "file", "text": "const user_profile = {\n first_name: \"John\",\n last_name: \"Doe\",\n birth_date: \"1990-05-15\",\n email_address: \"[email protected]\",\n phone_number: \"555-123-4567\",\n mailing_address: {\n street_name: \"Main Street\",\n house_number: 123,\n apartment_unit: \"4B\",\n zip_code: \"10001\",\n city_name: \"New York\",\n },\n};\n", "keys": "%"}
+{"name": "golf-snake-case-to-camel-case-02", "pane": "file", "text": "const user_profile = {\n first_name: \"John\",\n last_name: \"Doe\",\n birth_date: \"1990-05-15\",\n email_address: \"[email protected]\",\n phone_number: \"555-123-4567\",\n mailing_address: {\n street_name: \"Main Street\",\n house_number: 123,\n apartment_unit: \"4B\",\n zip_code: \"10001\",\n city_name: \"New York\",\n },\n};\n", "keys": "%s_<ret>"}
+{"name": "golf-snake-case-to-camel-case-03", "pane": "file", "text": "const user_profile = {\n first_name: \"John\",\n last_name: \"Doe\",\n birth_date: \"1990-05-15\",\n email_address: \"[email protected]\",\n phone_number: \"555-123-4567\",\n mailing_address: {\n street_name: \"Main Street\",\n house_number: 123,\n apartment_unit: \"4B\",\n zip_code: \"10001\",\n city_name: \"New York\",\n },\n};\n", "keys": "%s_<ret>5)"}
+{"name": "golf-snake-case-to-camel-case-04", "pane": "file", "text": "const user_profile = {\n first_name: \"John\",\n last_name: \"Doe\",\n birth_date: \"1990-05-15\",\n email_address: \"[email protected]\",\n phone_number: \"555-123-4567\",\n mailing_address: {\n street_name: \"Main Street\",\n house_number: 123,\n apartment_unit: \"4B\",\n zip_code: \"10001\",\n city_name: \"New York\",\n },\n};\n", "keys": "%s_<ret>5)<A-,>"}
+{"name": "golf-snake-case-to-camel-case-05", "pane": "file", "text": "const user_profile = {\n first_name: \"John\",\n last_name: \"Doe\",\n birth_date: \"1990-05-15\",\n email_address: \"[email protected]\",\n phone_number: \"555-123-4567\",\n mailing_address: {\n street_name: \"Main Street\",\n house_number: 123,\n apartment_unit: \"4B\",\n zip_code: \"10001\",\n city_name: \"New York\",\n },\n};\n", "keys": "%s_<ret>5)<A-,>d"}
+{"name": "golf-snake-case-to-camel-case", "pane": "file", "text": "const user_profile = {\n first_name: \"John\",\n last_name: \"Doe\",\n birth_date: \"1990-05-15\",\n email_address: \"[email protected]\",\n phone_number: \"555-123-4567\",\n mailing_address: {\n street_name: \"Main Street\",\n house_number: 123,\n apartment_unit: \"4B\",\n zip_code: \"10001\",\n city_name: \"New York\",\n },\n};\n", "keys": "%s_<ret>5)<A-,>d~"}
+{"name": "golf-text-into-array-01", "pane": "file", "text": "Hello\nThis\nIs\nHelix\n", "keys": "%"}
+{"name": "golf-text-into-array-02", "pane": "file", "text": "Hello\nThis\nIs\nHelix\n", "keys": "%<A-s>"}
+{"name": "golf-text-into-array-03", "pane": "file", "text": "Hello\nThis\nIs\nHelix\n", "keys": "%<A-s>ms\""}
+{"name": "golf-text-into-array-04", "pane": "file", "text": "Hello\nThis\nIs\nHelix\n", "keys": "%<A-s>ms\"<A-J>i,"}
+{"name": "golf-text-into-array", "pane": "file", "text": "Hello\nThis\nIs\nHelix\n", "keys": "%<A-s>ms\"<A-J>i,<esc>xms["}
diff --git a/test/hxcases/parity-waivers.jsonl b/test/hxcases/parity-waivers.jsonl
index 39a6a7c9..e28f3ff5 100644
--- a/test/hxcases/parity-waivers.jsonl
+++ b/test/hxcases/parity-waivers.jsonl
@@ -11,3 +11,9 @@
{"name":"comment-tab-indent","reason":"The terminal expands literal tabs to spaces before editing.","reference":{"name":"comment-tab-indent","text":"\t# alpha\n\t# beta\n","mode":"normal","cursor":{"row":1,"col":7},"anchor":{"row":0,"col":0}},"expected":{"name":"comment-tab-indent","text":" # alpha\n # beta\n","mode":"normal","cursor":{"row":1,"col":14},"anchor":{"row":0,"col":0}}}
{"name":"comment-noeol","reason":"Terminal capture restores a trailing newline that the source omits.","reference":{"name":"comment-noeol","text":"# alpha","mode":"normal","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":2}},"expected":{"name":"comment-noeol","text":"# alpha\n","mode":"normal","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":2}}}
{"name":"comment-only-blank","reason":"Terminal capture expands tabs and trims trailing blank rows.","reference":{"name":"comment-only-blank","text":" \n\t\n","mode":"normal","cursor":{"row":1,"col":1},"anchor":{"row":0,"col":0}},"expected":{"name":"comment-only-blank","text":" \n","mode":"normal","cursor":{"row":0,"col":3},"anchor":{"row":0,"col":0}}}
+{"name":"ins-backspace-indent-tab","reason":"The terminal expands literal tabs to spaces before editing.","reference":{"name":"ins-backspace-indent-tab","text":"\tx\n","mode":"insert","cursor":{"row":0,"col":1},"anchor":{"row":0,"col":1}},"expected":{"name":"ins-backspace-indent-tab","text":" x\n","mode":"insert","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}}
+{"name":"dot-append-count","reason":"A terminal's text is not the editor's to grow: a at its end adds no newline to append before, where a file gets one (helix append_mode).","reference":{"name":"dot-append-count","text":"aYZb\ncd\nYZYZYZ\n","mode":"normal","cursor":{"row":2,"col":5},"anchor":{"row":1,"col":2}},"expected":{"name":"dot-append-count","text":"aYZb\ncd\nYZYZYZ","mode":"normal","cursor":{"row":2,"col":6},"anchor":{"row":2,"col":6}}}
+{"name":"sticky-view-scroll","reason":"Terminal scroll limits change where scrolloff places the cursor.","reference":{"name":"sticky-view-scroll","text":"line 0\nline 1\nline 2\nline 3\nline 4\nline 5\nline 6\nline 7\nline 8\nline 9\nline 10\nline 11\nline 12\nline 13\nline 14\nline 15\nline 16\nline 17\nline 18\nline 19\nline 20\nline 21\nline 22\nline 23\nline 24\nline 25\nline 26\nline 27\nline 28\nline 29\nline 30\nline 31\nline 32\nline 33\nline 34\nline 35\nline 36\nline 37\nline 38\nline 39\nline 40\nline 41\nline 42\nline 43\nline 44\nline 45\nline 46\nline 47\nline 48\nline 49\nline 50\nline 51\nline 52\nline 53\nline 54\nline 55\nline 56\nline 57\nline 58\nline 59\n","mode":"normal","cursor":{"row":6,"col":0},"anchor":{"row":6,"col":0}},"expected":{"name":"sticky-view-scroll","text":"line 0\nline 1\nline 2\nline 3\nline 4\nline 5\nline 6\nline 7\nline 8\nline 9\nline 10\nline 11\nline 12\nline 13\nline 14\nline 15\nline 16\nline 17\nline 18\nline 19\nline 20\nline 21\nline 22\nline 23\nline 24\nline 25\nline 26\nline 27\nline 28\nline 29\nline 30\nline 31\nline 32\nline 33\nline 34\nline 35\nline 36\nline 37\nline 38\nline 39\nline 40\nline 41\nline 42\nline 43\nline 44\nline 45\nline 46\nline 47\nline 48\nline 49\nline 50\nline 51\nline 52\nline 53\nline 54\nline 55\nline 56\nline 57\nline 58\nline 59\n","mode":"normal","cursor":{"row":43,"col":0},"anchor":{"row":43,"col":0}}}
+{"name":"sticky-view-then-move","reason":"Terminal scroll limits change where scrolloff places the cursor.","reference":{"name":"sticky-view-then-move","text":"line 0\nline 1\nline 2\nline 3\nline 4\nline 5\nline 6\nline 7\nline 8\nline 9\nline 10\nline 11\nline 12\nline 13\nline 14\nline 15\nline 16\nline 17\nline 18\nline 19\nline 20\nline 21\nline 22\nline 23\nline 24\nline 25\nline 26\nline 27\nline 28\nline 29\nline 30\nline 31\nline 32\nline 33\nline 34\nline 35\nline 36\nline 37\nline 38\nline 39\nline 40\nline 41\nline 42\nline 43\nline 44\nline 45\nline 46\nline 47\nline 48\nline 49\nline 50\nline 51\nline 52\nline 53\nline 54\nline 55\nline 56\nline 57\nline 58\nline 59\n","mode":"normal","cursor":{"row":6,"col":0},"anchor":{"row":6,"col":0}},"expected":{"name":"sticky-view-then-move","text":"line 0\nline 1\nline 2\nline 3\nline 4\nline 5\nline 6\nline 7\nline 8\nline 9\nline 10\nline 11\nline 12\nline 13\nline 14\nline 15\nline 16\nline 17\nline 18\nline 19\nline 20\nline 21\nline 22\nline 23\nline 24\nline 25\nline 26\nline 27\nline 28\nline 29\nline 30\nline 31\nline 32\nline 33\nline 34\nline 35\nline 36\nline 37\nline 38\nline 39\nline 40\nline 41\nline 42\nline 43\nline 44\nline 45\nline 46\nline 47\nline 48\nline 49\nline 50\nline 51\nline 52\nline 53\nline 54\nline 55\nline 56\nline 57\nline 58\nline 59\n","mode":"normal","cursor":{"row":44,"col":0},"anchor":{"row":44,"col":0}}}
+{"name":"sticky-view-ignores","reason":"Terminal scroll limits change where scrolloff places the cursor.","reference":{"name":"sticky-view-ignores","text":"line 0\nline 1\nline 2\nline 3\nline 4\nline 5\nline 6\nline 7\nline 8\nline 9\nline 10\nline 11\nline 12\nline 13\nline 14\nline 15\nline 16\nline 17\nline 18\nline 19\nline 20\nline 21\nline 22\nline 23\nline 24\nline 25\nline 26\nline 27\nline 28\nline 29\nline 30\nline 31\nline 32\nline 33\nline 34\nline 35\nline 36\nline 37\nline 38\nline 39\nline 40\nline 41\nline 42\nline 43\nline 44\nline 45\nline 46\nline 47\nline 48\nline 49\nline 50\nline 51\nline 52\nline 53\nline 54\nline 55\nline 56\nline 57\nline 58\nline 59\n","mode":"normal","cursor":{"row":5,"col":0},"anchor":{"row":5,"col":0}},"expected":{"name":"sticky-view-ignores","text":"line 0\nline 1\nline 2\nline 3\nline 4\nline 5\nline 6\nline 7\nline 8\nline 9\nline 10\nline 11\nline 12\nline 13\nline 14\nline 15\nline 16\nline 17\nline 18\nline 19\nline 20\nline 21\nline 22\nline 23\nline 24\nline 25\nline 26\nline 27\nline 28\nline 29\nline 30\nline 31\nline 32\nline 33\nline 34\nline 35\nline 36\nline 37\nline 38\nline 39\nline 40\nline 41\nline 42\nline 43\nline 44\nline 45\nline 46\nline 47\nline 48\nline 49\nline 50\nline 51\nline 52\nline 53\nline 54\nline 55\nline 56\nline 57\nline 58\nline 59\n","mode":"normal","cursor":{"row":43,"col":0},"anchor":{"row":43,"col":0}}}
+{"name":"view-z-not-sticky","reason":"Terminal scroll limits change where scrolloff places the cursor.","reference":{"name":"view-z-not-sticky","text":"line 0\nline 1\nline 2\nline 3\nline 4\nline 5\nline 6\nline 7\nline 8\nline 9\nline 10\nline 11\nline 12\nline 13\nline 14\nline 15\nline 16\nline 17\nline 18\nline 19\nline 20\nline 21\nline 22\nline 23\nline 24\nline 25\nline 26\nline 27\nline 28\nline 29\nline 30\nline 31\nline 32\nline 33\nline 34\nline 35\nline 36\nline 37\nline 38\nline 39\nline 40\nline 41\nline 42\nline 43\nline 44\nline 45\nline 46\nline 47\nline 48\nline 49\nline 50\nline 51\nline 52\nline 53\nline 54\nline 55\nline 56\nline 57\nline 58\nline 59\n","mode":"normal","cursor":{"row":5,"col":0},"anchor":{"row":5,"col":0}},"expected":{"name":"view-z-not-sticky","text":"line 0\nline 1\nline 2\nline 3\nline 4\nline 5\nline 6\nline 7\nline 8\nline 9\nline 10\nline 11\nline 12\nline 13\nline 14\nline 15\nline 16\nline 17\nline 18\nline 19\nline 20\nline 21\nline 22\nline 23\nline 24\nline 25\nline 26\nline 27\nline 28\nline 29\nline 30\nline 31\nline 32\nline 33\nline 34\nline 35\nline 36\nline 37\nline 38\nline 39\nline 40\nline 41\nline 42\nline 43\nline 44\nline 45\nline 46\nline 47\nline 48\nline 49\nline 50\nline 51\nline 52\nline 53\nline 54\nline 55\nline 56\nline 57\nline 58\nline 59\n","mode":"normal","cursor":{"row":44,"col":0},"anchor":{"row":44,"col":0}}}
diff --git a/test/hxcases/waivers.jsonl b/test/hxcases/waivers.jsonl
index 82da2a08..34687480 100644
--- a/test/hxcases/waivers.jsonl
+++ b/test/hxcases/waivers.jsonl
@@ -1,6 +1,3 @@
-{"name":"wiX-edit-drops-sel","reason":"Insert edits clear the selection instead of tracking its anchor.","reference":{"name":"wiX-edit-drops-sel","text":"Xalpha beta\n","mode":"normal","cursor":{"row":0,"col":1},"anchor":{"row":0,"col":6}},"expected":{"name":"wiX-edit-drops-sel","text":"Xalpha beta\n","mode":"normal","cursor":{"row":0,"col":1},"anchor":{"row":0,"col":1}}}
{"name":"alt-c-window-op","reason":"Alt-c moves a pane to a new column instead of Helix's change-noyank.","reference":{"name":"alt-c-window-op","text":"bc def\n","mode":"insert","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}},"expected":{"name":"alt-c-window-op","text":"abc def\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}}
-{"name":"msel-append","reason":"Append-mode selection origins are tracked only for the primary selection.","reference":{"name":"msel-append","text":"aza\nbzb\n","mode":"normal","cursor":{"row":1,"col":1},"anchor":{"row":1,"col":0},"sels":[{"cursor":{"row":0,"col":1},"anchor":{"row":0,"col":0}},{"cursor":{"row":1,"col":1},"anchor":{"row":1,"col":0}}],"primary":1},"expected":{"name":"msel-append","text":"aza\nbzb\n","mode":"normal","cursor":{"row":1,"col":1},"anchor":{"row":1,"col":0},"sels":[{"cursor":{"row":0,"col":1},"anchor":{"row":0,"col":1}},{"cursor":{"row":1,"col":1},"anchor":{"row":1,"col":0}}],"primary":1}}
-{"name":"msel-yank-paste","reason":"Pardes has one combined yank register, not one value per selection.","reference":{"name":"msel-yank-paste","text":"aab\nccd\n","mode":"normal","cursor":{"row":1,"col":1},"anchor":{"row":1,"col":1},"sels":[{"cursor":{"row":0,"col":1},"anchor":{"row":0,"col":1}},{"cursor":{"row":1,"col":1},"anchor":{"row":1,"col":1}}],"primary":1},"expected":{"name":"msel-yank-paste","text":"aa\ncb\nca\ncd\n","mode":"normal","cursor":{"row":3,"col":0},"anchor":{"row":2,"col":1},"sels":[{"cursor":{"row":1,"col":0},"anchor":{"row":0,"col":1}},{"cursor":{"row":3,"col":0},"anchor":{"row":2,"col":1}}],"primary":1}}
-{"name":"sel-regex-dot-newline","reason":"The regex engine includes newlines in dot matches.","reference":{"name":"sel-regex-dot-newline","text":"ab\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0},"sels":[{"cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}},{"cursor":{"row":0,"col":1},"anchor":{"row":0,"col":1}}],"primary":0},"expected":{"name":"sel-regex-dot-newline","text":"ab\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0},"sels":[{"cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}},{"cursor":{"row":0,"col":1},"anchor":{"row":0,"col":1}},{"cursor":{"row":0,"col":2},"anchor":{"row":0,"col":2}}],"primary":0}}
-{"name":"sel-regex-caret","reason":"The regex engine lacks Helix's multiline anchors.","reference":{"name":"sel-regex-caret","text":"ab\nab\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0},"sels":[{"cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}},{"cursor":{"row":1,"col":0},"anchor":{"row":1,"col":0}}],"primary":0},"expected":{"name":"sel-regex-caret","text":"ab\nab\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}}
+{"name":"msel-ins-checkpoint","reason":"Undo restores the primary range alone: a history entry keeps one range, not every one, so the others stay where the edit left them.","reference":{"name":"msel-ins-checkpoint","text":"Xab\nXab\n","mode":"normal","cursor":{"row":1,"col":1},"anchor":{"row":1,"col":1},"sels":[{"cursor":{"row":0,"col":1},"anchor":{"row":0,"col":1}},{"cursor":{"row":1,"col":1},"anchor":{"row":1,"col":1}}],"primary":1},"expected":{"name":"msel-ins-checkpoint","text":"Xab\nXab\n","mode":"normal","cursor":{"row":1,"col":1},"anchor":{"row":1,"col":1},"sels":[{"cursor":{"row":0,"col":2},"anchor":{"row":0,"col":2}},{"cursor":{"row":1,"col":1},"anchor":{"row":1,"col":1}}],"primary":1}}
+{"name":"gc-noscroll","reason":"gc runs the Callstack builtin at the cursor instead of moving to the viewport center; with no language server the cursor stays put.","reference":{"name":"gc-noscroll","text":"l00\nl01\nl02\nl03\nl04\nl05\nl06\nl07\nl08\nl09\nl10\nl11\n","mode":"normal","cursor":{"row":6,"col":0},"anchor":{"row":6,"col":0}},"expected":{"name":"gc-noscroll","text":"l00\nl01\nl02\nl03\nl04\nl05\nl06\nl07\nl08\nl09\nl10\nl11\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}}
diff --git a/test/hxdiff.zig b/test/hxdiff.zig
index 22d8067d..b12bcd8e 100644
--- a/test/hxdiff.zig
+++ b/test/hxdiff.zig
@@ -39,7 +39,7 @@ pub fn main(init: std.process.Init) !void {
var pane_override: ?[]const u8 = null;
var goldens_path: ?[]const u8 = null;
var waivers_path: ?[]const u8 = null;
- const paths = try arena.alloc([]const u8, args.len - 1);
+ const paths = try arena.alloc([]const u8, @max(args.len - 1, 3)); // room for the defaults below
var n_paths: usize = 0;
var want_waivers = false;
for (args[1..]) |a| {
@@ -67,6 +67,18 @@ pub fn main(init: std.process.Init) !void {
n_paths += 1;
}
}
+ // Named nothing (`zig build hxdiff` or `hxparity` bare): the checked-in
+ // suite, run from the repository root.
+ if (n_paths == 0 and !want_waivers) {
+ strict = true;
+ const defaults: []const []const u8 = if (parity)
+ &.{ "test/hxcases/cases.jsonl", "test/hxcases/parity.jsonl" }
+ else
+ &.{ "test/hxcases/cases.jsonl", "test/hxcases/goldens.jsonl", "test/hxcases/waivers.jsonl" };
+ if (parity) waivers_path = waivers_path orelse "test/hxcases/parity-waivers.jsonl";
+ @memcpy(paths[0..defaults.len], defaults);
+ n_paths = defaults.len;
+ }
if (n_paths == 0 or want_waivers)
fatal("usage: pardes-hxdiff [--parity] <cases.jsonl>... [goldens.jsonl [waivers.jsonl]]", .{});
const case_paths = paths[0..if (parity) n_paths else 1];
@@ -397,9 +409,9 @@ fn runCase(arena: std.mem.Allocator, case: Case, pane_kind: []const u8) !Result
core.update(.{ .key = .{ .cp = core.opts.tty_toggle, .ctrl = true } });
pump(core);
if (core.panes[core.active]) |pane| {
- pane.cur_row = 0;
- pane.cur_col = 0;
- pane.cur_pinned = true;
+ pane.body.cur_row = 0;
+ pane.body.cur_col = 0;
+ pane.body.cur_pinned = true;
}
} else fatal("case {s}: unknown pane {s}", .{ case.name, pane_kind });
@@ -419,6 +431,9 @@ fn runCase(arena: std.mem.Allocator, case: Case, pane_kind: []const u8) !Result
} else if (std.mem.startsWith(u8, name, "A-")) {
key.alt = true;
name = name[2..];
+ } else if (std.mem.startsWith(u8, name, "S-")) {
+ key.shift = true;
+ name = name[2..];
} else break;
}
if (name.len == 1 or (name.len > 1 and name.len <= 4 and name[0] >= 0x80)) {
@@ -488,7 +503,7 @@ fn runCase(arena: std.mem.Allocator, case: Case, pane_kind: []const u8) !Result
// the cursor's empty row below the output (see Pardes.shellRows), so
// its line list is exactly a file content's — join it and you have the
// same bytes, trailing newline included, with nothing to patch up.
- const lines = try core.paneCursorLines(pane);
+ const lines = try pardes.edit.paneCursorLines(core, &pane.body);
var text_len: usize = if (lines.len == 0) 0 else lines.len - 1;
for (lines) |ln| text_len = std.math.add(usize, text_len, ln.len) catch return error.OutOfMemory;
const joined = try arena.alloc(u8, text_len);
@@ -503,28 +518,28 @@ fn runCase(arena: std.mem.Allocator, case: Case, pane_kind: []const u8) !Result
}
text = joined;
}
- var anchor: Pos = .{ .row = pane.cur_row, .col = pane.cur_col };
- if (pane.vsel.active) {
- anchor = .{ .row = pane.vsel.row, .col = pane.vsel.col };
- } else if (pane.msel.active) {
+ var anchor: Pos = .{ .row = pane.body.cur_row, .col = pane.body.cur_col };
+ if (pane.body.vsel.active) {
+ anchor = .{ .row = pane.body.vsel.row, .col = pane.body.vsel.col };
+ } else if (pane.body.msel.active) {
// line selection: the far end (the r0/r1 not holding the cursor), col 0
- anchor = .{ .row = if (pane.cur_row == pane.msel.r1) pane.msel.r0 else pane.msel.r1, .col = 0 };
+ anchor = .{ .row = if (pane.body.cur_row == pane.body.msel.r1) pane.body.msel.r0 else pane.body.msel.r1, .col = 0 };
}
// mode "select" ONLY while v-extend is on (helix keeps x/%/mi selections
- // in normal mode); pane.mode itself never holds a select state
- const mode = if (pane.mode == .normal and pane.select) "select" else @tagName(pane.mode);
+ // in normal mode); pane.body.mode itself never holds a select state
+ const mode = if (pane.body.mode == .normal and pane.body.select) "select" else @tagName(pane.body.mode);
// multiple cursors: the primary (cur_row/cur_col + the anchor above) and
- // pane.sels, slotted together in document order. pane.sels is already
+ // pane.body.sels, slotted together in document order. pane.body.sels is already
// ordered, so the primary is the only one that needs placing.
var sels: ?[]const Sel = null;
var primary: ?usize = null;
- if (pane.nsel > 0) {
- const out = try arena.alloc(Sel, @as(usize, pane.nsel) + 1);
+ if (pane.body.nsel > 0) {
+ const out = try arena.alloc(Sel, @as(usize, pane.body.nsel) + 1);
var out_len: usize = 0;
- const prim: Sel = .{ .cursor = .{ .row = pane.cur_row, .col = pane.cur_col }, .anchor = anchor };
+ const prim: Sel = .{ .cursor = .{ .row = pane.body.cur_row, .col = pane.body.cur_col }, .anchor = anchor };
const pr_row = @min(prim.cursor.row, prim.anchor.row);
const pr_col = if (prim.cursor.row == prim.anchor.row) @min(prim.cursor.col, prim.anchor.col) else if (prim.cursor.row < prim.anchor.row) prim.cursor.col else prim.anchor.col;
- for (pane.sels[0..pane.nsel]) |s| {
+ for (pane.body.sels[0..pane.body.nsel]) |s| {
const s_row = @min(s.row, s.arow);
const s_col = if (s.row == s.arow) @min(s.col, s.acol) else if (s.row < s.arow) s.col else s.acol;
if (primary == null and (pr_row < s_row or (pr_row == s_row and pr_col <= s_col))) {
@@ -545,7 +560,7 @@ fn runCase(arena: std.mem.Allocator, case: Case, pane_kind: []const u8) !Result
.name = case.name,
.text = try arena.dupe(u8, text),
.mode = mode,
- .cursor = .{ .row = pane.cur_row, .col = pane.cur_col },
+ .cursor = .{ .row = pane.body.cur_row, .col = pane.body.cur_col },
.anchor = anchor,
.sels = sels,
.primary = primary,
diff --git a/test/image_harness.zig b/test/image_harness.zig
index 474ec48b..b45851cc 100644
--- a/test/image_harness.zig
+++ b/test/image_harness.zig
@@ -38,7 +38,7 @@ pub fn main(init: std.process.Init) !void {
const args = try init.minimal.args.toSlice(arena);
if (args.len != 3 and args.len != 4) return error.BadArgs;
- const exe = try arena.dupeZ(u8, args[1]);
+ const exe = try arena.dupeSentinel(u8, args[1], 0);
const backend = args[2];
const pdf_mode = args.len == 4 and std.mem.eql(u8, args[3], "pdf");
if (args.len == 4 and !pdf_mode) return error.BadArgs;
diff --git a/test/kitty-fixtures/chafa.vt b/test/kitty-fixtures/chafa.vt
new file mode 100644
index 00000000..5a882361
--- /dev/null
+++ b/test/kitty-fixtures/chafa.vt
@@ -0,0 +1,2 @@
+]10;?\]11;?\[?25l_Ga=T,f=32,s=64,v=64,c=8,r=4,m=1,q=2\_Gm=1;DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N\_Gm=1;5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/\_Gm=1;DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N\_Gm=1;5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/\_Gm=1;DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N\_Gm=1;5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/\_Gm=1;DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N\_Gm=1;5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/\_Gm=1;DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N\_Gm=1;5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/\_Gm=1;DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N\_Gm=1;5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/\_Gm=1;DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N\_Gm=1;5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/\_Gm=1;DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N\_Gm=1;5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/\_Gm=1;DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N\_Gm=1;5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/\_Gm=1;DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N\_Gm=1;5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/\_Gm=1;DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N\_Gm=1;5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/\_Gm=1;DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N\_Gm=1;5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/\_Gm=1;DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N\_Gm=1;5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/\_Gm=1;DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N\_Gm=1;5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/\_Gm=1;DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N\_Gm=1;5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/\_Gm=1;DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N\_Gm=1;5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/\_Gm=1;DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w1N5/8NTef/DU3n/w==\_Gm=0\
+[?25h \ No newline at end of file
diff --git a/test/kitty-fixtures/icat-center.vt b/test/kitty-fixtures/icat-center.vt
new file mode 100644
index 00000000..de47d4cd
--- /dev/null
+++ b/test/kitty-fixtures/icat-center.vt
@@ -0,0 +1 @@
+[?s[*x[?1l[?5l[?2004l[?1000l[?1002l[?1003l[?1005l[?1006l[?8h[?7h[?25h_Ga=q,f=24,s=1,v=1,S=3,i=1;MTIz\_Ga=q,f=24,t=t,s=1,v=1,S=47,i=2;L2Rldi9zaG0va2l0dHktdHR5LWdyYXBoaWNzLXByb3RvY29sLTIyMDEyODU0MjQ\_Ga=q,f=24,t=s,s=1,v=1,S=19,i=3;L2ljYXQtRVRKSEZYWEpPVkxBUw\7[?r8 _Ga=T,q=2,f=100,s=64,v=64;iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAAlC+aJAAAwS0lEQVR4AQFAML/PAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5+0wES1gqxrAAAAAAElFTkSuQmCC\
diff --git a/test/kitty-fixtures/icat-clear.vt b/test/kitty-fixtures/icat-clear.vt
new file mode 100644
index 00000000..ba7cd735
--- /dev/null
+++ b/test/kitty-fixtures/icat-clear.vt
@@ -0,0 +1 @@
+_Ga=d,d=A\_Ga=d,d=A\[?s[*x[?1l[?5l[?2004l[?1000l[?1002l[?1003l[?1005l[?1006l[?8h[?7h[?25h_Ga=q,f=24,s=1,v=1,S=3,i=1;MTIz\_Ga=q,f=24,t=t,s=1,v=1,S=47,i=2;L2Rldi9zaG0va2l0dHktdHR5LWdyYXBoaWNzLXByb3RvY29sLTM0Mjk2MDk4NzM\_Ga=q,f=24,t=s,s=1,v=1,S=19,i=3;L2ljYXQtM1ozWTZQSVpSTVpDRQ\7[?r8 \ No newline at end of file
diff --git a/test/kitty-fixtures/icat-left.vt b/test/kitty-fixtures/icat-left.vt
new file mode 100644
index 00000000..4c913e2f
--- /dev/null
+++ b/test/kitty-fixtures/icat-left.vt
@@ -0,0 +1 @@
+[?s[*x[?1l[?5l[?2004l[?1000l[?1002l[?1003l[?1005l[?1006l[?8h[?7h[?25h_Ga=q,f=24,s=1,v=1,S=3,i=1;MTIz\_Ga=q,f=24,t=t,s=1,v=1,S=47,i=2;L2Rldi9zaG0va2l0dHktdHR5LWdyYXBoaWNzLXByb3RvY29sLTM4MDU5NTM1ODk\_Ga=q,f=24,t=s,s=1,v=1,S=19,i=3;L2ljYXQtU083U0NPSk1FUFpKNg\7[?r8 _Ga=T,q=2,f=100,s=64,v=64;iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAAlC+aJAAAwS0lEQVR4AQFAML/PAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5+0wES1gqxrAAAAAAElFTkSuQmCC\
diff --git a/test/kitty-fixtures/icat-place.vt b/test/kitty-fixtures/icat-place.vt
new file mode 100644
index 00000000..3f59865f
--- /dev/null
+++ b/test/kitty-fixtures/icat-place.vt
@@ -0,0 +1 @@
+[?s[*x[?1l[?5l[?2004l[?1000l[?1002l[?1003l[?1005l[?1006l[?8h[?7h[?25h_Ga=q,f=24,s=1,v=1,S=3,i=1;MTIz\_Ga=q,f=24,t=t,s=1,v=1,S=47,i=2;L2Rldi9zaG0va2l0dHktdHR5LWdyYXBoaWNzLXByb3RvY29sLTM5ODY5NDMyNTM\_Ga=q,f=24,t=s,s=1,v=1,S=19,i=3;L2ljYXQtVkVPN0VHWFpTVzdMVw\7[?r8 _Ga=T,q=2,f=100,C=1,s=64,v=64;iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAAlC+aJAAAwS0lEQVR4AQFAML/PAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5+0wES1gqxrAAAAAAElFTkSuQmCC\ \ No newline at end of file
diff --git a/test/kitty-fixtures/icat-placeholder.vt b/test/kitty-fixtures/icat-placeholder.vt
new file mode 100644
index 00000000..87692a51
--- /dev/null
+++ b/test/kitty-fixtures/icat-placeholder.vt
@@ -0,0 +1,4 @@
+[?s[*x[?1l[?5l[?2004l[?1000l[?1002l[?1003l[?1005l[?1006l[?8h[?7h[?25h_Ga=q,f=24,s=1,v=1,S=3,i=1;MTIz\_Ga=q,f=24,t=t,s=1,v=1,S=47,i=2;L2Rldi9zaG0va2l0dHktdHR5LWdyYXBoaWNzLXByb3RvY29sLTM0Mzc4NzgyNzA\_Ga=q,f=24,t=s,s=1,v=1,S=19,i=3;L2ljYXQtNVNMTlg2UjQ3VFBOSw\7[?r8 _Ga=T,q=2,f=100,U=1,s=64,v=64,c=8,r=4,i=159064709;iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAAlC+aJAAAwS0lEQVR4AQFAML/PAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5+0wES1gqxrAAAAAAElFTkSuQmCC\[38:2:123:34:133m􎻮̅̅͊􎻮̅̍͊􎻮̅̎͊􎻮̅̐͊􎻮̅̒͊􎻮̅̽͊􎻮̅̾͊􎻮̅̿͊
+ 􎻮̍̅͊􎻮̍̍͊􎻮̍̎͊􎻮̍̐͊􎻮̍̒͊􎻮̍̽͊􎻮̍̾͊􎻮̍̿͊
+ 􎻮̎̅͊􎻮̎̍͊􎻮̎̎͊􎻮̎̐͊􎻮̎̒͊􎻮̎̽͊􎻮̎̾͊􎻮̎̿͊
+ 􎻮̐̅͊􎻮̐̍͊􎻮̐̎͊􎻮̐̐͊􎻮̐̒͊􎻮̐̽͊􎻮̐̾͊􎻮̐̿͊
diff --git a/test/kitty-fixtures/icat-right.vt b/test/kitty-fixtures/icat-right.vt
new file mode 100644
index 00000000..d1470d7f
--- /dev/null
+++ b/test/kitty-fixtures/icat-right.vt
@@ -0,0 +1 @@
+[?s[*x[?1l[?5l[?2004l[?1000l[?1002l[?1003l[?1005l[?1006l[?8h[?7h[?25h_Ga=q,f=24,s=1,v=1,S=3,i=1;MTIz\_Ga=q,f=24,t=t,s=1,v=1,S=47,i=2;L2Rldi9zaG0va2l0dHktdHR5LWdyYXBoaWNzLXByb3RvY29sLTM3MjQwMjUzNzE\_Ga=q,f=24,t=s,s=1,v=1,S=19,i=3;L2ljYXQtSzVPSENHWVVSM0ZFNA\7[?r8 _Ga=T,q=2,f=100,s=64,v=64;iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAAlC+aJAAAwS0lEQVR4AQFAML/PAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5wANTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecNTecADU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nDU3nAA1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5w1N5+0wES1gqxrAAAAAAElFTkSuQmCC\
diff --git a/test/kitty.zig b/test/kitty.zig
new file mode 100644
index 00000000..de4dd605
--- /dev/null
+++ b/test/kitty.zig
@@ -0,0 +1,1349 @@
+//! Kitty graphics protocol conformance for terminal panes, at the core.
+//!
+//! zig build kitty-test -Dplatform=tty|gui these cases alone
+//! zig build unit-test they run with the rest
+//!
+//! ghostty-vt implements the protocol; what pardes owns is the proxy around
+//! it: a program's APC reaches the emulator whole however the pty splits it,
+//! the emulator's replies go back to that program's pty (and nowhere else),
+//! and what the emulator stores is drawn where the program put it. Each case
+//! feeds a pane's output the way a pty read does and checks all three: the
+//! bytes the program would read back, ghostty's image storage, and the
+//! `ImagePlace`s a frame hands the shell (which a tty re-emits to the outer
+//! terminal and the GUI draws; test/kitty_harness.zig follows them there).
+//!
+//! A case pardes does not pass yet is a `knownGap`: its check runs, the test
+//! is skipped with the reason while it fails, and fails once it passes, so
+//! the marker goes when the gap closes.
+const std = @import("std");
+const pardes = @import("pardes");
+const Pardes = pardes.Pardes;
+const config = pardes.config;
+const terminal = pardes.panes.terminal;
+
+const gpa = std.testing.allocator;
+
+// 4x2 pixels, the left half red and the right half blue, in every encoding
+// the protocol has (generated with Python's zlib and a hand-built PNG).
+const rgb_b64 = "/wAA/wAAAAD/AAD//wAA/wAAAAD/AAD/";
+const rgba_b64 = "/wAA//8AAP8AAP//AAD///8AAP//AAD/AAD//wAA//8=";
+const rgb_zlib_b64 = "eJz7z8Dwn4EBTPz/j8QGAGO0B/k=";
+const png_b64 = "iVBORw0KGgoAAAANSUhEUgAAAAQAAAACCAIAAADwyuo0AAAAE0lEQVR4nGP4z8AARGDiPwMyBwBnsgf5Q2OaZwAAAABJRU5ErkJggg==";
+const rgb_raw = [_]u8{ 255, 0, 0, 255, 0, 0, 0, 0, 255, 0, 0, 255, 255, 0, 0, 255, 0, 0, 0, 0, 255, 0, 0, 255 };
+// 256x256 transparent RGBA, zlib: 256 KiB stored per copy for 373 bytes sent.
+const blank_256_zlib_b64 = "eNrtwTEBAAAAwqD1T+1tB6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAN4AADwAAQ==";
+
+const red = [4]u8{ 255, 0, 0, 255 };
+const blue = [4]u8{ 0, 0, 255, 255 };
+
+/// `ESC _ G <control> ; <payload> ESC \`
+inline fn apc(comptime control: []const u8, comptime payload: []const u8) []const u8 {
+ return comptime "\x1b_G" ++ control ++ ";" ++ payload ++ "\x1b\\";
+}
+
+/// What the protocol answers: `ESC _ G <keys> ; <message> ESC \`
+inline fn reply(comptime keys: []const u8, comptime message: []const u8) []const u8 {
+ return comptime "\x1b_G" ++ keys ++ ";" ++ message ++ "\x1b\\";
+}
+
+fn knownGap(comptime reason: []const u8, passes: bool) !void {
+ if (passes) {
+ std.debug.print("kitty: a known gap passes now, drop its marker: {s}\n", .{reason});
+ return error.KnownGapNowPasses;
+ }
+ std.debug.print("kitty: known gap: {s}\n", .{reason});
+ return error.SkipZigTest;
+}
+
+/// A session of `shells` (1, or up to 3) terminal panes with 10x20 pixel cells, under a
+/// shell that draws pixels, every pane's keyboard at its pty.
+const Rig = struct {
+ p: *Pardes,
+ frame: std.heap.ArenaAllocator,
+ /// What each pane's program has read back since `take`.
+ read: [pardes.MAX_PANES]std.ArrayList(u8) = @splat(.empty),
+
+ fn init(shells: u8) !Rig {
+ // f=100 decodes through pardes's own decoder (stb_image), which the
+ // shells start at launch.
+ pardes.image.start(std.testing.io, gpa);
+ // ghostty warns of every refused command; the refusals are the point.
+ std.testing.log_level = .err;
+ // A core boots one shell or the classic three.
+ const p = try Pardes.init(gpa, .{ .cols = 120, .rows = 40, .shells = if (shells > 1) 3 else 1 });
+ p.native_images = true;
+ p.update(.{ .resize = .{ .cols = 120, .rows = 40, .cell_pixels = .{ .w = 10, .h = 20 } } });
+ for (p.panes) |slot| if (slot) |each| {
+ each.body.mode = .tty;
+ };
+ var r: Rig = .{ .p = p, .frame = .init(gpa) };
+ r.drain();
+ for (&r.read) |*b| b.clearRetainingCapacity();
+ return r;
+ }
+
+ fn deinit(r: *Rig) void {
+ for (&r.read) |*b| b.deinit(gpa);
+ r.frame.deinit();
+ r.p.deinit();
+ pardes.image.stop();
+ }
+
+ fn drain(r: *Rig) void {
+ while (r.p.nextEffect()) |effect| {
+ if (effect == .write) r.read[effect.write.pane].appendSlice(gpa, effect.write.bytes.slice()) catch @panic("OOM");
+ }
+ }
+
+ /// One pty read of pane `id`'s output.
+ fn feed(r: *Rig, id: u8, bytes: []const u8) void {
+ r.p.update(.{ .output = .{ .pane = id, .bytes = bytes } });
+ r.drain();
+ }
+
+ /// The same output, as reads of `step` bytes.
+ fn feedSplit(r: *Rig, id: u8, bytes: []const u8, step: usize) void {
+ var at: usize = 0;
+ while (at < bytes.len) : (at += step) r.feed(id, bytes[at..@min(bytes.len, at + step)]);
+ }
+
+ /// What pane `id`'s program read back, since the last take.
+ fn take(r: *Rig, id: u8) ![]u8 {
+ defer r.read[id].clearRetainingCapacity();
+ return r.frame.allocator().dupe(u8, r.read[id].items);
+ }
+
+ fn pane(r: *Rig, id: u8) *pardes.Pane {
+ return r.p.panes[id].?;
+ }
+
+ fn vt(r: *Rig, id: u8) @TypeOf(&r.pane(id).terminal.?.vt) {
+ return &r.pane(id).terminal.?.vt;
+ }
+
+ fn storage(r: *Rig, id: u8) @TypeOf(&r.vt(id).screens.active.kitty_images) {
+ return &r.vt(id).screens.active.kitty_images;
+ }
+
+ fn places(r: *Rig) ![]const ?pardes.ImagePlace {
+ _ = r.frame.reset(.retain_capacity);
+ const s = try r.p.render(r.frame.allocator());
+ return s.images[0..s.nimages];
+ }
+
+ /// The top-left cell of pane `id`'s body, in screen cells.
+ fn origin(r: *Rig, id: u8) struct { x: u16, y: u16 } {
+ const rect = r.p.rects[id];
+ return .{ .x = rect.x + config.GUTTER, .y = r.p.bodyTop(r.pane(id), rect) };
+ }
+
+ /// The places drawn for the image a program called `image_id`.
+ fn placesOf(r: *Rig, image_id: u32) ![]const pardes.ImagePlace {
+ var out: std.ArrayList(pardes.ImagePlace) = .empty;
+ for (try r.places()) |maybe| if (maybe) |place| if (place.native.page == image_id)
+ try out.append(r.frame.allocator(), place);
+ return out.items;
+ }
+
+ fn placementCount(r: *Rig, id: u8) usize {
+ return r.storage(id).placements.count();
+ }
+
+ fn hasImage(r: *Rig, id: u8, image_id: u32) bool {
+ return r.storage(id).imageById(image_id) != null;
+ }
+};
+
+/// The pixel at `(x, y)` of a drawn place's whole image, as RGBA.
+fn pixel(place: pardes.ImagePlace, x: usize, y: usize) [4]u8 {
+ return place.rgba[(y * place.iw + x) * 4 ..][0..4].*;
+}
+
+test "kitty: a support query is answered on the asking pane's pty and stores nothing" {
+ var r = try Rig.init(2);
+ defer r.deinit();
+ r.feed(1, apc("i=31,s=1,v=1,a=q,t=d,f=24", "AAAA"));
+ try std.testing.expectEqualStrings(reply("i=31", "OK"), try r.take(1));
+ try std.testing.expectEqualStrings("", try r.take(0));
+ try std.testing.expect(!r.hasImage(1, 31));
+ try std.testing.expectEqual(@as(usize, 0), (try r.places()).len);
+}
+
+test "kitty: a query that cannot load says why, with its keys" {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ // Too little data for a 2x2 RGB image.
+ r.feed(0, apc("i=32,s=2,v=2,a=q,t=d,f=24", "AAAA"));
+ const got = try r.take(0);
+ try std.testing.expect(std.mem.startsWith(u8, got, "\x1b_Gi=32;E"));
+ try std.testing.expect(std.mem.endsWith(u8, got, "\x1b\\"));
+ try std.testing.expectEqual(@as(usize, 1), std.mem.count(u8, got, "\x1b_G"));
+}
+
+test "kitty: quiet levels: q=1 drops the OK, q=2 the errors too" {
+ const Case = struct { control: []const u8, payload: []const u8, answered: bool };
+ const cases = [_]Case{
+ .{ .control = "i=33,s=1,v=1,a=q,f=24,q=0", .payload = "AAAA", .answered = true },
+ .{ .control = "i=33,s=1,v=1,a=q,f=24,q=1", .payload = "AAAA", .answered = false },
+ .{ .control = "i=33,s=2,v=2,a=q,f=24,q=1", .payload = "AAAA", .answered = true },
+ .{ .control = "i=33,s=2,v=2,a=q,f=24,q=2", .payload = "AAAA", .answered = false },
+ .{ .control = "i=33,s=4,v=2,a=t,f=24,q=1", .payload = rgb_b64, .answered = false },
+ .{ .control = "i=33,a=p,q=2", .payload = "", .answered = false },
+ };
+ for (cases) |c| {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ const bytes = try std.fmt.allocPrint(r.frame.allocator(), "\x1b_G{s};{s}\x1b\\", .{ c.control, c.payload });
+ r.feed(0, bytes);
+ const got = try r.take(0);
+ std.testing.expectEqual(c.answered, got.len > 0) catch |err| {
+ std.debug.print("q case {s}: read back {f}\n", .{ c.control, std.ascii.hexEscape(got, .lower) });
+ return err;
+ };
+ }
+}
+
+test "kitty: RGB, RGBA, PNG and zlib-compressed RGB all draw the same pixels" {
+ const Case = struct { control: []const u8, payload: []const u8 };
+ const cases = [_]Case{
+ .{ .control = "a=T,i=1,f=24,s=4,v=2,c=2,r=1", .payload = rgb_b64 },
+ .{ .control = "a=T,i=1,f=32,s=4,v=2,c=2,r=1", .payload = rgba_b64 },
+ .{ .control = "a=T,i=1,f=100,c=2,r=1", .payload = png_b64 },
+ .{ .control = "a=T,i=1,f=24,o=z,s=4,v=2,c=2,r=1", .payload = rgb_zlib_b64 },
+ };
+ for (cases) |c| {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ r.feed(0, try std.fmt.allocPrint(r.frame.allocator(), "\x1b_G{s};{s}\x1b\\", .{ c.control, c.payload }));
+ try std.testing.expectEqualStrings(reply("i=1", "OK"), try r.take(0));
+ const img = r.storage(0).imageById(1) orelse return error.NotStored;
+ try std.testing.expectEqual(@as(u32, 4), img.width);
+ try std.testing.expectEqual(@as(u32, 2), img.height);
+ const drawn = try r.placesOf(1);
+ try std.testing.expectEqual(@as(usize, 1), drawn.len);
+ try std.testing.expectEqual(@as(usize, 4), drawn[0].iw);
+ for ([_][2]usize{ .{ 0, 0 }, .{ 1, 1 } }) |at| try std.testing.expectEqual(red, pixel(drawn[0], at[0], at[1]));
+ for ([_][2]usize{ .{ 2, 0 }, .{ 3, 1 } }) |at| try std.testing.expectEqual(blue, pixel(drawn[0], at[0], at[1]));
+ }
+}
+
+test "kitty: a chunked transmission arrives whole however the pty splits it, answered once" {
+ // Three chunks of base64 (each a multiple of four), the keys on the first.
+ const chunked = apc("a=T,i=2,f=24,s=4,v=2,c=2,r=1,m=1", rgb_b64[0..8]) ++
+ apc("m=1", rgb_b64[8..20]) ++ apc("m=0", rgb_b64[20..]);
+ for ([_]usize{ 1, 2, 3, 5, 7, 16, 64, chunked.len }) |step| {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ r.feedSplit(0, chunked, step);
+ try std.testing.expectEqualStrings(reply("i=2", "OK"), try r.take(0));
+ const img = r.storage(0).imageById(2) orelse return error.NotStored;
+ try std.testing.expectEqualSlices(u8, &rgb_raw, img.data.bytes().?);
+ try std.testing.expectEqual(@as(usize, 1), (try r.placesOf(2)).len);
+ }
+}
+
+test "kitty: text around an APC prints, in the same read and split across reads" {
+ for ([_]usize{ 1, 4, 1024 }) |step| {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ r.feedSplit(0, "before" ++ apc("a=t,i=3,f=24,s=4,v=2,q=2", rgb_b64) ++ "after", step);
+ const text = try terminal.screenTextAlloc(r.pane(0), r.frame.allocator());
+ try std.testing.expect(std.mem.indexOf(u8, text, "beforeafter") != null);
+ try std.testing.expect(r.hasImage(0, 3));
+ }
+}
+
+const shm = struct {
+ extern "c" fn shm_open(name: [*:0]const u8, flag: c_int, mode: std.c.mode_t) c_int;
+ extern "c" fn shm_unlink(name: [*:0]const u8) c_int;
+};
+
+fn writeTemp(path: [:0]const u8, bytes: []const u8) !void {
+ const fd = std.c.open(path, .{ .ACCMODE = .WRONLY, .CREAT = true, .TRUNC = true }, @as(std.c.mode_t, 0o600));
+ if (fd < 0) return error.OpenFailed;
+ defer _ = std.c.close(fd);
+ if (std.c.write(fd, bytes.ptr, bytes.len) != @as(isize, @intCast(bytes.len))) return error.WriteFailed;
+}
+
+fn exists(path: [:0]const u8) bool {
+ return std.c.access(path, std.c.F_OK) == 0;
+}
+
+fn b64(arena: std.mem.Allocator, bytes: []const u8) ![]const u8 {
+ const enc = std.base64.standard.Encoder;
+ const out = try arena.alloc(u8, enc.calcSize(bytes.len));
+ return enc.encode(out, bytes);
+}
+
+test "kitty: file, temporary-file and shared-memory media load, and the terminal removes what it should" {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ const arena = r.frame.allocator();
+ const pid = std.c.getpid();
+
+ // t=f: a file the program keeps.
+ const file = try std.fmt.allocPrintSentinel(arena, "/tmp/pardes-kitty-{d}-file.rgb", .{pid}, 0);
+ try writeTemp(file, &rgb_raw);
+ defer _ = std.c.unlink(file);
+ r.feed(0, try std.fmt.allocPrint(arena, "\x1b_Ga=t,t=f,i=41,f=24,s=4,v=2;{s}\x1b\\", .{try b64(arena, file)}));
+ const file_reply = try r.take(0);
+ // t=t: a temporary file, which the terminal deletes once read; its name
+ // must say it is one.
+ const temp = try std.fmt.allocPrintSentinel(arena, "/tmp/tty-graphics-protocol-pardes-{d}.rgb", .{pid}, 0);
+ try writeTemp(temp, &rgb_raw);
+ defer _ = std.c.unlink(temp);
+ r.feed(0, try std.fmt.allocPrint(arena, "\x1b_Ga=t,t=t,i=42,f=24,s=4,v=2;{s}\x1b\\", .{try b64(arena, temp)}));
+ const temp_reply = try r.take(0);
+ // t=s: a POSIX shared memory object, which the terminal unlinks.
+ const name = try std.fmt.allocPrintSentinel(arena, "/pardes-kitty-{d}", .{pid}, 0);
+ const fd = shm.shm_open(name, @bitCast(std.c.O{ .ACCMODE = .RDWR, .CREAT = true, .TRUNC = true }), 0o600);
+ if (fd < 0) return error.ShmOpenFailed;
+ defer _ = shm.shm_unlink(name);
+ if (std.c.write(fd, &rgb_raw, rgb_raw.len) != rgb_raw.len) return error.WriteFailed;
+ _ = std.c.close(fd);
+ r.feed(0, try std.fmt.allocPrint(arena, "\x1b_Ga=t,t=s,i=43,f=24,s=4,v=2,S={d};{s}\x1b\\", .{ rgb_raw.len, try b64(arena, name) }));
+ const shm_reply = try r.take(0);
+
+ const passes = std.mem.eql(u8, file_reply, reply("i=41", "OK")) and
+ std.mem.eql(u8, temp_reply, reply("i=42", "OK")) and
+ std.mem.eql(u8, shm_reply, reply("i=43", "OK"));
+ if (!passes) {
+ std.debug.print("media replies: f {f} | t {f} | s {f}\n", .{
+ std.ascii.hexEscape(file_reply, .lower),
+ std.ascii.hexEscape(temp_reply, .lower),
+ std.ascii.hexEscape(shm_reply, .lower),
+ });
+ return error.MediumRefused;
+ }
+ for ([_]u32{ 41, 42, 43 }) |id| {
+ const img = r.storage(0).imageById(id) orelse return error.NotStored;
+ try std.testing.expectEqualSlices(u8, &rgb_raw, img.data.bytes().?);
+ }
+ try std.testing.expect(exists(file));
+ try std.testing.expect(!exists(temp));
+}
+
+test "kitty: a temporary file outside the temp directory, or not named as one, is refused" {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ const arena = r.frame.allocator();
+ const file = try std.fmt.allocPrintSentinel(arena, "/tmp/pardes-kitty-{d}-notemp.rgb", .{std.c.getpid()}, 0);
+ try writeTemp(file, &rgb_raw);
+ defer _ = std.c.unlink(file);
+ r.feed(0, try std.fmt.allocPrint(arena, "\x1b_Ga=t,t=t,i=44,f=24,s=4,v=2;{s}\x1b\\", .{try b64(arena, file)}));
+ const got = try r.take(0);
+ try std.testing.expect(std.mem.startsWith(u8, got, "\x1b_Gi=44;E"));
+ try std.testing.expect(!r.hasImage(0, 44));
+ // Refused, it is left where it was.
+ try std.testing.expect(exists(file));
+}
+
+test "kitty: a=T draws at the cursor and moves the cursor past the image; C=1 leaves it" {
+ for ([_]bool{ false, true }) |still| {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ if (still)
+ r.feed(0, "\x1b[3;5H" ++ apc("a=T,i=4,f=24,s=4,v=2,c=2,r=2,C=1,q=2", rgb_b64))
+ else
+ r.feed(0, "\x1b[3;5H" ++ apc("a=T,i=4,f=24,s=4,v=2,c=2,r=2,q=2", rgb_b64));
+ const cursor = r.vt(0).screens.active.cursor;
+ if (still) {
+ try std.testing.expectEqual(@as(usize, 4), cursor.x);
+ try std.testing.expectEqual(@as(usize, 2), cursor.y);
+ } else {
+ // Kitty: one cell past the image's right edge, on its last row.
+ try std.testing.expectEqual(@as(usize, 6), cursor.x);
+ try std.testing.expectEqual(@as(usize, 3), cursor.y);
+ }
+ const drawn = try r.placesOf(4);
+ // A cell row at a time: two rows.
+ try std.testing.expectEqual(@as(usize, 2), drawn.len);
+ const o = r.origin(0);
+ try std.testing.expectEqual(o.x + 4, drawn[0].x);
+ try std.testing.expectEqual(o.y + 2, drawn[0].y);
+ try std.testing.expectEqual(o.y + 3, drawn[1].y);
+ for (drawn) |place| try std.testing.expectEqual(@as(u16, 2), place.w);
+ }
+}
+
+test "kitty: a=p places one image twice by placement id, a source rect crops it, and a re-put moves it" {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ r.feed(0, apc("a=t,i=7,f=24,s=4,v=2", rgb_b64));
+ try std.testing.expectEqualStrings(reply("i=7", "OK"), try r.take(0));
+ try std.testing.expectEqual(@as(usize, 0), (try r.placesOf(7)).len);
+ r.feed(0, "\x1b[1;1H" ++ apc("a=p,i=7,p=1,c=2,r=1", ""));
+ try std.testing.expectEqualStrings(reply("i=7,p=1", "OK"), try r.take(0));
+ // The right half only (x=2, w=2): blue, in one cell.
+ r.feed(0, "\x1b[6;10H" ++ apc("a=p,i=7,p=2,x=2,y=0,w=2,h=2,c=1,r=1", ""));
+ try std.testing.expectEqualStrings(reply("i=7,p=2", "OK"), try r.take(0));
+ try std.testing.expectEqual(@as(usize, 2), r.placementCount(0));
+ const o = r.origin(0);
+ var drawn = try r.placesOf(7);
+ try std.testing.expectEqual(@as(usize, 2), drawn.len);
+ var cropped: ?pardes.ImagePlace = null;
+ for (drawn) |place| if (place.y == o.y + 5) {
+ cropped = place;
+ };
+ const crop = cropped orelse return error.CroppedPlacementMissing;
+ try std.testing.expectEqual(o.x + 9, crop.x);
+ try std.testing.expectEqual(@as(u16, 1), crop.w);
+ const g = crop.native.geometry.?;
+ try std.testing.expectEqual(@as(u32, 2), g.src.x);
+ try std.testing.expectEqual(@as(u32, 2), g.src.w);
+ // Put again under the same id, placement 1 moves; it is not doubled.
+ r.feed(0, "\x1b[10;1H" ++ apc("a=p,i=7,p=1,c=2,r=1,q=1", ""));
+ try std.testing.expectEqual(@as(usize, 2), r.placementCount(0));
+ drawn = try r.placesOf(7);
+ var at_ten = false;
+ var at_one = false;
+ for (drawn) |place| {
+ if (place.y == o.y + 9) at_ten = true;
+ if (place.y == o.y) at_one = true;
+ }
+ try std.testing.expect(at_ten and !at_one);
+}
+
+test "kitty: a=p of an image that is not there answers ENOENT" {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ r.feed(0, apc("a=p,i=99", ""));
+ const got = try r.take(0);
+ try std.testing.expect(std.mem.startsWith(u8, got, "\x1b_Gi=99;ENOENT"));
+}
+
+test "kitty: an image number gets an id, which the reply carries" {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ r.feed(0, apc("a=t,I=5,f=24,s=4,v=2", rgb_b64));
+ const got = try r.take(0);
+ // `i=<assigned>,I=5;OK`
+ try std.testing.expect(std.mem.startsWith(u8, got, "\x1b_Gi="));
+ try std.testing.expect(std.mem.endsWith(u8, got, ",I=5;OK\x1b\\"));
+ try std.testing.expect(r.storage(0).imageByNumber(5) != null);
+}
+
+test "kitty: z-index travels with the image, and images are handed on lowest z first" {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ // Three overlapping at (0,0), given out of order; the virtual one's z
+ // is its placement's.
+ r.feed(0, "\x1b[1;1H" ++ apc("a=T,i=8,f=24,s=4,v=2,c=2,r=1,z=5,C=1,q=2", rgb_b64) ++
+ apc("a=T,i=9,f=24,s=4,v=2,c=2,r=1,z=-7,C=1,q=2", rgb_b64) ++
+ apc("a=T,i=10,f=24,s=4,v=2,c=2,r=1,C=1,q=2", rgb_b64) ++
+ apc("a=T,U=1,i=11,f=24,s=4,v=2,c=1,r=1,z=3,q=2", rgb_b64) ++
+ "\x1b[1;1H\x1b[38;2;0;0;11m\u{10EEEE}\u{0305}\u{0305}\x1b[39m");
+ const drawn = try r.places();
+ try std.testing.expectEqual(@as(usize, 4), drawn.len);
+ var zs: [4]i32 = undefined;
+ var ids: [4]u32 = undefined;
+ for (drawn, 0..) |place, i| {
+ zs[i] = place.?.z;
+ ids[i] = place.?.native.page;
+ }
+ try std.testing.expectEqualSlices(i32, &.{ -7, 0, 3, 5 }, &zs);
+ try std.testing.expectEqualSlices(u32, &.{ 9, 10, 11, 8 }, &ids);
+}
+
+/// A screen with two images in known places, for the deletes:
+/// image 1: placement 1 at (0,0) 2x1, placement 2 at (10,5) 2x1, z=5
+/// image 2: placement 1 at (20,8) 2x2, z=-3
+/// and the cursor parked at (20,8), on image 2.
+fn deleteScene(r: *Rig) void {
+ r.feed(0, apc("a=t,i=1,f=24,s=4,v=2,q=2", rgb_b64) ++ apc("a=t,i=2,f=24,s=4,v=2,q=2", rgb_b64));
+ r.feed(0, "\x1b[1;1H" ++ apc("a=p,i=1,p=1,c=2,r=1,C=1,q=2", "") ++
+ "\x1b[6;11H" ++ apc("a=p,i=1,p=2,c=2,r=1,z=5,C=1,q=2", "") ++
+ "\x1b[9;21H" ++ apc("a=p,i=2,p=1,c=2,r=2,z=-3,C=1,q=2", ""));
+}
+
+test "kitty: every delete takes the placements it names, and the uppercase ones free the image" {
+ const Case = struct {
+ control: []const u8,
+ /// Placements left, and whether images 1 and 2 are still stored.
+ left: usize,
+ one: bool,
+ two: bool,
+ };
+ const cases = [_]Case{
+ .{ .control = "a=d", .left = 0, .one = true, .two = true }, // d=a is the default
+ .{ .control = "a=d,d=a", .left = 0, .one = true, .two = true },
+ .{ .control = "a=d,d=A", .left = 0, .one = false, .two = false },
+ .{ .control = "a=d,d=i,i=1", .left = 1, .one = true, .two = true },
+ .{ .control = "a=d,d=I,i=1", .left = 1, .one = false, .two = true },
+ .{ .control = "a=d,d=i,i=1,p=2", .left = 2, .one = true, .two = true },
+ .{ .control = "a=d,d=c", .left = 2, .one = true, .two = true },
+ .{ .control = "a=d,d=C", .left = 2, .one = true, .two = false },
+ .{ .control = "a=d,d=p,x=11,y=6", .left = 2, .one = true, .two = true },
+ .{ .control = "a=d,d=P,x=21,y=10", .left = 2, .one = true, .two = false },
+ .{ .control = "a=d,d=q,x=11,y=6,z=5", .left = 2, .one = true, .two = true },
+ .{ .control = "a=d,d=q,x=11,y=6,z=4", .left = 3, .one = true, .two = true },
+ .{ .control = "a=d,d=x,x=2", .left = 2, .one = true, .two = true },
+ .{ .control = "a=d,d=X,x=22", .left = 2, .one = true, .two = false },
+ .{ .control = "a=d,d=y,y=6", .left = 2, .one = true, .two = true },
+ .{ .control = "a=d,d=Y,y=10", .left = 2, .one = true, .two = false },
+ .{ .control = "a=d,d=z,z=-3", .left = 2, .one = true, .two = true },
+ .{ .control = "a=d,d=Z,z=-3", .left = 2, .one = true, .two = false },
+ .{ .control = "a=d,d=r,x=1,y=1", .left = 1, .one = true, .two = true },
+ .{ .control = "a=d,d=R,x=1,y=2", .left = 0, .one = false, .two = false },
+ };
+ for (cases) |c| {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ deleteScene(&r);
+ try std.testing.expectEqual(@as(usize, 3), r.placementCount(0));
+ try std.testing.expectEqual(@as(usize, 4), (try r.places()).len);
+ r.feed(0, try std.fmt.allocPrint(r.frame.allocator(), "\x1b_G{s}\x1b\\", .{c.control}));
+ const drawn = (try r.places()).len;
+ const got = .{ r.placementCount(0), r.hasImage(0, 1), r.hasImage(0, 2) };
+ std.testing.expectEqual(.{ c.left, c.one, c.two }, got) catch |err| {
+ std.debug.print("delete {s}: left {d}, image 1 {}, image 2 {}\n", .{ c.control, got[0], got[1], got[2] });
+ return err;
+ };
+ // Deletes never answer, and the frame draws what is left: a 2x1
+ // placement is one place, the 2x2 one two.
+ try std.testing.expectEqualStrings("", try r.take(0));
+ var rows: usize = 0;
+ var it = r.storage(0).placements.iterator();
+ while (it.next()) |entry| rows += if (entry.key_ptr.image_id == 2) 2 else 1;
+ try std.testing.expectEqual(rows, drawn);
+ }
+}
+
+test "kitty: deletes by image number take that image's placements, and N frees it" {
+ for ([_]bool{ false, true }) |free| {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ r.feed(0, "\x1b[1;1H" ++ apc("a=T,I=11,f=24,s=4,v=2,c=2,r=1,C=1,q=2", rgb_b64) ++
+ "\x1b[5;1H" ++ apc("a=T,i=2,f=24,s=4,v=2,c=2,r=1,C=1,q=2", rgb_b64));
+ try std.testing.expectEqual(@as(usize, 2), r.placementCount(0));
+ if (free) r.feed(0, apc("a=d,d=N,I=11", "")) else r.feed(0, apc("a=d,d=n,I=11", ""));
+ try std.testing.expectEqual(@as(usize, 1), r.placementCount(0));
+ try std.testing.expectEqual(!free, r.storage(0).imageByNumber(11) != null);
+ try std.testing.expect(r.hasImage(0, 2));
+ try std.testing.expectEqual(@as(usize, 1), (try r.places()).len);
+ }
+}
+
+test "kitty: a delete abandons a chunked load in progress" {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ r.feed(0, apc("a=t,i=9,f=24,s=4,v=2,m=1", rgb_b64[0..8]));
+ r.feed(0, apc("a=d,d=A", ""));
+ r.feed(0, apc("m=0", rgb_b64[8..]));
+ try std.testing.expect(!r.hasImage(0, 9));
+}
+
+test "kitty: Unicode placeholders draw a virtual placement over two rows, with implicit columns" {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ // Image 7 in the placeholders' foreground; row diacritics U+0305 (0)
+ // and U+030D (1); the first cell of each row names its column (U+0305 =
+ // 0) and the next one carries on from it with no diacritic of its own.
+ r.feed(0, apc("a=T,U=1,i=7,f=24,s=4,v=2,c=2,r=2,q=2", rgb_b64) ++
+ "\x1b[2;3H\x1b[38;2;0;0;7m\u{10EEEE}\u{0305}\u{0305}\u{10EEEE}" ++
+ "\x1b[3;3H\u{10EEEE}\u{030D}\u{0305}\u{10EEEE}\x1b[39mX");
+ const drawn = try r.placesOf(7);
+ const o = r.origin(0);
+ try std.testing.expectEqual(@as(usize, 2), drawn.len);
+ try std.testing.expectEqual(o.x + 2, drawn[0].x);
+ try std.testing.expectEqual(o.y + 1, drawn[0].y);
+ try std.testing.expectEqual(o.y + 2, drawn[1].y);
+ for (drawn) |place| try std.testing.expectEqual(@as(u16, 2), place.w);
+ // The top row shows the image's top half, the bottom its bottom half.
+ try std.testing.expectEqual(@as(u32, 0), drawn[0].native.geometry.?.src.y);
+ try std.testing.expectEqual(@as(u32, 1), drawn[1].native.geometry.?.src.y);
+}
+
+test "kitty: a placeholder naming its placement in the underline colour picks that placement" {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ // Two virtual placements of image 7: p=1 one cell, p=2 two cells wide.
+ r.feed(0, apc("a=t,i=7,f=24,s=4,v=2,q=2", rgb_b64) ++
+ apc("a=p,U=1,i=7,p=1,c=1,r=1,q=2", "") ++ apc("a=p,U=1,i=7,p=2,c=2,r=1,q=2", "") ++
+ "\x1b[1;1H\x1b[38;2;0;0;7m\x1b[58;2;0;0;2m\u{10EEEE}\u{0305}\u{0305}\u{10EEEE}\x1b[39;59m");
+ const drawn = try r.placesOf(7);
+ try std.testing.expectEqual(@as(usize, 1), drawn.len);
+ // Placement 2 spans two cells, so each cell is half the image.
+ try std.testing.expectEqual(@as(u16, 2), drawn[0].w);
+}
+
+test "kitty: an image follows its text when the shell scrolls, resizes and reflows" {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ r.feed(0, "\x1b[5;1Hmarker" ++ apc("a=T,i=10,f=24,s=4,v=2,c=2,r=1,q=2", rgb_b64));
+ const o = r.origin(0);
+ try std.testing.expectEqual(o.y + 4, (try r.placesOf(10))[0].y);
+ // Two lines of output at the bottom scroll it up two rows.
+ r.feed(0, "\x1b[40;1H\n\n");
+ try std.testing.expectEqual(o.y + 2, (try r.placesOf(10))[0].y);
+ // A narrower pane reflows the text; the image stays on its row.
+ const pane = r.pane(0);
+ terminal.resizeGrid(pane, gpa, 40, pane.rows);
+ const text = try terminal.screenTextAlloc(pane, r.frame.allocator());
+ var row: usize = 0;
+ var lines = std.mem.splitScalar(u8, text, '\n');
+ while (lines.next()) |line| : (row += 1) if (std.mem.startsWith(u8, line, "marker")) break;
+ const drawn = try r.placesOf(10);
+ try std.testing.expectEqual(@as(usize, 1), drawn.len);
+ const viewport_top: usize = @intCast(terminal.gridOffset(pane));
+ try std.testing.expectEqual(o.y + @as(u16, @intCast(row - viewport_top)), drawn[0].y);
+}
+
+test "kitty: the alternate screen has its own images, and the primary's come back after it" {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ r.feed(0, "\x1b[1;1H" ++ apc("a=T,i=11,f=24,s=4,v=2,c=2,r=1,q=2", rgb_b64));
+ r.feed(0, "\x1b[?1049h");
+ try std.testing.expectEqual(@as(usize, 0), (try r.placesOf(11)).len);
+ // yazi's way in: the image goes on the alternate screen.
+ r.feed(0, "\x1b[3;3H" ++ apc("a=T,i=12,f=24,s=4,v=2,c=2,r=1,q=2", rgb_b64));
+ try std.testing.expectEqual(@as(usize, 1), (try r.placesOf(12)).len);
+ try std.testing.expect(!r.hasImage(0, 11)); // per screen
+ r.feed(0, "\x1b[?1049l");
+ try std.testing.expectEqual(@as(usize, 0), (try r.placesOf(12)).len);
+ try std.testing.expectEqual(@as(usize, 1), (try r.placesOf(11)).len);
+}
+
+test "kitty: clear (ED 2 + ED 3) takes the images away, and they stay away" {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ r.feed(0, "\x1b[1;1H" ++ apc("a=T,i=13,f=24,s=4,v=2,c=2,r=1,q=2", rgb_b64));
+ var nl: [2 * 60]u8 = undefined;
+ for (0..60) |i| nl[2 * i ..][0..2].* = "\r\n".*;
+ r.feed(0, &nl);
+ r.feed(0, "\x1b[H\x1b[2J\x1b[3J");
+ try std.testing.expectEqual(@as(usize, 0), r.placementCount(0));
+ try std.testing.expectEqual(@as(usize, 0), (try r.places()).len);
+ r.feed(0, "after clear\r\n");
+ try std.testing.expectEqual(@as(usize, 0), (try r.places()).len);
+}
+
+test "kitty: replies go to the pane that asked, never another, and never into the drawn cells" {
+ var r = try Rig.init(3);
+ defer r.deinit();
+ r.feed(1, apc("i=51,s=1,v=1,a=q,f=24", "AAAA"));
+ r.feed(2, apc("i=52,s=1,v=1,a=q,f=24", "AAAA"));
+ r.feed(1, apc("a=t,i=53,f=24,s=4,v=2", rgb_b64));
+ r.feed(2, apc("a=p,i=53", ""));
+ try std.testing.expectEqualStrings(reply("i=51", "OK") ++ reply("i=53", "OK"), try r.take(1));
+ try std.testing.expect(std.mem.startsWith(u8, try r.take(2), reply("i=52", "OK") ++ "\x1b_Gi=53;ENOENT"));
+ try std.testing.expectEqualStrings("", try r.take(0));
+ // Images are per pane: pane 2 never sees pane 1's.
+ try std.testing.expect(r.hasImage(1, 53) and !r.hasImage(2, 53));
+ _ = try r.places();
+ const s = &r.p.surface;
+ for (0..s.rows) |y| for (0..s.cols) |x| {
+ const g = s.at(@intCast(x), @intCast(y)).grapheme();
+ try std.testing.expect(std.mem.indexOfScalar(u8, g, 0x1b) == null);
+ try std.testing.expect(!std.mem.eql(u8, g, "_"));
+ };
+}
+
+test "kitty: many replies from one read all arrive, each whole, in order" {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ var batch: std.ArrayList(u8) = .empty;
+ defer batch.deinit(gpa);
+ var want: std.ArrayList(u8) = .empty;
+ defer want.deinit(gpa);
+ for (100..164) |id| {
+ try batch.print(gpa, "\x1b_Gi={d},s=1,v=1,a=q,f=24;AAAA\x1b\\", .{id});
+ try want.print(gpa, "\x1b_Gi={d};OK\x1b\\", .{id});
+ }
+ r.feed(0, batch.items);
+ try std.testing.expectEqualStrings(want.items, try r.take(0));
+}
+
+test "kitty: answers past what one read may hold are dropped whole, never cut" {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ var batch: std.ArrayList(u8) = .empty;
+ defer batch.deinit(gpa);
+ // Each fails with a long EINVAL: far more answer than the pane holds.
+ for (1..1001) |id| try batch.print(gpa, "\x1b_Gi={d},s=2,v=2,a=q,f=24;AAAA\x1b\\", .{id});
+ r.feed(0, batch.items);
+ const got = try r.take(0);
+ try std.testing.expect(got.len > 0);
+ try std.testing.expect(r.pane(0).terminal.?.reply_dropped > 0);
+ // Whole sequences only, each its own `ESC _ G ... ESC \`.
+ var rest = got;
+ while (rest.len > 0) {
+ try std.testing.expect(std.mem.startsWith(u8, rest, "\x1b_Gi="));
+ const end = std.mem.indexOf(u8, rest, "\x1b\\") orelse return error.CutAnswer;
+ try std.testing.expect(std.mem.indexOf(u8, rest[3..end], "\x1b") == null);
+ rest = rest[end + 2 ..];
+ }
+ // The next read is answered again.
+ r.feed(0, apc("i=31,s=1,v=1,a=q,f=24", "AAAA"));
+ try std.testing.expectEqualStrings(reply("i=31", "OK"), try r.take(0));
+}
+
+test "kitty: the graphics answer comes before DA's, as a probe expects" {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ // yazi, chafa and kitten icat probe this way and wait for DA to end it.
+ r.feed(0, apc("i=31,s=1,v=1,a=q,t=d,f=24", "AAAA") ++ "\x1b[c");
+ const got = try r.take(0);
+ const kitty = std.mem.indexOf(u8, got, reply("i=31", "OK")) orelse return error.NoKittyReply;
+ const da = std.mem.indexOf(u8, got, "\x1b[?") orelse return error.NoDaReply;
+ try std.testing.expect(kitty < da);
+}
+
+test "kitty: a cancelled (CAN, SUB) APC runs nothing, answers nothing, and the text goes on" {
+ for ([_][]const u8{ "\x18", "\x1a" }) |cancel| {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ r.feed(0, "\x1b_Ga=T,i=60,f=24,s=4,v=2;" ++ rgb_b64);
+ r.feed(0, cancel);
+ r.feed(0, "after");
+ try std.testing.expect(!r.hasImage(0, 60));
+ try std.testing.expectEqualStrings("", try r.take(0));
+ const text = try terminal.screenTextAlloc(r.pane(0), r.frame.allocator());
+ try std.testing.expect(std.mem.indexOf(u8, text, "after") != null);
+ }
+}
+
+test "kitty: an image too large to hold is refused with an error" {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ // Past ghostty's 10000-pixel side.
+ r.feed(0, apc("a=t,i=61,f=32,s=20000,v=2,o=z", blank_256_zlib_b64));
+ const got = try r.take(0);
+ try std.testing.expect(std.mem.startsWith(u8, got, "\x1b_Gi=61;E"));
+ try std.testing.expect(!r.hasImage(0, 61));
+}
+
+test "kitty: many images stay inside the pane's storage limit, oldest out first, and go with the pane" {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ const storage = r.storage(0);
+ var buf: [600]u8 = undefined;
+ // 256 KiB each: 300 of them is past the 64 MiB a screen may hold.
+ for (1..301) |id| r.feed(0, try std.fmt.bufPrint(&buf, "\x1b_Ga=t,i={d},f=32,s=256,v=256,o=z,q=2;{s}\x1b\\", .{ id, blank_256_zlib_b64 }));
+ try std.testing.expect(storage.total_bytes <= storage.total_limit);
+ try std.testing.expect(storage.images.count() < 300);
+ try std.testing.expect(r.hasImage(0, 300));
+ try std.testing.expect(!r.hasImage(0, 1));
+ try std.testing.expectEqualStrings("", try r.take(0));
+ // The testing allocator checks the pane gives all of it back (deinit).
+}
+
+test "kitty: an animation's frames play" {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ // Root frame red, frame 2 blue (a whole-frame RGB replacement), then
+ // run it: s=3, looping.
+ const blue_frame = "AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/";
+ r.feed(0, "\x1b[1;1H" ++ apc("a=T,i=70,f=24,s=4,v=2,c=2,r=1,q=2", rgb_b64) ++
+ apc("a=f,i=70,f=24,s=4,v=2,z=40,q=2", blue_frame) ++
+ // The root frame's gap is 0 (gapless, skipped) until it is given one.
+ apc("a=a,i=70,r=1,z=40,q=2", "") ++
+ apc("a=a,i=70,s=3,v=1,q=2", ""));
+ const img = r.storage(0).imageById(70) orelse return error.NotStored;
+ try std.testing.expect(img.animation != null);
+ // On the core's clock: the first frame drawn starts it (red), the core
+ // asks to wake for the next, and a frame drawn after 40 ms shows blue.
+ const base: u64 = 10 * std.time.ns_per_s;
+ r.p.advance(base);
+ const first = try r.placesOf(70);
+ try std.testing.expectEqual(red, pixel(first[0], 0, 0));
+ try std.testing.expect(r.p.nextWake() != null);
+ var shows_blue = false;
+ for (1..20) |k| {
+ r.p.advance(base + k * 50 * std.time.ns_per_ms);
+ const drawn = try r.placesOf(70);
+ if (drawn.len == 1 and std.mem.eql(u8, &pixel(drawn[0], 0, 0), &blue)) shows_blue = true;
+ }
+ try std.testing.expect(shows_blue);
+ // Stopped (s=1), nothing more to wake for.
+ r.feed(0, apc("a=a,i=70,s=1,q=2", ""));
+ _ = try r.places();
+ try std.testing.expectEqual(@as(?u64, null), terminal.animationDueMs(r.pane(0)));
+}
+
+test "kitty: a placement relative to another (P=, Q=) is drawn at its parent's cell plus H/V" {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ r.feed(0, apc("a=t,i=80,f=24,s=4,v=2,q=2", rgb_b64) ++ "\x1b[2;2H" ++
+ apc("a=p,i=80,p=1,c=2,r=1,q=2", "") ++
+ // Three cells right of placement 1, one row down; then one relative
+ // to that, a chain two deep.
+ apc("a=p,i=80,p=2,P=80,Q=1,H=3,V=1,c=2,r=1,q=2", "") ++
+ apc("a=p,i=80,p=3,P=80,Q=2,H=3,c=2,r=1,q=2", ""));
+ try std.testing.expectEqual(@as(usize, 3), r.placementCount(0));
+ const drawn = try r.placesOf(80);
+ try std.testing.expectEqual(@as(usize, 3), drawn.len);
+ const o = r.origin(0);
+ var cells: [3][2]u16 = undefined;
+ for (drawn, 0..) |place, i| cells[i] = .{ place.x - o.x, place.y - o.y };
+ std.mem.sort([2]u16, &cells, {}, struct {
+ fn lt(_: void, a: [2]u16, b: [2]u16) bool {
+ return a[0] < b[0];
+ }
+ }.lt);
+ try std.testing.expectEqual([2]u16{ 1, 1 }, cells[0]);
+ try std.testing.expectEqual([2]u16{ 4, 2 }, cells[1]);
+ try std.testing.expectEqual([2]u16{ 7, 2 }, cells[2]);
+ // Its parent deleted, a relative placement goes with it.
+ r.feed(0, apc("a=d,d=i,i=80,p=1", ""));
+ try std.testing.expectEqual(@as(usize, 0), (try r.placesOf(80)).len);
+}
+
+// ---- What t=f, t=t and t=s may make pardes open ----
+//
+// A program in a pane names paths on pardes's machine. Which paths ghostty's
+// loader accepts is its policy (kitty's, which the user accepts); what pardes
+// owns is that none of them hangs or crashes it or blows its memory: a FIFO
+// (an open for reading waits for a writer), a device (an open may do
+// something), a file no screen could hold. And t=t deletes temporary files
+// only.
+
+extern "c" fn mkfifo(path: [*:0]const u8, mode: std.c.mode_t) c_int;
+extern "c" fn symlink(target: [*:0]const u8, link: [*:0]const u8) c_int;
+extern "c" fn usleep(us: c_uint) c_int;
+extern "c" fn ftruncate(fd: c_int, len: i64) c_int;
+extern "c" fn getcwd(buf: [*]u8, size: usize) ?[*:0]u8;
+
+const Guard = struct {
+ path: [:0]const u8,
+ done: std.atomic.Value(bool) = .init(false),
+ blocked: std.atomic.Value(bool) = .init(false),
+
+ /// After 1.5 s still running, the feed is stuck in an open of the FIFO:
+ /// open it for writing, which lets that open return.
+ fn run(g: *Guard) void {
+ for (0..150) |_| {
+ if (g.done.load(.acquire)) return;
+ _ = usleep(10_000);
+ }
+ g.blocked.store(true, .release);
+ const fd = std.c.open(g.path, .{ .ACCMODE = .WRONLY }, @as(std.c.mode_t, 0));
+ if (fd >= 0) _ = std.c.close(fd);
+ }
+};
+
+/// Feeds `bytes`; whether the feed blocked opening `fifo`.
+fn feedBlocks(r: *Rig, bytes: []const u8, fifo: [:0]const u8) !bool {
+ var g: Guard = .{ .path = fifo };
+ const t = try std.Thread.spawn(.{}, Guard.run, .{&g});
+ r.feed(0, bytes);
+ g.done.store(true, .release);
+ t.join();
+ return g.blocked.load(.acquire);
+}
+
+test "kitty: a FIFO named by t=f, t=t or t=s never blocks pardes" {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ const arena = r.frame.allocator();
+ const pid = std.c.getpid();
+ const Case = struct { medium: u8, fifo: [:0]const u8, name: []const u8 };
+ const file = try std.fmt.allocPrintSentinel(arena, "/tmp/pardes-kitty-{d}-fifo", .{pid}, 0);
+ const temp = try std.fmt.allocPrintSentinel(arena, "/tmp/tty-graphics-protocol-pardes-{d}-fifo", .{pid}, 0);
+ const shm_path = try std.fmt.allocPrintSentinel(arena, "/dev/shm/pardes-kitty-{d}-fifo", .{pid}, 0);
+ const cases = [_]Case{
+ .{ .medium = 'f', .fifo = file, .name = file },
+ .{ .medium = 't', .fifo = temp, .name = temp },
+ .{ .medium = 's', .fifo = shm_path, .name = shm_path["/dev/shm".len..] },
+ };
+ for (cases) |c| {
+ _ = std.c.unlink(c.fifo);
+ if (mkfifo(c.fifo, 0o600) != 0) return error.MkfifoFailed;
+ defer _ = std.c.unlink(c.fifo);
+ const cmd = try std.fmt.allocPrint(arena, "\x1b_Ga=t,t={c},i=90,f=24,s=1,v=1;{s}\x1b\\", .{ c.medium, try b64(arena, c.name) });
+ const blocked = try feedBlocks(&r, cmd, c.fifo);
+ if (blocked) std.debug.print("t={c}: pardes blocked opening the FIFO {s}\n", .{ c.medium, c.fifo });
+ try std.testing.expect(!blocked);
+ try std.testing.expect(std.mem.startsWith(u8, try r.take(0), "\x1b_Gi=90;E"));
+ try std.testing.expect(!r.hasImage(0, 90));
+ }
+}
+
+test "kitty: t=s through a /dev/shm symlink to a FIFO does not block pardes either" {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ const arena = r.frame.allocator();
+ const pid = std.c.getpid();
+ const fifo = try std.fmt.allocPrintSentinel(arena, "/tmp/pardes-kitty-{d}-shmfifo", .{pid}, 0);
+ _ = std.c.unlink(fifo);
+ if (mkfifo(fifo, 0o600) != 0) return error.MkfifoFailed;
+ defer _ = std.c.unlink(fifo);
+ const link = try std.fmt.allocPrintSentinel(arena, "/dev/shm/pardes-kitty-{d}-link", .{pid}, 0);
+ _ = std.c.unlink(link);
+ if (symlink(fifo, link) != 0) return error.SymlinkFailed;
+ defer _ = std.c.unlink(link);
+ const cmd = try std.fmt.allocPrint(arena, "\x1b_Ga=t,t=s,i=91,f=24,s=1,v=1;{s}\x1b\\", .{try b64(arena, link["/dev/shm".len..])});
+ try std.testing.expect(!try feedBlocks(&r, cmd, fifo));
+ try std.testing.expect(std.mem.startsWith(u8, try r.take(0), "\x1b_Gi=91;E"));
+}
+
+test "kitty: t=f and t=t refuse /proc, /sys, devices and directories" {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ const arena = r.frame.allocator();
+ const refused = [_][]const u8{ "/proc/self/status", "/sys/devices/system/cpu/online", "/dev/null", "/dev/zero", "/dev/urandom", "/tmp", "/" };
+ for ([_]u8{ 'f', 't' }) |medium| for (refused) |path| {
+ // A raw 1x1 pixel needs 3 bytes (S=3): any readable file would do.
+ r.feed(0, try std.fmt.allocPrint(arena, "\x1b_Ga=t,t={c},i=92,f=24,s=1,v=1,S=3;{s}\x1b\\", .{ medium, try b64(arena, path) }));
+ try std.testing.expect(std.mem.startsWith(u8, try r.take(0), "\x1b_Gi=92;E"));
+ try std.testing.expect(!r.hasImage(0, 92));
+ };
+}
+
+test "kitty: t=t deletes only a temporary file: one outside the temp directory, or behind a symlink, stays" {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ const arena = r.frame.allocator();
+ const pid = std.c.getpid();
+ var cwd_buf: [4096]u8 = undefined;
+ const cwd = std.mem.span(getcwd(&cwd_buf, cwd_buf.len) orelse return error.NoCwd);
+ // Outside /tmp, /dev/shm and $TMPDIR: the build's own cache.
+ const dir = try std.fmt.allocPrintSentinel(arena, "{s}/.zig-cache/tmp/pardes-kitty-{d}", .{ cwd, pid }, 0);
+ _ = std.c.mkdir(dir, 0o700);
+ defer _ = std.c.rmdir(dir);
+ const kept = try std.fmt.allocPrintSentinel(arena, "{s}/tty-graphics-protocol-kept.rgb", .{dir}, 0);
+ try writeTemp(kept, &rgb_raw);
+ defer _ = std.c.unlink(kept);
+ const link = try std.fmt.allocPrintSentinel(arena, "/tmp/tty-graphics-protocol-pardes-{d}-link", .{pid}, 0);
+ _ = std.c.unlink(link);
+ if (symlink(kept, link) != 0) return error.SymlinkFailed;
+ defer _ = std.c.unlink(link);
+ for ([_][:0]const u8{ kept, link }) |path| {
+ r.feed(0, try std.fmt.allocPrint(arena, "\x1b_Ga=t,t=t,i=93,f=24,s=4,v=2;{s}\x1b\\", .{try b64(arena, path)}));
+ try std.testing.expect(std.mem.startsWith(u8, try r.take(0), "\x1b_Gi=93;E"));
+ try std.testing.expect(!r.hasImage(0, 93));
+ try std.testing.expect(exists(kept));
+ }
+}
+
+test "kitty: a file bigger than a screen may hold is refused, not read whole" {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ const arena = r.frame.allocator();
+ // 100 MiB, sparse: 5120x5120 RGBA, past the 64 MiB a screen holds.
+ const big = try std.fmt.allocPrintSentinel(arena, "/tmp/pardes-kitty-{d}-big.rgba", .{std.c.getpid()}, 0);
+ const fd = std.c.open(big, .{ .ACCMODE = .WRONLY, .CREAT = true, .TRUNC = true }, @as(std.c.mode_t, 0o600));
+ if (fd < 0) return error.OpenFailed;
+ _ = ftruncate(fd, 5120 * 5120 * 4);
+ _ = std.c.close(fd);
+ defer _ = std.c.unlink(big);
+ r.feed(0, try std.fmt.allocPrint(arena, "\x1b_Ga=t,t=f,i=94,f=32,s=5120,v=5120;{s}\x1b\\", .{try b64(arena, big)}));
+ const got = try r.take(0);
+ try std.testing.expect(std.mem.startsWith(u8, got, "\x1b_Gi=94;E"));
+ try std.testing.expect(!r.hasImage(0, 94));
+}
+
+// ---- Fuzz ----
+//
+// Seeded random kitty traffic, the way a confused or hostile program sends
+// it: commands with any keys and values, payloads valid and broken, CAN and
+// SUB mid-command, placeholders with any diacritics, cursor moves, ED 2/3,
+// the alternate screen, window and cell-size resizes and frames between,
+// split into reads anywhere. Each seed checks that pardes neither crashes
+// nor leaks (the testing allocator) and that every answer parses.
+//
+// PARDES_KITTY_FUZZ=<seeds> more seeds (default 24)
+// PARDES_KITTY_FUZZ_SEED=<seed> one seed, printing each step
+// PARDES_KITTY_FUZZ_STEPS=<n> steps per seed (default 400)
+//
+// A crash prints `seed S step N`: rerun that seed with fewer steps to
+// shrink it. A bad answer shrinks itself to the shortest failing prefix.
+
+fn envNumber(name: [*:0]const u8, default: u64) u64 {
+ const v = std.c.getenv(name) orelse return default;
+ return std.fmt.parseInt(u64, std.mem.span(v), 10) catch default;
+}
+
+const fuzz_keys = "aiIpfsvxywhcrXYzCUPQHVmoqtSOd";
+const fuzz_actions = "tTpdqfac";
+const fuzz_deletes = "aAiInNcCpPqQxXyYzZrRfF";
+
+fn fuzzValue(rng: std.Random, out: *std.ArrayList(u8), arena: std.mem.Allocator) !void {
+ switch (rng.uintLessThan(u8, 10)) {
+ 0 => try out.appendSlice(arena, "0"),
+ 1 => try out.print(arena, "{d}", .{rng.int(u32)}),
+ 2 => try out.print(arena, "-{d}", .{rng.uintLessThan(u32, 1 << 31)}),
+ 3 => try out.appendSlice(arena, "4294967295"),
+ 4 => try out.appendSlice(arena, "99999999999999999999"),
+ 5 => try out.appendSlice(arena, "x"),
+ else => try out.print(arena, "{d}", .{rng.uintLessThan(u32, 12)}),
+ }
+}
+
+/// A command that loads, or places what is loaded, with any geometry: it
+/// gets past the parser to the storage and the drawing.
+fn fuzzPlacement(rng: std.Random, arena: std.mem.Allocator) ![]const u8 {
+ var out: std.ArrayList(u8) = .empty;
+ const id = 1 + rng.uintLessThan(u32, 4);
+ switch (rng.uintLessThan(u8, 3)) {
+ 0 => try out.print(arena, "\x1b_Ga=T,f=24,s=4,v=2,i={d},q=2", .{id}),
+ 1 => try out.print(arena, "\x1b_Ga=p,i={d},q=2", .{id}),
+ else => try out.print(arena, "\x1b_Ga=T,f=100,i={d},q=2", .{id}),
+ }
+ const keys = "crxywhXYzCUpPQHV";
+ for (0..rng.uintLessThan(usize, 6)) |_| {
+ try out.print(arena, ",{c}=", .{keys[rng.uintLessThan(usize, keys.len)]});
+ try fuzzValue(rng, &out, arena);
+ }
+ try out.append(arena, ';');
+ if (std.mem.startsWith(u8, out.items, "\x1b_Ga=T,f=24")) try out.appendSlice(arena, rgb_b64);
+ if (std.mem.startsWith(u8, out.items, "\x1b_Ga=T,f=100")) try out.appendSlice(arena, png_b64);
+ try out.appendSlice(arena, "\x1b\\");
+ return out.items;
+}
+
+fn fuzzCommand(rng: std.Random, arena: std.mem.Allocator) ![]const u8 {
+ if (rng.boolean()) return fuzzPlacement(rng, arena);
+ var out: std.ArrayList(u8) = .empty;
+ try out.appendSlice(arena, "\x1b_G");
+ const action = fuzz_actions[rng.uintLessThan(usize, fuzz_actions.len)];
+ try out.print(arena, "a={c}", .{action});
+ if (action == 'd') try out.print(arena, ",d={c}", .{fuzz_deletes[rng.uintLessThan(usize, fuzz_deletes.len)]});
+ for (0..rng.uintLessThan(usize, 7)) |_| {
+ const key = fuzz_keys[rng.uintLessThan(usize, fuzz_keys.len)];
+ try out.print(arena, ",{c}=", .{key});
+ switch (key) {
+ 'f' => try out.appendSlice(arena, ([_][]const u8{ "24", "32", "100", "7" })[rng.uintLessThan(usize, 4)]),
+ 't' => try out.appendSlice(arena, ([_][]const u8{ "d", "f", "t", "s", "q" })[rng.uintLessThan(usize, 5)]),
+ 'o' => try out.appendSlice(arena, if (rng.boolean()) "z" else "y"),
+ else => try fuzzValue(rng, &out, arena),
+ }
+ }
+ // Mostly the small ids the rest reuse, so commands meet each other.
+ if (rng.uintLessThan(u8, 4) != 0) try out.print(arena, ",i={d}", .{1 + rng.uintLessThan(u32, 4)});
+ if (rng.boolean()) try out.print(arena, ",s={d},v={d}", .{ rng.uintLessThan(u32, 6), rng.uintLessThan(u32, 6) });
+ try out.append(arena, ';');
+ switch (rng.uintLessThan(u8, 8)) {
+ 0 => try out.appendSlice(arena, rgb_b64),
+ 1 => try out.appendSlice(arena, rgba_b64),
+ 2 => try out.appendSlice(arena, png_b64),
+ 3 => try out.appendSlice(arena, rgb_zlib_b64),
+ 4 => {}, // nothing
+ 5 => {
+ // base64, broken: random characters, wrong padding.
+ for (0..rng.uintLessThan(usize, 40)) |_| try out.append(arena, "AB/+=x!Z09"[rng.uintLessThan(usize, 10)]);
+ },
+ 6 => try out.appendSlice(arena, png_b64[0..rng.uintLessThan(usize, png_b64.len)]),
+ else => try out.appendSlice(arena, "AAAA"),
+ }
+ switch (rng.uintLessThan(u8, 12)) {
+ 0 => try out.append(arena, 0x18), // CAN
+ 1 => try out.append(arena, 0x1a), // SUB
+ 2 => try out.appendSlice(arena, "\x1b[m"), // ESC aborting it
+ else => try out.appendSlice(arena, "\x1b\\"),
+ }
+ return out.items;
+}
+
+fn fuzzOutput(rng: std.Random, arena: std.mem.Allocator) ![]const u8 {
+ return switch (rng.uintLessThan(u8, 9)) {
+ 0 => try std.fmt.allocPrint(arena, "\x1b[{d};{d}H", .{ 1 + rng.uintLessThan(u32, 50), 1 + rng.uintLessThan(u32, 150) }),
+ 1 => "line\r\n",
+ 2 => "\x1b[H\x1b[2J\x1b[3J",
+ 3 => if (rng.boolean()) "\x1b[?1049h" else "\x1b[?1049l",
+ 4 => blk: {
+ // Placeholders: an image id in the colour (24-bit or 256), any
+ // diacritics, up to three per cell.
+ var out: std.ArrayList(u8) = .empty;
+ if (rng.boolean())
+ try out.print(arena, "\x1b[38;2;{d};{d};{d}m", .{ rng.int(u8), rng.int(u8), rng.uintLessThan(u8, 5) })
+ else
+ try out.print(arena, "\x1b[38;5;{d}m", .{rng.uintLessThan(u8, 5)});
+ if (rng.boolean()) try out.print(arena, "\x1b[58;5;{d}m", .{rng.uintLessThan(u8, 4)});
+ for (0..1 + rng.uintLessThan(usize, 6)) |_| {
+ try out.appendSlice(arena, "\u{10EEEE}");
+ const marks = [_][]const u8{ "\u{0305}", "\u{030D}", "\u{030E}", "\u{0310}", "\u{0312}", "\u{033D}", "\u{0346}", "\u{1D242}" };
+ for (0..rng.uintLessThan(usize, 4)) |_| try out.appendSlice(arena, marks[rng.uintLessThan(usize, marks.len)]);
+ }
+ try out.appendSlice(arena, "\x1b[39;59m");
+ break :blk out.items;
+ },
+ 5 => "\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n",
+ 6 => "\x1b[2;8r\x1b[S\x1b[T\x1b[r",
+ 7 => "\x1b[3L\x1b[2M\x1b[4@\x1b[2P",
+ else => "text",
+ };
+}
+
+/// Every answer whole: kitty's `ESC _ G ... ESC \`, or a CSI.
+fn answersParse(got: []const u8) bool {
+ var rest = got;
+ while (rest.len > 0) {
+ if (std.mem.startsWith(u8, rest, "\x1b_G")) {
+ const end = std.mem.indexOf(u8, rest, "\x1b\\") orelse return false;
+ if (std.mem.indexOfScalar(u8, rest[3..end], 0x1b) != null) return false;
+ rest = rest[end + 2 ..];
+ } else if (std.mem.startsWith(u8, rest, "\x1b[")) {
+ var i: usize = 2;
+ while (i < rest.len and !(rest[i] >= 0x40 and rest[i] <= 0x7e)) i += 1;
+ if (i == rest.len) return false;
+ rest = rest[i + 1 ..];
+ } else return false;
+ }
+ return true;
+}
+
+/// One seed's run, `steps` long; false on a bad answer.
+fn fuzzRun(seed: u64, steps: usize, trace: bool) !bool {
+ var prng: std.Random.DefaultPrng = .init(seed);
+ const rng = prng.random();
+ var r = try Rig.init(1);
+ defer r.deinit();
+ var arena_state: std.heap.ArenaAllocator = .init(gpa);
+ defer arena_state.deinit();
+ for (0..steps) |step| {
+ _ = arena_state.reset(.retain_capacity);
+ const arena = arena_state.allocator();
+ if (trace) std.debug.print("seed {d} step {d}\n", .{ seed, step });
+ switch (rng.uintLessThan(u8, 20)) {
+ 0 => {
+ const cols = 20 + rng.uintLessThan(u16, 140);
+ const rows = 6 + rng.uintLessThan(u16, 50);
+ r.p.update(.{ .resize = .{ .cols = cols, .rows = rows, .cell_pixels = .{ .w = 1 + rng.uintLessThan(u16, 30), .h = 1 + rng.uintLessThan(u16, 60) } } });
+ r.drain();
+ },
+ 1 => terminal.resizeGrid(r.pane(0), gpa, 1 + rng.uintLessThan(u16, 120), 1 + rng.uintLessThan(u16, 40)),
+ 2, 3 => {
+ const drawn = try r.places();
+ if (trace) std.debug.print(" {d} places, {d} placements, {d} images\n", .{ drawn.len, r.placementCount(0), r.storage(0).images.count() });
+ },
+ 4, 5, 6, 7 => r.feedSplit(0, try fuzzOutput(rng, arena), 1 + rng.uintLessThan(usize, 64)),
+ else => {
+ var batch: std.ArrayList(u8) = .empty;
+ for (0..1 + rng.uintLessThan(usize, 4)) |_| try batch.appendSlice(arena, try fuzzCommand(rng, arena));
+ r.feedSplit(0, batch.items, 1 + rng.uintLessThan(usize, 200));
+ },
+ }
+ const got = try r.take(0);
+ if (!answersParse(got)) {
+ if (trace) std.debug.print("seed {d} step {d}: unparsable answer {f}\n", .{ seed, step, std.ascii.hexEscape(got, .lower) });
+ return false;
+ }
+ }
+ _ = try r.places();
+ return true;
+}
+
+test "kitty: fuzzed traffic neither crashes nor leaks, and every answer parses" {
+ const steps: usize = @intCast(envNumber("PARDES_KITTY_FUZZ_STEPS", 400));
+ if (std.c.getenv("PARDES_KITTY_FUZZ_SEED")) |one| {
+ const seed = try std.fmt.parseInt(u64, std.mem.span(one), 10);
+ try std.testing.expect(try fuzzRun(seed, steps, true));
+ return;
+ }
+ const seeds = envNumber("PARDES_KITTY_FUZZ", 24);
+ for (0..seeds) |seed| {
+ if (try fuzzRun(seed, steps, false)) continue;
+ // Shrink to the shortest failing prefix.
+ var lo: usize = 1;
+ var hi: usize = steps;
+ while (lo < hi) {
+ const mid = lo + (hi - lo) / 2;
+ if (try fuzzRun(seed, mid, false)) lo = mid + 1 else hi = mid;
+ }
+ std.debug.print("kitty fuzz: seed {d} fails in {d} steps; PARDES_KITTY_FUZZ_SEED={d} PARDES_KITTY_FUZZ_STEPS={d} traces it\n", .{ seed, lo, seed, lo });
+ return error.FuzzFailed;
+ }
+ if (seeds != 24) std.debug.print("kitty fuzz: {d} seeds of {d} steps ok\n", .{ seeds, steps });
+}
+
+// ---- An image's pane, as it lives ----
+
+test "kitty: scrolled back by pardes, an image shows on its row; scrolled forward, it goes" {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ const pane = r.pane(0);
+ r.feed(0, "\x1b[1;1Hmarker" ++ apc("a=T,i=20,f=24,s=4,v=2,c=2,r=1,q=2", rgb_b64));
+ var nl: [2 * 60]u8 = undefined;
+ for (0..60) |i| nl[2 * i ..][0..2].* = "\r\n".*;
+ r.feed(0, &nl);
+ try std.testing.expectEqual(@as(usize, 0), (try r.placesOf(20)).len);
+ // Back to the top of the history: the marker row is the body's first.
+ terminal.scrollGrid(pane, -1000);
+ const o = r.origin(0);
+ const drawn = try r.placesOf(20);
+ try std.testing.expectEqual(@as(usize, 1), drawn.len);
+ try std.testing.expectEqual(o.y, drawn[0].y);
+ try std.testing.expectEqual(o.x + 6, drawn[0].x);
+ terminal.followOutput(pane);
+ try std.testing.expectEqual(@as(usize, 0), (try r.placesOf(20)).len);
+}
+
+test "kitty: an edited copy taller than the rows it covers pushes the images below it down" {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ const pane = r.pane(0);
+ r.feed(0, "\x1b[1;1Hone\r\ntwo\r\n\x1b[6;1H" ++ apc("a=T,i=21,f=24,s=4,v=2,c=2,r=1,q=2", rgb_b64));
+ const o = r.origin(0);
+ try std.testing.expectEqual(o.y + 5, (try r.placesOf(21))[0].y);
+ // Row 1 ("two") edited into three lines.
+ pane.body.mode = .normal;
+ pane.ovl = .{ .row = 1, .rows = 1, .text = try gpa.dupe(u8, "two\nthree\nfour") };
+ const drawn = try r.placesOf(21);
+ try std.testing.expectEqual(@as(usize, 1), drawn.len);
+ try std.testing.expectEqual(o.y + 7, drawn[0].y);
+}
+
+test "kitty: an image wider than its pane is cut at the pane's edge, never drawn over the next one" {
+ var r = try Rig.init(3);
+ defer r.deinit();
+ // The classic boot: two columns. Pane 0 is in the left one.
+ const rect = r.p.rects[0];
+ const o = r.origin(0);
+ const right = rect.x + rect.w;
+ // 2x1 cells at its last-but-one column: one cell is the pane's.
+ const at = try std.fmt.allocPrint(r.frame.allocator(), "\x1b[1;{d}H", .{r.pane(0).cols});
+ r.feed(0, at);
+ r.feed(0, apc("a=T,i=22,f=24,s=4,v=2,c=4,r=1,q=2", rgb_b64));
+ const drawn = try r.placesOf(22);
+ try std.testing.expectEqual(@as(usize, 1), drawn.len);
+ try std.testing.expect(drawn[0].x + drawn[0].w <= o.x + r.pane(0).cols);
+ try std.testing.expect(drawn[0].x + drawn[0].w <= right);
+ // And the pixels it takes are only that cell's.
+ const g = drawn[0].native.geometry.?;
+ try std.testing.expect(g.dst.w <= @as(u32, drawn[0].w) * 10);
+}
+
+test "kitty: a collapsed pane draws no image" {
+ var r = try Rig.init(3);
+ defer r.deinit();
+ r.feed(1, "\x1b[1;1H" ++ apc("a=T,i=23,f=24,s=4,v=2,c=2,r=1,q=2", rgb_b64));
+ try std.testing.expectEqual(@as(usize, 1), (try r.placesOf(23)).len);
+ try std.testing.expect(r.p.executeBuiltinLine(1, "Collapse"));
+ try std.testing.expectEqual(@as(usize, 0), (try r.placesOf(23)).len);
+ try std.testing.expect(r.p.executeBuiltinLine(1, "Collapse"));
+ try std.testing.expectEqual(@as(usize, 1), (try r.placesOf(23)).len);
+}
+
+test "kitty: a new cell size (font zoom) redraws an image at the same cells, scaled to the new size" {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ r.feed(0, "\x1b[2;3H" ++ apc("a=T,i=24,f=24,s=4,v=2,c=2,r=1,q=2", rgb_b64));
+ var drawn = try r.placesOf(24);
+ try std.testing.expectEqual(@as(u32, 20), drawn[0].native.geometry.?.dst.w);
+ r.p.update(.{ .resize = .{ .cols = 120, .rows = 40, .cell_pixels = .{ .w = 15, .h = 30 } } });
+ r.drain();
+ drawn = try r.placesOf(24);
+ const o = r.origin(0);
+ try std.testing.expectEqual(@as(usize, 1), drawn.len);
+ try std.testing.expectEqual(o.x + 2, drawn[0].x);
+ try std.testing.expectEqual(o.y + 1, drawn[0].y);
+ try std.testing.expectEqual(@as(u32, 30), drawn[0].native.geometry.?.dst.w);
+ try std.testing.expectEqual(@as(u32, 30), drawn[0].native.geometry.?.dst.h);
+}
+
+test "kitty: a dumped and restored terminal keeps its images" {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ r.feed(0, "\x1b[1;1Hpicture" ++ apc("a=T,i=25,f=24,s=4,v=2,c=2,r=1,q=2", rgb_b64));
+ try pardes.dump.dumpState(r.p);
+ const restored = try pardes.dump.restore(r.p, r.p.dump_out.?, "/tmp/pardes-kitty.dump.zon");
+ defer restored.deinit();
+ const pane = restored.panes[0].?;
+ const kept = pane.terminal != null and pane.terminal.?.vt.screens.active.kitty_images.placements.count() > 0;
+ try knownGap("a terminal's kitty images do not survive a dump (Dump/Load, Handover, a closed pane reopened from the Store): dumpPane writes the screen as VT text (ScreenFormatter), which has no images; ghostty's snapshot format carries them but is unstable (v1)", kept);
+}
+
+// ---- Real clients' traffic ----
+//
+// What kitten icat 0.49.2 and chafa 1.18.3 wrote to a pardes pane, recorded
+// with script(1) between them and the pane (`PARDES_KITTY_EXPLORE` in
+// test/kitty_harness.zig), a 64x64 PNG on a 118-column pane with 8x16 cells:
+// their probes, then the image streamed. Replayed in 4 KiB reads, each must
+// answer whole and draw its first row where it drew live.
+
+const Recorded = struct {
+ name: []const u8,
+ bytes: []const u8,
+ /// The pane cell its top-left landed on, live; null: draws nothing.
+ at: ?[2]u16,
+};
+
+const recorded = [_]Recorded{
+ .{ .name = "icat --align=left", .bytes = @embedFile("kitty-fixtures/icat-left.vt"), .at = .{ 0, 0 } },
+ .{ .name = "icat --align=center", .bytes = @embedFile("kitty-fixtures/icat-center.vt"), .at = .{ 55, 0 } },
+ .{ .name = "icat --align=right", .bytes = @embedFile("kitty-fixtures/icat-right.vt"), .at = .{ 110, 0 } },
+ .{ .name = "icat --place 10x5@20x3", .bytes = @embedFile("kitty-fixtures/icat-place.vt"), .at = .{ 21, 3 } },
+ .{ .name = "icat --unicode-placeholder", .bytes = @embedFile("kitty-fixtures/icat-placeholder.vt"), .at = .{ 0, 0 } },
+ .{ .name = "chafa -f kitty -s 8x4", .bytes = @embedFile("kitty-fixtures/chafa.vt"), .at = .{ 0, 0 } },
+ .{ .name = "icat --clear", .bytes = @embedFile("kitty-fixtures/icat-clear.vt"), .at = null },
+};
+
+test "kitty: recorded kitten icat and chafa traffic replays: answers whole, images where they were drawn" {
+ for (recorded) |rec| {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ r.p.update(.{ .resize = .{ .cols = 120, .rows = 40, .cell_pixels = .{ .w = 8, .h = 16 } } });
+ r.drain();
+ _ = try r.take(0);
+ r.feedSplit(0, rec.bytes, 4096);
+ const got = try r.take(0);
+ std.testing.expect(answersParse(got)) catch |err| {
+ std.debug.print("{s}: unparsable answer {f}\n", .{ rec.name, std.ascii.hexEscape(got, .lower) });
+ return err;
+ };
+ const drawn = try r.places();
+ const want = rec.at orelse {
+ try std.testing.expectEqual(@as(usize, 0), drawn.len);
+ continue;
+ };
+ const o = r.origin(0);
+ var top: ?pardes.ImagePlace = null;
+ for (drawn) |maybe| if (maybe) |place| {
+ if (top == null or place.y < top.?.y or (place.y == top.?.y and place.x < top.?.x)) top = place;
+ };
+ const first = top orelse {
+ std.debug.print("{s}: nothing drawn\n", .{rec.name});
+ return error.NothingDrawn;
+ };
+ std.testing.expectEqual([2]u16{ o.x + want[0], o.y + want[1] }, [2]u16{ first.x, first.y }) catch |err| {
+ std.debug.print("{s}: drawn at {d},{d}, live at {d},{d}\n", .{ rec.name, first.x - o.x, first.y - o.y, want[0], want[1] });
+ return err;
+ };
+ }
+}
+
+test "kitty: under a shell that draws no pixels, a 64x64 image over 8x4 cells is glyph art in every cell" {
+ var r = try Rig.init(1);
+ defer r.deinit();
+ r.p.native_images = false;
+ r.p.update(.{ .resize = .{ .cols = 120, .rows = 40, .cell_pixels = .{ .w = 8, .h = 16 } } });
+ r.drain();
+ // Not the frame's arena: each frame resets that.
+ var data: std.heap.ArenaAllocator = .init(gpa);
+ defer data.deinit();
+ const arena = data.allocator();
+ const px = try arena.alloc(u8, 64 * 64 * 3);
+ for (0..64 * 64) |i| px[i * 3 ..][0..3].* = .{ 13, 77, 231 };
+ const enc = try b64(arena, px);
+ for ([_]bool{ false, true }) |helix| {
+ if (helix) try std.testing.expect(r.p.executeBuiltinLine(0, "Theme helix"));
+ // As test/kitty_client.zig's `place` sends it: after text, in
+ // 1 KiB chunks.
+ var cmds: std.ArrayList(u8) = .empty;
+ try cmds.appendSlice(arena, "\x1b[H\x1b[2J\r\nANCHOR>");
+ var at: usize = 0;
+ while (at < enc.len) : (at += 1024) {
+ const end = @min(enc.len, at + 1024);
+ const more: u8 = if (end < enc.len) '1' else '0';
+ if (at == 0)
+ try cmds.print(arena, "\x1b_Ga=T,i=42,f=24,s=64,v=64,c=8,r=4,m={c};{s}\x1b\\", .{ more, enc[at..end] })
+ else
+ try cmds.print(arena, "\x1b_Gm={c};{s}\x1b\\", .{ more, enc[at..end] });
+ }
+ try cmds.appendSlice(arena, "\r\n");
+ r.feed(0, cmds.items);
+ _ = try r.places();
+ const s = &r.p.surface;
+ const o = r.origin(0);
+ var painted: usize = 0;
+ for (0..4) |dy| for (0..8) |dx| {
+ const cell = s.at(o.x + 7 + @as(u16, @intCast(dx)), o.y + 1 + @as(u16, @intCast(dy)));
+ if (cell.style.bg == .rgb and !cell.default) painted += 1;
+ };
+ std.testing.expectEqual(@as(usize, 32), painted) catch |err| {
+ std.debug.print("helix theme {}: {d} cells painted\n", .{ helix, painted });
+ return err;
+ };
+ }
+}
diff --git a/test/kitty_client.zig b/test/kitty_client.zig
new file mode 100644
index 00000000..753727df
--- /dev/null
+++ b/test/kitty_client.zig
@@ -0,0 +1,153 @@
+//! A kitty graphics client for test/kitty_harness.zig: run in a pardes
+//! terminal pane, it plays one case of the protocol the way yazi or
+//! `kitten icat` do (raw mode, a batch of commands, then reads what comes
+//! back) and records every byte its pty gave it.
+//!
+//! pardes-kitty-client <case> <out>
+//!
+//! After the case's commands it sends a sync query (`i=999`); replies come
+//! in order, so all the case's are in before the sync's. `<out>` gets the
+//! bytes read, and `<out>.done` is made last, which the harness waits for.
+const std = @import("std");
+const c = std.c;
+
+// 64x64 RGB, one colour: the harness looks for it in the outer terminal's
+// image store and in the GUI's capture.
+pub const side = 64;
+pub const colour = [3]u8{ 13, 77, 231 };
+const sync = "\x1b_Gi=999,s=1,v=1,a=q,t=d,f=24;AAAA\x1b\\";
+
+pub fn main(init: std.process.Init) !void {
+ var arena_state: std.heap.ArenaAllocator = .init(std.heap.page_allocator);
+ defer arena_state.deinit();
+ const arena = arena_state.allocator();
+ const args = try init.minimal.args.toSlice(arena);
+ if (args.len != 3) return error.BadArgs;
+ const case = args[1];
+ const out = try arena.dupeSentinel(u8, args[2], 0);
+
+ var saved: c.termios = undefined;
+ if (c.tcgetattr(0, &saved) != 0) return error.NotATerminal;
+ var raw = saved;
+ raw.lflag.ICANON = false;
+ raw.lflag.ECHO = false;
+ raw.cc[@backingInt(c.V.MIN)] = 0;
+ raw.cc[@backingInt(c.V.TIME)] = 1;
+ _ = c.tcsetattr(0, .NOW, &raw);
+ defer _ = c.tcsetattr(0, .NOW, &saved);
+
+ var cmds: std.ArrayList(u8) = .empty;
+ try play(arena, case, &cmds);
+ try cmds.appendSlice(arena, sync);
+ try writeAll(cmds.items);
+
+ // Read until the sync's answer, or 5 s.
+ var got: std.ArrayList(u8) = .empty;
+ var buf: [4096]u8 = undefined;
+ var waited: usize = 0;
+ while (waited < 50 and std.mem.indexOf(u8, got.items, "\x1b_Gi=999;") == null) {
+ const n = c.read(0, &buf, buf.len);
+ if (n > 0) try got.appendSlice(arena, buf[0..@intCast(n)]) else waited += 1;
+ }
+ // A little longer, for anything that should not have come.
+ for (0..3) |_| {
+ const n = c.read(0, &buf, buf.len);
+ if (n > 0) try got.appendSlice(arena, buf[0..@intCast(n)]);
+ }
+ // t=f's file stays the client's to remove (a terminal deletes only t=t's).
+ _ = c.unlink(try std.fmt.allocPrintSentinel(arena, "/tmp/kc-{d}.rgb", .{c.getpid()}, 0));
+ try writeFile(out, got.items);
+ try writeFile(try std.fmt.allocPrintSentinel(arena, "{s}.done", .{out}, 0), "");
+}
+
+fn play(arena: std.mem.Allocator, case: []const u8, cmds: *std.ArrayList(u8)) !void {
+ const pixels = try solid(arena);
+ const enc = std.base64.standard.Encoder;
+ const b64 = try arena.alloc(u8, enc.calcSize(pixels.len));
+ _ = enc.encode(b64, pixels);
+ const pid = c.getpid();
+
+ if (std.mem.eql(u8, case, "query")) {
+ // yazi's and chafa's probe: a graphics query, then DA to end it.
+ try cmds.appendSlice(arena, "\x1b_Gi=31,s=1,v=1,a=q,t=d,f=24;AAAA\x1b\\\x1b[c");
+ } else if (std.mem.eql(u8, case, "place")) {
+ // A line to find, then the image right after it: chunked in 1 KiB
+ // pieces, as kitten icat sends a big one, 8x4 cells.
+ try cmds.appendSlice(arena, "\r\nANCHOR>");
+ var at: usize = 0;
+ var first = true;
+ while (at < b64.len) : (at += 1024) {
+ const end = @min(b64.len, at + 1024);
+ const more: u8 = if (end < b64.len) '1' else '0';
+ if (first)
+ try cmds.print(arena, "\x1b_Ga=T,i=42,f=24,s={d},v={d},c=8,r=4,m={c};{s}\x1b\\", .{ side, side, more, b64[at..end] })
+ else
+ try cmds.print(arena, "\x1b_Gm={c};{s}\x1b\\", .{ more, b64[at..end] });
+ first = false;
+ }
+ try cmds.appendSlice(arena, "\r\n");
+ } else if (std.mem.eql(u8, case, "media")) {
+ const file = try std.fmt.allocPrintSentinel(arena, "/tmp/kc-{d}.rgb", .{pid}, 0);
+ const temp = try std.fmt.allocPrintSentinel(arena, "/tmp/tty-graphics-protocol-kc-{d}.rgb", .{pid}, 0);
+ const shm_name = try std.fmt.allocPrintSentinel(arena, "/kc-{d}", .{pid}, 0);
+ try writeFile(file, pixels);
+ try writeFile(temp, pixels);
+ const fd = shm_open(shm_name, @bitCast(c.O{ .ACCMODE = .RDWR, .CREAT = true, .TRUNC = true }), 0o600);
+ if (fd < 0) return error.ShmOpenFailed;
+ if (c.write(fd, pixels.ptr, pixels.len) != @as(isize, @intCast(pixels.len))) return error.WriteFailed;
+ _ = c.close(fd);
+ for ([_]struct { u8, u32, []const u8 }{ .{ 'f', 51, file }, .{ 't', 52, temp }, .{ 's', 53, shm_name } }) |m| {
+ const path = try arena.alloc(u8, enc.calcSize(m[2].len));
+ _ = enc.encode(path, m[2]);
+ try cmds.print(arena, "\x1b_Ga=t,t={c},i={d},f=24,s={d},v={d};{s}\x1b\\", .{ m[0], m[1], side, side, path });
+ }
+ } else if (std.mem.eql(u8, case, "quiet")) {
+ // q=1 hides the OK, q=2 the error; q=0's error is heard.
+ try cmds.print(arena, "\x1b_Ga=t,i=61,f=24,s={d},v={d},q=1;{s}\x1b\\", .{ side, side, b64 });
+ try cmds.appendSlice(arena, "\x1b_Ga=t,i=62,f=24,s=2,v=2,q=2;AAAA\x1b\\");
+ try cmds.appendSlice(arena, "\x1b_Ga=t,i=63,f=24,s=2,v=2,q=0;AAAA\x1b\\");
+ } else if (std.mem.eql(u8, case, "cancel")) {
+ // CAN in the middle of the payload: nothing runs, the text goes on.
+ try cmds.print(arena, "\x1b_Ga=T,i=64,f=24,s={d},v={d};{s}\x18CANCELLED-OK\r\n", .{ side, side, b64[0..512] });
+ } else if (std.mem.eql(u8, case, "under")) {
+ // Under the text (z < 0), as a background picture is put.
+ try cmds.print(arena, "\x1b_Ga=T,i=66,f=24,s={d},v={d},c=8,r=4,z=-1,q=2;{s}\x1b\\\r\n", .{ side, side, b64 });
+ } else if (std.mem.eql(u8, case, "show")) {
+ try cmds.print(arena, "\x1b_Ga=T,i=65,f=24,s={d},v={d},c=8,r=4,q=2;{s}\x1b\\\r\n", .{ side, side, b64 });
+ } else if (std.mem.eql(u8, case, "delete")) {
+ // Run after `show`, in the same pane: image 65 is still stored.
+ try cmds.appendSlice(arena, "\x1b_Ga=d,d=I,i=65\x1b\\");
+ } else return error.UnknownCase;
+}
+
+extern "c" fn shm_open(name: [*:0]const u8, flag: c_int, mode: c.mode_t) c_int;
+
+fn solid(arena: std.mem.Allocator) ![]u8 {
+ const px = try arena.alloc(u8, side * side * 3);
+ for (0..side * side) |i| px[i * 3 ..][0..3].* = colour;
+ return px;
+}
+
+fn writeAll(bytes: []const u8) !void {
+ var at: usize = 0;
+ while (at < bytes.len) {
+ const n = c.write(1, bytes[at..].ptr, bytes.len - at);
+ if (n < 0) {
+ if (c.errno(n) == .INTR or c.errno(n) == .AGAIN) continue;
+ return error.WriteFailed;
+ }
+ at += @intCast(n);
+ }
+}
+
+fn writeFile(path: [:0]const u8, bytes: []const u8) !void {
+ const fd = c.open(path, .{ .ACCMODE = .WRONLY, .CREAT = true, .TRUNC = true }, @as(c.mode_t, 0o644));
+ if (fd < 0) return error.OpenFailed;
+ defer _ = c.close(fd);
+ var at: usize = 0;
+ while (at < bytes.len) {
+ const n = c.write(fd, bytes[at..].ptr, bytes.len - at);
+ if (n <= 0) return error.WriteFailed;
+ at += @intCast(n);
+ }
+}
diff --git a/test/kitty_harness.zig b/test/kitty_harness.zig
new file mode 100644
index 00000000..652395b8
--- /dev/null
+++ b/test/kitty_harness.zig
@@ -0,0 +1,579 @@
+//! Kitty graphics end to end through a terminal pane.
+//!
+//! zig build kitty-harness -Dplatform=tty a fake kitty terminal outside
+//! zig build kitty-harness -Dplatform=gui the SDL renderer's capture
+//!
+//! test/kitty.zig checks the proxy at the core; this checks it through the
+//! real things on both sides of it. Inside: a bash in a pardes terminal pane
+//! runs test/kitty_client.zig (each case as yazi or `kitten icat` would play
+//! it, recording what its pty reads back), then `kitten icat` and `chafa`
+//! themselves when they are installed. Outside, on the tty, the harness is a
+//! kitty terminal: a ghostty-vt emulator that stores the images pardes
+//! re-emits, so a check reads where they landed in cells; on the GUI, the
+//! GPU readback (PARDES_TEST_CAPTURE_DIR) is where the pixels landed.
+const std = @import("std");
+const libc = std.c;
+const eh = @import("e2e_harness.zig");
+const client = @import("kitty_client.zig");
+
+extern "c" fn setenv(name: [*:0]const u8, value: [*:0]const u8, overwrite: c_int) c_int;
+extern "c" fn unsetenv(name: [*:0]const u8) c_int;
+extern "c" fn chdir(path: [*:0]const u8) c_int;
+
+pub const std_options: std.Options = .{ .log_level = .err };
+
+const gpa = std.heap.page_allocator;
+const rows = 40;
+const cols = 120;
+const sync_reply = "\x1b_Gi=999;OK\x1b\\";
+
+var failures: usize = 0;
+var skipped: usize = 0;
+
+fn check(ok: bool, comptime what: []const u8, args: anytype) void {
+ if (ok) {
+ std.debug.print(" ok " ++ what ++ "\n", args);
+ } else {
+ failures += 1;
+ std.debug.print(" FAIL " ++ what ++ "\n", args);
+ }
+}
+
+fn skip(comptime what: []const u8, args: anytype) void {
+ skipped += 1;
+ std.debug.print(" skip " ++ what ++ "\n", args);
+}
+
+pub fn main(init: std.process.Init) !void {
+ var arena_state: std.heap.ArenaAllocator = .init(gpa);
+ defer arena_state.deinit();
+ const arena = arena_state.allocator();
+ const args = try init.minimal.args.toSlice(arena);
+ if (args.len != 4) return error.BadArgs;
+ // Run steps pass artifacts relative to the build root; the harness
+ // works from its own directory.
+ const exe = try absolute(arena, args[1]);
+ const kc = try absolute(arena, args[2]);
+ const gui = std.mem.eql(u8, args[3], "gui");
+
+ const base = try std.fmt.allocPrintSentinel(arena, "/tmp/pardes-kitty-harness-{d}", .{libc.getpid()}, 0);
+ if (libc.mkdir(base, 0o755) != 0) return error.MkdirFailed;
+ defer removeTree(arena, base);
+ try hermetic(arena, base, gui);
+
+ var h = try eh.Harness.initArgv(gpa, exe, rows, cols, &.{});
+ defer h.deinit();
+ var run: Run = .{ .arena = arena, .h = &h, .base = base, .kc = kc, .gui = gui };
+ try run.start();
+
+ if (std.c.getenv("PARDES_KITTY_EXPLORE")) |list| return run.explore(std.mem.span(list));
+ std.debug.print("kitty harness ({s}):\n", .{if (gui) "gui" else "tty"});
+ try run.query();
+ try run.place();
+ try run.media();
+ try run.quiet();
+ try run.cancel();
+ if (!gui) try run.delete();
+ if (!gui) try run.under();
+ try run.icat();
+ try run.chafa();
+ try run.yazi();
+
+ if (!gui) try plainOuter(arena, exe, kc, base);
+
+ std.debug.print("kitty harness: {d} failed, {d} skipped\n", .{ failures, skipped });
+ if (failures > 0) return error.KittyHarnessFailed;
+}
+
+/// Outside, a terminal without kitty graphics (it answers DA, not the
+/// graphics query): pardes must send it no graphics command, and draws the
+/// pane's image as glyph art; the program in the pane is answered as ever.
+fn plainOuter(arena: std.mem.Allocator, exe: [:0]const u8, kc: []const u8, base: [:0]const u8) !void {
+ var h = try eh.Harness.initArgv(gpa, exe, rows, cols, &.{});
+ defer h.deinit();
+ try h.expectRawWaitFor("\x1b_Gi=1,a=q\x1b\\", 8000, "pardes did not probe for kitty graphics");
+ try h.send("\x1b[?62;22c");
+ try h.expectWaitFor("$ ", 10_000, "the shell's prompt did not show");
+ try h.pump(400);
+ var run: Run = .{ .arena = arena, .h = &h, .base = base, .kc = kc, .gui = false };
+ const probe_end = h.raw.items.len;
+ const got = try run.case("place");
+ check(std.mem.eql(u8, got, "\x1b_Gi=42;OK\x1b\\" ++ sync_reply), "plain outer: the pane's program is answered as ever ({f})", .{std.ascii.hexEscape(got, .lower)});
+ const raw = h.raw.items[probe_end..];
+ const sent = std.mem.count(u8, raw, "\x1b_G");
+ check(sent == 0, "plain outer: no graphics command reaches a terminal without them ({d})", .{sent});
+ // Glyph art fills the 8x4 cells after ANCHOR>: a solid picture is all
+ // background colour (C64's nearest blue), no glyph.
+ const anchor = try run.find("ANCHOR>") orelse {
+ check(false, "plain outer: ANCHOR> on the screen", .{});
+ return;
+ };
+ var art: usize = 0;
+ for (0..4) |dy| for (0..8) |dx| {
+ const cell = h.term.screens.active.pages.getCell(.{ .viewport = .{ .x = @intCast(anchor.x + 7 + dx), .y = @intCast(anchor.y + dy) } }) orelse continue;
+ if (cell.style().bg_color != .none) art += 1;
+ };
+ check(art == 32, "plain outer: the image is glyph art in its cells ({d} of 32 coloured)", .{art});
+}
+
+fn hermetic(arena: std.mem.Allocator, base: [:0]const u8, gui: bool) !void {
+ // zig build hands its children NO_COLOR, and vaxis honours it: pardes
+ // would draw no colour at all, glyph art included. Emptied, not unset:
+ // unsetenv compacts the environment block std captured (a null later).
+ _ = setenv("NO_COLOR", "", 1);
+ for ([_][*:0]const u8{ "PARDES_PID", "PARDES_9P", "PARDES_PANE", "PARDES_MOUNT", "PARDES_TEST", "PARDES_TEST_CAPTURE_DIR", "PARDES_TEST_COLS", "PARDES_TEST_ROWS", "PARDES_DUMP" }) |name|
+ _ = unsetenv(name);
+ _ = setenv("HOME", base, 1);
+ const config_home = try std.fmt.allocPrintSentinel(arena, "{s}/.config", .{base}, 0);
+ _ = setenv("XDG_CONFIG_HOME", config_home, 1);
+ const state_home = try std.fmt.allocPrintSentinel(arena, "{s}/.state", .{base}, 0);
+ _ = setenv("XDG_STATE_HOME", state_home, 1);
+ if (libc.mkdir(config_home, 0o755) != 0) return error.MkdirFailed;
+ const config_dir = try std.fmt.allocPrintSentinel(arena, "{s}/pardes", .{config_home}, 0);
+ if (libc.mkdir(config_dir, 0o755) != 0) return error.MkdirFailed;
+ try eh.writeFile(try std.fmt.allocPrintSentinel(arena, "{s}/init", .{config_dir}, 0), "Shell bash\nTheme helix\nMessageAnimation off\nMessageLinger 0\n");
+ try eh.writeFile(try std.fmt.allocPrintSentinel(arena, "{s}/.bashrc", .{base}, 0), "PS1='$ '\nHISTFILE=\n");
+ _ = setenv("HISTFILE", "/dev/null", 1);
+ _ = setenv("TERM", "xterm-256color", 1);
+ _ = setenv("LC_ALL", "C", 1);
+ _ = setenv("PARDES_NOTIME", "1", 1);
+ if (gui) {
+ _ = setenv("PARDES_TEST", "1", 1);
+ _ = setenv("PARDES_TEST_CAPTURE_DIR", base, 1);
+ _ = setenv("PARDES_TEST_COLS", "120", 1);
+ _ = setenv("PARDES_TEST_ROWS", "40", 1);
+ }
+ if (chdir(base) != 0) return error.ChdirFailed;
+ try writePng(arena, try std.fmt.allocPrintSentinel(arena, "{s}/solid.png", .{base}, 0));
+}
+
+const Run = struct {
+ arena: std.mem.Allocator,
+ h: *eh.Harness,
+ base: [:0]const u8,
+ kc: []const u8,
+ gui: bool,
+
+ fn capturePath(r: *Run) ![:0]const u8 {
+ return std.fmt.allocPrintSentinel(r.arena, "{s}/latest.ppm", .{r.base}, 0);
+ }
+
+ fn start(r: *Run) !void {
+ if (r.gui) {
+ // Up once the first frame is captured.
+ const path = try r.capturePath();
+ const deadline = eh.nowMs() + 10_000;
+ while (eh.nowMs() < deadline and libc.access(path, libc.F_OK) != 0) _ = try r.h.pumpOnce(50);
+ if (libc.access(path, libc.F_OK) != 0) return error.GuiNeverDrew;
+ try r.h.pump(1500);
+ } else {
+ // A kitty terminal: graphics, then DA to close the probe.
+ try r.h.expectRawWaitFor("\x1b_Gi=1,a=q\x1b\\", 8000, "pardes did not probe for kitty graphics");
+ try r.h.send("\x1b_Gi=1;OK\x1b\\\x1b[?1;2c");
+ try r.h.expectWaitFor("$ ", 10_000, "the shell's prompt did not show");
+ }
+ // A fresh shell pane has the keyboard, at its pty (tty mode).
+ try r.h.pump(400);
+ }
+
+ /// Type `line` into the pane's bash and wait for `<case>.out.done`.
+ fn shell(r: *Run, name: []const u8, line: []const u8) ![]const u8 {
+ const out = try std.fmt.allocPrintSentinel(r.arena, "{s}/{s}.out", .{ r.base, name }, 0);
+ const done = try std.fmt.allocPrintSentinel(r.arena, "{s}.done", .{out}, 0);
+ try r.h.send(line);
+ try r.h.send("\r");
+ const deadline = eh.nowMs() + 15_000;
+ while (eh.nowMs() < deadline and libc.access(done, libc.F_OK) != 0) _ = try r.h.pumpOnce(50);
+ if (libc.access(done, libc.F_OK) != 0) {
+ r.h.dump(name);
+ return error.CaseTimedOut;
+ }
+ // Its frame drawn and shown.
+ try r.h.pump(600);
+ return readFile(r.arena, out) catch "";
+ }
+
+ fn case(r: *Run, name: []const u8) ![]const u8 {
+ return r.shell(name, try std.fmt.allocPrint(r.arena, "clear; {s} {s} {s}/{s}.out", .{ r.kc, name, r.base, name }));
+ }
+
+ fn query(r: *Run) !void {
+ const got = try r.case("query");
+ const kitty = std.mem.indexOf(u8, got, "\x1b_Gi=31;OK\x1b\\");
+ const da = std.mem.indexOf(u8, got, "\x1b[?");
+ check(kitty != null and da != null and kitty.? < da.?, "query: OK on the client's pty, ahead of DA ({f})", .{std.ascii.hexEscape(got, .lower)});
+ check(std.mem.indexOf(u8, r.h.raw.items, "\x1b_Gi=31;OK") == null, "query: the answer never reaches the outer terminal", .{});
+ }
+
+ fn place(r: *Run) !void {
+ const raw_from = r.h.raw.items.len;
+ const got = try r.case("place");
+ check(std.mem.eql(u8, got, "\x1b_Gi=42;OK\x1b\\" ++ sync_reply), "place: one OK for 16 chunks, then sync ({f})", .{std.ascii.hexEscape(got, .lower)});
+ const raw = r.h.raw.items[raw_from..];
+ // Its RGB payload (13,77,231 is "DU3n" in base64) would show whole
+ // were it passed through; pardes sends RGBA it decoded.
+ check(std.mem.indexOf(u8, raw, "\x1b_Ga=T,i=42") == null and std.mem.indexOf(u8, raw, "DU3nDU3nDU3n") == null, "place: the client's own commands are not passed through", .{});
+ if (r.gui) return r.placedOnCapture();
+ // Outside, pardes's own transmission of the 64x64 and its per-row
+ // placements, from the cell after `ANCHOR>`.
+ const anchor = try r.find("ANCHOR>") orelse {
+ check(false, "place: ANCHOR> on the outer screen", .{});
+ return;
+ };
+ const cells = try r.outerPlacements(client.side, client.side);
+ check(cells.count > 0, "place: pardes placed a 64x64 image in the outer terminal ({d} placements)", .{cells.count});
+ if (cells.count == 0) return;
+ check(cells.min_x == anchor.x + 7 and cells.min_y == anchor.y, "place: at the cell after ANCHOR> (outer {d},{d}; anchor {d},{d})", .{ cells.min_x, cells.min_y, anchor.x, anchor.y });
+ check(cells.rows == 4 and cells.width == 8, "place: 8x4 cells, one placement a row ({d} rows, {d} wide)", .{ cells.rows, cells.width });
+ }
+
+ fn placedOnCapture(r: *Run) !void {
+ const path = try r.capturePath();
+ const deadline = eh.nowMs() + 5000;
+ var bounds: ?ColorBounds = null;
+ var ppm_w: usize = 0;
+ var ppm_h: usize = 0;
+ while (eh.nowMs() < deadline) {
+ if (captureColour(path, 0)) |seen| {
+ ppm_w = seen.width;
+ ppm_h = seen.height;
+ bounds = seen.bounds;
+ if (bounds) |b| if (b.count > 200) break;
+ }
+ _ = try r.h.pumpOnce(50);
+ }
+ const b = bounds orelse {
+ check(false, "place: the image's colour in the GUI capture", .{});
+ return;
+ };
+ // 8x4 cells of the capture's own cell size.
+ const cw = ppm_w / cols;
+ const ch = ppm_h / rows;
+ const w = b.max_x - b.min_x + 1;
+ const ht = b.max_y - b.min_y + 1;
+ check(w + 2 >= 8 * cw and w <= 8 * cw + 2 and ht + 2 >= 4 * ch and ht <= 4 * ch + 2, "place: 8x4 cells in the GUI ({d}x{d} px, cell {d}x{d})", .{ w, ht, cw, ch });
+ check(b.count * 10 >= w * ht * 9, "place: solid where drawn ({d} of {d} px)", .{ b.count, w * ht });
+ }
+
+ fn media(r: *Run) !void {
+ const got = try r.case("media");
+ for ([_][]const u8{ "\x1b_Gi=51;OK", "\x1b_Gi=52;OK", "\x1b_Gi=53;OK" }, [_][]const u8{ "t=f", "t=t", "t=s" }) |want, medium| {
+ check(std.mem.indexOf(u8, got, want) != null, "media: {s} loads ({f})", .{ medium, std.ascii.hexEscape(got, .lower) });
+ }
+ }
+
+ fn quiet(r: *Run) !void {
+ const got = try r.case("quiet");
+ check(std.mem.indexOf(u8, got, "i=61") == null and std.mem.indexOf(u8, got, "i=62") == null and
+ std.mem.startsWith(u8, got, "\x1b_Gi=63;E"), "quiet: q=1's OK and q=2's error unsaid, q=0's error heard ({f})", .{std.ascii.hexEscape(got, .lower)});
+ }
+
+ fn cancel(r: *Run) !void {
+ const got = try r.case("cancel");
+ check(std.mem.eql(u8, got, sync_reply), "cancel: a CAN'd command answers nothing ({f})", .{std.ascii.hexEscape(got, .lower)});
+ if (!r.gui) check(try r.find("CANCELLED-OK") != null, "cancel: the text after it prints", .{});
+ }
+
+ fn delete(r: *Run) !void {
+ // Shown first (pardes transmits it outside), then deleted by a
+ // second run of the client in the same pane.
+ const raw_from = r.h.raw.items.len;
+ _ = try r.case("show");
+ const shown = r.h.raw.items[raw_from..];
+ const transmit = "\x1b_Gf=32,s=64,v=64,i=";
+ const i = std.mem.indexOf(u8, shown, transmit) orelse {
+ check(false, "delete: the image to delete was drawn outside", .{});
+ return;
+ };
+ const id_at = i + transmit.len;
+ const id_end = std.mem.indexOfAnyPos(u8, shown, id_at, ",;") orelse return error.BadTransmit;
+ const free = try std.fmt.allocPrint(r.arena, "\x1b_Ga=d,d=I,i={s}", .{shown[id_at..id_end]});
+ const before = r.h.raw.items.len;
+ _ = try r.shell("delete", try std.fmt.allocPrint(r.arena, "{s} delete {s}/delete.out", .{ r.kc, r.base }));
+ try r.h.pump(400);
+ check(std.mem.indexOf(u8, r.h.raw.items[before..], free) != null, "delete: d=I in the pane frees what pardes sent outside ({s})", .{free[3..]});
+ const cells = try r.outerPlacements(client.side, client.side);
+ check(cells.count == 0, "delete: no placement of it left outside ({d})", .{cells.count});
+ }
+
+ /// PARDES_KITTY_EXPLORE=<file>: each line `name<TAB>command` runs in
+ /// the pane under `script`, whose log (the client's own bytes, as it
+ /// ran under pardes) goes to $PARDES_KITTY_RECORD/<name>.log; then the
+ /// outer screen and pardes's placements there are printed.
+ fn explore(r: *Run, list_path: []const u8) !void {
+ const list = try readFile(r.arena, try r.arena.dupeSentinel(u8, list_path, 0));
+ const record = if (std.c.getenv("PARDES_KITTY_RECORD")) |d| std.mem.span(d) else r.base;
+ var lines = std.mem.splitScalar(u8, list, '\n');
+ while (lines.next()) |line| {
+ const tab = std.mem.indexOfScalar(u8, line, '\t') orelse continue;
+ const name = line[0..tab];
+ const cmd = std.mem.replaceOwned(u8, r.arena, line[tab + 1 ..], "$BASE", r.base) catch line[tab + 1 ..];
+ const raw_from = r.h.raw.items.len;
+ const shell_line = try std.fmt.allocPrint(r.arena, "clear; script -q -O {s}/{s}.log -c '{s}' 2>{s}/{s}.err; touch {s}/{s}.out.done", .{ record, name, cmd, r.base, name, r.base, name });
+ _ = try r.shell(name, shell_line);
+ try r.h.pump(800);
+ std.debug.print("=== {s}: {s}\n", .{ name, cmd });
+ const err = readFile(r.arena, try std.fmt.allocPrintSentinel(r.arena, "{s}/{s}.err", .{ r.base, name }, 0)) catch "";
+ if (err.len > 0) std.debug.print("stderr: {s}\n", .{err});
+ const raw = r.h.raw.items[raw_from..];
+ std.debug.print("outer: {d} transmits, {d} puts, {d} deletes\n", .{ std.mem.count(u8, raw, "\x1b_Gf="), std.mem.count(u8, raw, "\x1b_Ga=p"), std.mem.count(u8, raw, "\x1b_Ga=d") });
+ var kinds: std.array_hash_map.String(usize) = .empty;
+ var from: usize = 0;
+ while (std.mem.indexOfPos(u8, raw, from, "\x1b_Ga=")) |i| : (from = i + 1) {
+ const end = std.mem.indexOfAnyPos(u8, raw, i + 1, ";\x1b") orelse continue;
+ var key = raw[i + 3 .. @min(end, i + 3 + 40)];
+ // Ids and geometry vary; the command's shape is the point.
+ if (std.mem.indexOf(u8, key, ",i=")) |cut| key = key[0..cut];
+ const gop = try kinds.getOrPut(r.arena, key);
+ gop.value_ptr.* = if (gop.found_existing) gop.value_ptr.* + 1 else 1;
+ }
+ for (kinds.keys(), kinds.values()) |k, n| std.debug.print(" {d}x {s}\n", .{ n, k });
+ const screen = r.h.term.screens.active;
+ const storage = &screen.kitty_images;
+ var it = storage.placements.iterator();
+ while (it.next()) |entry| {
+ const img = storage.imageById(entry.key_ptr.image_id) orelse continue;
+ const where: []const u8 = switch (entry.value_ptr.location) {
+ .pin => |pin| if (screen.pages.pointFromPin(.viewport, pin.*)) |at| try std.fmt.allocPrint(r.arena, "{d},{d}", .{ at.viewport.x, at.viewport.y }) else "off-viewport",
+ .virtual => "virtual",
+ .relative => "relative",
+ };
+ std.debug.print(" image {d} {d}x{d}px at {s} {d}x{d} cells src {d},{d} {d}x{d}\n", .{ entry.key_ptr.image_id, img.width, img.height, where, entry.value_ptr.columns, entry.value_ptr.rows, entry.value_ptr.source_x, entry.value_ptr.source_y, entry.value_ptr.source_width, entry.value_ptr.source_height });
+ }
+ r.h.dump(name);
+ }
+ }
+
+ fn under(r: *Run) !void {
+ _ = try r.case("under");
+ const storage = &r.h.term.screens.active.kitty_images;
+ var it = storage.placements.iterator();
+ var seen: usize = 0;
+ var below: usize = 0;
+ while (it.next()) |entry| {
+ const img = storage.imageById(entry.key_ptr.image_id) orelse continue;
+ if (img.width != client.side or img.height != client.side) continue;
+ seen += 1;
+ if (entry.value_ptr.z == -1) below += 1;
+ }
+ check(seen > 0 and below == seen, "under: z=-1 reaches the outer terminal on every row ({d} of {d})", .{ below, seen });
+ }
+
+ fn haveTool(r: *Run, name: []const u8) bool {
+ const which = std.fmt.allocPrintSentinel(r.arena, "command -v {s} >/dev/null 2>&1", .{name}, 0) catch return false;
+ return system(which) == 0;
+ }
+
+ fn icat(r: *Run) !void {
+ if (!r.haveTool("kitten")) return skip("kitten icat: not installed", .{});
+ for ([_][]const u8{ "stream", "detect" }) |mode| {
+ const raw_from = r.h.raw.items.len;
+ const name = try std.fmt.allocPrint(r.arena, "icat-{s}", .{mode});
+ const line = try std.fmt.allocPrint(r.arena, "clear; kitten icat --transfer-mode={s} --align=left {s}/solid.png 2>{s}/{s}.out; touch {s}/{s}.out.done", .{ mode, r.base, r.base, name, r.base, name });
+ const err = try r.shell(name, line);
+ if (r.gui) {
+ try r.placedNear(name);
+ continue;
+ }
+ const raw = r.h.raw.items[raw_from..];
+ const sent = std.mem.indexOf(u8, raw, "\x1b_Gf=32,s=64,v=64,i=") != null;
+ check(sent and err.len == 0, "kitten icat --transfer-mode={s}: drawn outside ({s})", .{ mode, std.mem.trim(u8, err, " \r\n") });
+ }
+ }
+
+ fn chafa(r: *Run) !void {
+ if (!r.haveTool("chafa")) return skip("chafa: not installed", .{});
+ const raw_from = r.h.raw.items.len;
+ const err = try r.shell("chafa", try std.fmt.allocPrint(r.arena, "clear; chafa -f kitty -s 8x4 {s}/solid.png 2>{s}/chafa.out; touch {s}/chafa.out.done", .{ r.base, r.base, r.base }));
+ if (r.gui) return r.placedNear("chafa");
+ const raw = r.h.raw.items[raw_from..];
+ // chafa scales to the cells it asked for: any image transmitted.
+ check(std.mem.indexOf(u8, raw, "\x1b_Gf=32,s=") != null and err.len == 0, "chafa -f kitty: drawn outside ({s})", .{std.mem.trim(u8, err, " \r\n")});
+ }
+
+ /// yazi previews the PNG (its first entry) through shared memory and a
+ /// virtual placement shown by placeholders, in its right-hand column.
+ /// Killed after 6 s, it leaves the preview up.
+ fn yazi(r: *Run) !void {
+ if (!r.haveTool("yazi")) return skip("yazi: not installed", .{});
+ const raw_from = r.h.raw.items.len;
+ _ = try r.shell("yazi", try std.fmt.allocPrint(r.arena, "clear; mkdir -p {s}/yz; cp {s}/solid.png {s}/yz/; timeout --foreground -s KILL 6 yazi {s}/yz 2>{s}/yazi.out; touch {s}/yazi.out.done", .{ r.base, r.base, r.base, r.base, r.base, r.base }));
+ if (r.gui) return r.placedNear("yazi");
+ const raw = r.h.raw.items[raw_from..];
+ const cells = try r.outerPlacements(client.side, client.side);
+ check(std.mem.indexOf(u8, raw, "\x1b_Gf=32,s=64,v=64,i=") != null and cells.count == 4 and cells.min_x > cols / 2, "yazi: its preview drawn outside, in its right half ({d} rows at {d},{d})", .{ cells.count, cells.min_x, cells.min_y });
+ }
+
+ fn placedNear(r: *Run, name: []const u8) !void {
+ const path = try r.capturePath();
+ const deadline = eh.nowMs() + 4000;
+ var count: usize = 0;
+ while (eh.nowMs() < deadline) {
+ if (captureColour(path, 4)) |seen| {
+ count = if (seen.bounds) |b| b.count else 0;
+ if (count > 200) break;
+ }
+ _ = try r.h.pumpOnce(50);
+ }
+ check(count > 200, "{s}: drawn in the GUI ({d} px of its colour)", .{ name, count });
+ }
+
+ /// Where `needle` is on the outer screen, in cells.
+ fn find(r: *Run, needle: []const u8) !?struct { x: usize, y: usize } {
+ const text = try r.h.screenText();
+ defer gpa.free(text);
+ var y: usize = 0;
+ var lines = std.mem.splitScalar(u8, text, '\n');
+ while (lines.next()) |line| : (y += 1) {
+ if (std.mem.indexOf(u8, line, needle)) |x| return .{ .x = try std.unicode.utf8CountCodepoints(line[0..x]), .y = y };
+ }
+ return null;
+ }
+
+ const Cells = struct { count: usize = 0, min_x: usize = std.math.maxInt(usize), min_y: usize = std.math.maxInt(usize), rows: usize = 0, width: usize = 0 };
+
+ /// The outer terminal's placements of its `w`x`h` images, in viewport cells.
+ fn outerPlacements(r: *Run, w: u32, h: u32) !Cells {
+ const screen = r.h.term.screens.active;
+ const storage = &screen.kitty_images;
+ var out: Cells = .{};
+ var row_seen: [rows]bool = @splat(false);
+ var it = storage.placements.iterator();
+ while (it.next()) |entry| {
+ const img = storage.imageById(entry.key_ptr.image_id) orelse continue;
+ if (img.width != w or img.height != h) continue;
+ const pin = switch (entry.value_ptr.location) {
+ .pin => |pin| pin,
+ else => continue,
+ };
+ const at = screen.pages.pointFromPin(.viewport, pin.*) orelse continue;
+ out.count += 1;
+ out.min_x = @min(out.min_x, at.viewport.x);
+ out.min_y = @min(out.min_y, at.viewport.y);
+ if (at.viewport.y < rows and !row_seen[at.viewport.y]) {
+ row_seen[at.viewport.y] = true;
+ out.rows += 1;
+ }
+ out.width = @max(out.width, entry.value_ptr.columns);
+ }
+ return out;
+ }
+};
+
+extern "c" fn system(command: [*:0]const u8) c_int;
+extern "c" fn realpath(path: [*:0]const u8, resolved: ?[*]u8) ?[*:0]u8;
+
+fn absolute(arena: std.mem.Allocator, path: []const u8) ![:0]const u8 {
+ var buf: [4096]u8 = undefined;
+ const z = try arena.dupeSentinel(u8, path, 0);
+ const got = realpath(z, &buf) orelse return error.NoSuchArtifact;
+ return arena.dupeSentinel(u8, std.mem.span(got), 0);
+}
+
+/// The GUI's latest capture: its size and where the client's colour is.
+fn captureColour(path: [:0]const u8, tolerance: u8) ?struct { width: usize, height: usize, bounds: ?ColorBounds } {
+ var scratch: std.heap.ArenaAllocator = .init(gpa);
+ defer scratch.deinit();
+ const bytes = readFile(scratch.allocator(), path) catch return null;
+ const ppm = ppmView(bytes) orelse return null;
+ return .{ .width = ppm.width, .height = ppm.height, .bounds = colorBounds(ppm, client.colour, tolerance) };
+}
+
+const ColorBounds = struct { count: usize, min_x: usize, min_y: usize, max_x: usize, max_y: usize };
+const PpmView = struct { width: usize, height: usize, pixels: []const u8 };
+
+/// Where `colour` is in the capture, each channel within `tolerance`
+/// (chafa hands back its pixels a step off the source's).
+fn colorBounds(ppm: PpmView, colour: [3]u8, tolerance: u8) ?ColorBounds {
+ var b: ColorBounds = .{ .count = 0, .min_x = std.math.maxInt(usize), .min_y = std.math.maxInt(usize), .max_x = 0, .max_y = 0 };
+ for (0..ppm.width * ppm.height) |i| {
+ const px = ppm.pixels[i * 3 ..][0..3];
+ const near = for (px, colour) |got, want| {
+ if (@max(got, want) - @min(got, want) > tolerance) break false;
+ } else true;
+ if (!near) continue;
+ const x = i % ppm.width;
+ const y = i / ppm.width;
+ b.count += 1;
+ b.min_x = @min(b.min_x, x);
+ b.min_y = @min(b.min_y, y);
+ b.max_x = @max(b.max_x, x);
+ b.max_y = @max(b.max_y, y);
+ }
+ return if (b.count == 0) null else b;
+}
+
+fn ppmView(bytes: []const u8) ?PpmView {
+ if (!std.mem.startsWith(u8, bytes, "P6\n")) return null;
+ const dims_end = std.mem.indexOfScalarPos(u8, bytes, 3, '\n') orelse return null;
+ var dims = std.mem.splitScalar(u8, bytes[3..dims_end], ' ');
+ const width = std.fmt.parseUnsigned(usize, dims.next() orelse return null, 10) catch return null;
+ const height = std.fmt.parseUnsigned(usize, dims.next() orelse return null, 10) catch return null;
+ const max_end = std.mem.indexOfScalarPos(u8, bytes, dims_end + 1, '\n') orelse return null;
+ const len = width * height * 3;
+ if (bytes.len -| (max_end + 1) < len) return null;
+ return .{ .width = width, .height = height, .pixels = bytes[max_end + 1 ..][0..len] };
+}
+
+fn readFile(arena: std.mem.Allocator, path: [:0]const u8) ![]u8 {
+ const fd = libc.open(path, .{ .ACCMODE = .RDONLY }, @as(libc.mode_t, 0));
+ if (fd < 0) return error.OpenFailed;
+ defer _ = libc.close(fd);
+ var out: std.ArrayList(u8) = .empty;
+ var buf: [1 << 16]u8 = undefined;
+ while (true) {
+ const n = libc.read(fd, &buf, buf.len);
+ if (n < 0) return error.ReadFailed;
+ if (n == 0) break;
+ try out.appendSlice(arena, buf[0..@intCast(n)]);
+ }
+ return out.items;
+}
+
+/// A 64x64 PNG of the client's colour, stored (uncompressed) deflate.
+fn writePng(arena: std.mem.Allocator, path: [:0]const u8) !void {
+ const side = client.side;
+ var raw: std.ArrayList(u8) = .empty;
+ for (0..side) |_| {
+ try raw.append(arena, 0);
+ for (0..side) |_| try raw.appendSlice(arena, &client.colour);
+ }
+ var z: std.ArrayList(u8) = .empty;
+ try z.appendSlice(arena, &.{ 0x78, 0x01 });
+ var at: usize = 0;
+ while (at < raw.items.len) {
+ const n: u16 = @intCast(@min(65535, raw.items.len - at));
+ const final: u8 = if (at + n == raw.items.len) 1 else 0;
+ try z.append(arena, final);
+ try z.appendSlice(arena, &std.mem.toBytes(std.mem.nativeToLittle(u16, n)));
+ try z.appendSlice(arena, &std.mem.toBytes(std.mem.nativeToLittle(u16, ~n)));
+ try z.appendSlice(arena, raw.items[at..][0..n]);
+ at += n;
+ }
+ try z.appendSlice(arena, &std.mem.toBytes(std.mem.nativeToBig(u32, std.hash.Adler32.hash(raw.items))));
+ var png: std.ArrayList(u8) = .empty;
+ try png.appendSlice(arena, "\x89PNG\r\n\x1a\n");
+ var ihdr: [13]u8 = undefined;
+ std.mem.writeInt(u32, ihdr[0..4], side, .big);
+ std.mem.writeInt(u32, ihdr[4..8], side, .big);
+ ihdr[8..13].* = .{ 8, 2, 0, 0, 0 };
+ try chunk(arena, &png, "IHDR", &ihdr);
+ try chunk(arena, &png, "IDAT", z.items);
+ try chunk(arena, &png, "IEND", "");
+ try eh.writeFile(path, png.items);
+}
+
+fn chunk(arena: std.mem.Allocator, png: *std.ArrayList(u8), kind: *const [4]u8, data: []const u8) !void {
+ try png.appendSlice(arena, &std.mem.toBytes(std.mem.nativeToBig(u32, @intCast(data.len))));
+ try png.appendSlice(arena, kind);
+ try png.appendSlice(arena, data);
+ var crc = std.hash.Crc32.init();
+ crc.update(kind);
+ crc.update(data);
+ try png.appendSlice(arena, &std.mem.toBytes(std.mem.nativeToBig(u32, crc.final())));
+}
+
+fn removeTree(arena: std.mem.Allocator, base: [:0]const u8) void {
+ const cmd = std.fmt.allocPrintSentinel(arena, "rm -rf '{s}'", .{base}, 0) catch return;
+ _ = system(cmd);
+}
diff --git a/test/look_placement.py b/test/look_placement.py
deleted file mode 100644
index 1341e776..00000000
--- a/test/look_placement.py
+++ /dev/null
@@ -1,143 +0,0 @@
-#!/usr/bin/env python3
-"""Check narrow-window first-document Look placement in owned SDL/TTY sessions.
-
-python3 -B test/look_placement.py zig-out/column-review/bin/pardes-gui
-python3 -B test/look_placement.py zig-out/column-review/bin/pardes --tty
-
-Starts the classic three-terminal layout, then opens the first document from
-the lower-left or right terminal. Screen-grid geometry must split only that
-terminal, immediately below it, and a repeated Look must reuse the file pane.
-Use --output DIR to retain grid observations and SDL GPU screenshots.
-"""
-import argparse
-from contextlib import nullcontext
-from pathlib import Path
-import tempfile
-
-from fs import session
-from ui_review import capture, panes, require, wait_for
-
-
-def geometry(client, markers):
- frame = client.screen()
- width = frame['cols']
- lines = [''.join(cell[0] for cell in frame['cells'][row * width:(row + 1) * width])
- for row in range(frame['rows'])]
- positions = {}
- for serial, marker in markers.items():
- hits = [(row, line.index(marker)) for row, line in enumerate(lines) if marker in line]
- if len(hits) != 1:
- return None
- row, offset = hits[0]
- column_x = 0 if offset < width // 2 else width // 2
- positions[serial] = (column_x, row)
- rectangles = {}
- for serial, (column_x, row) in positions.items():
- following = [other_y for other_x, other_y in positions.values()
- if other_x == column_x and other_y > row]
- end = min(following, default=frame['rows'])
- rectangles[serial] = (column_x, row, width // 2, end - row)
- return frame, rectangles
-
-
-def rectangle_text(frame, rect):
- x, y, width, height = rect
- return tuple(tuple(cell[0] for cell in frame['cells'][row * frame['cols'] + x:
- row * frame['cols'] + x + width])
- for row in range(y, y + height))
-
-
-def run_case(args, root, source_index):
- root.mkdir(parents=True, exist_ok=True, mode=0o700)
- root.chmod(0o700)
- config = root / 'config/pardes'
- config.mkdir(parents=True)
- (config / 'init').write_text('Shell /bin/sh\nTheme forge\n')
- target = root / 'opened.txt'
- contents = b'First document opened from this terminal.\n' * 40
- target.write_bytes(contents)
- name = 'look-placement'
- inherited = {} if args.tty else {
- 'PARDES_TEST': '1', 'PARDES_TEST_COLS': '150', 'PARDES_TEST_ROWS': '48',
- 'PARDES_TEST_CAPTURE_DIR': str(root), 'SDL_VIDEODRIVER': 'x11',
- }
- # No document argument: the regression concerns the very first document.
- launch = ['-c', 'stty cols 150 rows 48; exec "$@"', name,
- str(args.binary.resolve()), '--9p=' + name, '-n', '3']
- with session('/bin/sh', root, name, socket_name=name, tty=True,
- launch=launch, inherited=inherited) as (client, _):
- serials = list(panes(client))
- require(len(serials) == 3, 'classic fixture did not boot three terminals')
- markers = {}
- for index, serial in enumerate(serials):
- pane = f'/pane/{serial}'
- require('pty' in client.list(pane), 'fixture contains an existing document')
- marker = f'LP_{index}'
- markers[serial] = marker
- client.write(pane + '/ctl', b'cleartag\n')
- client.write(pane + '/tag', f' {marker} Tty Del Collapse'.encode())
- # Establish non-pristine shells and a stable prompt before measuring.
- client.write(pane + '/pty/data', f"printf 'ready-{index}\\n'\r".encode())
- require(wait_for(lambda: f'\nready-{index}\n'.encode() in
- client.read(pane + '/body').replace(b'\r', b'')),
- 'terminal did not execute readiness command')
- before_frame, before = require(wait_for(lambda: geometry(client, markers)),
- 'terminal tags not visible in fixture')
- source = serials[source_index]
- source_rect = before[source]
- require(source_rect[3] >= 8, 'source terminal too short for a local split')
- require(before[serials[0]][:2] == (0, 2) and before[serials[1]][0] == 0 and
- before[serials[1]][1] > 2 and before[serials[2]][:2] == (75, 2),
- f'unexpected initial classic layout: {before}')
- client.write(f'/pane/{source}/ctl', f'look {target}\n'.encode())
- opened = require(wait_for(lambda: next((serial for serial in panes(client)
- if serial not in serials), None)),
- 'Look did not open the first document')
- markers[opened] = 'opened.txt'
- after_frame, after = require(wait_for(lambda: geometry(client, markers)),
- 'Look pane tags not visible')
- require(len(panes(client)) == 4, 'Look removed a terminal or added extra panes')
- x, y, width, height = source_rect
- require(after[source][:3] == (x, y, width),
- f'Look moved its originating terminal: {source_rect} -> {after[source]}')
- require(after[opened][:3] == (x, y + after[source][3], width) and
- after[source][3] + after[opened][3] == height,
- f'Look did not split directly below its caller: {after}')
- for serial in serials:
- if serial == source:
- continue
- require(after[serial] == before[serial],
- f'Look resized or moved unrelated terminal {serial}: {before} -> {after}')
- require(rectangle_text(before_frame, before[serial]) ==
- rectangle_text(after_frame, after[serial]),
- f'Look changed unrelated terminal {serial} rendered text')
- require(client.read(f'/pane/{opened}/body') == contents,
- 'opened document contents differ')
- client.write(f'/pane/{source}/ctl', f'look {target}:2\n'.encode())
- require(list(panes(client)) == serials + [opened], 'repeated Look created a duplicate pane')
- require(wait_for(lambda: geometry(client, markers)[1] == after),
- 'repeated Look changed layout')
- require(target.read_bytes() == contents, 'Look modified the fixture on disk')
- if args.output:
- capture(client, root, 'look-below-caller', not args.tty)
- print(f'{"TTY" if args.tty else "SDL"} source {"lower-left" if source_index == 1 else "right"}: '
- 'local split, unchanged other terminals, first-file contents and re-Look reuse passed', flush=True)
-
-
-def run(args):
- # Cache-rooted fixtures avoid relying on /tmp quota in developer sessions.
- cache = Path.home() / '.cache'
- cache.mkdir(exist_ok=True)
- context = nullcontext(str(args.output.resolve())) if args.output else tempfile.TemporaryDirectory(
- prefix='lp-', dir=cache)
- with context as directory:
- for source_index, label in [(1, 'left'), (2, 'right')]:
- run_case(args, Path(directory) / label, source_index)
-
-
-if __name__ == '__main__':
- parser = argparse.ArgumentParser(description=__doc__)
- parser.add_argument('binary', type=Path)
- parser.add_argument('--tty', action='store_true')
- parser.add_argument('--output', type=Path)
- run(parser.parse_args())
diff --git a/test/lspbench.zig b/test/lspbench.zig
index 59cac155..08df9f4c 100644
--- a/test/lspbench.zig
+++ b/test/lspbench.zig
@@ -22,7 +22,7 @@ const Anchor = struct {
};
const anchors = [_]Anchor{
- .{ .file = "src/pardes.zig", .needle = "modal.cursorLineCount(text)", .at = 6, .kind = .definition, .expect = "modal.zig" },
+ .{ .file = "src/edit.zig", .needle = "modal.cursorLineCount(text)", .at = 6, .kind = .definition, .expect = "modal.zig" },
.{ .file = "src/lsp/lsp.zig", .needle = "lineCol(source", .at = 0, .kind = .definition, .expect = "lsp.zig" },
.{ .file = "src/lsp/lsp.zig", .needle = "std.mem.count(u8", .at = 8, .kind = .definition, .expect = "mem.zig" },
.{ .file = "src/lsp/lsp.zig", .needle = "lineCol(source", .at = 0, .kind = .hover, .expect = "" },
@@ -40,8 +40,7 @@ const anchors = [_]Anchor{
.{ .file = "src/lsp/lsp.zig", .needle = "pub const Kind", .at = 11, .kind = .workspace_symbols, .expect = "" },
.{ .file = "test/lspfixture/broken.zig", .needle = "unused_local", .at = 0, .kind = .workspace_diagnostics, .expect = "broken.zig" },
.{ .file = "src/lsp/lsp.zig", .needle = "std.mem.count(u8", .at = 4, .kind = .completion, .expect = "std.zig" },
- .{ .file = "src/lsp/lsp_zls.zig", .needle = ".declaration => try rowForToken", .at = 1, .kind = .completion, .expect = "type_definition" },
- .{ .file = "src/pardes.zig", .needle = ".definition => .definition,", .at = 1, .kind = .completion, .expect = "" },
+ .{ .file = "src/normal.zig", .needle = ".definition => .definition,", .at = 1, .kind = .completion, .expect = "" },
// The repeated name proves the result includes the declaration, not just the cursor line.
.{ .file = "test/lspfixture/dotcomplete.zig", .needle = "return switch (s) {\n .", .at = 29, .kind = .completion, .expect = "verdigris verdigris," },
// Indentation keeps the fixture header from becoming the first needle match.
@@ -111,10 +110,16 @@ test "lspbench options reject unknown flags and multiple roots before probing" {
try std.testing.expectError(error.MultipleRoots, Options.parse(&.{ "first", "--check", "second" }));
}
+/// The process's Io, for the queries: their waits are woken by the client's
+/// reader threads, which a single-threaded Io cannot be.
+var query_io: std.Io = undefined;
+
pub fn main(init: std.process.Init) !void {
const gpa = std.heap.page_allocator;
+ query_io = init.io;
const args = try init.minimal.args.toSlice(init.arena.allocator());
+ if (args.len > 1 and std.mem.eql(u8, args[1], "probe")) return probeCommand(init);
const options = try Options.parse(args[1..]);
const rss0 = rssKib();
@@ -171,13 +176,19 @@ fn checkResults(results: []const Result, required: usize) !void {
for (results) |r| if (r.empty or !r.correct) return error.IncorrectProbe;
}
-fn runOnce(gpa: std.mem.Allocator, req: lsp.Req, expected: []const u8, r: *Result) !u64 {
- var arena: std.heap.ArenaAllocator = .init(gpa);
- defer arena.deinit();
+fn runOnce(gpa: std.mem.Allocator, req_in: lsp.Req, expected: []const u8, r: *Result) !u64 {
+ // The editor's own path (host_io.Lsp.work): the query in the fixed
+ // region reserved at startup, not a heap arena that maps its memory anew.
+ const memory = @import("pardes").memory;
+ const region = memory.takeLspQuery() orelse return error.QueryRegionBusy;
+ var arena: std.heap.FixedBufferAllocator = .init(region);
+ defer memory.giveLspQuery(arena.end_index);
+ var req = req_in;
+ req.budget = &arena;
var out: std.Io.Writer.Allocating = .init(gpa);
defer out.deinit();
const t0 = nowNs();
- try lsp.query(gpa, arena.allocator(), req, &out.writer);
+ try lsp.query(query_io, gpa, arena.allocator(), req, &out.writer);
const ns = nowNs() -| t0;
r.accept(out.written(), expected);
return ns / 1000;
@@ -216,7 +227,7 @@ fn reportText(rs: []const Result, rss: u64) void {
const o = std.debug.print;
o("backend: {s}\n\n", .{lsp.backend_name});
o("{s:<24} {s:>9} {s:>7} {s:>10} {s:>10} {s}\n", .{ "kind", "supports", "rows", "cold(us)", "warm(us)", "verdict" });
- o("{s}\n", .{"-" ** 78});
+ o("{s}\n", .{&@as([78]u8, @splat('-'))});
var claimed: usize = 0;
var working: usize = 0;
var lies: usize = 0;
@@ -296,3 +307,172 @@ fn rssKib() u64 {
}
return 0;
}
+
+// ---- probe: one query from the command line ----
+
+fn nowUs() u64 {
+ var ts: std.c.timespec = undefined;
+ _ = std.c.clock_gettime(.MONOTONIC, &ts);
+ return @as(u64, @intCast(ts.sec)) *| 1_000_000 +| @as(u64, @intCast(ts.nsec)) / 1000;
+}
+
+const aliases = .{
+ .{ "gd", lsp.Kind.definition },
+ .{ "gD", lsp.Kind.declaration },
+ .{ "gy", lsp.Kind.type_definition },
+ .{ "gi", lsp.Kind.implementation },
+ .{ "gr", lsp.Kind.references },
+};
+
+fn probeUsage() noreturn {
+ std.debug.print(
+ \\usage: pardes-lspbench probe <kind> <file> <line>:<col> [arg] [--reps N] [--warm S]
+ \\ kind: gd gD gy gi gr, or any lsp.Kind tag (hover, references,
+ \\ document_symbols, workspace_symbols, incoming_calls, ...)
+ \\ arg: the new name for rename, the query for workspace_symbols
+ \\ --warm sleep S seconds after the first (cold) query — long enough
+ \\ for an indexing server to reach ready, narrated on stderr
+ \\
+ , .{});
+ std.process.exit(2);
+}
+
+/// The editor's message row, here: the client's reader threads narrate server
+/// state through the same sink the shells register, printed to stderr so the
+/// rows on stdout stay clean.
+fn statusSink(ctx: ?*anyopaque, text: []const u8) void {
+ _ = ctx;
+ std.debug.print("# status: {s}\n", .{text});
+}
+
+extern "c" fn usleep(usec: c_uint) c_int;
+
+/// `lspbench probe`: one language query against the real seam, from the
+/// command line (the old lspprobe): `probe <kind> <file> <line>:<col> [arg]
+/// [--reps N] [--warm S]`, rows on stdout, the timing on stderr.
+fn probeCommand(init: std.process.Init) !void {
+ const gpa = std.heap.page_allocator;
+ query_io = init.io;
+ const arena = init.arena.allocator();
+ const io = std.Io.Threaded.global_single_threaded.io();
+
+ // args[1] is `probe`: the rest are where lspprobe's were.
+ const all = try init.minimal.args.toSlice(arena);
+ const args = all[1..];
+ if (args.len < 4) probeUsage();
+
+ // comma-separated kinds share ONE server instance and its index — the
+ // whole battery against a big workspace pays the cold cost once
+ var kinds: [16]lsp.Kind = undefined;
+ var nkinds: usize = 0;
+ var kit = std.mem.tokenizeScalar(u8, args[1], ',');
+ while (kit.next()) |word| {
+ if (nkinds == kinds.len) probeUsage();
+ kinds[nkinds] = blk: {
+ inline for (aliases) |a| if (std.mem.eql(u8, word, a[0])) break :blk a[1];
+ break :blk std.meta.stringToEnum(lsp.Kind, word) orelse probeUsage();
+ };
+ nkinds += 1;
+ }
+ if (nkinds == 0) probeUsage();
+
+ var pz: [4096:0]u8 = undefined;
+ const pz_s = std.fmt.bufPrintSentinel(&pz, "{s}", .{args[2]}, 0) catch probeUsage();
+ var realbuf: [4096]u8 = undefined;
+ const path = std.mem.span(realpath(pz_s.ptr, &realbuf) orelse {
+ std.debug.print("cannot resolve {s}\n", .{args[2]});
+ std.process.exit(1);
+ });
+ const source = std.Io.Dir.cwd().readFileAllocOptions(
+ io,
+ path,
+ arena,
+ .limited(64 << 20),
+ .of(u8),
+ 0,
+ ) catch {
+ std.debug.print("cannot read {s}\n", .{path});
+ std.process.exit(1);
+ };
+
+ const colon = std.mem.indexOfScalar(u8, args[3], ':') orelse probeUsage();
+ const line = std.fmt.parseInt(u32, args[3][0..colon], 10) catch probeUsage();
+ const col = std.fmt.parseInt(u32, args[3][colon + 1 ..], 10) catch probeUsage();
+ if (line == 0 or col == 0) probeUsage();
+
+ var arg: []const u8 = "";
+ var reps: u32 = 1;
+ var warm_s: u32 = 0;
+ var i: usize = 4;
+ while (i < args.len) : (i += 1) {
+ if (std.mem.eql(u8, args[i], "--reps")) {
+ i += 1;
+ if (i >= args.len) probeUsage();
+ reps = @max(1, std.fmt.parseInt(u32, args[i], 10) catch probeUsage());
+ } else if (std.mem.eql(u8, args[i], "--warm")) {
+ i += 1;
+ if (i >= args.len) probeUsage();
+ warm_s = std.fmt.parseInt(u32, args[i], 10) catch probeUsage();
+ } else arg = args[i];
+ }
+
+ lsp.setStatusSink(null, statusSink);
+
+ // 1-based line:col -> byte offset
+ var off: usize = 0;
+ var ln: u32 = 1;
+ while (ln < line and off < source.len) : (off += 1) {
+ if (source[off] == '\n') ln += 1;
+ }
+ off = @min(off + col - 1, source.len);
+
+ const root = std.fs.path.dirname(path) orelse "/";
+ const timings = try arena.alloc(u64, reps);
+ var stdout_buf: [64 * 1024]u8 = undefined;
+ var stdout = std.Io.File.stdout().writer(io, &stdout_buf);
+ var first_query = true;
+
+ for (kinds[0..nkinds]) |kind| {
+ var rows: []const u8 = "";
+ for (0..reps) |r| {
+ // one warm pause for the whole battery, right after the very
+ // first (cold, server-spawning) query — the status lines on
+ // stderr narrate what the server does with the time
+ var out: std.Io.Writer.Allocating = .init(gpa);
+ defer out.deinit();
+ var scratch: std.heap.ArenaAllocator = .init(gpa);
+ defer scratch.deinit();
+ const t0 = nowUs();
+ try lsp.query(query_io, gpa, scratch.allocator(), .{
+ .kind = kind,
+ .path = path,
+ .source = source,
+ .offset = @intCast(off),
+ .arg = arg,
+ .root = root,
+ }, &out.writer);
+ timings[r] = nowUs() -| t0;
+ rows = try arena.dupe(u8, out.written());
+ if (first_query) {
+ first_query = false;
+ if (warm_s > 0) for (0..warm_s * 10) |_| {
+ _ = usleep(100_000);
+ };
+ }
+ }
+
+ try stdout.interface.print("## {t}\n", .{kind});
+ try stdout.interface.writeAll(rows);
+ try stdout.interface.flush();
+
+ const n = std.mem.count(u8, rows, "\n");
+ const cold = timings[0];
+ std.mem.sort(u64, timings[0..reps], {}, std.sort.asc(u64));
+ if (reps == 1)
+ std.debug.print("# {t}: {d} row(s) in {d}us\n", .{ kind, n, cold })
+ else
+ std.debug.print("# {t}: {d} row(s); first {d}us, min {d}us, median {d}us ({d} reps)\n", .{
+ kind, n, cold, timings[0], timings[reps / 2], reps,
+ });
+ }
+}
diff --git a/test/lspfixture/broken.zig b/test/lspfixture/broken.zig
index 22c86c9b..b27840cd 100644
--- a/test/lspfixture/broken.zig
+++ b/test/lspfixture/broken.zig
@@ -20,6 +20,6 @@ pub fn hasUnusedLocal() u32 {
return 7;
}
-pub fn badly_spaced ( a : u32 , b : u32 ) u32 {
- return a+b;
+pub fn badly_spaced(a: u32, b: u32) u32 {
+ return a + b;
}
diff --git a/test/lspmock.zig b/test/lspmock.zig
index 7b379b49..001c3488 100644
--- a/test/lspmock.zig
+++ b/test/lspmock.zig
@@ -97,6 +97,20 @@ fn range(a: std.mem.Allocator, line: u32, from: u32, to: u32) []const u8 {
var root_uri: [512]u8 = undefined;
var root_uri_len: usize = 0;
+/// The documents the editor has opened here (didOpen), as zls keeps its
+/// store: a rename answers in each of them, and in no file it never saw.
+var opened: [8][512]u8 = undefined;
+var opened_len: [8]usize = @splat(0);
+var opened_n: usize = 0;
+
+fn noteOpened(uri: []const u8) void {
+ for (opened[0..opened_n], opened_len[0..opened_n]) |*o, n| if (std.mem.eql(u8, o[0..n], uri)) return;
+ if (opened_n == opened.len or uri.len > opened[0].len) return;
+ @memcpy(opened[opened_n][0..uri.len], uri);
+ opened_len[opened_n] = uri.len;
+ opened_n += 1;
+}
+
pub fn main(init: std.process.Init) !void {
_ = init;
if (getenv("LSPMOCK_MODE")) |m| {
@@ -187,6 +201,7 @@ fn handle(a: std.mem.Allocator, raw: []const u8) void {
notify(a, "$/progress", "{{\"token\":\"t1\",\"value\":{{\"kind\":\"end\"}}}}", .{});
return;
}
+ if (std.mem.eql(u8, method, "textDocument/didOpen")) noteOpened(reqUri(params));
if (id == null) return; // didOpen/didChange/$/cancelRequest: nothing to say
if (mode == .mute) return; // swallow every request after the handshake
@@ -227,10 +242,20 @@ fn handle(a: std.mem.Allocator, raw: []const u8) void {
q, root_uri[0..root_uri_len], range(a, 1, 7, 10),
});
} else if (std.mem.eql(u8, method, "textDocument/rename")) {
+ // In every document it has seen: lib.rs's definition, main.rs's two
+ // calls (any other file reads as main.rs's shape).
const nn = str(get(params, "newName")) orelse "renamed";
- reply(a, rid, "{{\"changes\":{{\"{s}\":[{{\"range\":{s},\"newText\":\"{s}\"}},{{\"range\":{s},\"newText\":\"{s}\"}}]}}}}", .{
- uri, range(a, 3, 12, 15), nn, range(a, 4, 12, 15), nn,
- });
+ var changes: std.ArrayList(u8) = .empty;
+ for (opened[0..opened_n], opened_len[0..opened_n], 0..) |*o, n, k| {
+ const doc = o[0..n];
+ const edits = if (std.mem.endsWith(u8, doc, "/lib.rs"))
+ std.fmt.allocPrint(a, "[{{\"range\":{s},\"newText\":\"{s}\"}}]", .{ range(a, 1, 7, 10), nn }) catch return
+ else
+ std.fmt.allocPrint(a, "[{{\"range\":{s},\"newText\":\"{s}\"}},{{\"range\":{s},\"newText\":\"{s}\"}}]", .{ range(a, 3, 12, 15), nn, range(a, 4, 12, 15), nn }) catch return;
+ changes.print(a, "{s}\"{s}\":{s}", .{ if (k > 0) "," else "", doc, edits }) catch return;
+ }
+ if (opened_n == 0) changes.print(a, "\"{s}\":[{{\"range\":{s},\"newText\":\"{s}\"}},{{\"range\":{s},\"newText\":\"{s}\"}}]", .{ uri, range(a, 3, 12, 15), nn, range(a, 4, 12, 15), nn }) catch return;
+ reply(a, rid, "{{\"changes\":{{{s}}}}}", .{changes.items});
} else if (std.mem.eql(u8, method, "textDocument/formatting")) {
reply(a, rid, "[{{\"range\":{s},\"newText\":\"// formatted by mock\\n\"}}]", .{range(a, 0, 0, 0)});
} else if (std.mem.eql(u8, method, "textDocument/codeAction")) {
diff --git a/test/macos_e2e.swift b/test/macos_e2e.swift
index 5f172f9d..2b0eedad 100644
--- a/test/macos_e2e.swift
+++ b/test/macos_e2e.swift
@@ -1251,7 +1251,7 @@ private func buildWorld(stem: String) throws -> String {
// sources $HOME/.bashrc (host_io.Shell) — so this is what pins the
// prompt to `$ ` and keeps the developer's history out of the capture.
try "PS1='$ '\nHISTFILE=\n".write(toFile: "\(home)/.bashrc", atomically: true, encoding: .utf8)
- // ...and the config is not empty, because the DEFAULT shell is fish, whose
+ // ...and the config is not empty, because the DEFAULT shell is $SHELL (fish, say), whose
// prompt carries a hostname and whose greeting carries a version. A golden
// taken against that is a golden for one machine.
try "Shell bash\n".write(toFile: "\(pardesConfig)/init", atomically: true, encoding: .utf8)
diff --git a/test/mode.zig b/test/mode.zig
index cc36ac04..f49c434c 100644
--- a/test/mode.zig
+++ b/test/mode.zig
@@ -3,57 +3,60 @@ const pardes = @import("pardes");
const panes = pardes.panes;
const Pardes = pardes.Pardes;
-fn mode(p: *Pardes, id: usize, expected: pardes.Pane.Mode) !void {
+fn mode(p: *Pardes, id: usize, expected: panes.Text.Mode) !void {
try std.testing.expect(p.executeBuiltinLine(id, "Mode"));
- try std.testing.expectEqual(expected, p.panes[id].?.mode);
- try std.testing.expect(!p.panes[id].?.tag_edit);
+ try std.testing.expectEqual(expected, p.panes[id].?.body.mode);
+ try std.testing.expect(p.panes[id].?.focus == .body);
}
fn clickModeTag(p: *Pardes) !void {
const pane = p.panes[0].?;
- const text = try p.tagText(p.scratch.allocator(), pane);
+ const text = try pardes.tagline.tagText(p, p.scratch.allocator(), pane);
const col = std.mem.indexOf(u8, text, "Mode") orelse return error.MissingModeTag;
const rect = p.rects[0];
const row = if (p.settings.tag_bottom) rect.y + rect.h - pardes.BOX_H else rect.y;
for ([_]pardes.Mouse.Kind{ .press, .release }) |kind|
p.update(.{ .mouse = .{ .button = .left, .kind = kind, .col = rect.x + pardes.TAG_TEXT_INSET + @as(u16, @intCast(col)), .row = row } });
- try std.testing.expect(pane.tag_edit);
+ try std.testing.expect(pane.focus == .tag);
}
-fn customTag(pane: *pardes.Pane, text: []const u8) void {
- @memcpy(pane.tag_tail[0..text.len], text);
- pane.tag_tail_len = text.len;
- pane.tag_init = true;
+fn customTag(pane: *pardes.Pane, text: []const u8) !void {
+ if (pane.tag.own) |own| pane.gpa.free(own);
+ pane.tag.own = try pane.gpa.dupe(u8, text);
}
test "Mode cycles terminal modes and keeps legacy toggle and custom tags" {
- if (comptime !panes.Terminal.enabled) return error.SkipZigTest;
+ if (comptime !panes.terminal.enabled) return error.SkipZigTest;
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 100 });
defer p.deinit();
p.presentation.enabled = false;
while (p.nextEffect()) |_| {}
const pane = p.panes[0].?;
- try std.testing.expectEqual(pardes.Pane.Mode.tty, pane.mode);
- try std.testing.expect(std.mem.indexOf(u8, try p.tagText(p.scratch.allocator(), pane), " Mode") != null);
+ try std.testing.expectEqual(panes.Text.Mode.tty, pane.body.mode);
+ try std.testing.expect(std.mem.indexOf(u8, try pardes.tagline.tagText(p, p.scratch.allocator(), pane), " Mode") != null);
try mode(p, 0, .normal);
try mode(p, 0, .insert);
+ // A clicked tag is typed into; its execute key is a normal-mode key, as
+ // a body's is, and the body keeps its own mode meanwhile.
try clickModeTag(p);
- try std.testing.expectEqual(pardes.Pane.Mode.insert, pane.tag_mode);
+ try std.testing.expectEqual(panes.Text.Mode.insert, pane.tag.mode);
+ try std.testing.expectEqual(panes.Text.Mode.insert, pane.body.mode);
+ p.update(.{ .key = .{ .cp = pardes.Key.escape } });
p.update(.{ .key = .{ .cp = pardes.Key.tab } });
- try std.testing.expectEqual(pardes.Pane.Mode.tty, pane.mode);
- try std.testing.expect(!pane.tag_edit);
+ try std.testing.expectEqual(panes.Text.Mode.tty, pane.body.mode);
+ try std.testing.expect(pane.focus == .body);
while (p.nextEffect()) |effect| try std.testing.expect(effect != .write);
- customTag(pane, " Togglettymode Keep");
+ try customTag(pane, " Togglettymode Keep");
try mode(p, 0, .normal);
try mode(p, 0, .insert);
try std.testing.expect(p.executeBuiltinLine(0, "Togglettymode"));
- try std.testing.expectEqual(pardes.Pane.Mode.tty, pane.mode);
+ try std.testing.expectEqual(panes.Text.Mode.tty, pane.body.mode);
p.update(.{ .key = .{ .cp = 'b', .ctrl = true } });
- try std.testing.expectEqual(pardes.Pane.Mode.normal, pane.mode);
+ try std.testing.expectEqual(panes.Text.Mode.normal, pane.body.mode);
p.update(.{ .key = .{ .cp = 'b', .ctrl = true } });
- try std.testing.expectEqual(pardes.Pane.Mode.tty, pane.mode);
- try std.testing.expectEqualStrings(" Togglettymode Keep", pane.tag_tail[0..pane.tag_tail_len]);
+ try std.testing.expectEqual(panes.Text.Mode.tty, pane.body.mode);
+ try std.testing.expectEqualStrings(" Togglettymode Keep", pane.tag.own.?);
}
test "Mode from actual tag Exec preserves parked file and output insert transactions" {
@@ -64,26 +67,26 @@ test "Mode from actual tag Exec preserves parked file and output insert transact
p.presentation.enabled = false;
const pane = try p.setTestFile("ab\n");
if (output) pane.file.?.output = .{ .from = .search };
- try std.testing.expect(std.mem.indexOf(u8, try p.tagText(p.scratch.allocator(), pane), " Mode") == null);
- customTag(pane, " Mode");
+ try std.testing.expect(std.mem.indexOf(u8, try pardes.tagline.tagText(p, p.scratch.allocator(), pane), " Mode") == null);
+ try customTag(pane, " Mode");
try mode(p, 0, .insert);
p.update(.{ .key = .{ .cp = '界', .text = "界" } });
p.update(.{ .key = .{ .cp = 'x', .text = "x" } });
try std.testing.expectEqualStrings("界xab\n", pane.file.?.content);
try clickModeTag(p);
- try std.testing.expectEqual(pardes.Pane.Mode.insert, pane.tag_mode);
- if (normal_tag) pane.mode = .normal;
+ try std.testing.expectEqual(panes.Text.Mode.insert, pane.body.mode);
+ if (normal_tag) pane.tag.mode = .normal else p.update(.{ .key = .{ .cp = pardes.Key.escape } });
p.update(.{ .key = .{ .cp = pardes.Key.tab } });
- try std.testing.expectEqual(pardes.Pane.Mode.normal, pane.mode);
- try std.testing.expect(!pane.tag_edit);
- try std.testing.expect(pane.append_at == null);
+ try std.testing.expectEqual(panes.Text.Mode.normal, pane.body.mode);
+ try std.testing.expect(pane.focus == .body);
+ try std.testing.expect(!pane.body.restore_cursor);
p.update(.{ .key = .{ .cp = 'u' } });
try std.testing.expectEqualStrings("ab\n", pane.file.?.content);
p.update(.{ .key = .{ .cp = 'a' } });
p.update(.{ .key = .{ .cp = 'z', .text = "z" } });
- try std.testing.expect(pane.append_at != null);
+ try std.testing.expect(pane.body.restore_cursor);
try mode(p, 0, .normal);
- try std.testing.expect(pane.append_at == null);
+ try std.testing.expect(!pane.body.restore_cursor);
p.update(.{ .key = .{ .cp = 'u' } });
try std.testing.expectEqualStrings("ab\n", pane.file.?.content);
}
@@ -106,7 +109,7 @@ test "Mode leaves image and PDF document modes unchanged" {
const len = try tmp.dir.realPath(std.testing.io, &buffer);
const path = try std.fmt.allocPrint(std.testing.allocator, "{s}/mode.pdf", .{buffer[0..len]});
defer std.testing.allocator.free(path);
- const document = try panes.Pdf.openPane(p, 2, path, 1);
+ const document = try panes.Pdf.openPane(p, 2, path, 1, .last);
const page = document.pdf.?.page;
try mode(p, 2, .normal);
try std.testing.expectEqual(page, document.pdf.?.page);
diff --git a/test/monkey.zig b/test/monkey.zig
new file mode 100644
index 00000000..dcea0b43
--- /dev/null
+++ b/test/monkey.zig
@@ -0,0 +1,244 @@
+// pardes-monkey: random snapshot scripts against the tty, hunting panics.
+//
+// zig build monkey -Dplatform=tty -- <seeds> [steps] [--from=N] [--out=DIR] [--keep]
+//
+// Each seed makes one script (a fixed seed makes the same script, so a hit
+// replays): keys and leader bursts, typing, mouse presses, drags and wheel,
+// tiny resizes, prompts and long prompt text, over files of bad UTF-8 and
+// wide glyphs. pardes-snap runs it with --update into DIR (default
+// /tmp/pardes-monkey), and a panic is a record in the app's crash file
+// (src/crash.zig, in the script's fake home: found even when the crash cut
+// the script short) or a `.zig:N:N: 0x` stack frame in the report or the
+// grid it captured (a trace renders INTO the screen). A hit
+// keeps DIR/seed-N.snap, its captures and its report; the rest are deleted.
+// A panic's trace can scroll off a small grid: replay the kept script, or
+// run the app in a larger pty. Every hit gets a fix and a pinned regression
+// script in test/snapshots/.
+//
+// Not a test gate: it is slow, random over seeds and aimed at finding, not
+// holding. Shell text typed into a pane only ever runs in the throwaway
+// script directory, and its alphabet has no path characters.
+const std = @import("std");
+const libc = std.c;
+
+const Script = struct {
+ out: std.ArrayListUnmanaged(u8) = .empty,
+ gpa: std.mem.Allocator,
+ rows: u16 = 24,
+ cols: u16 = 80,
+
+ fn line(s: *Script, comptime fmt: []const u8, args: anytype) !void {
+ try s.out.print(s.gpa, fmt ++ "\n", args);
+ }
+};
+
+// Workspace-tag words: clicked with the middle button they run, and the
+// harness finds their column on row 1 while the window is wide enough.
+const commands = [_][]const u8{ "Newcol", "Find", "Grep", "Joincol", "Help", "Dump", "NextColor", "Debug" };
+const leader_keys = "abcdefghijklmnopqrstuvwxyz0123456789$^";
+const typed = "abcdefghijklmnopqrstuvwxyz0123456789 -_=+,:;()";
+
+fn generate(gpa: std.mem.Allocator, seed: u64, steps: usize) ![]u8 {
+ var prng = std.Random.DefaultPrng.init(seed);
+ const random = prng.random();
+ var s: Script = .{ .gpa = gpa };
+ try s.line("# pardes-monkey seed {d}, {d} steps", .{ seed, steps });
+ try s.line("file bad.txt hello \\xff\\xfe world\\nlatin-1 caf\\xe9 tail\\ntruncated \\xe6\\x97 here\\nend\\n", .{});
+ try s.line("file wide.txt {s}tail\\nsecond line\\n", .{std.mem.asBytes(&@as([8][37]u8, @splat("\\xe6\\x97\\xa5\\xe6\\x9c\\xac\\xe8\\xaa\\x9e ".*)))});
+ try s.line("lines long.txt 400 some words after the number, long enough to wrap in a narrow pane", .{});
+ try s.line("start 24 80 bad.txt", .{});
+ try s.line("wait 8000 Newcol Joincol", .{});
+ try s.line("stable 300 5000", .{});
+ for (0..steps) |step| {
+ const wide = s.cols >= 70 and s.rows >= 6;
+ switch (random.uintLessThan(u8, 12)) {
+ // A workspace word, run with a middle click: new columns make
+ // narrow panes, Find and Grep open prompts.
+ 0, 1 => if (wide) {
+ const word = commands[random.uintLessThan(usize, commands.len)];
+ try s.line("press middle @{s} 1", .{word});
+ try s.line("release middle @{s} 1", .{word});
+ },
+ // Typing: into a prompt when one is up, far past its band.
+ 2, 3 => {
+ var text: [200]u8 = undefined;
+ const n = random.intRangeAtMost(usize, 1, if (random.uintLessThan(u8, 4) == 0) text.len else 12);
+ for (text[0..n]) |*c| c.* = typed[random.uintLessThan(usize, typed.len)];
+ try s.line("text {s}", .{text[0..n]});
+ },
+ 4 => try s.line("key {s}", .{switch (random.uintLessThan(u8, 10)) {
+ 0 => "enter",
+ 1 => "tab",
+ 2 => "bs",
+ 3 => "up",
+ 4 => "down",
+ 5 => "left",
+ 6 => "right",
+ 7 => "pgdn",
+ 8 => "home",
+ else => "end",
+ }}),
+ 5 => {
+ try s.line("key esc", .{});
+ try s.line("settle 120", .{});
+ },
+ // A leader burst: space and a chord's keys.
+ 6 => {
+ var chord: [3][2]u8 = undefined;
+ const n = random.intRangeAtMost(usize, 1, 3);
+ for (chord[0..n]) |*c| c.* = .{ leader_keys[random.uintLessThan(usize, leader_keys.len)], 0 };
+ try s.out.appendSlice(gpa, "key space");
+ for (chord[0..n]) |c| try s.out.print(gpa, " {c}", .{c[0]});
+ try s.out.append(gpa, '\n');
+ },
+ 7, 8 => {
+ const buttons = [_][]const u8{ "left", "middle", "right" };
+ const button = buttons[random.uintLessThan(usize, buttons.len)];
+ const col = random.intRangeAtMost(u16, 1, s.cols);
+ const row = random.intRangeAtMost(u16, 1, s.rows);
+ try s.line("press {s} {d} {d}", .{ button, col, row });
+ if (random.boolean()) try s.line("drag {s} {d} {d}", .{ button, random.intRangeAtMost(u16, 1, s.cols), random.intRangeAtMost(u16, 1, s.rows) });
+ try s.line("release {s} {d} {d}", .{ button, random.intRangeAtMost(u16, 1, s.cols), random.intRangeAtMost(u16, 1, s.rows) });
+ },
+ 9 => try s.line("wheel {s} {d} {d}", .{ if (random.boolean()) "up" else "down", random.intRangeAtMost(u16, 1, s.cols), random.intRangeAtMost(u16, 1, s.rows) }),
+ 10 => try s.line("motion {d} {d}", .{ random.intRangeAtMost(u16, 1, s.cols), random.intRangeAtMost(u16, 1, s.rows) }),
+ // Tiny windows as often as ordinary ones.
+ else => {
+ s.rows = if (random.boolean()) random.intRangeAtMost(u16, 1, 6) else random.intRangeAtMost(u16, 7, 40);
+ s.cols = if (random.boolean()) random.intRangeAtMost(u16, 1, 20) else random.intRangeAtMost(u16, 21, 140);
+ try s.line("resize {d} {d}", .{ s.rows, s.cols });
+ },
+ }
+ try s.line("settle 30", .{});
+ if (step % 10 == 9) try s.line("snap s{d}", .{step});
+ }
+ try s.line("stable 300 5000", .{});
+ try s.line("snap end", .{});
+ return s.out.toOwnedSlice(gpa);
+}
+
+/// A stack frame of a Zig panic trace, `.zig:12:34: 0x`, of the app's: the
+/// harness's own error trace (a script it could not finish) is not a hit.
+fn hasTrace(bytes: []const u8) bool {
+ var lines = std.mem.splitScalar(u8, bytes, '\n');
+ while (lines.next()) |line| {
+ if (std.mem.indexOf(u8, line, "test/snapshot.zig") != null or std.mem.indexOf(u8, line, "test/e2e_harness.zig") != null) continue;
+ if (frameIn(line)) return true;
+ }
+ return false;
+}
+
+fn frameIn(bytes: []const u8) bool {
+ var from: usize = 0;
+ while (std.mem.indexOfPos(u8, bytes, from, ".zig:")) |at| : (from = at + 1) {
+ var i = at + ".zig:".len;
+ var digits: usize = 0;
+ while (i < bytes.len and std.ascii.isDigit(bytes[i])) : (i += 1) digits += 1;
+ if (digits == 0 or i >= bytes.len or bytes[i] != ':') continue;
+ i += 1;
+ digits = 0;
+ while (i < bytes.len and std.ascii.isDigit(bytes[i])) : (i += 1) digits += 1;
+ if (digits > 0 and std.mem.startsWith(u8, bytes[i..], ": 0x")) return true;
+ }
+ return false;
+}
+
+test "a panic trace is found, and ordinary colons are not" {
+ try std.testing.expect(hasTrace(" /src/draw.zig:814:31: 0x4212821 in joinNotice"));
+ try std.testing.expect(!hasTrace("draw.zig:814 is where it was; 12:30: 0x"));
+ try std.testing.expect(!hasTrace("/x/test/snapshot.zig:197:28: 0x1279761 in main (snapshot.zig)"));
+}
+
+test "a seed makes the same script every time" {
+ const a = try generate(std.testing.allocator, 42, 50);
+ defer std.testing.allocator.free(a);
+ const b = try generate(std.testing.allocator, 42, 50);
+ defer std.testing.allocator.free(b);
+ try std.testing.expectEqualStrings(a, b);
+}
+
+fn readAll(gpa: std.mem.Allocator, io: std.Io, path: []const u8) []u8 {
+ return std.Io.Dir.cwd().readFileAlloc(io, path, gpa, .limited(64 << 20)) catch &.{};
+}
+
+pub fn main(init: std.process.Init) !void {
+ const gpa = std.heap.page_allocator;
+ const io = init.io;
+ const args = try init.minimal.args.toSlice(init.arena.allocator());
+ if (args.len < 4) {
+ std.debug.print("usage: pardes-monkey <pardes-snap> <pardes> <seeds> [steps] [--from=N] [--out=DIR]\n", .{});
+ std.process.exit(2);
+ }
+ const snap = args[1];
+ const app = args[2];
+ var seeds: u64 = 20;
+ var steps: usize = 70;
+ var from: u64 = 1;
+ var out: []const u8 = "/tmp/pardes-monkey";
+ // Keep every script and capture, not only a hit's: to see what it did.
+ var keep = false;
+ var positional: usize = 0;
+ for (args[3..]) |a| {
+ if (std.mem.startsWith(u8, a, "--from=")) {
+ from = try std.fmt.parseInt(u64, a["--from=".len..], 10);
+ } else if (std.mem.eql(u8, a, "--keep")) {
+ keep = true;
+ } else if (std.mem.startsWith(u8, a, "--out=")) {
+ out = a["--out=".len..];
+ } else {
+ switch (positional) {
+ 0 => seeds = try std.fmt.parseInt(u64, a, 10),
+ 1 => steps = try std.fmt.parseInt(usize, a, 10),
+ else => {},
+ }
+ positional += 1;
+ }
+ }
+ std.Io.Dir.cwd().createDirPath(io, out) catch {};
+ var hits: usize = 0;
+ var seed = from;
+ while (seed < from + seeds) : (seed += 1) {
+ const script = try generate(gpa, seed, steps);
+ defer gpa.free(script);
+ var path_buf: [4096]u8 = undefined;
+ const path = try std.fmt.bufPrint(&path_buf, "{s}/seed-{d}.snap", .{ out, seed });
+ try std.Io.Dir.cwd().writeFile(io, .{ .sub_path = path, .data = script });
+ const run = std.process.run(gpa, io, .{
+ .argv = &.{ snap, app, "--update", "--no-retry", "--jobs=1", path },
+ .stdout_limit = .limited(64 << 20),
+ .stderr_limit = .limited(64 << 20),
+ }) catch |err| {
+ std.debug.print("seed {d}: pardes-snap did not run ({t})\n", .{ seed, err });
+ continue;
+ };
+ defer gpa.free(run.stdout);
+ defer gpa.free(run.stderr);
+ var golden_buf: [4096]u8 = undefined;
+ const golden_path = try std.fmt.bufPrint(&golden_buf, "{s}/seed-{d}.golden", .{ out, seed });
+ const golden = readAll(gpa, io, golden_path);
+ defer gpa.free(golden);
+ // The app's own crash file (src/crash.zig) in the script's fake home:
+ // found even when the crash cut the script short of a capture.
+ var crash_buf: [4096]u8 = undefined;
+ const crash_path = try std.fmt.bufPrint(&crash_buf, "/tmp/pardes-snap/seed-{d}/home/.config/pardes/crashes", .{seed});
+ const crashes = readAll(gpa, io, crash_path);
+ defer gpa.free(crashes);
+ if (crashes.len != 0 or hasTrace(run.stdout) or hasTrace(run.stderr) or hasTrace(golden)) {
+ hits += 1;
+ var log_buf: [4096]u8 = undefined;
+ const log_path = try std.fmt.bufPrint(&log_buf, "{s}/seed-{d}.log", .{ out, seed });
+ const both = try std.mem.concat(gpa, u8, &.{ crashes, run.stdout, run.stderr });
+ defer gpa.free(both);
+ try std.Io.Dir.cwd().writeFile(io, .{ .sub_path = log_path, .data = both });
+ std.debug.print("PANIC seed {d}: {s}\n", .{ seed, path });
+ } else if (!keep) {
+ std.Io.Dir.cwd().deleteFile(io, path) catch {};
+ std.Io.Dir.cwd().deleteFile(io, golden_path) catch {};
+ std.debug.print("ok seed {d}\n", .{seed});
+ } else {
+ std.debug.print("ok seed {d} (kept)\n", .{seed});
+ }
+ }
+ std.debug.print("{d} of {d} seeds panicked; kept in {s}\n", .{ hits, seeds, out });
+ if (hits != 0) std.process.exit(1);
+}
diff --git a/test/monkey9p.py b/test/monkey9p.py
new file mode 100644
index 00000000..7899f25b
--- /dev/null
+++ b/test/monkey9p.py
@@ -0,0 +1,2010 @@
+#!/usr/bin/env python3
+"""pardes 9P monkey: random 9P operations against a throwaway detached session.
+
+ zig build monkey-9p -Dplatform=tty --prefix <scratch> -- [--seed N] [--steps M]
+ zig build monkey-9p -Dplatform=tty --prefix <scratch> -- --replay FILE
+ zig build monkey-9p -Dplatform=tty --prefix <scratch> -- --shrink FILE
+ python3 test/monkey9p.py <pardes> [same flags]
+
+A run starts `pardes --detach` with its own HOME, XDG dirs and a short
+runtime dir in /tmp, speaks raw 9P to it (test/ninep.py), and for each
+step asks a GENERATOR for one concrete operation, runs it, then runs every
+INVARIANT. Everything random comes from --seed; every operation it ran is
+written to <out>/runs/seed-N/ops.jsonl, concrete but for pane and column
+references ({p3}: the 4th serial of /index, mod its length, when the op
+runs, so a shrunk sequence still names live panes), and `--replay` runs
+the same requests again without the generator. A failure writes a bug record
+(seed, step, the replayable operations since that session began) to
+<out>/bugs/, shrinks it by delta debugging over replays unless
+--no-shrink, and the run carries on in a fresh session.
+
+Plug-in points: a generator is a function `(ctx, rng) -> op dict` under
+@generator(weight); an op kind is a function `(sess, op) -> Result` under
+@op_kind(name); an invariant is a function `(ctx, res) -> str | None`
+under @invariant, returning why it failed.
+
+Safety: the session never sees PARDES_*, NINE_MOUNT or NAMESPACE; every
+payload that could reach a shell is drawn from an alphabet with no path
+or shell metacharacters (shell_safe), Edit text from a grammar without
+sam's w/e/r/f/b/B/D/n/!/</>/| commands, and nothing is ever written,
+created or removed under /os or /src (the host filesystem). This process
+makes itself a child subreaper, so every shell the session starts is its
+descendant even after pardes dies, and teardown kills them all.
+"""
+import argparse
+import collections
+import ctypes
+import hashlib
+import json
+import os
+import random
+import re
+import select
+import shutil
+import signal
+import socket
+import struct
+import subprocess
+import sys
+import tempfile
+import threading
+import time
+
+sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
+from ninep import Client, string # noqa: E402
+
+REPO = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+DEFAULT_OUT = os.path.join(os.path.dirname(REPO), '.scratch', 'monkey9p')
+
+# 9P message types.
+TWALK, TOPEN, TCREATE, TREAD, TWRITE, TCLUNK, TREMOVE, TSTAT, TFLUSH = 110, 112, 114, 116, 118, 120, 122, 124, 108
+RERROR = 107
+OREAD, OWRITE, ORDWR, OTRUNC = 0, 1, 2, 16
+DMDIR = 0x80000000
+
+TIMEOUT = 5.0 # every reply, unless the op is a documented slow one
+SLOW_TIMEOUT = 30.0 # Grep, Find, Dump, Restore, Tty, huge writes
+HELD_WAIT = 0.1 # how long a read of a held file is let wait before Tflush
+MSIZE = 65536 + 24
+
+
+class Hang(Exception):
+ """A 9P reply did not come within its timeout."""
+
+
+class Dropped(Exception):
+ """The server closed the connection (or reset it)."""
+
+
+class Ended(Exception):
+ """pardes quit cleanly: exit 0, no crash file. Closing the session's last
+ pane quits it (docs/typ/reference.typ: 'closing the session's last pane quits pardes'),
+ and a terminal whose shell exits closes its pane, so this can follow any
+ step; the run starts a fresh session and carries on."""
+
+
+# --------------------------------------------------------------------------
+# Wire: raw 9P with per-request timeouts and Tflush for held reads.
+
+class Wire(Client):
+ def __init__(self, address, msize=MSIZE):
+ super().__init__(address, timeout=TIMEOUT, msize=msize)
+ self.next_fid = 100
+
+ def newfid(self):
+ self.next_fid += 1
+ return self.next_fid
+
+ def _send(self, kind, payload):
+ self.tag = (self.tag + 1) % 65535
+ packet = struct.pack('<IBH', 7 + len(payload), kind, self.tag) + payload
+ if len(packet) > self.msize:
+ raise ValueError(f'harness bug: a {len(packet)}-byte request exceeds msize {self.msize}')
+ try:
+ self.socket.sendall(packet)
+ except socket.timeout:
+ raise Hang('send did not drain within the timeout')
+ except OSError as why:
+ raise Dropped(f'send: {why}')
+ return self.tag
+
+ def _recv(self, timeout):
+ self.socket.settimeout(timeout)
+ try:
+ size, kind, tag = struct.unpack('<IBH', self.receive(7))
+ body = self.receive(size - 7)
+ except socket.timeout:
+ raise Hang(f'no reply within {timeout:g}s')
+ except (EOFError, ConnectionResetError, BrokenPipeError) as why:
+ raise Dropped(str(why))
+ except OSError as why:
+ if isinstance(why, socket.timeout):
+ raise Hang(f'no reply within {timeout:g}s')
+ raise Dropped(str(why))
+ return kind, tag, body
+
+ def call(self, kind, payload, timeout=TIMEOUT):
+ """(ok, body_or_error_text)."""
+ tag = self._send(kind, payload)
+ while True:
+ rkind, rtag, body = self._recv(timeout)
+ if rtag != tag:
+ continue # a late reply to a flushed request
+ if rkind == RERROR:
+ n = struct.unpack_from('<H', body)[0]
+ return False, body[2:2 + n].decode(errors='replace')
+ if rkind != kind + 1:
+ raise Dropped(f'expected reply {kind + 1}, received {rkind}')
+ return True, body
+
+ def call_held(self, kind, payload, wait=HELD_WAIT):
+ """A request the server may hold: after `wait`, flush it. Returns
+ (ok, body) for an answer, or (None, 'flushed')."""
+ tag = self._send(kind, payload)
+ self.socket.settimeout(None)
+ ready, _, _ = select.select([self.socket], [], [], wait)
+ if ready:
+ rkind, rtag, body = self._recv(TIMEOUT)
+ if rtag == tag:
+ if rkind == RERROR:
+ n = struct.unpack_from('<H', body)[0]
+ return False, body[2:2 + n].decode(errors='replace')
+ return True, body
+ ftag = self._send(TFLUSH, struct.pack('<H', tag))
+ answer = (None, 'flushed')
+ while True:
+ rkind, rtag, body = self._recv(TIMEOUT)
+ if rtag == tag:
+ if rkind == RERROR:
+ n = struct.unpack_from('<H', body)[0]
+ answer = (False, body[2:2 + n].decode(errors='replace'))
+ else:
+ answer = (True, body)
+ elif rtag == ftag:
+ return answer
+
+ # Convenience over call().
+ def walk_names(self, names, timeout=TIMEOUT):
+ """(fid or None, error)."""
+ fid = self.newfid()
+ old = 1
+ if not names:
+ ok, body = self.call(TWALK, struct.pack('<IIH', old, fid, 0), timeout)
+ return (fid, None) if ok else (None, body)
+ for start in range(0, len(names), 16):
+ part = names[start:start + 16]
+ ok, body = self.call(TWALK, struct.pack('<IIH', old, fid, len(part)) +
+ b''.join(string(n) for n in part), timeout)
+ if not ok:
+ if old != 1:
+ self.call(TCLUNK, struct.pack('<I', fid))
+ return None, body
+ if struct.unpack_from('<H', body)[0] != len(part):
+ if old != 1:
+ self.call(TCLUNK, struct.pack('<I', fid))
+ return None, 'walk stopped short'
+ old = fid
+ return fid, None
+
+ def clunk(self, fid):
+ return self.call(TCLUNK, struct.pack('<I', fid))
+
+ def read_all(self, fid, count=None, limit=1 << 22):
+ count = min(count or (self.msize - 11), self.msize - 11)
+ data = bytearray()
+ while len(data) < limit:
+ ok, body = self.call(TREAD, struct.pack('<IQI', fid, len(data), count))
+ if not ok:
+ raise OSError(body)
+ chunk = body[4:]
+ if not chunk:
+ break
+ data.extend(chunk)
+ return bytes(data)
+
+ def read_path(self, path):
+ fid, err = self.walk_names(split(path))
+ if fid is None:
+ raise FileNotFoundError(f'{path}: {err}')
+ try:
+ ok, body = self.call(TOPEN, struct.pack('<IB', fid, OREAD))
+ if not ok:
+ raise OSError(f'{path}: {body}')
+ return self.read_all(fid)
+ finally:
+ self.clunk(fid)
+
+ def write_path(self, path, data):
+ """(ok, error) for one open, one write, one clunk."""
+ fid, err = self.walk_names(split(path))
+ if fid is None:
+ return False, err
+ try:
+ ok, body = self.call(TOPEN, struct.pack('<IB', fid, OWRITE))
+ if not ok:
+ return False, body
+ ok, body = self.call(TWRITE, struct.pack('<IQI', fid, 0, len(data)) + data)
+ return (True, None) if ok else (False, body)
+ finally:
+ self.clunk(fid)
+
+
+def split(path):
+ return [p.encode('latin-1') if isinstance(p, str) else p for p in path.split('/') if p]
+
+
+def dir_names(data):
+ names, offset = [], 0
+ while offset + 2 <= len(data):
+ size = struct.unpack_from('<H', data, offset)[0]
+ n = struct.unpack_from('<H', data, offset + 41)[0]
+ names.append(data[offset + 43:offset + 43 + n].decode('latin-1'))
+ offset += size + 2
+ return names
+
+
+# --------------------------------------------------------------------------
+# Session lifecycle.
+
+def _libc():
+ try:
+ return ctypes.CDLL(None, use_errno=True)
+ except OSError:
+ return None
+
+
+def become_subreaper():
+ """Orphaned shells re-parent to us, not init, so teardown finds them."""
+ libc = _libc()
+ if libc is not None:
+ libc.prctl(36, 1, 0, 0, 0) # PR_SET_CHILD_SUBREAPER
+
+
+def descendants(root):
+ parent = {}
+ for entry in os.listdir('/proc'):
+ if not entry.isdigit():
+ continue
+ try:
+ with open(f'/proc/{entry}/stat', 'rb') as f:
+ stat = f.read()
+ ppid = int(stat[stat.rindex(b')') + 2:].split()[1])
+ except (OSError, ValueError):
+ continue
+ parent.setdefault(ppid, []).append(int(entry))
+ out, stack = [], [root]
+ while stack:
+ for child in parent.get(stack.pop(), []):
+ out.append(child)
+ stack.append(child)
+ return out
+
+
+def tokened(token):
+ """Our own processes whose environment carries this session's token."""
+ found, needle = [], f'M9P_TOKEN={token}'.encode()
+ for entry in os.listdir('/proc'):
+ if not entry.isdigit():
+ continue
+ try:
+ with open(f'/proc/{entry}/environ', 'rb') as f:
+ if needle in f.read().split(b'\0'):
+ found.append(int(entry))
+ except OSError:
+ continue
+ return found
+
+
+def sweep(prefix):
+ """Kill every process whose M9P_TOKEN starts with `prefix`, until none."""
+ needle = f'M9P_TOKEN={prefix}'.encode()
+ for _ in range(100):
+ found = []
+ for entry in os.listdir('/proc'):
+ if not entry.isdigit() or int(entry) == os.getpid():
+ continue
+ try:
+ with open(f'/proc/{entry}/environ', 'rb') as f:
+ if any(v.startswith(needle) for v in f.read().split(b'\0')):
+ found.append(int(entry))
+ except OSError:
+ continue
+ if not found:
+ return
+ for pid in found:
+ try:
+ os.kill(pid, signal.SIGKILL)
+ except ProcessLookupError:
+ pass
+ reap_zombies()
+ time.sleep(0.02)
+
+
+def reap_zombies():
+ while True:
+ try:
+ pid, _ = os.waitpid(-1, os.WNOHANG)
+ except ChildProcessError:
+ return
+ if pid == 0:
+ return
+
+
+RUNTIME_DIRS = [] # removed at exit, whatever ended the run
+
+
+class Session:
+ """One throwaway `pardes --detach`, its dirs, its connection(s)."""
+
+ counter = 0
+
+ def __init__(self, binary, run_dir, follower):
+ Session.counter += 1
+ self.binary = binary
+ self.follower_mode = follower
+ self.token = f'{os.getpid()}-{Session.counter}-{random.SystemRandom().randrange(1 << 30)}'
+ self.dir = os.path.join(run_dir, f'sess{Session.counter}')
+ self.home = os.path.join(self.dir, 'home')
+ self.runtime = tempfile.mkdtemp(prefix='m9p.', dir='/tmp')
+ RUNTIME_DIRS.append(self.runtime)
+ self.proc = None
+ self.wire = None
+ self.follower = None
+ self.handles = {}
+ self.dump_written = False
+ self.marker = None
+ self.window_base = 0
+ self.start()
+
+ def env(self):
+ env = {k: v for k, v in os.environ.items()
+ if not k.startswith('PARDES_') and k not in ('NINE_MOUNT', 'NAMESPACE')}
+ env.update(HOME=self.home, XDG_RUNTIME_DIR=self.runtime,
+ XDG_CONFIG_HOME=os.path.join(self.home, 'config'),
+ XDG_STATE_HOME=os.path.join(self.home, 'state'),
+ XDG_DATA_HOME=os.path.join(self.home, 'data'),
+ XDG_CACHE_HOME=os.path.join(self.home, 'cache'),
+ SHELL='/bin/sh', PARDES_NOTIME='1', M9P_TOKEN=self.token,
+ PARDES_DUMP=os.path.join(self.home, 'm9p.dump.zon'))
+ for language in ['RS', 'C', 'GO', 'TS', 'PY', 'ZIG']:
+ env['PARDES_LSP_' + language] = ''
+ return env
+
+ def start(self):
+ os.makedirs(self.home, exist_ok=True)
+ for name, text in FIXTURES.items():
+ with open(os.path.join(self.home, name), 'wb') as f:
+ f.write(text)
+ self.stderr = open(os.path.join(self.dir, 'stderr'), 'wb')
+ self.proc = subprocess.Popen([self.binary, '--detach=m9p', 'alpha.txt'], cwd=self.home,
+ env=self.env(), stdin=subprocess.DEVNULL,
+ stdout=subprocess.DEVNULL, stderr=self.stderr,
+ start_new_session=True)
+ self.address = os.path.join(self.runtime, 'pardes-9p-m9p.sock')
+ self.connect(first=True)
+ # Two more panes, so one close does not end the session.
+ for name in (b'utf8.txt\n', b'crlf.txt\n'):
+ self.wire.write_path('/look', name)
+
+ def connect(self, first=False):
+ deadline = time.monotonic() + (15 if first else 10)
+ last = None
+ while time.monotonic() < deadline:
+ if self.proc.poll() is not None:
+ raise Dropped(f'pardes exited {self.proc.returncode} before its socket answered')
+ if os.path.exists(self.address):
+ try:
+ self.wire = Wire(self.address)
+ break
+ except OSError as why:
+ last = why
+ time.sleep(0.01)
+ else:
+ raise Hang(f'9P socket did not answer: {last}')
+ self.handles = {}
+ self.marker = None
+ if self.follower_mode:
+ self.follower = Follower(self.address)
+
+ def reconnect(self):
+ self.close_wires()
+ # A Restore hangs up and serves again: let the old socket go.
+ time.sleep(0.05)
+ self.connect()
+
+ def close_wires(self):
+ if self.follower is not None:
+ self.follower.stop()
+ self.follower = None
+ if self.wire is not None:
+ try:
+ self.wire.socket.close()
+ except OSError:
+ pass
+ self.wire = None
+
+ def alive(self):
+ return self.proc is not None and self.proc.poll() is None
+
+ def crash_text(self):
+ """The crash file's text (src/crash.zig) and stderr's tail."""
+ out = []
+ for base, _, files in os.walk(self.home):
+ if 'crashes' in files:
+ with open(os.path.join(base, 'crashes'), 'rb') as f:
+ out.append(f.read().decode(errors='replace'))
+ try:
+ self.stderr.flush()
+ with open(os.path.join(self.dir, 'stderr'), 'rb') as f:
+ text = f.read()
+ # The panic line leads; the frames under it can run long.
+ tail = (text if len(text) <= 6000 else text[:3000] + b'\n...\n' + text[-2000:]).decode(errors='replace')
+ if tail.strip():
+ out.append('stderr: ' + tail)
+ except OSError:
+ pass
+ return '\n'.join(out)
+
+ def has_crash_file(self):
+ for base, _, files in os.walk(os.path.join(self.home, 'config')):
+ if 'crashes' in files:
+ return True
+ return False
+
+ def close(self, keep=False):
+ """Kill pardes and everything it started; verify nothing survives."""
+ self.close_wires()
+ if self.proc is not None and self.proc.poll() is None:
+ self.proc.terminate()
+ try:
+ self.proc.wait(timeout=3)
+ except subprocess.TimeoutExpired:
+ self.proc.kill()
+ self.proc.wait()
+ survivors = []
+ for _ in range(100):
+ reap_zombies()
+ pids = set(tokened(self.token)) | set(descendants(os.getpid()))
+ pids.discard(os.getpid())
+ if not pids:
+ break
+ for pid in pids:
+ try:
+ os.kill(pid, signal.SIGKILL)
+ except ProcessLookupError:
+ pass
+ survivors = pids
+ time.sleep(0.02)
+ else:
+ raise RuntimeError(f'processes survived teardown: {sorted(survivors)}')
+ reap_zombies()
+ self.stderr.close()
+ shutil.rmtree(self.runtime, ignore_errors=True)
+ if not keep:
+ shutil.rmtree(self.dir, ignore_errors=True)
+
+
+class Follower:
+ """A second connection holding `follow new` on /log, reading records."""
+
+ def __init__(self, address):
+ self.lines = []
+ self.cond = threading.Condition()
+ self.done = False
+ self.wire = Wire(address)
+ fid, err = self.wire.walk_names([b'log'])
+ ok, body = self.wire.call(TOPEN, struct.pack('<IB', fid, ORDWR))
+ ok, body = self.wire.call(TWRITE, struct.pack('<IQI', fid, 0, 11) + b'follow new\n')
+ if not ok:
+ raise OSError(f'follow new: {body}')
+ self.fid = fid
+ self.thread = threading.Thread(target=self.run, daemon=True)
+ self.thread.start()
+
+ def run(self):
+ offset = 0
+ try:
+ while not self.done:
+ tag = self.wire._send(TREAD, struct.pack('<IQI', self.fid, offset, 8192))
+ while True:
+ self.wire.socket.settimeout(None)
+ kind, rtag, body = self.wire._recv(None)
+ if rtag == tag:
+ break
+ if kind == RERROR:
+ break
+ chunk = body[4:]
+ if not chunk:
+ break
+ offset += len(chunk)
+ with self.cond:
+ self.lines.extend(chunk.decode(errors='replace').splitlines())
+ self.cond.notify_all()
+ except (Hang, Dropped, OSError, struct.error):
+ pass
+ with self.cond:
+ self.done = True
+ self.cond.notify_all()
+
+ def wait_for(self, needle, timeout=TIMEOUT):
+ deadline = time.monotonic() + timeout
+ with self.cond:
+ while True:
+ for i in range(len(self.lines) - 1, -1, -1):
+ if needle in self.lines[i]:
+ return i
+ left = deadline - time.monotonic()
+ if left <= 0 or self.done:
+ return None
+ self.cond.wait(left)
+
+ def stop(self):
+ self.done = True
+ try:
+ self.wire.socket.shutdown(socket.SHUT_RDWR)
+ except OSError:
+ pass
+ self.wire.socket.close()
+ self.thread.join(timeout=2)
+
+
+FIXTURES = {
+ 'alpha.txt': b'alpha beta gamma\nsecond line\n\nthird after a blank\n',
+ 'utf8.txt': 'naïve café 日本語 é \U0001f600\nline two\n'.encode(),
+ 'crlf.txt': b'one\r\ntwo\r\nthree\r\n',
+ 'bad.txt': b'hello \xff\xfe world\nlatin-1 caf\xe9\ntruncated \xe6\x97 here\n',
+ 'empty.txt': b'',
+ 'noeol.txt': b'no newline at the end',
+}
+
+
+# --------------------------------------------------------------------------
+# Results, registries.
+
+class Result:
+ def __init__(self):
+ self.requests = [] # (kind, path, ok, why)
+ self.hung_up = False # the op expected the server to hang up (Restore)
+ self.note = ''
+
+ def add(self, kind, path, ok, why=None):
+ self.requests.append((kind, path, ok, why))
+
+ def writes(self):
+ return [r for r in self.requests if r[0] in ('write', 'clunk-write', 'open-new', 'trunc')]
+
+
+GENERATORS = [] # (weight, fn)
+OPS = {} # name -> fn(sess, op) -> Result
+INVARIANTS = [] # fn(ctx, res) -> str | None
+
+
+def generator(weight):
+ def wrap(fn):
+ GENERATORS.append((weight, fn))
+ return fn
+ return wrap
+
+
+def op_kind(name):
+ def wrap(fn):
+ OPS[name] = fn
+ return fn
+ return wrap
+
+
+def invariant(fn):
+ INVARIANTS.append(fn)
+ return fn
+
+
+def host_path(path):
+ """Guard: nothing mutating ever touches the served host tree."""
+ parts = split(path)
+ return bool(parts) and parts[0] in (b'os', b'src')
+
+
+def is_held(path):
+ return (path.rstrip('/') == '/log' or path.endswith('/event') or
+ path.endswith('/pty/data') or path.endswith('/pty/run'))
+
+
+def slow(data):
+ return len(data) > 65536 or any(w in data for w in (b'Grep', b'Find', b'Dump', b'Restore', b'Tty', b'Edit'))
+
+
+# --------------------------------------------------------------------------
+# Op kinds: each takes a concrete op (what the ops log holds) and runs it.
+
+def dec(s):
+ return s.encode('latin-1')
+
+
+def enc(b):
+ return b.decode('latin-1')
+
+
+@op_kind('write')
+def op_write(sess, op):
+ """open(path, mode); write data in the given chunk sizes; clunk."""
+ res = Result()
+ path, data, mode = op['path'], dec(op['data']), op.get('mode', OWRITE)
+ if host_path(path):
+ res.note = 'refused by guard: host tree'
+ return res
+ w = sess.wire
+ fid, err = w.walk_names(split(path))
+ if fid is None:
+ res.add('walk', path, False, err)
+ return res
+ timeout = SLOW_TIMEOUT if slow(data) else TIMEOUT
+ ok, body = w.call(TOPEN, struct.pack('<IB', fid, mode), timeout)
+ res.add(open_kind(path, mode), path, ok, None if ok else body)
+ sizes = chunking(op.get('chunks', 'whole'), len(data), w.msize - 23)
+ opened = ok
+ sent = data
+ if ok:
+ offset = 0
+ took = []
+ for size in sizes:
+ piece = data[offset:offset + size]
+ ok, body = w.call(TWRITE, struct.pack('<IQI', fid, op.get('offset', offset), len(piece)) + piece, timeout)
+ # A write on a fid opened for reading is 9P misuse, not a write
+ # the tree refused: the rule does not name it.
+ res.add('write' if mode & 3 else 'write-badfid', path, ok, None if ok else body)
+ offset += size
+ sent = data[:offset]
+ if ok:
+ took.append(size)
+ if not ok and op.get('stop_on_error', True):
+ break
+ # Misses are allowed the Twrites that succeeded: a line written a
+ # byte a Twrite is a look a byte, each its own write.
+ allowances(res, path, data[:sum(took)], took, w.msize - 24)
+ ok, body = w.call(TCLUNK, struct.pack('<I', fid), timeout)
+ res.add('clunk-write' if mode & 3 else 'clunk', path, ok, None if ok else body)
+ # What the open holds when it closes: the last line written, if unended.
+ if opened and mode & 3 and sent and not sent.endswith(b'\n'):
+ res.add('close-runs', path, ok)
+ return res
+
+
+def served_lines(data, sizes, room):
+ """The lines a lines file runs for `data` written in pieces of `sizes`
+ (docs/typ/reference.typ, tree.zig write): each ended line, and the unended tail of a piece
+ shorter than a Twrite holds (`room`, msize less 24), which is whole in
+ itself, as acme takes each write; a piece that fills its Twrite may go
+ on, and its tail waits for the next, and so does one of a multiple of
+ 4096 bytes, where a writer's buffer filled. A line written a byte a
+ Twrite is so as many lines as bytes."""
+ lines, pending, at = [], b'', 0
+ for size in sizes:
+ piece = data[at:at + size]
+ at += size
+ pending += piece
+ *done, pending = pending.split(b'\n')
+ lines += done
+ if pending and len(piece) < room and len(piece) % 4096 != 0:
+ lines.append(pending)
+ pending = b''
+ if pending:
+ lines.append(pending)
+ return lines
+
+
+def allowances(res, path, data, sizes, room):
+ """Errs a successful write may log (docs/typ/reference.typ): a look that finds nothing logs
+ one, per line, whether written to look, written back as an event record
+ (acme's xfid.c:842) or run as the Look builtin; an Edit block whose text
+ never ended runs, and fails, at the close."""
+ base = path.rsplit('/', 1)[-1]
+ served = served_lines(data, sizes, room)
+ lines = [line for line in served if line.strip()]
+ if base == 'look':
+ # A look's line is its text, blanks and all: one of blanks alone
+ # is a look too (docs/typ/reference.typ); only an empty one (or a lone \r) is none.
+ n = len([line for line in served if line.rstrip(b'\r')])
+ elif base == 'event':
+ n = len(lines)
+ elif base in ('exec', 'ctl', 'tagexec'):
+ n = sum(1 for line in lines if line.split()[:1] == [b'Look'])
+ if b'Edit' in data and len(lines) > 1:
+ n += 1
+ else:
+ return
+ if n:
+ res.add('allow', path, True, n)
+
+
+def open_kind(path, mode):
+ """An open the rule names: pane/new's (it makes a pane) and a truncation
+ ('every write or truncation the tree refused'); others are 'open'."""
+ if path.rstrip('/') == '/pane/new' and not mode & 3:
+ return 'open-new'
+ if mode & OTRUNC and mode & 3:
+ return 'trunc'
+ return 'open'
+
+
+def check_served_lines():
+ assert served_lines(b'a\nb\n', [4], 8000) == [b'a', b'b']
+ assert served_lines(b'ab\n', [1, 1, 1], 8000) == [b'a', b'b', b'']
+ assert served_lines(b'abcd', [2, 2], 2) == [b'abcd']
+ assert served_lines(b'ab\ncd', [3, 2], 8000) == [b'ab', b'cd']
+
+
+def chunking(spec, n, cap):
+ if n == 0:
+ return [0]
+ if spec == 'bytes':
+ return [1] * n
+ if isinstance(spec, list):
+ out, total = [], 0
+ for s in spec:
+ s = max(1, min(s, cap, n - total))
+ out.append(s)
+ total += s
+ if total >= n:
+ return out
+ while total < n:
+ s = min(cap, n - total)
+ out.append(s)
+ total += s
+ return out
+ out, total = [], 0
+ while total < n:
+ s = min(cap, n - total)
+ out.append(s)
+ total += s
+ return out
+
+
+@op_kind('read')
+def op_read(sess, op):
+ """open(path, OREAD); read from offset in chunks of count until EOF or cap."""
+ res = Result()
+ path, count, offset = op['path'], op.get('count', 8192), op.get('offset', 0)
+ w = sess.wire
+ fid, err = w.walk_names(split(path))
+ if fid is None:
+ res.add('walk', path, False, err)
+ return res
+ mode = op.get('mode', OREAD)
+ ok, body = w.call(TOPEN, struct.pack('<IB', fid, mode))
+ res.add(open_kind(path, mode), path, ok, None if ok else body)
+ if ok:
+ for _ in range(op.get('reads', 4)):
+ payload = struct.pack('<IQI', fid, offset, min(count, w.msize - 11))
+ if is_held(path):
+ ok, body = w.call_held(TREAD, payload)
+ else:
+ ok, body = w.call(TREAD, payload)
+ res.add('read', path, ok, body if ok is False else None)
+ if not ok or len(body) <= 4:
+ break
+ offset += len(body) - 4
+ ok, body = w.call(TCLUNK, struct.pack('<I', fid))
+ res.add('clunk', path, ok, None if ok else body)
+ return res
+
+
+@op_kind('stat')
+def op_stat(sess, op):
+ res = Result()
+ fid, err = sess.wire.walk_names(split(op['path']))
+ res.add('walk', op['path'], fid is not None, err)
+ if fid is not None:
+ ok, body = sess.wire.call(TSTAT, struct.pack('<I', fid))
+ res.add('stat', op['path'], ok, None if ok else body)
+ sess.wire.clunk(fid)
+ return res
+
+
+@op_kind('remove')
+def op_remove(sess, op):
+ res = Result()
+ if host_path(op['path']):
+ res.note = 'refused by guard: host tree'
+ return res
+ fid, err = sess.wire.walk_names(split(op['path']))
+ res.add('walk', op['path'], fid is not None, err)
+ if fid is not None:
+ ok, body = sess.wire.call(TREMOVE, struct.pack('<I', fid), SLOW_TIMEOUT)
+ res.add('remove', op['path'], ok, None if ok else body)
+ return res
+
+
+@op_kind('create')
+def op_create(sess, op):
+ res = Result()
+ if host_path(op['path']):
+ res.note = 'refused by guard: host tree'
+ return res
+ fid, err = sess.wire.walk_names(split(op['path']))
+ res.add('walk', op['path'], fid is not None, err)
+ if fid is not None:
+ ok, body = sess.wire.call(TCREATE, struct.pack('<I', fid) + string(dec(op['name'])) +
+ struct.pack('<IB', op.get('perm', 0o666), op.get('mode', OREAD)))
+ res.add('create', op['path'] + '/' + op['name'], ok, None if ok else body)
+ sess.wire.clunk(fid)
+ return res
+
+
+@op_kind('hold')
+def op_hold(sess, op):
+ """Open and keep a fid across later ops as handle op['h']."""
+ res = Result()
+ path, mode = op['path'], op.get('mode', OREAD)
+ if host_path(path) and mode & 3:
+ res.note = 'refused by guard: host tree'
+ return res
+ fid, err = sess.wire.walk_names(split(path))
+ if fid is None:
+ res.add('walk', path, False, err)
+ return res
+ ok, body = sess.wire.call(TOPEN, struct.pack('<IB', fid, mode))
+ res.add(open_kind(path, mode), path, ok, None if ok else body)
+ if ok:
+ sess.handles[op['h']] = [fid, path, mode, [0], b'']
+ else:
+ sess.wire.clunk(fid)
+ return res
+
+
+@op_kind('hwrite')
+def op_hwrite(sess, op):
+ res = Result()
+ h = sess.handles.get(op['h'])
+ if h is None:
+ res.note = 'no such handle'
+ return res
+ fid, path, mode, off, _ = h
+ data = dec(op['data'])[:sess.wire.msize - 23] # one Twrite
+ h[4] = data
+ ok, body = sess.wire.call(TWRITE, struct.pack('<IQI', fid, off[0], len(data)) + data,
+ SLOW_TIMEOUT if slow(data) else TIMEOUT)
+ res.add('write' if mode & 3 else 'write-badfid', path, ok, None if ok else body)
+ if ok:
+ allowances(res, path, data, [len(data)], sess.wire.msize - 24)
+ if ok:
+ off[0] += len(data)
+ return res
+
+
+@op_kind('hread')
+def op_hread(sess, op):
+ res = Result()
+ h = sess.handles.get(op['h'])
+ if h is None:
+ res.note = 'no such handle'
+ return res
+ fid, path, _, off, _ = h
+ offset = op['offset'] if op.get('offset') is not None else off[0]
+ payload = struct.pack('<IQI', fid, offset, min(op.get('count', 8192), sess.wire.msize - 11))
+ ok, body = sess.wire.call_held(TREAD, payload) if is_held(path) else sess.wire.call(TREAD, payload)
+ res.add('read', path, ok, body if ok is False else None)
+ if ok:
+ off[0] = offset + len(body) - 4
+ return res
+
+
+@op_kind('clunk')
+def op_clunk(sess, op):
+ res = Result()
+ h = sess.handles.pop(op['h'], None)
+ if h is None:
+ res.note = 'no such handle'
+ return res
+ ok, body = sess.wire.call(TCLUNK, struct.pack('<I', h[0]))
+ res.add('clunk-write' if h[2] & 3 else 'clunk', h[1], ok, None if ok else body)
+ if h[2] & 3 and h[4] and not h[4].endswith(b'\n'):
+ res.add('close-runs', h[1], ok)
+ return res
+
+
+@op_kind('restore')
+def op_restore(sess, op):
+ """Write Restore [f] to /ctl: refused with an Rerror, or the server
+ hangs up and serves the dump's panes again (docs/typ/reference.typ: a Restore hangs its
+ connection up)."""
+ res = Result()
+ data = dec(op['data'])
+ try:
+ ok, why = sess.wire.write_path('/ctl', data)
+ res.add('write', '/ctl', ok, why)
+ if ok:
+ # Taken: the hangup follows the reply.
+ try:
+ sess.wire.call(TSTAT, struct.pack('<I', 1), 2.0)
+ except (Dropped, Hang):
+ pass
+ res.hung_up = True
+ except Dropped:
+ res.add('write', '/ctl', True, None)
+ res.hung_up = True
+ if res.hung_up:
+ sess.reconnect()
+ return res
+
+
+@op_kind('host')
+def op_host(sess, op):
+ """A change on disk under the session's HOME: write or delete a file."""
+ res = Result()
+ name = op['name']
+ assert '/' not in name and name not in ('.', '..')
+ path = os.path.join(sess.home, name)
+ if op['action'] == 'rm':
+ try:
+ os.remove(path)
+ except OSError:
+ pass
+ else:
+ with open(path, 'wb') as f:
+ f.write(dec(op['data']))
+ return res
+
+
+@op_kind('seq')
+def op_seq(sess, op):
+ """Several ops as one step (e.g. clearing the window)."""
+ res = Result()
+ for sub in op['ops']:
+ r = OPS[sub['op']](sess, sub)
+ res.requests.extend(r.requests)
+ res.hung_up |= r.hung_up
+ return res
+
+
+# --------------------------------------------------------------------------
+# Input: data pools and generators (deliberately simple; swap freely).
+
+SAFE = (b'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 '
+ b'-_=+,:#^@%()\n\r\t\0')
+UNSAFE = set(b'/~$`;|&<>.\\*?![]{}\'"')
+
+
+def shell_safe(data):
+ """No path or shell metacharacters, whatever else it holds."""
+ return bytes(b for b in data if b not in UNSAFE)
+
+
+RUNES = ['é', 'é', '日本', '\U0001f600', 'Δ', ' ', '​', '\u0080', '\u009f']
+ODD = [b'', b'\n', b'\r\n', b'\0', b'\xff', b'\xfe\xff', b'\xe6\x97', b'\xc0\x80', b'\x1b[2J', b'\x7f', b'\t',
+ b'\n\n\n', b' ', b' \n']
+WORDS = [b'alpha', b'beta', b'foo', b'bar', b'x', b'hello', b'zz', b'0', b'1', b'-1', b'99999999999',
+ b'on', b'off', b'follow', b'follow new', b'lock', b'unlock', b'clean', b'dirty', b'show',
+ b'dot=addr', b'addr=dot', b'limit=addr', b'nomark', b'mark', b'get', b'put', b'del', b'delete',
+ b'name', b'cleartag', b'answer', b'answer -', b'size 80 24', b'size 20 6', b'size 5000 5000',
+ b'winsize 80 24', b'winsize 0 0', b'sig INT', b'sig TERM', b'sig HUP', b'sig KILL', b'sig BOGUS',
+ b'exec', b'Placement acme', b'Placement pardes', b'Wrap on', b'Wrap off']
+SHELL_LINES = [b'true', b'false', b'echo hi', b'echo m9p', b'sleep 1', b'ls', b'cat nonexist',
+ b'printf abc', b'exit 3', b'seq 1 2000', b'yes | head -n 3000', b'date', b'pwd', b'env | wc']
+DENY = {'Exit', 'Attach', 'Detach', 'Mount', 'Unmount', 'Tty9p', 'ClipYank', 'ClipYankMain', 'ClipPaste',
+ 'ClipPasteBefore', 'ClipReplace', 'Shell', 'ThemeFile', 'EffectCode', 'Help', 'Tutor', 'Changelog',
+ 'Rename', 'Hover', 'CodeAction', 'SelectRefs', 'Symbols', 'Diagnostics', 'WsDiagnostics', 'Callers',
+ 'Callees', 'Supertypes', 'Subtypes', 'WsSymbols', 'Lspinfo', 'Lspwhy', 'Restore'}
+BUILTINS = ['Look', 'Exec', 'Kill', 'Dump', 'Msg', 'NextColor', 'Themes', 'DumpThemes', 'TreeContext', 'PdfFit',
+ 'PdfTint', 'PdfSections', 'Petscii', 'Palette', 'Ascii', 'Save', 'New', 'Newcol', 'Del', 'Filter',
+ 'Mode', 'Togglettymode', 'Edit', 'Undo', 'Redo', 'Collapse', 'Delcol', 'DelAbove', 'DelBelow', 'Tty',
+ 'Repl', 'Joincol', 'Config', 'LocationsConfig', 'Messages', 'Mini', 'Find', 'Grep', 'Left', 'Down',
+ 'Up', 'Right', 'Back', 'Forward', 'Last', 'Recent', 'Jumplist', 'Colors', 'Wrap', 'Tagbottom', 'Debug',
+ 'FocusTint', 'Verbose', 'Motion', 'InactiveDim', 'DumpDir', 'Theme', 'Placement', 'BootShell',
+ 'LookWord', 'Get', 'Put', 'Undo', 'Redo', 'Zerox', 'Snarf', 'Paste', 'Cut', 'Sort', 'Font', 'Local']
+PANE_FILES = ['name', 'body', 'tag', 'ctl', 'addr', 'dot', 'limit', 'data', 'xdata', 'sel', 'dirty', 'mark',
+ 'scroll', 'errors', 'event', 'look', 'exec', 'tagexec', 'pty', 'pty/run', 'pty/data', 'pty/ctl',
+ 'pty/status']
+ROOT_FILES = ['README', 'index', 'status', 'focus', 'ctl', 'commands', 'recent', 'look', 'exec', 'log', 'screen',
+ 'listeners', 'layout', 'tag', 'tagexec', 'pane', 'pane/new', 'col', '']
+COL_FILES = ['tag', 'ctl', 'exec']
+WRITABLE = ['ctl', 'exec', 'look', 'tag', 'tagexec', 'focus', 'body', 'data', 'xdata', 'addr', 'dot', 'limit',
+ 'name', 'sel', 'dirty', 'mark', 'scroll', 'errors', 'event', 'pty/run', 'pty/data', 'pty/ctl', 'log']
+
+
+class Ctx:
+ """What the generators and invariants see."""
+
+ def __init__(self, seed):
+ self.seed = seed
+ self.rng = random.Random(seed)
+ self.sess = None
+ self.step = 0
+ self.serials = []
+ self.cols = []
+ self.gone = [] # serials seen and since closed (stale)
+ self.next_h = 0
+ self.last_index = b''
+ self.verbose = False
+
+
+def pick_serial(ctx, rng):
+ """A live pane as a token, {pN}: the Nth serial of /index (mod its
+ length) when the op runs, so a shrunk replay still names a pane that
+ exists; or a stale or impossible serial, literally."""
+ r = rng.random()
+ if ctx.serials and r < 0.85:
+ return '{p%d}' % rng.randrange(64)
+ if ctx.gone and r < 0.95:
+ return rng.choice(ctx.gone)
+ return rng.choice([0, 1, 999, 4294967295, 4294967296, -1])
+
+
+def pick_col(ctx, rng):
+ if ctx.cols and rng.random() < 0.85:
+ return '{c%d}' % rng.randrange(16)
+ return rng.choice([0, 99, 4294967295])
+
+
+def odd_bytes(rng, n):
+ out = bytearray()
+ while len(out) < n:
+ r = rng.random()
+ if r < 0.5:
+ out += rng.choice(WORDS)
+ elif r < 0.7:
+ out += rng.choice(RUNES).encode()
+ elif r < 0.9:
+ out += rng.choice(ODD)
+ else:
+ out.append(rng.randrange(256))
+ if rng.random() < 0.5:
+ out += b' '
+ return bytes(out[:n])
+
+
+def payload(rng, maxlen=64):
+ """Plain or odd bytes, sometimes huge, with or without a newline."""
+ r = rng.random()
+ if r < 0.35:
+ data = rng.choice(WORDS)
+ elif r < 0.55:
+ data = odd_bytes(rng, rng.randrange(0, maxlen))
+ elif r < 0.62:
+ data = rng.choice(ODD)
+ elif r < 0.66:
+ data = (rng.choice(WORDS) + b' ') * rng.randrange(100, 20000) # huge
+ elif r < 0.7:
+ data = b'x' * rng.choice([255, 256, 1023, 1024, 1025, 65535, 65536, 70000])
+ else:
+ data = rng.choice(WORDS) + b' ' + odd_bytes(rng, rng.randrange(0, 12))
+ if rng.random() < 0.6 and not data.endswith(b'\n'):
+ data += rng.choice([b'\n', b'\n', b'\r\n', b'\n\n'])
+ return shell_safe(data)
+
+
+def weird_name(rng):
+ r = rng.random()
+ if r < 0.3:
+ return 'x' * rng.choice([255, 256, 300, 1000])
+ if r < 0.5:
+ return rng.choice(['..', '.', '', ' ', 'new', 'NEW', '01', '1 ', '\n', 'a\0b'])
+ if r < 0.7:
+ return enc(rng.choice(RUNES).encode())
+ return enc(bytes(rng.randrange(1, 256) for _ in range(rng.randrange(1, 20))).replace(b'/', b'_'))
+
+
+def random_path(ctx, rng, writable=False):
+ r = rng.random()
+ if r < 0.6:
+ f = rng.choice(WRITABLE if writable else PANE_FILES)
+ return f'/pane/{pick_serial(ctx, rng)}/{f}'
+ if r < 0.75:
+ f = rng.choice(['ctl', 'exec', 'look', 'tag', 'tagexec', 'focus', 'log'] if writable else ROOT_FILES)
+ return '/' + f
+ if r < 0.85:
+ return f'/col/{pick_col(ctx, rng)}/{rng.choice(COL_FILES)}'
+ if r < 0.93:
+ return f'/pane/{pick_serial(ctx, rng)}/{weird_name(rng)}'
+ return '/' + '/'.join(weird_name(rng) for _ in range(rng.randrange(1, 4)))
+
+
+def data_for(ctx, rng, path):
+ """Payload a file is likely to take, often mutated."""
+ base = path.rsplit('/', 1)[-1]
+ r = rng.random()
+ if r < 0.25:
+ return payload(rng)
+ if base in ('addr', 'dot', 'limit', 'sel'):
+ return address(rng)
+ if base == 'ctl' and path.endswith('pty/ctl'):
+ return rng.choice([b'sig INT\n', b'sig TERM\n', b'sig HUP\n', b'sig QUIT\n', b'sig KILL\n',
+ b'winsize 80 24\n', b'winsize 1 1\n', b'winsize 99999 3\n', b'exec\n', b'sig\n'])
+ if base in ('ctl', 'exec', 'tagexec'):
+ return builtin_line(ctx, rng, path)
+ if base == 'run':
+ return shell_safe(rng.choice(SHELL_LINES)) + b'\n'
+ if base == 'data' and '/pty/' in path:
+ return shell_safe(rng.choice(SHELL_LINES)) + rng.choice([b'\r', b'\n', b'', b'\x03', b'\x04'])
+ if base == 'event':
+ return event_record(rng)
+ if base == 'focus':
+ return str(pick_serial(ctx, rng)).encode() + rng.choice([b'\n', b''])
+ if base == 'look':
+ return shell_safe(rng.choice([b'alpha', b'alpha.txt', b'alpha.txt:2', b'utf8.txt:#3', b'nothere',
+ b'bad.txt', b'crlf.txt:1', b'gamma', b'beta'])) + b'\n'
+ if base in ('dirty', 'mark', 'scroll'):
+ return rng.choice([b'0', b'1', b'0\n', b'1\n', b'2\n', b'', b'yes\n'])
+ if base == 'log':
+ return rng.choice([b'follow\n', b'follow new\n', b'follow', b'nope\n'])
+ return payload(rng, 200)
+
+
+def mutate(rng, data, rounds=None):
+ data = bytearray(data)
+ for _ in range(rounds or rng.randrange(1, 4)):
+ if not data:
+ data += rng.choice(WORDS)
+ continue
+ i = rng.randrange(len(data))
+ r = rng.random()
+ if r < 0.3:
+ del data[i]
+ elif r < 0.55:
+ data[i:i] = shell_safe(rng.choice(ODD) or b'\0')
+ elif r < 0.75:
+ j = rng.randrange(i, len(data) + 1)
+ data[i:i] = data[i:j]
+ else:
+ data[i:i] = rng.choice(RUNES).encode()
+ return bytes(data)
+
+
+def builtin_line(ctx, rng, path):
+ word = rng.choice(BUILTINS).encode()
+ r = rng.random()
+ if r < 0.4:
+ line = word
+ elif r < 0.7:
+ line = word + b' ' + rng.choice(WORDS)
+ elif r < 0.8:
+ line = b'Edit ' + edit_command(rng)
+ return line + b'\n' # Edit text keeps its / delimiters
+ else:
+ line = mutate(rng, word + b' ' + rng.choice(WORDS))
+ if rng.random() < 0.1:
+ line = shell_safe(rng.choice(SHELL_LINES))
+ if rng.random() < 0.8:
+ line += b'\n'
+ return shell_safe(line)
+
+
+# sam's commands without the ones that reach files or shells.
+EDIT_TEXT = b'abcdghijklmopqstuvxyz0123456789 ACEGHIJKLMNOPQRSTUVWXYZ_-'
+
+
+def edit_text(rng):
+ s = bytes(rng.choice(EDIT_TEXT) for _ in range(rng.randrange(0, 8)))
+ if rng.random() < 0.3:
+ s += rng.choice(RUNES).encode()
+ return s
+
+
+def regex(rng):
+ parts = [edit_text(rng) or b'a']
+ for _ in range(rng.randrange(0, 4)):
+ parts.append(rng.choice([b'(a|b)', b'^', b'$', b'[a-z]', b'[^ ]', b'.*', b'\\n',
+ '[é日]'.encode(), b'x+', b'(', b'[', b'\\', b'a**',
+ b'(((a)))', b'[z-a]', (b'a|' * rng.randrange(1, 300)) + b'b']))
+ parts.append(edit_text(rng))
+ return b''.join(parts)
+
+
+def address(rng):
+ """sam addresses: valid, near-valid and garbage."""
+ simple = [b'0', b'$', b'.', b',', b';', b'#0', b'#3', b'#99999', b'1', b'2', b'3:2', b'1:1', b'0:0',
+ b'#1,#2', b'1,$', b'2,1', b'-', b'+', b'-1', b'+2', b'#-1', b'99999', b'1:99', b'?a?']
+ r = rng.random()
+ if r < 0.4:
+ a = rng.choice(simple)
+ elif r < 0.7:
+ a = b'/' + regex(rng) + b'/'
+ elif r < 0.85:
+ a = rng.choice(simple) + rng.choice([b',', b';', b'+', b'-']) + rng.choice(simple + [b'/a/'])
+ else:
+ a = mutate(rng, rng.choice(simple) + b'/' + regex(rng) + b'/')
+ return a + rng.choice([b'', b'\n'])
+
+
+def edit_command(rng):
+ t = lambda: edit_text(rng) # noqa: E731
+ cmds = [lambda: b',x/' + regex(rng) + b'/c/' + t() + b'/',
+ lambda: b's/' + regex(rng) + b'/' + t() + b'/g',
+ lambda: b'a/' + t() + b'/',
+ lambda: b'i/' + t() + b'/',
+ lambda: b'c/' + t() + b'/',
+ lambda: b'd',
+ lambda: b',d',
+ lambda: b',y/' + regex(rng) + b'/d',
+ lambda: b',x/' + regex(rng) + b'/g/' + regex(rng) + b'/d',
+ lambda: b',x/' + regex(rng) + b'/v/' + regex(rng) + b'/c/' + t() + b'/',
+ lambda: b'1,2m$',
+ lambda: b'1t0',
+ lambda: b'k',
+ lambda: b'p',
+ lambda: b'=',
+ lambda: b'u',
+ lambda: b'{\na/' + t() + b'/\ni/' + t() + b'/\n}',
+ lambda: b',x/\\n/a/' + t() + b'/',
+ lambda: b'0,$s/' + regex(rng) + b'/&&/g']
+ cmd = rng.choice(cmds)()
+ if rng.random() < 0.4:
+ cmd = address(rng).rstrip(b'\n') + cmd
+ if rng.random() < 0.2:
+ cmd = mutate(rng, cmd)
+ # Mutation never introduces a banned command letter or shell char.
+ cmd = bytes(b for b in cmd if b not in b'werfbBDn!<>|')
+ return cmd
+
+
+def event_record(rng):
+ origin = rng.choice(b'EFKMZ')
+ action = rng.choice(b'xXlLiIdDZ')
+ q0, q1 = rng.choice([0, 1, 5, 10]), rng.choice([0, 2, 7, 1 << 40, -1])
+ rec = bytes([origin, action]) + f'{q0} {q1} {rng.choice([0, 1, 2, 8])} '.encode()
+ text = shell_safe(edit_text(rng))
+ rec += str(len(text)).encode() + b' ' + text + b'\n'
+ if rng.random() < 0.3:
+ rec = mutate(rng, rec)
+ return shell_safe(rec)
+
+
+def new_handle(ctx):
+ ctx.next_h += 1
+ return f'h{ctx.next_h}'
+
+
+@generator(30)
+def gen_write(ctx, rng):
+ path = random_path(ctx, rng, writable=True)
+ data = data_for(ctx, rng, path)
+ mode = rng.choice([OWRITE, OWRITE, ORDWR, OWRITE | OTRUNC, ORDWR | OTRUNC, OREAD])
+ r = rng.random()
+ chunks = 'bytes' if r < 0.08 and len(data) <= 64 else (
+ [rng.randrange(1, 16) for _ in range(4)] if r < 0.15 else 'whole')
+ op = {'op': 'write', 'path': path, 'data': enc(data), 'mode': mode, 'chunks': chunks}
+ if rng.random() < 0.05:
+ op['offset'] = rng.choice([1, 100, 1 << 40])
+ return op
+
+
+@generator(14)
+def gen_read(ctx, rng):
+ path = random_path(ctx, rng)
+ return {'op': 'read', 'path': path, 'count': rng.choice([1, 2, 7, 64, 200, 8192, 1 << 20]),
+ 'offset': rng.choice([0, 0, 0, 1, 3, 100, 1 << 33]), 'reads': rng.choice([1, 2, 8])}
+
+
+@generator(4)
+def gen_stat(ctx, rng):
+ path = random_path(ctx, rng)
+ if rng.random() < 0.2:
+ path = '/os/' + rng.choice(['etc', 'etc/hosts', 'nonexistent', 'x' * 300])
+ return {'op': 'stat', 'path': path}
+
+
+@generator(5)
+def gen_newpane(ctx, rng):
+ if rng.random() < 0.7:
+ return {'op': 'read', 'path': '/pane/new', 'count': 64, 'reads': 1}
+ return {'op': 'hold', 'h': new_handle(ctx), 'path': '/pane/new', 'mode': rng.choice([OREAD, ORDWR])}
+
+
+@generator(2)
+def gen_remove(ctx, rng):
+ r = rng.random()
+ if r < 0.6:
+ path = f'/pane/{pick_serial(ctx, rng)}'
+ elif r < 0.85:
+ path = f'/col/{pick_col(ctx, rng)}'
+ else:
+ path = random_path(ctx, rng)
+ return {'op': 'remove', 'path': path}
+
+
+@generator(2)
+def gen_create(ctx, rng):
+ where = rng.choice(['/col', '/pane', '/', f'/pane/{pick_serial(ctx, rng)}'])
+ return {'op': 'create', 'path': where, 'name': weird_name(rng) if rng.random() < 0.5 else 'new',
+ 'perm': rng.choice([0o666, DMDIR | 0o777]), 'mode': rng.choice([OREAD, OWRITE])}
+
+
+@generator(2)
+def gen_clear_window(ctx, rng):
+ """Down to the empty window (every pane closed), sometimes rebuilt."""
+ keep = rng.choice(ctx.serials) if ctx.serials and rng.random() < 0.8 else None
+ ops = [{'op': 'remove', 'path': f'/pane/{s}'} for s in ctx.serials if s != keep]
+ if rng.random() < 0.5:
+ ops += [{'op': 'remove', 'path': f'/col/{c}'} for c in ctx.cols]
+ if rng.random() < 0.6:
+ ops.append({'op': 'read', 'path': '/pane/new', 'count': 64, 'reads': 1})
+ return {'op': 'seq', 'ops': ops}
+
+
+@generator(6)
+def gen_hold(ctx, rng):
+ held = [h for h in (ctx.sess.handles if ctx.sess else {})]
+ r = rng.random()
+ if not held or r < 0.35:
+ path = random_path(ctx, rng)
+ if rng.random() < 0.3:
+ path = rng.choice(['/log', f'/pane/{pick_serial(ctx, rng)}/event', '/screen', '/index',
+ f'/pane/{pick_serial(ctx, rng)}/ctl'])
+ return {'op': 'hold', 'h': new_handle(ctx), 'path': path, 'mode': rng.choice([OREAD, ORDWR, OWRITE])}
+ h = rng.choice(held)
+ path = ctx.sess.handles[h][1]
+ if r < 0.6:
+ return {'op': 'hwrite', 'h': h, 'data': enc(data_for(ctx, rng, path))}
+ if r < 0.85:
+ return {'op': 'hread', 'h': h, 'count': rng.choice([1, 16, 8192]),
+ 'offset': rng.choice([None, None, 0, 5])}
+ return {'op': 'clunk', 'h': h}
+
+
+@generator(6)
+def gen_shell(ctx, rng):
+ s = pick_serial(ctx, rng)
+ line = shell_safe(rng.choice(SHELL_LINES))
+ r = rng.random()
+ if r < 0.25:
+ return {'op': 'write', 'path': f'/pane/{s}/ctl', 'data': enc(b'Tty\n'), 'mode': OWRITE}
+ if r < 0.45:
+ return {'op': 'write', 'path': f'/pane/{s}/pty/run', 'data': enc(line + b'\n'), 'mode': ORDWR}
+ if r < 0.6:
+ return {'op': 'write', 'path': f'/pane/{s}/pty/data', 'data': enc(line + b'\r'), 'mode': OWRITE}
+ if r < 0.75:
+ return {'op': 'write', 'path': f'/pane/{s}/pty/ctl',
+ 'data': enc(rng.choice([b'sig INT\n', b'sig TERM\n', b'sig KILL\n', b'sig HUP\n'])), 'mode': OWRITE}
+ return {'op': 'write', 'path': rng.choice(['/exec', f'/pane/{s}/exec']), 'data': enc(line + b'\n'),
+ 'mode': OWRITE}
+
+
+@generator(6)
+def gen_edit(ctx, rng):
+ s = pick_serial(ctx, rng)
+ path = rng.choice([f'/pane/{s}/ctl', f'/pane/{s}/exec', '/exec'])
+ return {'op': 'write', 'path': path, 'data': enc(b'Edit ' + edit_command(rng) + b'\n'), 'mode': OWRITE}
+
+
+@generator(8)
+def gen_addr(ctx, rng):
+ s = pick_serial(ctx, rng)
+ ops = [{'op': 'write', 'path': f'/pane/{s}/addr', 'data': enc(address(rng)), 'mode': OWRITE}]
+ r = rng.random()
+ if r < 0.4:
+ ops.append({'op': 'read', 'path': f'/pane/{s}/{rng.choice(["xdata", "data", "addr", "dot"])}',
+ 'count': 8192, 'reads': 2})
+ elif r < 0.7:
+ ops.append({'op': 'write', 'path': f'/pane/{s}/{rng.choice(["data", "xdata"])}',
+ 'data': enc(payload(rng, 20)), 'mode': rng.choice([OWRITE, OWRITE | OTRUNC])})
+ return {'op': 'seq', 'ops': ops}
+
+
+@generator(3)
+def gen_tag(ctx, rng):
+ path = rng.choice([f'/pane/{pick_serial(ctx, rng)}/tag', '/tag', f'/col/{pick_col(ctx, rng)}/tag'])
+ return {'op': 'write', 'path': path, 'data': enc(payload(rng, 40)),
+ 'mode': rng.choice([OWRITE, OWRITE | OTRUNC])}
+
+
+@generator(3)
+def gen_event(ctx, rng):
+ s = pick_serial(ctx, rng)
+ return {'op': 'hold', 'h': new_handle(ctx), 'path': f'/pane/{s}/event', 'mode': ORDWR}
+
+
+@generator(2)
+def gen_dump_restore(ctx, rng):
+ r = rng.random()
+ if r < 0.5:
+ return {'op': 'write', 'path': '/ctl', 'data': enc(rng.choice([b'Dump\n', b'Dump', b'Dump m9pdump\n'])),
+ 'mode': OWRITE}
+ return {'op': 'restore', 'data': enc(rng.choice([b'Restore\n', b'Restore\n', b'Restore m9pdump\n',
+ b'Restore nothere\n']))}
+
+
+@generator(3)
+def gen_host(ctx, rng):
+ name = rng.choice(list(FIXTURES) + ['fresh.txt'])
+ if rng.random() < 0.5:
+ return {'op': 'host', 'action': 'rm', 'name': name}
+ return {'op': 'host', 'action': 'write', 'name': name, 'data': enc(payload(rng, 100))}
+
+
+@generator(3)
+def gen_look_fixture(ctx, rng):
+ name = rng.choice(list(FIXTURES) + ['fresh.txt'])
+ suffix = rng.choice([b'', b':2', b':#4', b':1:3', b':/beta/'])
+ return {'op': 'write', 'path': rng.choice(['/look', f'/pane/{pick_serial(ctx, rng)}/look']),
+ 'data': enc(name.encode() + suffix + b'\n'), 'mode': OWRITE}
+
+
+# --------------------------------------------------------------------------
+# Log window: the records one step caused, between two unique markers.
+
+MARK = re.compile(r'unknown control message "(m9p-mark-\d+)"')
+
+
+def write_marker(sess, step):
+ """An unknown ctl word logs `err - ctl: unknown control message "<word>"`."""
+ word = f'm9p-mark-{step}'
+ ok, why = sess.wire.write_path('/ctl', word.encode() + b'\n')
+ if ok:
+ return None, 'marker write was taken'
+ prev, sess.marker = sess.marker, word
+ if sess.follower is not None:
+ end = sess.follower.wait_for(f'"{word}"')
+ if end is None:
+ return None, 'marker record never reached the follower'
+ lines = sess.follower.lines[:end]
+ start = 0
+ if prev is not None:
+ for i in range(len(lines) - 1, -1, -1):
+ if f'"{prev}"' in lines[i]:
+ start = i + 1
+ break
+ else:
+ return None, None
+ window = lines[start:]
+ del sess.follower.lines[:end]
+ return window, None
+ lines = sess.wire.read_path('/log').decode(errors='replace').splitlines()
+ end = next((i for i in range(len(lines) - 1, -1, -1) if f'"{word}"' in lines[i]), None)
+ if end is None:
+ return None, 'marker record missing from /log'
+ if prev is None:
+ return None, None
+ start = next((i for i in range(end - 1, -1, -1) if f'"{prev}"' in lines[i]), None)
+ if start is None:
+ return None, None # the ring moved past it
+ return lines[start + 1:end], None
+
+
+COUNT = re.compile(r'^(.*) \(x(\d+)\)$')
+
+
+def occurrences(lines, kind):
+ """Records of `kind` (err|msg), counting `(xN)` repeats (docs/typ/reference.typ: a record said
+ again is counted; a follower sees each count as a line of its own)."""
+ out, last_text, last_n = [], None, 0
+ for line in lines:
+ if not line.startswith(kind + ' '):
+ last_text = None
+ continue
+ m = COUNT.match(line)
+ text, n = (m.group(1), int(m.group(2))) if m else (line, 1)
+ if text == last_text:
+ new = n - last_n
+ else:
+ new = n
+ out.extend([text] * max(new, 0))
+ last_text, last_n = text, n
+ return out
+
+
+# --------------------------------------------------------------------------
+# Invariants: small, cheap, each with its doc citation.
+
+@invariant
+def alive(ctx, res):
+ """Never crashes or panics (src/crash.zig: a panic leaves its crash file)."""
+ if not ctx.sess.alive():
+ return f'pardes died (exit {ctx.sess.proc.returncode})'
+ if ctx.sess.has_crash_file():
+ return 'crash file written: ' + ctx.sess.crash_text()[-2000:]
+ return None
+
+
+@invariant
+def one_failure_rule(ctx, res):
+ """docs/typ/reference.typ 'One rule for what fails': a write fails whenever what it asked
+ for fails ... and logs its reason exactly once, as `err <serial|-> <file>:
+ <why>`, with no `msg` for it. What is not a failure: a look that finds
+ nothing answers nothing and logs one `err`, the write succeeding."""
+ if res.window is None or res.hung_up:
+ return None
+ writes = res.writes()
+ # The rule is a write's: a refused open (pane/new's and an OTRUNC one
+ # too), create or remove logs no err, nor does a write to pane/new
+ # (`permission denied`: it is only read).
+ failed = [w for w in writes if w[2] is False and w[0] in ('write', 'clunk-write')
+ and w[1].rstrip('/') != '/pane/new']
+ errs = occurrences(res.window, 'err')
+ msgs = occurrences(res.window, 'msg')
+ # Allowed only the Twrites that succeeded (allowances): a failed one
+ # logs its one err.
+ allowed = sum(r[3] for r in res.requests if r[0] == 'allow')
+ # docs/typ/reference.typ 'A write of command lines ... what is left when it closes runs at
+ # the close ... and its failure is in the log alone'.
+ closes = [r for r in res.requests if r[0] == 'close-runs']
+ lo, hi = len(failed), len(failed) + allowed + len(closes)
+ if not lo <= len(errs) <= hi:
+ return (f'{len(failed)} failed write(s) logged {len(errs)} err record(s) '
+ f'(allowed {lo}..{hi}); failed={[(w[0], w[1], w[3]) for w in failed]} window={res.window}')
+ # A msg is a failed write's only when no Twrite of the op succeeded: a
+ # line cut across Twrites runs a piece a Twrite, and a piece that ran
+ # (a Save) says so while a later one is refused.
+ succeeded = [w for w in writes if w[2] is True and w[0] == 'write']
+ # A file watch's notice (`<file> deleted on disk ...`, `changed on
+ # disk`, a stamped `reloaded <file>` or `reloaded theme`) is the host's
+ # news, said whenever it arrives: no write's.
+ msgs = [m for m in msgs if ' deleted on disk (' not in m and ' changed on disk (' not in m and ' reloaded ' not in m]
+ if failed and msgs and not succeeded:
+ return f'a failed write also logged msg: {msgs}; failed={[(w[1], w[3]) for w in failed]}'
+ return None
+
+
+LINE_FILES = ('look', 'exec', 'tagexec', 'ctl')
+
+
+@invariant
+def close_runs_only_line_files(ctx, res):
+ """docs/typ/reference.typ: 'A write of command lines -- to look, exec, tagexec, a ctl of the
+ root, a pane or a column, or a column's exec -- runs each line once it is
+ whole ... what is left when it closes runs at the close'. Another file
+ that fails only at its close breaks 'a write fails whenever what it asked
+ for fails' (or the list is short)."""
+ if res.window is None:
+ return None
+ closes = [r[1] for r in res.requests if r[0] == 'close-runs']
+ failed_files = {w[1].rsplit('/', 1)[-1] for w in res.writes() if w[2] is False}
+ for line in occurrences(res.window, 'err'):
+ m = re.match(r'err \S+ ([^:]+):', line)
+ if not m:
+ continue
+ name = m.group(1).rsplit('/', 1)[-1]
+ if name in LINE_FILES or name in failed_files:
+ continue
+ for path in closes:
+ if path.rsplit('/', 1)[-1] == name:
+ return f'a write to {name} with no newline was answered, then failed at the close: {line}'
+ return None
+
+
+@invariant
+def index_matches_pane_dirs(ctx, res):
+ """docs/typ/reference.typ /index: one line per pane; /pane/<n>/ each pane's directory."""
+ w = ctx.sess.wire
+ first = w.read_path('/index')
+ fid, err = w.walk_names([b'pane'])
+ if fid is None:
+ return f'walking /pane failed: {err}'
+ ok, _ = w.call(TOPEN, struct.pack('<IB', fid, OREAD))
+ names = dir_names(w.read_all(fid))
+ w.clunk(fid)
+ second = w.read_path('/index')
+ ctx.last_index = second
+ serials = []
+ for line in second.decode(errors='replace').splitlines():
+ try:
+ serials.append(int(line.split()[0]))
+ except (IndexError, ValueError):
+ return f'/index line unparsable: {line!r}'
+ old = set(ctx.serials)
+ ctx.serials = serials
+ ctx.gone = sorted(set(ctx.gone) | (old - set(serials)))[-20:]
+ if first != second:
+ return None # it changed between the reads; no claim
+ dirs = sorted(int(n) for n in names if n.isdigit())
+ extra = [n for n in names if not n.isdigit() and n != 'new']
+ if extra:
+ return f'/pane lists non-serial entries {extra}'
+ if sorted(serials) != dirs:
+ return f'/index serials {sorted(serials)} != /pane dirs {dirs}'
+ return None
+
+
+LISTINGS = ['/index', '/layout', '/', '/pane', '/col', '/pane/{s}', '/status', '/commands', '/pane/{s}/tag',
+ '/recent', '/README']
+
+
+@invariant
+def chunked_equals_whole(ctx, res):
+ """9P read(5): reads at successive offsets see the one file; a listing read
+ in chunks equals one read whole within the same open."""
+ w = ctx.sess.wire
+ path = LISTINGS[ctx.step % len(LISTINGS)]
+ if '{s}' in path:
+ if not ctx.serials:
+ return None
+ path = path.format(s=ctx.serials[ctx.step % len(ctx.serials)])
+ fid, err = w.walk_names(split(path))
+ if fid is None:
+ return None # gone since
+ try:
+ ok, body = w.call(TOPEN, struct.pack('<IB', fid, OREAD))
+ if not ok:
+ return None
+ whole = w.read_all(fid)
+ isdir = path in ('/', '/pane', '/col') or path.count('/') == 2 and path.startswith('/pane/')
+ size = 128 + (ctx.step * 37) % 900 if isdir else 1 + (ctx.step * 7) % 50
+ chunked = w.read_all(fid, count=size)
+ if isdir:
+ whole_n, chunk_n = dir_names(whole), dir_names(chunked)
+ if whole_n != chunk_n:
+ return f'{path}: whole {whole_n} != chunked({size}) {chunk_n}'
+ elif whole != chunked and w.read_all(fid) != chunked:
+ # A live file (a tag says `running`, then `exit 0`) may change
+ # between the two reads: only chunks that no whole read matches,
+ # read again, are a chunking fault.
+ return f'{path}: whole {whole[:200]!r} != chunked({size}) {chunked[:200]!r}'
+ finally:
+ w.clunk(fid)
+ return None
+
+
+# --------------------------------------------------------------------------
+# Runner.
+
+class Failure(Exception):
+ def __init__(self, kind, why, step):
+ super().__init__(f'{kind}: {why}')
+ self.kind, self.why, self.step = kind, why, step
+
+ def signature(self):
+ """What makes two failures the same bug: the kind, and the message with
+ numbers, quoted words and pane paths blurred."""
+ why = re.sub(r'"[^"]*"', '""', self.why)
+ why = re.sub(r"'[^']*'", "''", why) if 'window=' not in why else why
+ why = re.sub(r'/home/\S*', 'PATH', why)
+ return self.kind + ':' + re.sub(r'\d+', 'N', why)[:300]
+
+
+def check_death(sess, step, what):
+ """After an error: did pardes quit cleanly (Ended), or die (Failure)?"""
+ deadline = time.monotonic() + 1.0
+ while sess.alive() and time.monotonic() < deadline:
+ time.sleep(0.02)
+ if sess.alive():
+ return
+ if sess.proc.returncode == 0 and not sess.has_crash_file():
+ raise Ended(what)
+ raise Failure('crash', f'{what}: pardes exit {sess.proc.returncode} ' + sess.crash_text()[:3000], step)
+
+
+TOKEN = re.compile(r'\{([pc])(\d+)\}')
+
+
+def resolve(ctx, op):
+ """Replace {pN}/{cN} in an op's paths with live serials."""
+ def sub(m):
+ live = ctx.serials if m.group(1) == 'p' else ctx.cols
+ return str(live[int(m.group(2)) % len(live)]) if live else '0'
+ out = dict(op)
+ if 'path' in out:
+ out['path'] = TOKEN.sub(sub, out['path'])
+ if 'ops' in out:
+ out['ops'] = [resolve(ctx, o) for o in out['ops']]
+ if 'data' in out and '/focus' in out.get('path', ''):
+ out['data'] = TOKEN.sub(sub, out['data'])
+ return out
+
+
+def run_step(ctx, op):
+ """Run one op and every invariant. Raises Failure or Ended."""
+ sess = ctx.sess
+ op = resolve(ctx, op)
+ ctx.last_op = op
+ what = f'{op["op"]} {op.get("path", "")}'.strip()
+ try:
+ res = OPS[op['op']](sess, op)
+ except Hang as why:
+ check_death(sess, ctx.step, what)
+ raise Failure('hang', f'{what}: {why}', ctx.step)
+ except Dropped as why:
+ check_death(sess, ctx.step, what)
+ raise Failure('dropped', f'{what}: {why}', ctx.step)
+ res.window = None
+ try:
+ if not sess.alive():
+ check_death(sess, ctx.step, what)
+ # Liveness: a trivial request answers within the timeout.
+ ok, _ = sess.wire.call(TSTAT, struct.pack('<I', 1))
+ window, why = write_marker(sess, ctx.step)
+ if why:
+ raise Failure('log', why, ctx.step)
+ res.window = None if res.hung_up else window
+ if ctx.verbose:
+ print(f' op {ctx.step}: {json.dumps(op)[:300]}')
+ for r in res.requests:
+ print(f' {r[0]} {r[1]!r} -> {"ok" if r[2] else ("held" if r[2] is None else "Rerror")}'
+ f'{": " + str(r[3]) if r[3] else ""}')
+ for line in window or []:
+ print(f' log: {line}')
+ for check in INVARIANTS:
+ problem = check(ctx, res)
+ if problem:
+ raise Failure(check.__name__, problem, ctx.step)
+ # The column list, for the generators.
+ fid, err = sess.wire.walk_names([b'col'])
+ if fid is not None:
+ sess.wire.call(TOPEN, struct.pack('<IB', fid, OREAD))
+ ctx.cols = [int(n) for n in dir_names(sess.wire.read_all(fid)) if n.isdigit()]
+ sess.wire.clunk(fid)
+ except Hang as why:
+ check_death(sess, ctx.step, what)
+ raise Failure('hang', f'after {what}: {why}', ctx.step)
+ except Dropped as why:
+ check_death(sess, ctx.step, what)
+ raise Failure('dropped', f'after {what}: {why}', ctx.step)
+ except Failure as f:
+ # An invariant that failed because pardes was quitting is not one.
+ check_death(sess, ctx.step, what)
+ raise f
+ except OSError as why:
+ check_death(sess, ctx.step, what)
+ raise Failure('checker', f'after {what}: {why}', ctx.step)
+ return res
+
+
+class Runner:
+ def __init__(self, args):
+ self.args = args
+ self.out = args.out
+ os.makedirs(os.path.join(self.out, 'bugs'), exist_ok=True)
+ os.makedirs(os.path.join(self.out, 'runs'), exist_ok=True)
+
+ def new_session(self, ctx, follower, run_dir):
+ if ctx.sess is not None:
+ ctx.sess.close()
+ ctx.sess = Session(self.args.binary, run_dir, follower)
+ ctx.serials, ctx.cols, ctx.gone = [], [], []
+ idx = ctx.sess.wire.read_path('/index')
+ ctx.serials = [int(line.split()[0]) for line in idx.decode(errors='replace').splitlines() if line]
+
+ def execute(self, ops, run_dir, ctx=None, log=None, stop_on_failure=True, verbose=False):
+ """Run concrete ops (a replay). Returns the first Failure or None."""
+ ctx = ctx or Ctx(0)
+ ctx.verbose = verbose
+ failure = None
+ try:
+ for i, op in enumerate(ops):
+ ctx.step = i
+ if op['op'] == 'fresh':
+ self.new_session(ctx, op.get('follower', False), run_dir)
+ continue
+ if ctx.sess is None:
+ self.new_session(ctx, False, run_dir)
+ try:
+ run_step(ctx, op)
+ except Ended:
+ ctx.sess.close()
+ ctx.sess = None
+ except Failure as f:
+ failure = f
+ if verbose:
+ print(f'step {i}: {f}')
+ if stop_on_failure:
+ break
+ finally:
+ if ctx.sess is not None:
+ ctx.sess.close(keep=False)
+ ctx.sess = None
+ return failure
+
+ def fuzz(self, seed, steps):
+ name = f'seed-{seed}'
+ run_dir = os.path.join(self.out, 'runs', name)
+ shutil.rmtree(run_dir, ignore_errors=True)
+ os.makedirs(run_dir)
+ ctx = Ctx(seed)
+ rng = ctx.rng
+ log_path = os.path.join(run_dir, 'ops.jsonl')
+ segment = []
+ found = collections.OrderedDict()
+ t0 = time.monotonic()
+ weights = [w for w, _ in GENERATORS]
+ ended = 0
+ with open(log_path, 'w') as log:
+ log.write(json.dumps({'seed': seed, 'steps': steps, 'binary': self.args.binary}) + '\n')
+
+ def fresh():
+ op = {'op': 'fresh', 'follower': rng.random() < 0.5}
+ log.write(json.dumps(op) + '\n')
+ segment.clear()
+ segment.append(op)
+ self.new_session(ctx, op['follower'], run_dir)
+
+ fresh()
+ for step in range(steps):
+ ctx.step = step
+ gen = rng.choices(GENERATORS, weights)[0][1]
+ op = gen(ctx, rng)
+ log.write(json.dumps(op) + '\n')
+ log.flush()
+ segment.append(op)
+ f = None
+ try:
+ run_step(ctx, op)
+ except Ended:
+ ended += 1
+ fresh()
+ continue
+ except Failure as failure:
+ f = failure
+ except Exception as why: # a harness bug: say so, carry on
+ import traceback
+ f = Failure('harness', f'{type(why).__name__}: {why} ' +
+ traceback.format_exc()[-1500:], step)
+ if f is not None:
+ sig = f.signature()
+ first = sig not in found
+ found.setdefault(sig, []).append(step)
+ print(f'[seed {seed} step {step}] FAIL {f.kind}: {f.why[:400]}', flush=True)
+ if first:
+ crash = ctx.sess.crash_text()
+ ctx.sess.close(keep=True)
+ ctx.sess = None
+ self.record(seed, step, f, list(segment), crash)
+ fresh()
+ if self.args.progress and step and step % self.args.progress == 0:
+ rate = step / (time.monotonic() - t0)
+ print(f'[seed {seed}] step {step}/{steps} {rate:.0f} steps/s, {len(found)} distinct failure(s)',
+ flush=True)
+ if ctx.sess is not None:
+ ctx.sess.close()
+ dt = time.monotonic() - t0
+ print(f'[seed {seed}] {steps} steps in {dt:.0f}s ({steps / dt:.0f}/s), {ended} clean quit(s); '
+ f'ops log {log_path}')
+ for sig, at in found.items():
+ print(f' {len(at)}x {sig[:200]} (first at step {at[0]})')
+ return found
+
+ def record(self, seed, step, f, ops, crash):
+ digest = hashlib.sha1(f.signature().encode()).hexdigest()[:8]
+ path = os.path.join(self.out, 'bugs', f'{f.kind}-{digest}-seed{seed}-step{step}.jsonl')
+ header = {'seed': seed, 'step': step, 'kind': f.kind, 'why': f.why, 'signature': f.signature(),
+ 'crash': crash[-4000:], 'binary': self.args.binary}
+ write_ops(path, header, ops)
+ print(f' bug record {path}', flush=True)
+ if not self.args.no_shrink:
+ self.shrink(path)
+
+ def shrink(self, path):
+ header, ops = read_ops(path)
+ # The first replay pins the signature (this code's, which may have
+ # changed since the record was written); later ones must match it.
+ sig = None
+ kind = header.get('kind')
+ run_dir = os.path.join(self.out, 'runs', f'shrink-{os.getpid()}')
+ os.makedirs(run_dir, exist_ok=True)
+ follower = ops[0].get('follower', False) if ops and ops[0]['op'] == 'fresh' else False
+ body = [op for op in ops if op['op'] != 'fresh']
+ budget = [self.args.shrink_budget]
+ deadline = time.monotonic() + self.args.shrink_seconds
+
+ def fails(candidate):
+ if budget[0] <= 0 or time.monotonic() > deadline:
+ return False
+ budget[0] -= 1
+ nonlocal sig
+ f = self.execute([{'op': 'fresh', 'follower': follower}] + candidate, run_dir)
+ if f is None:
+ return False
+ if sig is None:
+ if kind is not None and f.kind != kind:
+ return False
+ sig = f.signature()
+ return True
+ return f.signature() == sig
+
+ if not fails(body):
+ # One more try with the other log mode, then give up.
+ follower = not follower
+ if not fails(body):
+ header['shrink'] = 'did not reproduce on replay'
+ write_ops(path, header, ops)
+ print(f' not reproduced on replay: {path}', flush=True)
+ return
+ small = ddmin(body, fails)
+ # Then shrink each op's payload.
+ small = shrink_payloads(small, fails)
+ header['shrink'] = f'{len(body)} -> {len(small)} ops'
+ out = path.replace('.jsonl', '.min.jsonl')
+ write_ops(out, header, [{'op': 'fresh', 'follower': follower}] + small)
+ print(f' shrunk {len(body)} -> {len(small)} ops: {out}', flush=True)
+
+
+def ddmin(items, fails):
+ """Zeller's delta debugging: a 1-minimal failing subsequence."""
+ n = 2
+ # Trailing ops after the failure never matter; the failing op is last.
+ while len(items) >= 2:
+ size = max(1, len(items) // n)
+ chunks = [items[i:i + size] for i in range(0, len(items), size)]
+ reduced = False
+ for i in range(len(chunks)):
+ complement = [op for j, c in enumerate(chunks) if j != i for op in c]
+ if complement and fails(complement):
+ items, n, reduced = complement, max(n - 1, 2), True
+ break
+ if not reduced:
+ if n >= len(items):
+ break
+ n = min(len(items), n * 2)
+ return items
+
+
+def shrink_payloads(ops, fails):
+ """Halve long data payloads while the failure stays."""
+ ops = [dict(op) for op in ops]
+ for i, op in enumerate(ops):
+ while 'data' in op and len(op['data']) > 8:
+ half = dict(op, data=op['data'][:len(op['data']) // 2])
+ trial = ops[:i] + [half] + ops[i + 1:]
+ if fails(trial):
+ ops[i] = op = half
+ else:
+ break
+ if op.get('chunks') not in (None, 'whole'):
+ whole = dict(op, chunks='whole')
+ if fails(ops[:i] + [whole] + ops[i + 1:]):
+ ops[i] = whole
+ return ops
+
+
+def write_ops(path, header, ops):
+ with open(path, 'w') as f:
+ f.write(json.dumps(header) + '\n')
+ for op in ops:
+ f.write(json.dumps(op) + '\n')
+
+
+def read_ops(path):
+ with open(path) as f:
+ lines = [json.loads(line) for line in f if line.strip()]
+ return lines[0], lines[1:]
+
+
+def main():
+ ap = argparse.ArgumentParser(description=__doc__.split('\n\n')[0])
+ ap.add_argument('binary')
+ ap.add_argument('--seed', type=int, action='append', help='seed (repeatable); default 1')
+ ap.add_argument('--steps', type=int, default=1000)
+ ap.add_argument('--replay', help='run an ops log (or bug record) exactly')
+ ap.add_argument('--shrink', help='shrink a bug record by delta debugging over replays')
+ ap.add_argument('--no-shrink', action='store_true', help='record failures without shrinking them')
+ ap.add_argument('--shrink-budget', type=int, default=300, help='replays a shrink may spend')
+ ap.add_argument('--shrink-seconds', type=float, default=600)
+ ap.add_argument('--smoke', action='store_true', help='fixed seed, few steps, fail on any failure')
+ ap.add_argument('--progress', type=int, default=500)
+ ap.add_argument('--verbose', '-v', action='store_true', help='replay: print each request and log record')
+ ap.add_argument('--out', default=DEFAULT_OUT)
+ args = ap.parse_args()
+ check_served_lines()
+ args.binary = os.path.abspath(args.binary)
+ for key in [k for k in os.environ if k.startswith('PARDES_') or k in ('NINE_MOUNT', 'NAMESPACE')]:
+ del os.environ[key]
+ become_subreaper()
+ signal.signal(signal.SIGTERM, lambda *_: sys.exit(143))
+ runner = Runner(args)
+ try:
+ return run_main(runner, args)
+ finally:
+ sweep(f'{os.getpid()}-')
+ for d in RUNTIME_DIRS:
+ shutil.rmtree(d, ignore_errors=True)
+
+
+def run_main(runner, args):
+ if args.replay:
+ header, ops = read_ops(args.replay)
+ run_dir = os.path.join(args.out, 'runs', f'replay-{os.getpid()}')
+ os.makedirs(run_dir, exist_ok=True)
+ f = runner.execute(ops, run_dir, verbose=args.verbose)
+ print(f'replay {args.replay}: ' + (f'FAIL at op {f.step}: {f.kind}: {f.why}' if f else 'passed'))
+ return 1 if f else 0
+ if args.shrink:
+ runner.shrink(args.shrink)
+ return 0
+ if args.smoke:
+ args.no_shrink = True
+ found = runner.fuzz(20260929, args.steps if args.steps != 1000 else 800)
+ return 1 if found else 0
+ total = 0
+ for seed in args.seed or [1]:
+ total += len(runner.fuzz(seed, args.steps))
+ return 1 if total else 0
+
+
+if __name__ == '__main__':
+ sys.exit(main())
diff --git a/test/ninep.py b/test/ninep.py
index 6c625951..ac4e146b 100644
--- a/test/ninep.py
+++ b/test/ninep.py
@@ -97,6 +97,25 @@ class Client:
def close(self, fid):
self.rpc(120, struct.pack('<I', fid))
+ def create(self, path, name, perm=0o777, mode=0):
+ """Tcreate `name` in the directory `path`; returns the new qid."""
+ fid = self.walk(path)
+ try:
+ reply = self.rpc(114, struct.pack('<I', fid) + string(name) +
+ struct.pack('<IB', perm, mode))
+ if len(reply) != 17:
+ raise OSError('invalid create reply')
+ return reply[:13]
+ finally:
+ self.close(fid)
+
+ def mkdir(self, path, name):
+ return self.create(path, name, 0x80000000 | 0o777)
+
+ def remove(self, path):
+ """Tremove, which clunks the fid whether or not it succeeds."""
+ self.rpc(122, struct.pack('<I', self.walk(path)))
+
def read_fid(self, fid, offset=0, count=None):
count = min(count if count is not None else self.msize - 11, self.msize - 11)
reply = self.rpc(116, struct.pack('<IQI', fid, offset, count))
diff --git a/test/output.zig b/test/output.zig
index 07a1ce23..530db77c 100644
--- a/test/output.zig
+++ b/test/output.zig
@@ -61,10 +61,10 @@ test "search tint survives wrapping and theme changes while selections remain au
light_matches += 1;
}
try std.testing.expectEqual(@as(usize, 3), light_matches);
- pane.mode = .normal;
- pane.cur_row = 0;
- pane.cur_col = @intCast(std.mem.indexOf(u8, text, "abc").? + 2);
- pane.vsel = .{ .active = true, .row = 0, .col = pane.cur_col - 2, .explicit = true };
+ pane.body.mode = .normal;
+ pane.body.cur_row = 0;
+ pane.body.cur_col = @intCast(std.mem.indexOf(u8, text, "abc").? + 2);
+ pane.body.vsel = .{ .active = true, .row = 0, .col = pane.body.cur_col - 2, .explicit = true };
const selected = try p.render(frame.allocator());
for (selected.cells) |cell|
try std.testing.expect(!std.meta.eql(cell.style.bg, pardes.Color{ .rgb = p.theme().search_bg.? }));
@@ -77,7 +77,7 @@ fn outputCell(p: *Pardes, surface: *pardes.Surface, id: usize, byte: usize) *par
const line = modal.lineSlice(pane.file.?.content, 0);
const rect = p.rects[id];
const x = rect.x + config.GUTTER + panes.File.gutterWidth(pane) + @as(u16, @intCast(panes.File.displayWidth(line[0..byte])));
- const y = if (p.settings.tag_bottom) rect.y else rect.y + pardes.BOX_H;
+ const y = p.bodyTop(pane, rect);
return surface.at(x, y);
}
@@ -89,7 +89,7 @@ fn resultId(p: *Pardes) !usize {
}
test "output callers opt into location highlighting instead of matching prose colons" {
- for ([_]panes.Output.Origin{ .{ .cmd = .LocationsConfig }, .{ .cmd = .Config }, .{ .query = .hover } }) |origin| {
+ for ([_]panes.Output.Origin{ .{ .cmd = .LocationsConfig }, .{ .cmd = .DumpConfig }, .{ .query = .hover } }) |origin| {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 140, .rows = 30 });
defer p.deinit();
p.locations_config.layout = .@"inline";
@@ -185,7 +185,7 @@ test "ranked choices and prose retain their supplied order" {
}
}
-test "reference Look selects the next sorted row from the captured request and keeps navigation there" {
+test "references fill the asking text's query pane: sorted under their files, the next after where it was asked current, the owner's places the refs in it" {
if (!pardes.lsp.supports.contains(.references)) return error.SkipZigTest;
var tmp = std.testing.tmpDir(.{});
defer tmp.cleanup();
@@ -194,53 +194,49 @@ test "reference Look selects the next sorted row from the captured request and k
try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "z.zig", .data = "z\n" });
var path_buf: [256]u8 = undefined;
const path = try std.fmt.bufPrint(&path_buf, ".zig-cache/tmp/{s}/m.zig", .{tmp.sub_path});
- const p = try Pardes.init(std.testing.allocator, .{ .file = path, .cols = 80, .rows = 24 });
+ const p = try Pardes.init(std.testing.allocator, .{ .file = path, .cols = 80, .rows = 40 });
defer p.deinit();
- p.locations_config.layout = .@"inline";
const source = p.panes[0].?;
const response = "m.zig:5:5-8 later\nz.zig:1:1 last-file\nm.zig:1:7-10 earlier\nm.zig:3:5-8 current\na.zig:1:1 first-file\nm.zig:4:5-8 next\n";
- const sorted = "a.zig:1:1 first-file\nm.zig:1:7-10 earlier\nm.zig:3:5-8 current\nm.zig:4:5-8 next\nm.zig:5:5-8 later\nz.zig:1:1 last-file\n";
- source.cur_row = 2;
- source.cur_col = 4;
+ source.body.cur_row = 2;
+ source.body.cur_col = 4;
p.lspRequest(0, .references, "");
const request = p.lsp_wait.?.id;
- source.cur_row = 4;
+ // the cursor moves before the answer: it is placed by where it was asked
+ source.body.cur_row = 4;
p.lspResponse(request, response);
- const rid = source.search_pane orelse return error.MissingResults;
- const results = p.panes[rid].?;
- try expectResultRows(sorted, &results.file.?);
- try std.testing.expectEqual(@as(usize, 0), p.active);
- try std.testing.expectEqual(@as(i32, 3), source.cur_row);
- try std.testing.expect(source.vsel.active);
- try std.testing.expectEqual(@as(i32, 4), @min(source.cur_col, source.vsel.col));
- try std.testing.expectEqual(@as(i32, 7), @max(source.cur_col, source.vsel.col));
- try std.testing.expectEqual(@as(i32, 3), results.cur_row);
- try std.testing.expectEqual(@as(usize, 3), source.search_row.?);
- try std.testing.expectEqual(results.serial, p.look_walk_owner.?);
- try std.testing.expectEqual(@as(i32, 3), results.look_at.?.row);
- const available = p.freeSlot();
+ const qid = panes.Query.ofOwner(p, source.serial) orelse return error.MissingResults;
+ const results = p.panes[qid].?;
+ const content = results.file.?.content;
+ try std.testing.expect(std.mem.startsWith(u8, content, "Refs \n"));
+ // under their files, in order
+ const a_at = std.mem.indexOf(u8, content, "\na.zig\n").?;
+ const m_at = std.mem.indexOf(u8, content, "\nm.zig\n").?;
+ const z_at = std.mem.indexOf(u8, content, "\nz.zig\n").?;
+ try std.testing.expect(a_at < m_at and m_at < z_at);
+ // the owner's places are its four refs; the current the one after line 3
+ try std.testing.expectEqual(@as(usize, 4), source.places.hits.items.len);
+ try std.testing.expectEqual(@as(?usize, 2), source.places.current);
+ try std.testing.expectEqual(@as(i32, 3), source.body.cur_row);
+ try std.testing.expectEqual(@as(usize, 6), results.query.?.total);
+ // A list answered, not a query typed: the keyboard on its current row in
+ // normal mode; n, Enter: the keyboard on that ref in the text
+ try std.testing.expectEqual(qid, p.active);
+ try std.testing.expect(results.body.mode == .normal and results.body.cur_row > 0);
p.update(.{ .key = .{ .cp = 'n' } });
- try std.testing.expectEqual(rid, p.active);
- try std.testing.expectEqual(@as(i32, 4), results.cur_row);
- try std.testing.expectEqual(available, p.freeSlot());
+ try std.testing.expectEqual(@as(?usize, 3), source.places.current);
+ p.update(.{ .key = .{ .cp = Key.enter } });
+ try std.testing.expectEqual(@as(usize, 0), p.active);
+ try std.testing.expectEqual(@as(i32, 4), source.body.cur_row);
p.update(.{ .key = .{ .cp = 'N' } });
- try std.testing.expectEqual(@as(i32, 3), results.cur_row);
-
+ try std.testing.expectEqual(@as(?usize, 2), source.places.current);
+ // n in the owner steps them, round the end without a word
p.active = 0;
- source.cur_row = 4;
- source.cur_col = 4;
- p.lspRequest(0, .references, "");
- p.lspResponse(p.lsp_wait.?.id, response);
- try std.testing.expect(std.mem.endsWith(u8, p.panes[p.active].?.file.?.path, "/z.zig"));
- try std.testing.expectEqual(@as(i32, 5), results.cur_row);
- try std.testing.expectEqual(@as(usize, 5), source.search_row.?);
- const last = p.active;
- p.lspRequest(last, .references, "");
- p.lspResponse(p.lsp_wait.?.id, response);
- try std.testing.expect(std.mem.endsWith(u8, p.panes[p.active].?.file.?.path, "/a.zig"));
- const wrapped = p.panes[p.panes[last].?.search_pane.?].?;
- try std.testing.expectEqual(@as(i32, 0), wrapped.cur_row);
- try std.testing.expectEqual(wrapped.serial, p.look_walk_owner.?);
+ p.update(.{ .key = .{ .cp = 'n' } });
+ try std.testing.expectEqual(@as(?usize, 3), source.places.current);
+ p.update(.{ .key = .{ .cp = 'n' } });
+ try std.testing.expectEqual(@as(?usize, 0), source.places.current);
+ try std.testing.expectEqual(@as(usize, 0), p.active);
}
test "location sorting leaves mixed prose alone and preserves newline shape" {
@@ -280,7 +276,7 @@ test "a single language location opens the full spaced filename" {
p.lspRequest(0, .references, "");
p.lspResponse(p.lsp_wait.?.id, "with space.zig:2:1 second\n");
try std.testing.expect(std.mem.endsWith(u8, p.panes[p.active].?.file.?.path, "/with space.zig"));
- try std.testing.expectEqual(@as(i32, 1), p.panes[p.active].?.cur_row);
+ try std.testing.expectEqual(@as(i32, 1), p.panes[p.active].?.body.cur_row);
for (p.panes) |slot| {
const pane = slot orelse continue;
if (pane.file) |file| try std.testing.expect(file.output == null);
@@ -316,19 +312,19 @@ test "reordered identical results preserve the selected row and warm line index"
const index = try panes.File.lineIndex(p.gpa, file);
const content = file.content.ptr;
const revision = file.revision;
- result.cur_row = 1;
- result.cur_col = 0;
- result.vsel = .{ .active = true, .explicit = true, .row = 1, .col = 9 };
- result.select = true;
- const selected = result.vsel;
+ result.body.cur_row = 1;
+ result.body.cur_col = 0;
+ result.body.vsel = .{ .active = true, .explicit = true, .row = 1, .col = 9 };
+ result.body.select = true;
+ const selected = result.body.vsel;
try panes.Output.fillResults(p, 0, "/tmp", .{ .query = .references }, "new request", try p.gpa.dupe(u8, "a.zig:10:1 second\na.zig:2:1 first\n"), 0);
try expectResultRows(sorted, file);
try std.testing.expectEqual(content, file.content.ptr);
try std.testing.expectEqual(index.ptr, file.line_starts.ptr);
try std.testing.expectEqual(revision, file.revision);
- try std.testing.expectEqual(selected, result.vsel);
- try std.testing.expect(result.select);
- try std.testing.expectEqual(@as(i32, 1), result.cur_row);
+ try std.testing.expectEqual(selected, result.body.vsel);
+ try std.testing.expect(result.body.select);
+ try std.testing.expectEqual(@as(i32, 1), result.body.cur_row);
try std.testing.expectEqual(@as(usize, 1), source.search_row.?);
}
@@ -387,10 +383,10 @@ test "result stepping reaches an unterminated last row" {
const source = try p.setTestFile("one\ntwo\n");
const rows = try std.fmt.allocPrint(p.gpa, "{s}:1:1 first\n{s}:2:1 last", .{ source.file.?.path, source.file.?.path });
try panes.Output.fillResults(p, 0, "/tmp", .search, "", rows, 0);
- try std.testing.expect(pardes.test_api.searchStep(p, 0, 1));
+ try std.testing.expect(pardes.look.searchStep(p, 0, 1));
try std.testing.expectEqual(@as(usize, 1), source.search_row.?);
const result = p.panes[source.search_pane.?].?;
- try std.testing.expectEqual(@as(i32, 1), result.cur_row);
+ try std.testing.expectEqual(@as(i32, 1), result.body.cur_row);
}
test "Mini uses OS source precedence and refreshes one independent snapshot" {
@@ -438,9 +434,9 @@ test "Mini dump preserves its exact virtual snapshot and body writes detach colo
const id = p.active;
const before = p.panes[id].?.file.?;
try std.testing.expect(before.mini != null);
- try p.dumpState();
+ try pardes.dump.dumpState(p);
panes.File.setContent(p, &source.file.?, try p.gpa.dupe(u8, "changed\n"));
- const restored = try Pardes.initFromDump(std.testing.allocator, .{ .tty_only = true }, p.dump_out.?);
+ const restored = try pardes.dump.initFromDump(std.testing.allocator, .{ .tty_only = true }, p.dump_out.?);
defer restored.deinit();
const mini = restored.panes[restored.active].?;
try std.testing.expectEqualStrings(before.content, mini.file.?.content);
@@ -472,10 +468,10 @@ test "Mini syntax colors survive toggles themes and rendering without source acc
defer p.deinit();
try p.panes[0].?.setOwnedCwd(dir);
p.settings.colors = false;
- try panes.Mini.open(p, 0, "demo.zig");
+ try panes.mini.open(p, 0, "demo.zig");
const id = p.active;
const mini = p.panes[id].?;
- const keyword = std.mem.indexOfScalar(u8, mini.file.?.mini.?.colors, @intFromEnum(pardes.syntax.Syn.keyword)) orelse return error.MissingKeywordColor;
+ const keyword = std.mem.indexOfScalar(u8, mini.file.?.mini.?.colors, @backingInt(pardes.syntax.Syn.keyword)) orelse return error.MissingKeywordColor;
// Direct pane construction bypasses the host update's layout sync.
p.update(.{ .resize = .{ .cols = 80, .rows = 24 } });
const position = modal.positionAt(mini.file.?.content, keyword);
@@ -490,7 +486,7 @@ test "Mini syntax colors survive toggles themes and rendering without source acc
const surface = try p.render(frame.allocator());
const rect = p.rects[id];
const x = rect.x + config.GUTTER + panes.File.gutterWidth(mini) + @as(u16, @intCast(column));
- const y = (if (p.settings.tag_bottom) rect.y else rect.y + pardes.BOX_H) + @as(u16, @intCast(position.row));
+ const y = p.bodyTop(mini, rect) + @as(u16, @intCast(position.row));
if (enabled) try std.testing.expectEqualDeep(pardes.Color{ .rgb = p.theme().kw }, surface.at(x, y).style.fg);
try std.testing.expectEqual(colors, mini.file.?.mini.?.colors.ptr);
try std.testing.expectEqual(@as(usize, 0), mini.file.?.highlights.len);
@@ -522,54 +518,134 @@ test "Mini failures leave its existing snapshot and focus unchanged" {
const source = try p.setTestFile("abc\n");
var path_buf: [128]u8 = undefined;
const path = try std.fmt.bufPrint(&path_buf, "/virtual/pane/{d}/body", .{source.serial});
- try panes.Mini.open(p, 0, path);
+ try panes.mini.open(p, 0, path);
const id = p.active;
const mini = p.panes[id].?;
const body = mini.file.?.content.ptr;
const next = p.freeSlot();
- try std.testing.expectError(error.FileNotFound, panes.Mini.open(p, 0, "/virtual/does-not-exist"));
+ try std.testing.expectError(error.FileNotFound, panes.mini.open(p, 0, "/virtual/does-not-exist"));
try std.testing.expectEqual(id, p.active);
try std.testing.expectEqual(body, mini.file.?.content.ptr);
try std.testing.expectEqual(next, p.freeSlot());
}
-test "Config prints the startup path and refreshes its one output" {
+test "DumpConfig prints the startup path and refreshes its one output" {
const path = "/home/pardes-test/.config/pardes/init";
const p = try Pardes.init(std.testing.allocator, .{ .startup_config_path = path });
defer p.deinit();
- try std.testing.expect(p.executeBuiltinLine(0, "Config"));
+ try std.testing.expect(p.executeBuiltinLine(0, "DumpConfig"));
const opened = p.active;
const out = p.panes[opened].?.file.?;
for ([_][]const u8{
"Startup config: " ++ path ++ "\n",
- "Theme: orchard\n",
- "Shell requested (new panes): " ++ config.default_shell ++ " (default)\n",
- "Shell effective (last spawn): (none)\n",
- "Shell pending: on\n",
+ "Theme orchard\n",
+ "Last shell spawned: (none)\n",
+ "Shell change pending: on\n",
+ "LocationsConfig ",
}) |line| try std.testing.expect(std.mem.indexOf(u8, out.content, line) != null);
- try std.testing.expectEqualStrings(config.config_buffer, std.fs.path.basename(out.path));
- try std.testing.expectEqual(panes.Output.Origin{ .cmd = .Config }, out.output.?.from);
+ var default_line: [256]u8 = undefined;
+ try std.testing.expect(std.mem.indexOf(u8, out.content, try std.fmt.bufPrint(&default_line, "Shell {s}\n", .{config.defaultShell()})) != null);
+ try std.testing.expectEqualStrings(config.dump_config_buffer, std.fs.path.basename(out.path));
+ try std.testing.expectEqual(panes.Output.Origin{ .cmd = .DumpConfig }, out.output.?.from);
- try std.testing.expect(p.executeBuiltinLine(0, "Config"));
+ try std.testing.expect(p.executeBuiltinLine(0, "DumpConfig"));
try std.testing.expectEqual(opened, p.active);
var buffers: usize = 0;
for (p.panes) |slot| {
const f = (slot orelse continue).file orelse continue;
const origin = (f.output orelse continue).from;
- buffers += @intFromBool(std.meta.eql(origin, panes.Output.Origin{ .cmd = .Config }));
+ buffers += @intFromBool(std.meta.eql(origin, panes.Output.Origin{ .cmd = .DumpConfig }));
}
try std.testing.expectEqual(@as(usize, 1), buffers);
}
-test "Config reports the absence of a per-user config path" {
+test "DumpConfig reports the absence of a per-user config path" {
const p = try Pardes.init(std.testing.allocator, .{});
defer p.deinit();
- try std.testing.expect(p.executeBuiltinLine(0, "Config"));
+ try std.testing.expect(p.executeBuiltinLine(0, "DumpConfig"));
const report = p.panes[p.active].?.file.?.content;
try std.testing.expect(std.mem.indexOf(u8, report, "no per-user config path") != null);
}
+/// The file Config names, in a fresh temporary directory: `pardes/init`
+/// under it, written with `content` unless that is null.
+fn configFixture(tmp: *std.testing.TmpDir, content: ?[]const u8, buf: *[4096]u8) ![]const u8 {
+ if (content) |text| {
+ try tmp.dir.createDirPath(std.testing.io, "pardes");
+ try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "pardes/init", .data = text });
+ }
+ const len = try tmp.dir.realPath(std.testing.io, buf);
+ return std.fmt.bufPrint(buf[len..], "{s}/pardes/init", .{buf[0..len]}) catch unreachable;
+}
+
+test "Config opens the startup file, and a second Config goes back to its pane" {
+ if (comptime !pardes.hosted) return;
+ var tmp = std.testing.tmpDir(.{});
+ defer tmp.cleanup();
+ var buf: [4096]u8 = undefined;
+ const path = try configFixture(&tmp, "Theme orchard\n", &buf);
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .startup_config_path = path });
+ defer p.deinit();
+ const first = p.active;
+
+ try std.testing.expect(p.executeBuiltinLine(first, "Config"));
+ const opened = p.active;
+ try std.testing.expect(opened != first);
+ const f = p.panes[opened].?.file.?;
+ try std.testing.expectEqualStrings(path, f.path);
+ try std.testing.expectEqualStrings("Theme orchard\n", f.content);
+ try std.testing.expect(f.output == null);
+
+ p.active = first;
+ try std.testing.expect(p.executeBuiltinLine(first, "Config"));
+ try std.testing.expectEqual(opened, p.active);
+ var named: usize = 0;
+ for (p.panes) |slot| if (slot) |pane| if (pane.file) |file| {
+ named += @intFromBool(std.mem.eql(u8, file.path, path));
+ };
+ try std.testing.expectEqual(@as(usize, 1), named);
+}
+
+test "Config with no startup file opens a pane of its name, and Save makes its directory" {
+ if (comptime !pardes.hosted) return;
+ var tmp = std.testing.tmpDir(.{});
+ defer tmp.cleanup();
+ var buf: [4096]u8 = undefined;
+ const path = try configFixture(&tmp, null, &buf);
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .startup_config_path = path });
+ defer p.deinit();
+ const first = p.active;
+
+ try std.testing.expect(p.executeBuiltinLine(first, "Config"));
+ const opened = p.active;
+ try std.testing.expect(opened != first);
+ const f = p.panes[opened].?.file.?;
+ try std.testing.expectEqualStrings(path, f.path);
+ try std.testing.expectEqualStrings("", f.content);
+ try std.testing.expect(f.output == null);
+
+ // Again: the same pane, not a second one.
+ p.active = first;
+ try std.testing.expect(p.executeBuiltinLine(first, "Config"));
+ try std.testing.expectEqual(opened, p.active);
+
+ try std.testing.expectError(error.FileNotFound, tmp.dir.statFile(std.testing.io, "pardes", .{}));
+ // Save's effect, as a host performs it.
+ try std.testing.expect(p.executeBuiltinLine(opened, "Save"));
+ p.perform(.{ .save_file = .{ .pane = @intCast(opened) } });
+ const made = try tmp.dir.statFile(std.testing.io, "pardes", .{});
+ try std.testing.expectEqual(std.Io.File.Kind.directory, made.kind);
+}
+
+test "Config without a configuration directory says so and opens nothing" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true });
+ defer p.deinit();
+ const before = p.freeSlot();
+ try std.testing.expect(p.executeBuiltinLine(p.active, "Config"));
+ try std.testing.expectEqual(before, p.freeSlot());
+}
+
test "EffectCode lists readable virtual sources used by this backend" {
if (comptime !builtins.EffectCode.enabled) return;
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true });
@@ -590,10 +666,7 @@ test "EffectCode lists readable virtual sources used by this backend" {
try std.testing.expect(std.mem.indexOf(u8, out.content, "/virtual/src/layout.zig\n") != null);
const backend_source = switch (platform) {
.tty => "/virtual/src/tty/panel_compositor.zig",
- .gui => if (@import("pardes_config").gui_shader_sources_prebuilt)
- "/virtual/shaders/prebuilt/ui.vert.glsl"
- else
- "/virtual/shaders/ui.vert.glsl",
+ .gui => "/virtual/shaders/ui.vert.glsl",
.macos => "/virtual/src/macos/Sources/ScenePostprocessor.swift",
.web, .esp32p4 => unreachable,
};
@@ -610,7 +683,7 @@ test "EffectCode lists readable virtual sources used by this backend" {
}
try std.testing.expect(count >= 3);
const report = p.active;
- p.lookAt(report, backend_source);
+ pardes.look.lookAt(p, report, backend_source);
try std.testing.expect(p.active != report);
const source = p.panes[p.active].?.file.?;
try std.testing.expectEqualStrings(backend_source, source.path);
@@ -650,39 +723,37 @@ test "every enabled setting builtin mutates the State Config reports" {
}
}
- try std.testing.expect(p.executeBuiltinLine(p.active, "Config"));
+ try std.testing.expect(p.executeBuiltinLine(p.active, "DumpConfig"));
const report = p.panes[p.active].?.file.?.content;
for ([_][]const u8{
- "Colors: off\n",
- "Wrap: off\n",
- "Tagbottom: on\n",
- "Debug: on\n",
- "Theme: acme\n",
- "Shell requested (new panes): fish\n",
+ "Colors off\n",
+ "Wrap off\n",
+ "Tagbottom on\n",
+ "Debug on\n",
+ "Theme acme\n",
+ "Shell fish\n",
}) |line| try std.testing.expect(std.mem.indexOf(u8, report, line) != null);
- const transition = if (builtins.capabilities.panel_transitions)
- try std.fmt.bufPrint(&buf, "Panel transition: {s}\n", .{
- config.Runtime.findAction(.{ .transition = p.settings.panel_transition }).?.word,
- })
+ const transition = if (!builtins.capabilities.panel_transitions)
+ "PanelSlide unsupported\n"
+ else if (p.settings.panel_transition == .off)
+ "PanelSlide off\n"
else
- "Panel transition: unsupported\n";
+ try std.fmt.bufPrint(&buf, "{s} on\n", .{config.Runtime.findAction(.{ .transition = p.settings.panel_transition }).?.word});
try std.testing.expect(std.mem.indexOf(u8, report, transition) != null);
- const scene_status = if (builtins.capabilities.scene_shaders) "on" else "unsupported";
- for ([_][]const u8{ "Crt", "Ripple", "Glitch" }) |name| {
- const line = try std.fmt.bufPrint(&buf, "{s}: {s}\n", .{ name, scene_status });
+ // A bare word turns a bundled pass on at its default level.
+ const scene_status = if (builtins.capabilities.scene_shaders) "2" else "unsupported";
+ for ([_][]const u8{"Crt"}) |name| {
+ const line = try std.fmt.bufPrint(&buf, "{s} {s}\n", .{ name, scene_status });
try std.testing.expect(std.mem.indexOf(u8, report, line) != null);
}
const tagline = if (!builtins.capabilities.tagline_font_size)
- "TaglineSize: unsupported\n"
+ "TaglineSize unsupported\n"
else
- try std.fmt.bufPrint(&buf, "TaglineSize: {d}%{s}\n", .{
- p.settings.font.tagline_percent,
- if (builtins.capabilities.font_picker) "" else " (build-time only)",
- });
+ try std.fmt.bufPrint(&buf, "TaglineSize {d}\n", .{p.settings.font.tagline_percent});
try std.testing.expect(std.mem.indexOf(u8, report, tagline) != null);
if (chosen_font) |name| {
try std.testing.expect(std.mem.indexOf(u8, report, name) != null);
- try std.testing.expect(std.mem.indexOf(u8, report, "Font pending: on\n") != null);
+ try std.testing.expect(std.mem.indexOf(u8, report, "Font change pending: on\n") != null);
}
}
@@ -708,21 +779,21 @@ fn projectPaths(cwd_buf: *[4096]u8, path_buf: *[4096]u8) !ProjectPaths {
fn selectedOutputText(pane: *const pardes.Pane) ?[]const u8 {
const file = pane.file orelse return null;
- if (!pane.vsel.active or pane.vsel.row != pane.cur_row or pane.cur_row < 0) return null;
- const line = modal.lineSlice(file.content, @intCast(pane.cur_row));
- const lo: usize = @intCast(@max(0, @min(pane.vsel.col, pane.cur_col)));
- const hi: usize = @intCast(@max(0, @max(pane.vsel.col, pane.cur_col)));
+ if (!pane.body.vsel.active or pane.body.vsel.row != pane.body.cur_row or pane.body.cur_row < 0) return null;
+ const line = modal.lineSlice(file.content, @intCast(pane.body.cur_row));
+ const lo: usize = @intCast(@max(0, @min(pane.body.vsel.col, pane.body.cur_col)));
+ const hi: usize = @intCast(@max(0, @max(pane.body.vsel.col, pane.body.cur_col)));
if (lo >= line.len) return "";
return line[lo..@min(line.len, hi + 1)];
}
-test "n/N in ordinary text skips comment slashes and retains real paths" {
+test "LookNext/LookPrev in ordinary text skips comment slashes and retains real paths" {
if (platform == .web) return error.SkipZigTest;
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 100, .rows = 20 });
defer p.deinit();
const pane = try p.setTestFile("// ordinary comment\n/// documentation comment\n(//) [///] punctuation\n/\n// /tmp\n//tmp\n");
try std.testing.expect(pane.file.?.output == null);
- p.armLookWalk(0);
+ pardes.look.armLookWalk(p, 0);
const available = p.freeSlot();
for ([_]struct { key: u21, row: i32, text: []const u8 }{
.{ .key = 'n', .row = 3, .text = "/" },
@@ -733,15 +804,15 @@ test "n/N in ordinary text skips comment slashes and retains real paths" {
.{ .key = 'N', .row = 4, .text = "/tmp" },
.{ .key = 'N', .row = 3, .text = "/" },
}) |step| {
- p.update(.{ .key = .{ .cp = step.key } });
+ lookKey(p, step.key);
try std.testing.expectEqual(@as(usize, 0), p.active);
- try std.testing.expectEqual(step.row, pane.cur_row);
+ try std.testing.expectEqual(step.row, pane.body.cur_row);
try std.testing.expectEqualStrings(step.text, selectedOutputText(pane) orelse "");
try std.testing.expectEqual(available, p.freeSlot());
}
}
-test "n/N skips formatted context and selects comment match locations" {
+test "LookNext/LookPrev skips formatted context and selects comment match locations" {
if (!pardes.syntax.enabled) return error.SkipZigTest;
for ([_]panes.Output.Origin{ .search, .{ .query = .references } }) |origin| {
for ([_]bool{ false, true }) |tslocations| {
@@ -785,31 +856,34 @@ test "n/N skips formatted context and selects comment match locations" {
.{ .key = 'N', .match = 1 },
.{ .key = 'N', .match = 0 },
}) |step| {
- p.update(.{ .key = .{ .cp = step.key } });
+ lookKey(p, step.key);
try std.testing.expectEqual(id, p.active);
const row = matches[step.match];
- try std.testing.expectEqual(@as(i32, @intCast(row)), result.cur_row);
+ try std.testing.expectEqual(@as(i32, @intCast(row)), result.body.cur_row);
const line = modal.lineSlice(file.content, row);
try std.testing.expectEqualStrings(line[0..file.location_rows[row].location_end], selectedOutputText(result) orelse "");
try std.testing.expectEqual(available, p.freeSlot());
}
- try p.dumpState();
- const restored = try Pardes.initFromDump(p.gpa, .{ .tty_only = true }, p.dump_out.?);
+ try pardes.dump.dumpState(p);
+ const restored = try pardes.dump.initFromDump(p.gpa, .{ .tty_only = true }, p.dump_out.?);
defer restored.deinit();
- restored.armLookWalk(id);
+ pardes.look.armLookWalk(restored, id);
const restored_result = restored.panes[id].?;
- restored.update(.{ .key = .{ .cp = 'n' } });
- try std.testing.expectEqual(@as(i32, @intCast(matches[0])), restored_result.cur_row);
- restored.update(.{ .key = .{ .cp = 'N' } });
- try std.testing.expectEqual(@as(i32, @intCast(matches[1])), restored_result.cur_row);
+ // The dot came back on the match it was on (the first), so the
+ // walk goes on from there.
+ try std.testing.expectEqual(@as(i32, @intCast(matches[0])), restored_result.body.cur_row);
+ lookKey(restored, 'n');
+ try std.testing.expectEqual(@as(i32, @intCast(matches[1])), restored_result.body.cur_row);
+ lookKey(restored, 'N');
+ try std.testing.expectEqual(@as(i32, @intCast(matches[0])), restored_result.body.cur_row);
const restored_file = &restored_result.file.?;
- const last = modal.lineSlice(restored_file.content, matches[1]);
- try std.testing.expectEqualStrings(last[0..restored_file.location_rows[matches[1]].location_end], selectedOutputText(restored_result) orelse "");
+ const last = modal.lineSlice(restored_file.content, matches[0]);
+ try std.testing.expectEqualStrings(last[0..restored_file.location_rows[matches[0]].location_end], selectedOutputText(restored_result) orelse "");
}
}
}
-test "n/N selects one output location per row and opens nothing" {
+test "LookNext/LookPrev selects one output location per row and opens nothing" {
if (platform == .web) return;
var cwd_buf: [4096]u8 = undefined;
var path_buf: [4096]u8 = undefined;
@@ -822,21 +896,21 @@ test "n/N selects one output location per row and opens nothing" {
const results = p.panes[rid].?;
const panes_before = p.freeSlot();
- p.update(.{ .key = .{ .cp = 'n' } });
+ lookKey(p, 'n');
try std.testing.expectEqual(rid, p.active);
try std.testing.expectEqual(panes_before, p.freeSlot());
- try std.testing.expect(results.vsel.active and results.vsel.explicit);
+ try std.testing.expect(results.body.vsel.active and results.body.vsel.explicit);
try std.testing.expectEqualStrings("build.zig:1:1", selectedOutputText(results) orelse "");
try std.testing.expectEqual(panes.Output.Grain.line, panes.Output.grain(results.file.?.output));
- p.update(.{ .key = .{ .cp = 'n' } });
- try std.testing.expectEqual(@as(i32, 1), results.cur_row);
+ lookKey(p, 'n');
+ try std.testing.expectEqual(@as(i32, 1), results.body.cur_row);
try std.testing.expectEqualStrings("mise.toml", selectedOutputText(results) orelse "");
- p.update(.{ .key = .{ .cp = 'n' } });
- try std.testing.expectEqual(@as(i32, 3), results.cur_row); // row 2 is not look-able
+ lookKey(p, 'n');
+ try std.testing.expectEqual(@as(i32, 3), results.body.cur_row); // row 2 is not look-able
try std.testing.expectEqualStrings("uucode_config.zig:7:1", selectedOutputText(results) orelse "");
- p.update(.{ .key = .{ .cp = 'n' } });
- try std.testing.expectEqual(@as(i32, 0), results.cur_row); // ring seam
+ lookKey(p, 'n');
+ try std.testing.expectEqual(@as(i32, 0), results.body.cur_row); // ring seam
p.update(.{ .key = .{ .cp = Key.enter } });
try std.testing.expect(p.freeSlot() != panes_before);
@@ -844,7 +918,7 @@ test "n/N selects one output location per row and opens nothing" {
try std.testing.expectEqual(panes.Output.Grain.word, panes.Output.grain(p.panes[p.active].?.file.?.output));
}
-test "n/N resumes the result output whose Look moved focus away" {
+test "LookNext/LookPrev resumes the result output whose Look moved focus away" {
if (platform == .web) return;
var tmp = std.testing.tmpDir(.{});
defer tmp.cleanup();
@@ -857,20 +931,21 @@ test "n/N resumes the result output whose Look moved focus away" {
const p = try Pardes.init(std.testing.allocator, .{ .file = path, .cols = 80, .rows = 24 });
defer p.deinit();
p.locations_config.layout = .@"inline";
+ p.settings.look_word = .list; // the +Search listing is what is walked
try std.testing.expect(p.executeBuiltinLine(0, "Look target"));
const rid = p.panes[0].?.search_pane orelse return error.MissingResults;
const results = p.panes[rid].?;
- const first = results.cur_row;
+ const first = results.body.cur_row;
try std.testing.expectEqual(@as(usize, 0), p.active);
try std.testing.expect(results.look_at != null);
try std.testing.expectEqual(results.serial, p.look_walk_owner orelse return error.MissingLookOwner);
- p.update(.{ .key = .{ .cp = 'n' } });
+ lookKey(p, 'n');
try std.testing.expectEqual(rid, p.active);
- try std.testing.expectEqual(first + 1, results.cur_row);
- p.update(.{ .key = .{ .cp = 'N' } });
- try std.testing.expectEqual(first, results.cur_row);
+ try std.testing.expectEqual(first + 1, results.body.cur_row);
+ lookKey(p, 'N');
+ try std.testing.expectEqual(first, results.body.cur_row);
// A later no-match answer has no position to resume and therefore cannot
// steal the provenance established by the Look above.
@@ -886,9 +961,9 @@ test "n/N resumes the result output whose Look moved focus away" {
null,
);
try std.testing.expectEqual(owner, p.look_walk_owner.?);
- p.update(.{ .key = .{ .cp = 'n' } });
+ lookKey(p, 'n');
try std.testing.expectEqual(rid, p.active);
- try std.testing.expectEqual(first + 1, results.cur_row);
+ try std.testing.expectEqual(first + 1, results.body.cur_row);
// Emptying the owner itself keeps its identity as the ring's starting
// point. Deleting it then leaves a stale serial, never an id that can bind
@@ -902,7 +977,7 @@ test "n/N resumes the result output whose Look moved focus away" {
try std.testing.expect(p.paneBySerial(owner) == null);
}
-test "N exactly reverses n across output panes and the ring seam" {
+test "LookPrev exactly reverses LookNext across output panes and the ring seam" {
if (platform == .web) return;
var cwd_buf: [4096]u8 = undefined;
var path_buf: [4096]u8 = undefined;
@@ -920,20 +995,20 @@ test "N exactly reverses n across output panes and the ring seam" {
const here = struct {
fn at(pp: *Pardes) Mark {
const pane = pp.panes[pp.active].?;
- return .{ .pane = pp.active, .row = pane.cur_row, .col = pane.cur_col };
+ return .{ .pane = pp.active, .row = pane.body.cur_row, .col = pane.body.cur_col };
}
}.at;
- p.update(.{ .key = .{ .cp = 'n' } });
+ lookKey(p, 'n');
const base = here(p);
var trail: [12]Mark = undefined;
for (&trail) |*mark| {
- p.update(.{ .key = .{ .cp = 'n' } });
+ lookKey(p, 'n');
mark.* = here(p);
}
var i = trail.len;
while (i > 0) {
i -= 1;
- p.update(.{ .key = .{ .cp = 'N' } });
+ lookKey(p, 'N');
const want = if (i == 0) base else trail[i - 1];
try std.testing.expectEqual(want, here(p));
}
@@ -946,45 +1021,63 @@ test "N exactly reverses n across output panes and the ring seam" {
try std.testing.expect(saw_first and saw_second);
}
-test "ThemeSel groups native themes first and skips headings in both directions" {
+test "Themes lists the ring in sections and skips headings in both directions" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 100, .rows = 40 });
defer p.deinit();
const source = try p.setTestFile("notes\n");
- p.setThemeIndex(pardes.themes.len - 1);
+ pardes.colors.setThemeIndex(p, pardes.themes.len - 1);
const original_theme = p.settings.theme;
- try std.testing.expect(p.executeBuiltinLine(0, "ThemeSel"));
+ try std.testing.expect(p.executeBuiltinLine(0, "Themes"));
const tid = source.search_pane orelse return error.MissingThemeList;
const list = p.panes[tid].?;
const content = list.file.?.content;
try std.testing.expectEqual(@as(usize, 0), p.active);
- try std.testing.expectEqual(@as(i32, 0), list.cur_row);
+ try std.testing.expectEqual(@as(i32, 0), list.body.cur_row);
try std.testing.expectEqual(@as(usize, 0), list.file.?.scroll);
try std.testing.expectEqualStrings("# Pardes themes", modal.lineSlice(content, 0));
- try std.testing.expectEqualStrings("# Legacy and imported themes", modal.lineSlice(content, pardes.native_theme_count + 2));
- try std.testing.expectEqual(@as(usize, pardes.themes.len + 3), std.mem.count(u8, content, "\n"));
+ // Every theme in ring order, each section's heading after a blank line
+ // where colors.groupAt says one starts.
+ var row: usize = 1;
+ var sections: usize = 1;
+ var first_break: ?usize = null;
for (pardes.themes, 0..) |theme, i| {
- const row = i + 1 + @as(usize, if (i >= pardes.native_theme_count) 2 else 0);
+ if (i > 0) if (pardes.colors.groupAt(i)) |title| {
+ try std.testing.expectEqualStrings("", modal.lineSlice(content, row));
+ try std.testing.expect(std.mem.startsWith(u8, modal.lineSlice(content, row + 1), "# "));
+ try std.testing.expectEqualStrings(title, modal.lineSlice(content, row + 1)["# ".len..]);
+ row += 2;
+ sections += 1;
+ if (first_break == null) first_break = i;
+ };
const line = modal.lineSlice(content, row);
try std.testing.expect(std.mem.startsWith(u8, line, "Theme "));
try std.testing.expectEqualStrings(theme.name, line["Theme ".len..]);
+ row += 1;
}
+ try std.testing.expectEqual(pardes.themes.len + 1 + 2 * (sections - 1), std.mem.count(u8, content, "\n"));
+ // acme is a current theme: it is listed before any break.
+ const acme = for (pardes.themes, 0..) |t, i| {
+ if (std.mem.eql(u8, t.name, "acme")) break i;
+ } else return error.MissingAcme;
+ const brk = first_break orelse return error.NoSections;
+ try std.testing.expect(acme < brk);
// Opening an imported theme's selector must still begin with the natives.
// Walk across the section break without selecting or executing a heading.
- for (pardes.themes[0 .. pardes.native_theme_count + 1]) |theme| {
- p.update(.{ .key = .{ .cp = 'n' } });
+ for (pardes.themes[0 .. brk + 1]) |theme| {
+ lookKey(p, 'n');
try std.testing.expectEqual(tid, p.active);
- const selected = selectedOutputText(list) orelse return error.MissingThemeSelection;
+ const selected = selectedOutputText(list) orelse return error.MissingThemeSection;
try std.testing.expectEqualStrings(theme.name, selected["Theme ".len..]);
try std.testing.expectEqual(original_theme, p.settings.theme);
}
- p.update(.{ .key = .{ .cp = 'N' } });
- const previous = selectedOutputText(list) orelse return error.MissingThemeSelection;
- try std.testing.expectEqualStrings(pardes.themes[pardes.native_theme_count - 1].name, previous["Theme ".len..]);
+ lookKey(p, 'N');
+ const previous = selectedOutputText(list) orelse return error.MissingThemeSection;
+ try std.testing.expectEqualStrings(pardes.themes[brk - 1].name, previous["Theme ".len..]);
p.update(.{ .key = .{ .cp = Key.tab } });
- try std.testing.expectEqual(pardes.native_theme_count - 1, p.settings.theme);
+ try std.testing.expectEqual(brk - 1, p.settings.theme);
}
-test "n/N selects command outputs by whole row" {
+test "LookNext/LookPrev selects command outputs by whole row" {
if (platform == .web) return;
var cwd_buf: [4096]u8 = undefined;
var path_buf: [4096]u8 = undefined;
@@ -993,22 +1086,22 @@ test "n/N selects command outputs by whole row" {
defer p.deinit();
p.update(.{ .resize = .{ .cols = 100, .rows = 40 } });
- try std.testing.expect(p.executeBuiltinLine(p.active, "ThemeSel"));
+ try std.testing.expect(p.executeBuiltinLine(p.active, "Themes"));
const tid = p.panes[p.active].?.search_pane orelse return error.MissingThemeList;
const themes = p.panes[tid].?;
try std.testing.expect(panes.Output.fileTraits(themes.file.?.output).commands);
- p.update(.{ .key = .{ .cp = 'n' } });
+ lookKey(p, 'n');
const row0 = std.mem.trimEnd(u8, modal.lineSlice(themes.file.?.content, 1), " \t\r");
try std.testing.expectEqualStrings(row0, selectedOutputText(themes) orelse "");
const theme_before = p.settings.theme;
- p.update(.{ .key = .{ .cp = 'n' } });
+ lookKey(p, 'n');
p.update(.{ .key = .{ .cp = Key.tab } });
try std.testing.expect(p.settings.theme != theme_before);
try std.testing.expect(p.executeBuiltinLine(0, "Look build.zig"));
p.update(.tick);
try std.testing.expect(p.active != 0);
- p.update(.{ .key = .{ .cp = 'n' } });
+ lookKey(p, 'n');
try std.testing.expectEqual(@as(usize, 0), p.active);
}
@@ -1024,10 +1117,10 @@ test "identical result refresh keeps warm content caches without allocation" {
const id = source.search_pane orelse return error.MissingResults;
const result = p.panes[id].?;
const file = &result.file.?;
- result.cur_row = 1;
- result.cur_col = 12;
- result.vsel = .{ .active = true, .explicit = true, .row = 0, .col = 2 };
- result.select = true;
+ result.body.cur_row = 1;
+ result.body.cur_col = 12;
+ result.body.vsel = .{ .active = true, .explicit = true, .row = 0, .col = 2 };
+ result.body.select = true;
file.scroll = 1;
result.hscroll = 3;
panes.File.refreshHighlights(p);
@@ -1040,7 +1133,7 @@ test "identical result refresh keeps warm content caches without allocation" {
const body_ptr = file.content.ptr;
const style_ptr = file.highlights.ptr;
const highlight_start = file.highlight_start;
- const selected = result.vsel;
+ const selected = result.body.vsel;
const event_node = pardes.ctlfs.Node.of(result.serial, .event);
const opened = pardes.ctlfs.handle(p, .{ .tag = 0, .op = .open, .node = event_node });
try std.testing.expectEqual(.ok, opened.status);
@@ -1071,10 +1164,10 @@ test "identical result refresh keeps warm content caches without allocation" {
try std.testing.expectEqual(freed + text.len, allocator.freed_bytes);
try std.testing.expectEqual(deallocations + 1, allocator.deallocations);
try std.testing.expect(!allocator.has_induced_failure);
- try std.testing.expectEqual(selected, result.vsel);
- try std.testing.expect(result.select);
- try std.testing.expectEqual(@as(i32, 1), result.cur_row);
- try std.testing.expectEqual(@as(i32, 12), result.cur_col);
+ try std.testing.expectEqual(selected, result.body.vsel);
+ try std.testing.expect(result.body.select);
+ try std.testing.expectEqual(@as(i32, 1), result.body.cur_row);
+ try std.testing.expectEqual(@as(i32, 12), result.body.cur_col);
try std.testing.expectEqual(@as(usize, 1), file.scroll);
try std.testing.expectEqual(@as(i32, 3), result.hscroll);
try std.testing.expectEqualStrings("after", file.output.?.arg());
@@ -1082,23 +1175,24 @@ test "identical result refresh keeps warm content caches without allocation" {
try std.testing.expectEqual(id, source.search_pane.?);
try std.testing.expectEqual(@as(usize, 1), source.search_row.?);
try std.testing.expectEqual(result.serial, p.look_walk_owner.?);
- try std.testing.expect(p.fs.panes[id].events.empty());
+ try std.testing.expect(p.panes[id].?.fs.events.empty());
}
try panes.Output.fillResults(p, 0, "/tmp", .{ .query = .references }, "changed", try p.gpa.dupe(u8, "short\n"), null);
try std.testing.expectEqual(revision + 1, file.revision);
try std.testing.expectEqualStrings("short\n", file.content);
try std.testing.expectEqualStrings("changed", file.output.?.arg());
- try std.testing.expectEqual(@as(usize, 0), file.line_starts.len);
+ // The warm index is carried through the edit, not dropped.
+ try std.testing.expectEqualSlices(usize, &.{ 0, 6 }, file.line_starts);
try std.testing.expectEqual(@as(usize, 0), file.highlights.len);
try std.testing.expect(file.syntax_dirty);
- try std.testing.expect(!result.vsel.active and !result.select);
- try std.testing.expectEqual(@as(i32, 0), result.cur_row);
- try std.testing.expectEqual(@as(i32, 0), result.cur_col);
+ try std.testing.expect(!result.body.vsel.active and !result.body.select);
+ try std.testing.expectEqual(@as(i32, 0), result.body.cur_row);
+ try std.testing.expectEqual(@as(i32, 0), result.body.cur_col);
try std.testing.expectEqual(@as(usize, 0), file.scroll);
try std.testing.expectEqual(@as(i32, 0), result.hscroll);
try std.testing.expect(source.search_row == null);
- const events = &p.fs.panes[id].events;
+ const events = &p.panes[id].?.fs.events;
try std.testing.expect(std.mem.startsWith(u8, events.peek().?, "KD"));
events.pop();
try std.testing.expect(std.mem.startsWith(u8, events.peek().?, "KI"));
@@ -1210,15 +1304,15 @@ test "result alignment chunks keep seventeen matches independent and refresh sta
const content = file.content.ptr;
const revision = file.revision;
const index = try panes.File.lineIndex(p.gpa, file);
- result.cur_row = 8;
- result.cur_col = @intCast(file.location_rows[8].code_start);
+ result.body.cur_row = 8;
+ result.body.cur_col = @intCast(file.location_rows[8].code_start);
try panes.Output.fillResults(p, 0, "/", origin, "chunks", try p.gpa.dupe(u8, input.items), 8);
try std.testing.expectEqual(result_id, source.search_pane.?);
try std.testing.expectEqual(content, file.content.ptr);
try std.testing.expectEqual(revision, file.revision);
try std.testing.expectEqual(index.ptr, file.line_starts.ptr);
try std.testing.expectEqual(@as(usize, 8), source.search_row.?);
- try std.testing.expectEqual(@as(i32, 8), result.cur_row);
+ try std.testing.expectEqual(@as(i32, 8), result.body.cur_row);
for (file.location_rows, starts) |row, start| try std.testing.expectEqual(start, row.code_start);
// Simulate a restored view made by the previous global-padding
@@ -1558,19 +1652,19 @@ test "stacked search and LSP results retain source tint navigation and dump owne
}
try std.testing.expectEqual(@as(usize, 6), marked);
const number = std.mem.indexOf(u8, file.content, "42").?;
- try std.testing.expectEqual(@intFromEnum(pardes.syntax.Syn.number), file.highlights[number]);
+ try std.testing.expectEqual(@backingInt(pardes.syntax.Syn.number), file.highlights[number]);
p.active = id;
- pane.mode = .normal;
- p.armLookWalk(id);
+ pane.body.mode = .normal;
+ pardes.look.armLookWalk(p, id);
for ([_]struct { key: u21, match: usize }{ .{ .key = 'n', .match = 0 }, .{ .key = 'n', .match = 1 }, .{ .key = 'N', .match = 0 } }) |step| {
- p.update(.{ .key = .{ .cp = step.key } });
- try std.testing.expectEqual(@as(i32, @intCast(matches[step.match])), pane.cur_row);
+ lookKey(p, step.key);
+ try std.testing.expectEqual(@as(i32, @intCast(matches[step.match])), pane.body.cur_row);
const row = file.location_rows[matches[step.match]];
const line = modal.lineSlice(file.content, matches[step.match]);
try std.testing.expectEqualStrings(line[0..row.location_end], selectedOutputText(pane) orelse "");
}
- try p.dumpState();
- const restored = try Pardes.initFromDump(p.gpa, .{ .tty_only = true }, p.dump_out.?);
+ try pardes.dump.dumpState(p);
+ const restored = try pardes.dump.initFromDump(p.gpa, .{ .tty_only = true }, p.dump_out.?);
defer restored.deinit();
const restored_file = &restored.panes[id].?.file.?;
try std.testing.expectEqualStrings(file.content, restored_file.content);
@@ -1584,9 +1678,14 @@ test "stacked search and LSP results retain source tint navigation and dump owne
try std.testing.expectEqualSlices(u8, before.colors, after.colors);
}
restored.active = id;
- restored.armLookWalk(id);
- restored.update(.{ .key = .{ .cp = 'N' } });
- try std.testing.expectEqual(@as(i32, @intCast(matches[1])), restored.panes[id].?.cur_row);
+ pardes.look.armLookWalk(restored, id);
+ // The dot came back on the match it was on; the walk goes on
+ // from it both ways, N wrapping to the last as it does live.
+ try std.testing.expectEqual(@as(i32, @intCast(matches[0])), restored.panes[id].?.body.cur_row);
+ lookKey(restored, 'N');
+ try std.testing.expectEqual(@as(i32, @intCast(matches[1])), restored.panes[id].?.body.cur_row);
+ lookKey(restored, 'n');
+ try std.testing.expectEqual(@as(i32, @intCast(matches[0])), restored.panes[id].?.body.cur_row);
try std.testing.expectEqualStrings(source_text, source.file.?.content);
}
}
@@ -1712,7 +1811,7 @@ test "location cache eviction retains early colors and honors disk and unsaved r
return error.MissingEarlyContext;
}
};
- try std.testing.expectEqual(@intFromEnum(pardes.syntax.Syn.comment), try Color.valueColor(file));
+ try std.testing.expectEqual(@backingInt(pardes.syntax.Syn.comment), try Color.valueColor(file));
const single = "f00.c:4:1-6 needle();\n";
// Put the evicted file back before a same-size edit tests exact-byte keys.
try panes.Output.fillResults(p, 0, dir, .search, "eviction", try p.gpa.dupe(u8, single), null);
@@ -1720,13 +1819,18 @@ test "location cache eviction retains early colors and honors disk and unsaved r
try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "f00.c", .data = code });
try panes.Output.fillResults(p, 0, dir, .search, "eviction", try p.gpa.dupe(u8, single), null);
try std.testing.expect(p.locations_cache.analyses > analyses);
- try std.testing.expectEqual(@intFromEnum(pardes.syntax.Syn.number), try Color.valueColor(file));
+ try std.testing.expectEqual(@backingInt(pardes.syntax.Syn.number), try Color.valueColor(file));
// An open buffer has priority over that disk revision, even with equal size.
p.gpa.free(source.file.?.path);
source.file.?.path = try std.fs.path.join(p.gpa, &.{ dir, "f00.c" });
panes.File.setContent(p, &source.file.?, try p.gpa.dupe(u8, comment));
try panes.Output.fillResults(p, 0, dir, .search, "eviction", try p.gpa.dupe(u8, single), null);
- try std.testing.expectEqual(@intFromEnum(pardes.syntax.Syn.comment), try Color.valueColor(file));
+ try std.testing.expectEqual(@backingInt(pardes.syntax.Syn.comment), try Color.valueColor(file));
try std.testing.expectEqualStrings(comment, source.file.?.content);
}
+
+fn lookKey(p: *Pardes, key: u21) void {
+ for ([_]u21{ ' ', 'j', if (key == 'N') 'p' else 'n' }) |cp|
+ p.update(.{ .key = .{ .cp = cp } });
+}
diff --git a/test/panes.zig b/test/panes.zig
index d3c29856..e2cd85dc 100644
--- a/test/panes.zig
+++ b/test/panes.zig
@@ -2,6 +2,7 @@ const std = @import("std");
const pardes = @import("pardes");
const panes = pardes.panes;
const layout = pardes.layout;
+const animation = pardes.animation;
const Pardes = pardes.Pardes;
const Pane = pardes.Pane;
const Key = pardes.Key;
@@ -12,18 +13,23 @@ const image = pardes.image;
const syntax = pardes.syntax;
const filesystem = pardes.filesystem;
+fn setTag(pane: *Pane, text: []const u8) !void {
+ if (pane.tag.own) |own| pane.gpa.free(own);
+ pane.tag.own = try pane.gpa.dupe(u8, text);
+}
+
const TagLayerTests = struct {
- const Kind = @FieldType(pardes.TagLayer, "kind");
- fn findLayer(p: *Pardes, kind: Kind, id: usize) !*pardes.TagLayer {
+ const Kind = @FieldType(pardes.Layer, "kind");
+ fn findLayer(p: *Pardes, kind: Kind, id: usize) !*pardes.Layer {
for (&p.surface.tag_layers) |*layer| {
- if (layer.cols > 0 and layer.kind == kind and layer.id == id) return layer;
+ if (layer.rows > 0 and layer.kind == kind and layer.id == id) return layer;
}
return error.MissingTagLayer;
}
- fn mouse(layer: *const pardes.TagLayer, x: f32, kind: pardes.Mouse.Kind) pardes.Mouse {
+ fn mouse(layer: *const pardes.Layer, x: f32, kind: pardes.Mouse.Kind) pardes.Mouse {
const y = (@as(f32, @floatFromInt(layer.viewport.y)) + 0.5) * 20;
- return .{ .button = .left, .kind = kind, .col = @intFromFloat(x / 10), .row = @intFromFloat(y / 20), .tag_hit = layer.hitAt(x, y, 10, 20, 5, 10) };
+ return .{ .button = .left, .kind = kind, .col = @intFromFloat(x / 10), .row = @intFromFloat(y / 20), .tag_hit = layer.tagHit(x, y, 10, 20, 5, 10) };
}
test "compact tag layers render and edit Unicode text beyond body column capacity" {
@@ -36,15 +42,12 @@ const TagLayerTests = struct {
p.row_metrics = .{ .body_w = 10, .body_h = 20, .tagline_w = 5, .tagline_h = 10 };
p.gpa.free(pane.file.?.path);
pane.file.?.path = try p.gpa.dupe(u8, "/x");
- const tail = " " ++ "a" ** 38 ++ "\t界 END";
- @memcpy(pane.tag_tail[0..tail.len], tail);
- pane.tag_tail_len = tail.len;
- pane.tag_init = true;
+ try setTag(pane, " " ++ &@as([38]u8, @splat('a')) ++ "\t界 END");
var frame = std.heap.ArenaAllocator.init(p.gpa);
defer frame.deinit();
_ = try p.render(frame.allocator());
const layer = try findLayer(p, .pane, 0);
- const text = try p.tagText(frame.allocator(), pane);
+ const text = try pardes.tagline.tagText(p, frame.allocator(), pane);
const at = std.mem.indexOf(u8, text, "END").?;
const col = panes.File.displayWidth(text[0..at]);
try std.testing.expect(col > p.rects[0].w);
@@ -55,20 +58,20 @@ const TagLayerTests = struct {
var stale = mouse(layer, x, .press);
stale.tag_hit.?.serial +%= 1;
p.update(.{ .mouse = stale });
- try std.testing.expect(!pane.tag_edit);
+ try std.testing.expect(pane.focus == .body);
p.update(.{ .mouse = mouse(layer, x, .press) });
p.update(.{ .mouse = mouse(layer, x, .release) });
- try std.testing.expect(pane.tag_edit);
- try std.testing.expectEqual(@as(u16, @intCast(at)), pane.tag_col);
+ try std.testing.expect(pane.focus == .tag);
+ try std.testing.expectEqual(at, @as(usize, @intCast(pane.tag.cur_col)));
p.update(.{ .key = .{ .cp = 'X', .text = "X" } });
_ = try p.render(frame.allocator());
- const edited = try p.tagText(frame.allocator(), pane);
+ const edited = try pardes.tagline.tagText(p, frame.allocator(), pane);
try std.testing.expect(std.mem.endsWith(u8, edited, "界 XEND"));
try std.testing.expectEqual(@as(u16, 0), pane.tag_scroll);
try std.testing.expectEqualStrings("body\n", pane.file.?.content);
p.update(.{ .key = .{ .cp = Key.escape } });
const rect = p.rects[0];
- const track: layout.Track = .{
+ const track: animation.Track = .{
.serial = pane.serial,
.pane = 0,
.effect = .zoom,
@@ -83,6 +86,8 @@ const TagLayerTests = struct {
const source_y = @as(f32, @floatFromInt(layer.viewport.y)) + 0.5;
const painted_x = shown.x + (x / 10 - track.to.x) / track.to.w * shown.w;
const painted_y = shown.y + (source_y - track.to.y) / track.to.h * shown.h;
+ // Each is a first click, whatever cell the one before hit.
+ p.last_click = null;
for ([_]pardes.Mouse.Kind{ .press, .release }) |kind| {
var event = mouse(layer, x, kind);
// Hosts inverse the exact painted pixel into the tag envelope;
@@ -91,7 +96,7 @@ const TagLayerTests = struct {
event.row = @intFromFloat(painted_y);
p.update(.{ .mouse = event });
}
- try std.testing.expectEqual(@as(u16, @intCast(at)), pane.tag_col);
+ try std.testing.expectEqual(at, @as(usize, @intCast(pane.tag.cur_col)));
}
}
@@ -100,7 +105,6 @@ const TagLayerTests = struct {
defer p.deinit();
_ = try p.setTestFile("body\n");
p.presentation.enabled = false;
- p.settings.column_tags = true;
p.row_metrics = .{ .body_w = 10, .body_h = 20, .tagline_w = 5, .tagline_h = 10 };
try std.testing.expect(p.executeBuiltinLine(0, "New"));
const second = p.active;
@@ -117,24 +121,24 @@ const TagLayerTests = struct {
try std.testing.expectEqual(second, p.drag.move.id);
p.update(.{ .mouse = mouse(layer, grip_edge - 0.1, .release) });
try std.testing.expectEqualStrings(" ", p.surface.at(layer.viewport.x - 1, layer.viewport.y).grapheme());
- p.update(.{ .mouse = mouse(layer, edge - 0.1, .press) });
- try std.testing.expect(p.drag != .move);
- try std.testing.expect(!p.panes[second].?.tag_edit);
- p.update(.{ .mouse = mouse(layer, edge - 0.1, .release) });
+ if (pardes.TAG_GAP > 0) {
+ p.update(.{ .mouse = mouse(layer, edge - 0.1, .press) });
+ try std.testing.expect(p.drag != .move);
+ try std.testing.expect(p.panes[second].?.focus == .body);
+ p.update(.{ .mouse = mouse(layer, edge - 0.1, .release) });
+ }
p.update(.{ .mouse = mouse(layer, edge + 0.1, .press) });
p.update(.{ .mouse = mouse(layer, edge + 0.1, .release) });
try std.testing.expectEqual(second, p.active);
- try std.testing.expect(p.panes[second].?.tag_edit);
- try std.testing.expectEqual(@as(u16, 0), p.panes[second].?.tag_col);
+ // The first cell of the tag is its path: a click there drafts a name.
+ try std.testing.expect(p.panes[second].?.prompt == .name);
+ try std.testing.expectEqual(@as(i32, 0), p.panes[second].?.input.cur_col);
p.update(.{ .key = .{ .cp = Key.escape } });
const left = p.panes[0].?;
- const tail = " " ++ "a" ** 110;
- @memcpy(left.tag_tail[0..tail.len], tail);
- left.tag_tail_len = tail.len;
- left.tag_init = true;
+ try setTag(left, " " ++ &@as([110]u8, @splat('a')));
_ = try p.render(frame.allocator());
const left_layer = try findLayer(p, .pane, 0);
- const left_text = try p.tagText(frame.allocator(), left);
+ const left_text = try pardes.tagline.tagText(p, frame.allocator(), left);
const start_x = @as(f32, @floatFromInt(left_layer.viewport.x)) * 10 + 12.5;
const beyond_x = edge + 12.5;
p.update(.{ .mouse = mouse(left_layer, start_x, .press) });
@@ -142,12 +146,12 @@ const TagLayerTests = struct {
p.update(.{ .mouse = mouse(layer, beyond_x, .release) });
try std.testing.expectEqual(@as(usize, 0), p.active);
const end_col = left_layer.capacity(p.row_metrics) - 1;
- try std.testing.expectEqual(@as(u16, @intCast(panes.File.rawAtDisplay(left_text, end_col))), left.tag_col);
- try std.testing.expect(left.tag_sel);
+ try std.testing.expectEqual(panes.File.rawAtDisplay(left_text, end_col), @as(usize, @intCast(left.tag.cur_col)));
+ try std.testing.expect(left.sel[0].state == .done and left.sel[0].r0 == 0);
p.update(.{ .key = .{ .cp = Key.escape } });
- const long = "a" ** 60 ++ "界END";
- try std.testing.expect(p.global_tag.set(long));
- for (p.col_tags[0..p.ncol]) |*tag| try std.testing.expect(tag.set(long));
+ const long = &@as([60]u8, @splat('a')) ++ "界END";
+ p.global_tag.own = try p.gpa.dupe(u8, long);
+ for (p.col_tags[0..p.ncol]) |*tag| tag.own = try p.gpa.dupe(u8, long);
_ = try p.render(frame.allocator());
for ([_]Kind{ .workspace, .column }) |kind| {
const id: usize = if (kind == .column) 1 else 0;
@@ -155,24 +159,235 @@ const TagLayerTests = struct {
const x = @as(f32, @floatFromInt(header.viewport.x)) * 10 + 62.5 * 5;
p.update(.{ .mouse = mouse(header, x, .press) });
p.update(.{ .mouse = mouse(header, x, .release) });
- try std.testing.expectEqual(@as(?u16, 63), p.topbar_col);
+ try std.testing.expectEqual(@as(i32, 63), pardes.tagline.focusedHeader(p).?.cur_col);
if (kind == .column) try std.testing.expectEqual(@as(?usize, 1), p.header_column) else try std.testing.expect(p.header_column == null);
p.update(.{ .key = .{ .cp = Key.escape } });
}
}
};
+// Rows relative to where the pane's body and tag are, whatever height its
+// tag has (a tag wraps onto more rows when it is long).
+fn paneAt(p: *Pardes, r: anytype) *pardes.Pane {
+ for (p.panes, 0..) |slot, id| if (slot) |pane| if (std.meta.eql(p.rects[id], r)) return pane;
+ unreachable;
+}
+fn bodyY(p: *Pardes, r: anytype) u16 {
+ return p.bodyTop(paneAt(p, r), r);
+}
+fn bodyH(p: *Pardes, r: anytype) u16 {
+ return r.h -| paneAt(p, r).tag_rows;
+}
+fn tagY(p: *Pardes, r: anytype) u16 {
+ return p.tagTop(paneAt(p, r), r);
+}
+
+test "a tag with a newline in it is as tall as its lines, and each line is typed into and pointed at" {
+ for ([_]bool{ false, true }) |bottom| {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 80, .rows = 14 });
+ defer p.deinit();
+ const pane = try p.setTestFile("body\n");
+ p.presentation.enabled = false;
+ p.settings.tag_bottom = bottom;
+ p.update(.tick);
+ try std.testing.expectEqual(@as(u16, 1), pane.tag_rows);
+ const height = p.rects[0].h;
+ const body_rows = pane.rows;
+ // Insert mode in a tag is a body's: Enter is a new line.
+ p.update(.{ .key = .{ .cp = ':' } });
+ p.update(.{ .key = .{ .cp = 'A' } });
+ p.update(.{ .key = .{ .cp = Key.enter } });
+ p.update(.{ .key = .{ .cp = 'S', .text = "Second" } });
+ try std.testing.expect(std.mem.endsWith(u8, pardes.tagline.curTail(pane), "\nSecond"));
+ try std.testing.expectEqual(@as(u16, 2), pane.tag_rows);
+ // The pane keeps its height; the body gives the tag its row.
+ try std.testing.expectEqual(height, p.rects[0].h);
+ try std.testing.expectEqual(body_rows - 1, pane.rows);
+ var frame = std.heap.ArenaAllocator.init(std.testing.allocator);
+ defer frame.deinit();
+ const surface = try p.render(frame.allocator());
+ const r = p.rects[0];
+ const tag_y = p.tagTop(pane, r);
+ const x = r.x + pardes.TAG_TEXT_INSET;
+ try std.testing.expectEqualStrings("/", surface.at(x, tag_y).grapheme());
+ for ("Second", 0..) |byte, i| try std.testing.expectEqual(byte, surface.at(x + @as(u16, @intCast(i)), tag_y + 1).text[0]);
+ try std.testing.expectEqual(pardes.FontRole.tagline, surface.at(x, tag_y + 1).style.font_role);
+ // the caret is on the second line, after what was typed
+ try std.testing.expectEqual(tag_y + 1, surface.cursor.?.y);
+ try std.testing.expectEqual(x + 6, surface.cursor.?.x);
+ // the body starts under (or over) the whole tag
+ const body_y = p.bodyTop(pane, r);
+ try std.testing.expectEqual(if (bottom) r.y else r.y + 2, body_y);
+ try std.testing.expectEqualStrings("b", surface.at(r.x + config.GUTTER + panes.File.gutterWidth(pane), body_y).grapheme());
+ // one layer, a row to each line, for a pixel shell
+ var layers: usize = 0;
+ for (p.surface.tagLayers()) |*layer| {
+ if (layer.rows == 0 or layer.kind != .pane or layer.id != 0) continue;
+ try std.testing.expectEqual(tag_y, layer.viewport.y);
+ try std.testing.expectEqual(@as(u16, 2), layer.rows);
+ try std.testing.expectEqual(@as(u16, 2), layer.viewport.h);
+ layers += 1;
+ }
+ try std.testing.expectEqual(@as(usize, 1), layers);
+ // a click on the second line puts the tag's cursor on it
+ p.update(.{ .key = .{ .cp = Key.escape } });
+ p.update(.{ .key = .{ .cp = ':' } });
+ ClickCursorTests.click(p, .left, x + 2, tag_y + 1);
+ try std.testing.expect(pane.focus == .tag);
+ try std.testing.expectEqual(@as(i32, 1), pane.tag.cur_row);
+ try std.testing.expectEqual(@as(i32, 2), pane.tag.cur_col);
+ // and the pane's text, a row to a screen row, has both of its lines
+ const text = try pardes.edit.paneText(p, pane);
+ try std.testing.expect(std.mem.startsWith(u8, modal.lineSlice(text, 0), "/test.txt"));
+ try std.testing.expectEqualStrings("Second", modal.lineSlice(text, 1));
+ try std.testing.expectEqualStrings("body\n", pane.file.?.content);
+ }
+}
+
+test "a tag with more lines than rows scrolls to keep its caret in view" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 80, .rows = 30 });
+ defer p.deinit();
+ const pane = try p.setTestFile("body\n");
+ p.presentation.enabled = false;
+ var many: std.ArrayList(u8) = .empty;
+ defer many.deinit(std.testing.allocator);
+ for (1..21) |n| try many.print(std.testing.allocator, "\nL{d}", .{n});
+ try pane.appendTag(many.items);
+ p.update(.tick);
+ try std.testing.expectEqual(@as(u16, pardes.MAX_TAG_ROWS), pane.tag_rows);
+ var frame = std.heap.ArenaAllocator.init(std.testing.allocator);
+ defer frame.deinit();
+ const r = p.rects[0];
+ const x = r.x + pardes.TAG_TEXT_INSET;
+ // To the last line: the tag scrolls so it is the bottom row, caret on it.
+ p.update(.{ .key = .{ .cp = ':' } });
+ p.update(.{ .key = .{ .cp = 'g' } });
+ p.update(.{ .key = .{ .cp = 'e' } });
+ try std.testing.expectEqual(@as(i32, 20), pane.tag.cur_row);
+ const bottom = try p.render(frame.allocator());
+ const tag_y = p.tagTop(pane, r);
+ const last_row = tag_y + pardes.MAX_TAG_ROWS - 1;
+ try std.testing.expectEqual(last_row, bottom.cursor.?.y);
+ try std.testing.expectEqualStrings("L", bottom.at(x, last_row).grapheme());
+ try std.testing.expectEqualStrings("2", bottom.at(x + 1, last_row).grapheme());
+ try std.testing.expectEqualStrings("0", bottom.at(x + 2, last_row).grapheme());
+ // what the pointer sees is what is shown: its first row is line 13
+ const text = try pardes.edit.paneText(p, pane);
+ try std.testing.expectEqualStrings("L13", modal.lineSlice(text, 0));
+ ClickCursorTests.click(p, .left, x + 1, tag_y + 1);
+ try std.testing.expectEqual(@as(i32, 14), pane.tag.cur_row);
+ try std.testing.expectEqual(@as(i32, 1), pane.tag.cur_col);
+ // Back to the first line brings the prefix back into view.
+ p.update(.{ .key = .{ .cp = Key.escape } });
+ p.update(.{ .key = .{ .cp = 'g' } });
+ p.update(.{ .key = .{ .cp = 'g' } });
+ const top = try p.render(frame.allocator());
+ try std.testing.expectEqual(@as(u16, 0), pane.tag_top);
+ try std.testing.expectEqual(tag_y, top.cursor.?.y);
+ try std.testing.expectEqualStrings("/", top.at(x, tag_y).grapheme());
+
+ // A column tag is one row, as acme's: its lines are joined.
+ many.clearRetainingCapacity();
+ try many.appendSlice(std.testing.allocator, "New");
+ for (1..21) |n| try many.print(std.testing.allocator, "\nC{d}", .{n});
+ p.col_tags[0].own = try p.gpa.dupe(u8, many.items);
+ p.update(.tick);
+ try std.testing.expectEqual(pardes.COLBAR_H, p.columnBarHeight());
+ try std.testing.expect(std.mem.indexOfScalar(u8, p.col_tags[0].own.?, '\n') == null);
+}
+
const TagNavigationTests = struct {
fn key(p: *Pardes, cp: u21) void {
p.update(.{ .key = .{ .cp = cp } });
}
- fn enterNormal(p: *Pardes) *Pane {
+ test "s, S and | in a tag answer for the tag's own text; / still searches the body" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 100, .rows = 20 });
+ defer p.deinit();
+ const pane = try p.setTestFile("Some body\n");
+ try setTag(pane, " Save Del Snarf");
+ key(p, ':');
+ key(p, 'x'); // the tag's line
+ key(p, 's');
+ try std.testing.expect(pane.prompt == .search and pane.prompt_for == .tag and pane.focus == .tag);
+ p.update(.{ .key = .{ .cp = 'S', .text = "S" } });
+ key(p, Key.enter);
+ try std.testing.expect(pane.focus == .tag and pane.prompt == .none);
+ var ranges: [panes.Text.max_selections]modal.Selection = undefined;
+ const text = try pardes.edit.flatSurface(p, &pane.tag);
+ const got = pane.tag.ranges(text, 0, &ranges);
+ try std.testing.expectEqual(@as(usize, 2), got.n);
+ for (ranges[0..got.n]) |range| try std.testing.expectEqualStrings("S", text[@min(range.anchor, range.head)..@max(range.anchor, range.head)]);
+ // the body's selection is its own
+ try std.testing.expectEqual(@as(u16, 0), pane.body.nsel);
+ // `/` from the tag is the body's search, as acme's Look from a tag is
+ key(p, ',');
+ key(p, '/');
+ try std.testing.expect(pane.prompt == .search and pane.prompt_for == .body and pane.focus == .body);
+ key(p, Key.escape);
+ try std.testing.expect(pane.prompt == .none and pane.focus == .body);
+ }
+
+ test "ms and md edit a tag's own text, and the text the edit made is read back whole" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 100, .rows = 20 });
+ defer p.deinit();
+ const pane = try p.setTestFile("body\n");
+ p.update(.tick);
+ key(p, ':'); // the tag, on `Save` the first time
+ for ("miwms(") |cp| key(p, cp);
+ try std.testing.expect(std.mem.indexOf(u8, pardes.tagline.curTail(pane), "(Save)") != null);
+ for ("md(") |cp| key(p, cp);
+ try std.testing.expect(std.mem.indexOf(u8, pardes.tagline.curTail(pane), " Save ") != null);
+ try std.testing.expect(std.mem.indexOf(u8, pardes.tagline.curTail(pane), "(") == null);
+ }
+
+ test "the keyboard reaches a tag's path, which it can select and yank but not edit" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 100, .rows = 20 });
+ defer p.deinit();
+ const pane = try p.setTestFile("body\n");
+ p.update(.tick);
key(p, ':');
- return p.panes[p.active].?;
+ // `0` is the line's start, as in acme, where the name is ordinary text
+ key(p, '0');
+ try std.testing.expectEqual(@as(i32, 0), pane.tag.cur_col);
+ key(p, 'E');
+ key(p, 'y');
+ try std.testing.expectEqualStrings("/test.txt", p.registers.text(p.gpa, '"').?);
+ // an edit that reaches into it is refused, the cursor with it
+ const before = try std.testing.allocator.dupe(u8, try pardes.edit.flatSurface(p, &pane.tag));
+ defer std.testing.allocator.free(before);
+ const cursor = pane.tag.cur_col;
+ key(p, 'd');
+ try std.testing.expectEqualStrings(before, try pardes.edit.flatSurface(p, &pane.tag));
+ try std.testing.expectEqual(cursor, pane.tag.cur_col);
+ try std.testing.expect(pane.tag.vsel.active);
+ // typed into, the path drafts a name there, as a click on it does
+ key(p, ';');
+ key(p, '0');
+ key(p, 'i');
+ p.update(.{ .key = .{ .cp = 'x', .text = "x" } });
+ try std.testing.expect(pane.prompt == .name);
+ try std.testing.expectEqualStrings("x/test.txt", pane.input.own.?);
+ // Esc keeps the draft pending; a second drops it.
+ key(p, Key.escape);
+ key(p, Key.escape);
+ try std.testing.expect(pane.prompt == .none);
+ try std.testing.expectEqualStrings("/test.txt", pane.file.?.path);
+ // after the path, the text is the tag's own to edit
+ key(p, ':');
+ key(p, 'A');
+ p.update(.{ .key = .{ .cp = '!', .text = "!" } });
+ try std.testing.expect(std.mem.endsWith(u8, pardes.tagline.curTail(pane), "!"));
+ try std.testing.expectEqualStrings("body\n", pane.file.?.content);
}
- test "tag navigation retains each pane cursor and mouse placement overrides memory" {
+ fn window(p: *Pardes, letter: u21) void {
+ p.update(.{ .key = .{ .cp = 'w', .ctrl = true } });
+ key(p, letter);
+ key(p, Key.enter);
+ }
+
+ test "a tag remembers its cursor, starts on Save, and a click moves it" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 100, .rows = 20 });
defer p.deinit();
const first = try p.setTestFile("body\n");
@@ -183,65 +398,100 @@ const TagNavigationTests = struct {
try std.testing.expect(layout.splitColumn(p, second_id, second_id, false));
p.update(.tick);
p.active = 0;
+ // Nothing to remember yet: `:` lands on Save, in normal mode.
key(p, ':');
+ try std.testing.expect(first.focus == .tag and first.tag.mode == .normal);
+ const shown = try pardes.edit.flatSurface(p, &first.tag);
+ try std.testing.expectEqualStrings("Save", shown[@intCast(first.tag.cur_col)..][0..4]);
+ // Home is the line's start, the path's: the keyboard reaches it.
key(p, Key.home);
for (0..3) |_| key(p, Key.right);
- const first_col = first.tag_col;
- key(p, Key.escape);
+ try std.testing.expectEqual(@as(i32, 3), first.tag.cur_col);
+ // `:` in the tag's normal mode is the way back to the body.
+ key(p, ':');
+ try std.testing.expect(first.focus == .body);
p.active = second_id;
key(p, ':');
key(p, Key.home);
for (0..5) |_| key(p, Key.right);
- const second_col = second.tag_col;
- key(p, Key.escape);
+ key(p, ':');
p.active = 0;
key(p, ':');
- try std.testing.expectEqual(first_col, first.tag_col);
- key(p, Key.escape);
+ try std.testing.expectEqual(@as(i32, 3), first.tag.cur_col);
+ key(p, ':');
p.active = second_id;
key(p, ':');
- try std.testing.expectEqual(second_col, second.tag_col);
- key(p, Key.escape);
+ try std.testing.expectEqual(@as(i32, 5), second.tag.cur_col);
+ key(p, ':');
var frame = std.heap.ArenaAllocator.init(p.gpa);
defer frame.deinit();
_ = try p.render(frame.allocator());
const rect = p.rects[0];
- const y = if (p.settings.tag_bottom) rect.y + rect.h - pardes.BOX_H else rect.y;
- ClickCursorTests.click(p, .left, rect.x + pardes.TAG_TEXT_INSET + 6, y);
+ const y = tagY(p, rect);
+ const prefix: u16 = @intCast(panes.File.displayWidth(try pardes.tagline.tagPrefix(p, first)));
+ ClickCursorTests.click(p, .left, rect.x + pardes.TAG_TEXT_INSET + prefix + 6, y);
try std.testing.expectEqual(@as(usize, 0), p.active);
- try std.testing.expectEqual(@as(u16, 6), first.tag_col);
- key(p, Key.escape);
- p.startPrompt(first, .{ .search = config.search_marker });
+ try std.testing.expect(first.focus == .tag and first.tag.mode == .insert);
+ try std.testing.expectEqual(@as(i32, prefix + 6), first.tag.cur_col);
key(p, Key.escape);
key(p, ':');
- try std.testing.expectEqual(@as(u16, 6), first.tag_col);
+ p.startPrompt(first, &first.body, .{ .search = config.search_marker });
key(p, Key.escape);
+ key(p, ':');
+ try std.testing.expectEqual(@as(i32, prefix + 6), first.tag.cur_col);
+ key(p, ':');
try std.testing.expectEqualStrings("body\n", first.file.?.content);
}
- test "tag navigation clamps remembered columns to renamed graphemes and shorter tags" {
+ test "executing a word from the tag runs it and gives the keyboard back to the body" {
+ for ([_]u21{ Key.tab, Key.enter }) |chord| {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 100, .rows = 20 });
+ defer p.deinit();
+ const pane = try p.setTestFile("body\n");
+ p.update(.{ .key = .{ .cp = 'i' } });
+ p.update(.{ .key = .{ .cp = 'x', .text = "x" } });
+ p.update(.{ .key = .{ .cp = Key.escape } });
+ while (p.nextEffect()) |_| {}
+ // `:` lands on Save; the execute key runs it, the look key looks
+ // it up. Either way the tag lets go of the keyboard first.
+ key(p, ':');
+ try std.testing.expect(pane.focus == .tag);
+ key(p, chord);
+ try std.testing.expect(pane.focus == .body);
+ try std.testing.expectEqual(.normal, pane.body.mode);
+ var saved = false;
+ while (p.nextEffect()) |effect| {
+ if (effect == .save_file) saved = true;
+ }
+ try std.testing.expectEqual(chord == Key.tab, saved);
+ // ...and the tag still knows where it was.
+ key(p, ':');
+ try std.testing.expectEqualStrings("Save", (try pardes.edit.flatSurface(p, &pane.tag))[@intCast(pane.tag.cur_col)..][0..4]);
+ }
+ }
+
+ test "a renamed path moves the tag's cursor with the text after it and a shorter tag pulls it back" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 80, .rows = 14 });
defer p.deinit();
const pane = try p.setTestFile("body\n");
+ key(p, ':'); // on Save
key(p, ':');
- key(p, Key.home);
- for (0..3) |_| key(p, Key.right);
- key(p, Key.escape);
p.gpa.free(pane.file.?.path);
pane.file.?.path = try p.gpa.dupe(u8, "/界.zig");
+ p.update(.tick);
key(p, ':');
- try std.testing.expectEqual(@as(u16, 1), pane.tag_col);
- key(p, Key.end);
- key(p, Key.escape);
- p.gpa.free(pane.file.?.path);
- pane.file.?.path = try p.gpa.dupe(u8, "/é");
- pane.tag_tail_len = 0;
+ const shown = try pardes.edit.flatSurface(p, &pane.tag);
+ try std.testing.expectEqualStrings("Save", shown[@intCast(pane.tag.cur_col)..][0..4]);
+ key(p, ':');
+ try setTag(pane, "é");
+ p.update(.tick);
key(p, ':');
- try std.testing.expectEqual(@as(u16, 3), pane.tag_col);
+ // `/界.zig é`: the cursor is pulled back onto the last character
+ try std.testing.expectEqual(@as(i32, "/界.zig ".len), pane.tag.cur_col);
try std.testing.expectEqualStrings("body\n", pane.file.?.content);
}
- test "tag navigation J and K restore cursors in stacked panes" {
+ test "window keys move between panes from a tag and each tag keeps its cursor" {
for ([_]bool{ false, true }) |bottom| {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 80, .rows = 24 });
defer p.deinit();
@@ -253,99 +503,78 @@ const TagNavigationTests = struct {
const second = p.panes[second_id].?;
p.update(.tick);
p.active = 0;
- _ = enterNormal(p);
+ key(p, ':');
key(p, Key.home);
key(p, 'l');
key(p, 'l');
- key(p, 'J');
+ window(p, 'j');
try std.testing.expectEqual(second_id, p.active);
- try std.testing.expect(!first.tag_edit and second.tag_edit);
+ try std.testing.expect(first.focus == .body and second.focus == .body);
+ key(p, ':');
key(p, Key.home);
for (0..4) |_| key(p, 'l');
- key(p, 'K');
+ window(p, 'k');
try std.testing.expectEqual(@as(usize, 0), p.active);
- try std.testing.expectEqual(@as(u16, 2), first.tag_col);
- key(p, 'J');
- try std.testing.expectEqual(second_id, p.active);
- try std.testing.expectEqual(@as(u16, 4), second.tag_col);
+ try std.testing.expect(second.focus == .body);
+ key(p, ':');
+ try std.testing.expectEqual(@as(i32, 2), first.tag.cur_col);
+ window(p, 'j');
+ key(p, ':');
+ try std.testing.expectEqual(@as(i32, 4), second.tag.cur_col);
}
}
- test "tag navigation uses uppercase pane and header keys while lowercase stays local" {
+ test "a tag's normal mode is the body's: motions stay in the tag and insert types into it" {
for ([_]bool{ false, true }) |bottom| {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 100, .rows = 20 });
defer p.deinit();
_ = try p.setTestFile("body\n");
p.presentation.enabled = false;
p.settings.tag_bottom = bottom;
- p.settings.column_tags = true;
try std.testing.expect(p.executeBuiltinLine(0, "New"));
const right = p.active;
try std.testing.expect(layout.splitColumn(p, right, right, false));
p.update(.tick);
p.active = 0;
- const pane = enterNormal(p);
+ key(p, ':');
+ const pane = p.panes[0].?;
key(p, Key.home);
key(p, 'l');
- try std.testing.expectEqual(@as(u16, 1), pane.tag_col);
+ try std.testing.expectEqual(@as(i32, 1), pane.tag.cur_col);
key(p, 'h');
key(p, 'k');
- try std.testing.expectEqual(@as(u16, 0), pane.tag_col);
+ key(p, 'j');
+ try std.testing.expectEqual(@as(i32, 0), pane.tag.cur_col);
try std.testing.expectEqual(@as(usize, 0), p.active);
- try std.testing.expect(pane.tag_edit and p.topbar_col == null);
- key(p, 'L');
+ try std.testing.expect(pane.focus == .tag and !p.header_focus);
+ window(p, 'l');
try std.testing.expectEqual(right, p.active);
- try std.testing.expect(!pane.tag_edit and p.panes[right].?.tag_edit);
- key(p, 'H');
- try std.testing.expectEqual(@as(usize, 0), p.active);
- key(p, 'K');
- try std.testing.expect(p.topbar_col != null and p.header_column != null);
- try std.testing.expect(!pane.tag_edit);
- key(p, 'l');
- const column_cursor = p.topbar_col.?;
- key(p, 'K');
- try std.testing.expect(p.topbar_col != null and p.header_column == null);
- key(p, 'l');
- key(p, 'l');
- const workspace_cursor = p.topbar_col.?;
- key(p, 'J');
- try std.testing.expect(p.topbar_col != null and p.header_column != null);
- try std.testing.expectEqual(column_cursor, p.topbar_col.?);
- key(p, 'K');
- try std.testing.expectEqual(workspace_cursor, p.topbar_col.?);
- key(p, 'J');
- key(p, 'J');
- try std.testing.expect(p.topbar_col == null and pane.tag_edit);
- key(p, 'j');
- try std.testing.expect(!pane.tag_edit and p.topbar_col == null);
+ try std.testing.expect(pane.focus == .body and p.panes[right].?.focus == .body);
+ window(p, 'h');
try std.testing.expectEqual(@as(usize, 0), p.active);
- _ = enterNormal(p);
- key(p, 'K');
- key(p, 'j');
- try std.testing.expect(p.topbar_col == null and !pane.tag_edit);
key(p, ':');
key(p, 'i');
key(p, Key.end);
- const before = pane.tag_tail_len;
- try std.testing.expect(pane.tag_edit and pane.mode == .insert);
- for ("hjklHJKL") |letter| {
+ const before = pardes.tagline.curTail(pane).len;
+ try std.testing.expect(pane.focus == .tag and pane.tag.mode == .insert and pane.body.mode == .normal);
+ for ("hjklHJKL:") |letter| {
const text = [_]u8{letter};
p.update(.{ .key = .{ .cp = letter, .text = &text } });
- try std.testing.expect(pane.tag_edit and pane.mode == .insert);
+ try std.testing.expect(pane.focus == .tag and pane.tag.mode == .insert);
}
- try std.testing.expectEqualStrings("hjklHJKL", pane.tag_tail[before..pane.tag_tail_len]);
- try std.testing.expect(pane.tag_edit and pane.mode == .insert and p.topbar_col == null);
+ try std.testing.expectEqualStrings("hjklHJKL:", pardes.tagline.curTail(pane)[before..]);
+ try std.testing.expectEqualStrings("body\n", pane.file.?.content);
try std.testing.expectEqual(@as(usize, 0), p.active);
}
}
};
const BodyHitTests = struct {
- fn mouse(layer: *const pardes.BodyLayer, row: u16, col: u16, kind: pardes.Mouse.Kind) pardes.Mouse {
+ fn mouse(layer: *const pardes.Layer, row: u16, col: u16, kind: pardes.Mouse.Kind) pardes.Mouse {
const width: f32 = if (row < layer.context_rows) 8 else 10;
const x = @as(f32, @floatFromInt(layer.viewport.x)) * 10 + (@as(f32, @floatFromInt(col)) + 0.5) * width;
const y = layer.rowTop(row, 20, 10) + layer.rowHeight(row, 20, 10) / 2;
- return .{ .button = .left, .kind = kind, .col = @intFromFloat(x / 10), .row = @intFromFloat(y / 20), .body_hit = layer.hitAt(x, y, 10, 20, 8, 10).? };
+ return .{ .button = .left, .kind = kind, .col = @intFromFloat(x / 10), .row = @intFromFloat(y / 20), .body_hit = layer.bodyHit(x, y, 10, 20, 8, 10).? };
}
test "compact TreeContext mouse follows source rows in reclaimed space" {
@@ -353,7 +582,7 @@ const BodyHitTests = struct {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 64, .rows = 18 });
defer p.deinit();
p.row_metrics = .{ .body_w = 10, .body_h = 20, .tagline_w = 8, .tagline_h = 10 };
- const pane = try TreeContextTests.setZigFile(p, "const Box = struct {\n pub fn work(\n value: usize,\n ) void {\n" ++ " // body\n" ** 60 ++ " }\n};\n");
+ const pane = try TreeContextTests.setZigFile(p, "const Box = struct {\n pub fn work(\n value: usize,\n ) void {\n" ++ std.mem.asBytes(&@as([60][16]u8, @splat(" // body\n".*))) ++ " }\n};\n");
try std.testing.expect(p.executeBuiltinLine(0, "TreeContext"));
pane.scrollBy(10);
var frame = std.heap.ArenaAllocator.init(p.gpa);
@@ -370,7 +599,7 @@ const BodyHitTests = struct {
const expected = pane.wrapAt(row).line;
p.update(.{ .mouse = mouse(layer, row, 2, .press) });
p.update(.{ .mouse = mouse(layer, row, 2, .release) });
- try std.testing.expectEqual(expected, pane.cur_row);
+ try std.testing.expectEqual(expected, pane.body.cur_row);
try std.testing.expectEqual(top, pane.scroll());
}
const last = pane.body_visible_rows - 1;
@@ -380,20 +609,57 @@ const BodyHitTests = struct {
p.update(.{ .mouse = mouse(layer, last - 1, prefix + 11, .press) });
// Release at a different source row without an intermediate drag event.
p.update(.{ .mouse = mouse(layer, last, prefix + 14, .release) });
- try std.testing.expectEqualStrings("body\nbody", pardes.test_api.heldSelection(p, 0).?);
+ // A stream: the last row from its start, indentation and all.
+ try std.testing.expect(std.mem.endsWith(u8, pardes.exec.heldSelection(p, 0).?, "// body") and std.mem.startsWith(u8, pardes.exec.heldSelection(p, 0).?, "body\n"));
p.update(.{ .mouse = mouse(layer, last, 10, .press) });
p.update(.{ .mouse = mouse(layer, last, 10, .release) });
- try std.testing.expectEqual(expected, pane.cur_row);
+ try std.testing.expectEqual(expected, pane.body.cur_row);
var stale = mouse(layer, 0, 2, .press);
stale.body_hit.?.serial +%= 1;
p.update(.{ .mouse = stale });
- try std.testing.expectEqual(expected, pane.cur_row);
+ try std.testing.expectEqual(expected, pane.body.cur_row);
p.update(.{ .key = .{ .cp = 'i' } });
p.update(.{ .key = .{ .cp = 'X', .text = "X" } });
try std.testing.expect(std.mem.indexOfScalar(u8, modal.lineSlice(pane.file.?.content, @intCast(expected)), 'X') != null);
}
};
+const LineNumberLookTests = struct {
+ test "right-click on a line number looks at that line, sticky context headers included" {
+ if (!syntax.enabled) return error.SkipZigTest;
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 64, .rows = 18 });
+ defer p.deinit();
+ p.row_metrics = .{ .body_w = 10, .body_h = 20, .tagline_w = 8, .tagline_h = 10 };
+ const pane = try TreeContextTests.setZigFile(p, "const Box = struct {\n pub fn work(\n value: usize,\n ) void {\n" ++ std.mem.asBytes(&@as([60][16]u8, @splat(" // body\n".*))) ++ " }\n};\n");
+ try std.testing.expect(p.executeBuiltinLine(0, "TreeContext"));
+ pane.scrollBy(30);
+ var frame = std.heap.ArenaAllocator.init(p.gpa);
+ defer frame.deinit();
+ _ = try p.render(frame.allocator());
+ const layer = &p.surface.body_layers[0];
+ try std.testing.expect(layer.context_rows >= 2);
+ // A header row's number is its declaration's own source line, not the
+ // body line it sits over (`pub fn work(` is line 1); a body row's is
+ // its own.
+ try std.testing.expectEqual(@as(i32, 1), pane.wrapAt(1).line);
+ const rows = [_]u16{ 1, pane.context_rows + 3 };
+ for (rows) |row| {
+ // Each Look recentres the view; come back under the headers.
+ pane.scrollBy(30 - pane.scroll());
+ _ = frame.reset(.retain_capacity);
+ _ = try p.render(frame.allocator());
+ const expected = pane.wrapAt(row).line;
+ var press = BodyHitTests.mouse(&p.surface.body_layers[0], row, 1, .press);
+ press.button = .right;
+ var release = BodyHitTests.mouse(&p.surface.body_layers[0], row, 1, .release);
+ release.button = .right;
+ p.update(.{ .mouse = press });
+ p.update(.{ .mouse = release });
+ try std.testing.expectEqual(expected, pane.body.cur_row);
+ }
+ }
+};
+
const TreeContextTests = struct {
const source = "const Box = struct {\n" ++
" pub fn work(\n" ++
@@ -421,7 +687,7 @@ const TreeContextTests = struct {
if (!syntax.enabled) return error.SkipZigTest;
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 64, .rows = 18 });
defer p.deinit();
- const pane = try setZigFile(p, "const Box = struct {\n\n // omitted member comment\n\n pub fn work(\n value: usize,\n ) void {\n" ++ " // body\n" ** 30 ++ " }\n};\n");
+ const pane = try setZigFile(p, "const Box = struct {\n\n // omitted member comment\n\n pub fn work(\n value: usize,\n ) void {\n" ++ std.mem.asBytes(&@as([30][16]u8, @splat(" // body\n".*))) ++ " }\n};\n");
p.row_metrics = .{ .body_w = 10, .body_h = 20, .tagline_w = 8, .tagline_h = 10 };
try std.testing.expect(p.executeBuiltinLine(0, "TreeContext"));
pane.scrollBy(10);
@@ -437,7 +703,7 @@ const TreeContextTests = struct {
const y = layer.rowTop(row, 20, 10) + 9.5;
const x = @as(f32, @floatFromInt(layer.viewport.x)) * 10 + 5;
// A one-pixel separator remains inside its existing header row.
- try std.testing.expectEqual(row, layer.hitAt(x, y, 10, 20, 8, 10).?.row);
+ try std.testing.expectEqual(row, layer.bodyHit(x, y, 10, 20, 8, 10).?.row);
}
pane.scrollBy(-5);
_ = try p.render(frame.allocator());
@@ -452,23 +718,23 @@ const TreeContextTests = struct {
if (context and !syntax.enabled) continue;
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 64, .rows = 18 });
defer p.deinit();
- const pane = try setZigFile(p, "pub fn work() void {\n" ++ " // body\n" ** 100 ++ "}\n");
+ const pane = try setZigFile(p, "pub fn work() void {\n" ++ std.mem.asBytes(&@as([100][12]u8, @splat(" // body\n".*))) ++ "}\n");
if (context) try std.testing.expect(p.executeBuiltinLine(0, "TreeContext"));
var frame = std.heap.ArenaAllocator.init(p.gpa);
defer frame.deinit();
_ = try p.render(frame.allocator());
try std.testing.expectEqual(@as(i32, 0), pane.scroll());
- p.lookAt(0, "/tree-context.zig:60");
+ pardes.look.lookAt(p, 0, "/tree-context.zig:60");
try std.testing.expectEqual(@as(usize, 0), p.active);
- try std.testing.expectEqual(@as(i32, 59), pane.cur_row);
+ try std.testing.expectEqual(@as(i32, 59), pane.body.cur_row);
const surface = try p.render(frame.allocator());
- const visible = pane.wrapRow(pane.cur_row, pane.cur_col);
+ const visible = pane.wrapRow(pane.body.cur_row, pane.body.cur_col);
try std.testing.expect(visible.row >= pane.context_rows);
try std.testing.expect(visible.row < pane.rows);
try std.testing.expectEqual(@as(i32, 59), pane.wrapAt(visible.row).line);
const cursor = surface.cursor orelse return error.MissingLookCursor;
const rect = p.rects[0];
- const y = if (p.settings.tag_bottom) rect.y else rect.y + pardes.BOX_H;
+ const y = p.bodyTop(pane, rect);
try std.testing.expectEqual(y + @as(u16, @intCast(visible.row)), cursor.y);
}
}
@@ -490,14 +756,16 @@ const TreeContextTests = struct {
try std.testing.expectEqual(@as(i32, 7), pane.wrapAt(pane.context_rows).line);
const rect = p.rects[0];
const x = rect.x + config.GUTTER + panes.File.gutterWidth(pane);
- const y = if (p.settings.tag_bottom) rect.y else rect.y + pardes.BOX_H;
+ const y = p.bodyTop(pane, rect);
ClickCursorTests.click(p, .left, x + 6, y);
- try std.testing.expectEqual(@as(i32, 0), pane.cur_row);
- try std.testing.expectEqual(@as(i32, 6), pane.cur_col);
+ try std.testing.expectEqual(@as(i32, 0), pane.body.cur_row);
+ try std.testing.expectEqual(@as(i32, 6), pane.body.cur_col);
try std.testing.expectEqual(@as(i32, 7), pane.scroll());
const cursor = (try p.render(frame.allocator())).cursor orelse return error.MissingContextCursor;
try std.testing.expectEqual(x + 6, cursor.x);
- try std.testing.expectEqual(y, cursor.y);
+ // Read the body top again: the click cleared the announcement band the
+ // builtin above put up, and the body moved back up with it.
+ try std.testing.expectEqual(p.bodyTop(pane, p.rects[0]), cursor.y);
p.update(.{ .key = .{ .cp = 'i' } });
p.update(.{ .key = .{ .cp = 'Z', .text = "Z" } });
try std.testing.expect(std.mem.startsWith(u8, pane.file.?.content, "const ZBox = struct {"));
@@ -514,7 +782,7 @@ const TreeContextTests = struct {
try std.testing.expectEqual(pane.scroll(), pane.wrapAt(pane.context_rows).line);
}
try std.testing.expectEqual(@as(u16, 0), pane.context_rows);
- try std.testing.expectEqual(@as(i32, 0), pane.wrapRow(0, pane.cur_col).row);
+ try std.testing.expectEqual(@as(i32, 0), pane.wrapRow(0, pane.body.cur_col).row);
try std.testing.expect(p.executeBuiltinLine(0, "TreeContext"));
pane.scrollBy(7);
_ = try p.render(frame.allocator());
@@ -525,7 +793,9 @@ const TreeContextTests = struct {
if (!syntax.enabled) return error.SkipZigTest;
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 48, .rows = 14 });
defer p.deinit();
- const pane = try setZigFile(p, "pub fn @\"界name\"(\n\tvalue: usize,\n) void {\n" ++ " _ = value;\n" ** 12 ++ "}\n");
+ const pane = try setZigFile(p, "pub fn @\"界name\"(\n\tvalue: usize,\n) void {\n" ++ std.mem.asBytes(&@as([12][15]u8, @splat(" _ = value;\n".*))) ++ "}\n");
+ pane.tag_expanded = false; // a one-row tag keeps this small screen's rows
+ p.sync();
p.settings.wrap = false;
p.settings.colors = false;
try std.testing.expect(p.executeBuiltinLine(0, "TreeContext"));
@@ -536,20 +806,22 @@ const TreeContextTests = struct {
const surface = try p.render(frame.allocator());
try std.testing.expectEqual(@as(u16, 3), pane.context_rows);
const rect = p.rects[0];
- const y = if (p.settings.tag_bottom) rect.y else rect.y + pardes.BOX_H;
+ const y = p.bodyTop(pane, rect);
var glyph_x: ?u16 = null;
for (0..surface.cols) |col| {
if (std.mem.eql(u8, surface.at(@intCast(col), y).grapheme(), "界")) glyph_x = @intCast(col);
}
const x = glyph_x orelse return error.MissingContextUnicode;
ClickCursorTests.click(p, .left, x + 1, y);
- try std.testing.expectEqual(@as(i32, 0), pane.cur_row);
- try std.testing.expectEqual(@as(i32, 9), pane.cur_col);
+ try std.testing.expectEqual(@as(i32, 0), pane.body.cur_row);
+ try std.testing.expectEqual(@as(i32, 9), pane.body.cur_col);
try std.testing.expectEqual(@as(i32, 8), pane.scroll());
const cursor = (try p.render(frame.allocator())).cursor orelse return error.MissingContextCursor;
try std.testing.expectEqual(x, cursor.x);
- try std.testing.expectEqual(y, cursor.y);
- panes.File.setContent(p, &pane.file.?, try p.gpa.dupe(u8, "// no enclosing declaration\n" ** 18));
+ // Read the body top again: the click cleared the announcement band the
+ // builtin above put up, so the body moved with it.
+ try std.testing.expectEqual(p.bodyTop(pane, p.rects[0]), cursor.y);
+ panes.File.setContent(p, &pane.file.?, try p.gpa.dupe(u8, std.mem.asBytes(&@as([18][28]u8, @splat("// no enclosing declaration\n".*)))));
_ = try p.render(frame.allocator());
try std.testing.expectEqual(@as(u16, 0), pane.context_rows);
try std.testing.expectEqual(pane.scroll(), pane.wrapAt(0).line);
@@ -561,6 +833,8 @@ const TreeContextTests = struct {
defer p.deinit();
const body = " // 012345678901234567890123456789界tail";
const pane = try setZigFile(p, "pub fn aLongDeclarationNameThatCannotFit() void {\n // before\n" ++ body ++ "\n}\n");
+ pane.tag_expanded = false; // a one-row tag keeps this small screen's rows
+ p.sync();
p.settings.wrap = true;
try std.testing.expect(p.executeBuiltinLine(0, "TreeContext"));
pane.scrollBy(2);
@@ -577,8 +851,8 @@ const TreeContextTests = struct {
};
const glyph = target orelse return error.MissingWrappedContextBody;
ClickCursorTests.click(p, .left, glyph.x + 1, glyph.y);
- try std.testing.expectEqual(@as(i32, 2), pane.cur_row);
- try std.testing.expectEqual(@as(i32, @intCast(std.mem.indexOf(u8, body, "界").?)), pane.cur_col);
+ try std.testing.expectEqual(@as(i32, 2), pane.body.cur_row);
+ try std.testing.expectEqual(@as(i32, @intCast(std.mem.indexOf(u8, body, "界").?)), pane.body.cur_col);
const cursor = (try p.render(frame.allocator())).cursor orelse return error.MissingContextBodyCursor;
try std.testing.expectEqual(glyph.x, cursor.x);
try std.testing.expectEqual(glyph.y, cursor.y);
@@ -594,7 +868,7 @@ const TtySelectionTests = struct {
}
test "tty selection yields to a new modal cursor selection" {
- if (comptime !panes.Terminal.enabled) return error.SkipZigTest;
+ if (comptime !panes.terminal.enabled) return error.SkipZigTest;
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 40, .rows = 12 });
defer p.deinit();
p.presentation.enabled = false;
@@ -607,24 +881,24 @@ const TtySelectionTests = struct {
_ = try p.render(frame.allocator());
const rect = p.rects[0];
const x = rect.x + config.GUTTER;
- const y = if (p.settings.tag_bottom) rect.y else rect.y + pardes.BOX_H;
+ const y = p.bodyTop(pane, rect);
JumpSelectionTests.drag(p, x + 1, y, x + 3, y);
- try std.testing.expectEqualStrings("lph", p.yank orelse return error.MissingAutomaticTtyYank);
+ try std.testing.expectEqualStrings("lph", p.registers.text(p.gpa, '"') orelse return error.MissingAutomaticTtyYank);
p.update(.{ .key = .{ .cp = p.opts.tty_toggle, .ctrl = true } });
p.update(.{ .key = .{ .cp = 'l' } });
- try std.testing.expectEqual(@as(i32, 4), pane.cur_col);
+ try std.testing.expectEqual(@as(i32, 4), pane.body.cur_col);
p.update(.{ .key = .{ .cp = 'y' } });
- try std.testing.expectEqualStrings("a", p.yank.?);
+ try std.testing.expectEqualStrings("a", p.registers.text(p.gpa, '"').?);
try noChildInput(p);
}
- test "tty selection preserves exact rectangle through yank clipboard and mode changes" {
- if (comptime !panes.Terminal.enabled) return error.SkipZigTest;
+ test "tty selection preserves its exact stream through yank clipboard and mode changes" {
+ if (comptime !panes.terminal.enabled) return error.SkipZigTest;
for ([_]bool{ false, true }) |prompt| {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 40, .rows = 12 });
defer p.deinit();
const pane = p.panes[0].?;
- pane.mode = .tty;
+ pane.body.mode = .tty;
pane.tty_filter = false;
p.presentation.enabled = false;
while (p.nextEffect()) |_| {}
@@ -637,53 +911,57 @@ const TtySelectionTests = struct {
_ = try p.render(frame.allocator());
const rect = p.rects[0];
const x = rect.x + config.GUTTER;
- const y = if (p.settings.tag_bottom) rect.y else rect.y + pardes.BOX_H;
+ const y = p.bodyTop(pane, rect);
JumpSelectionTests.drag(p, x + @as(u16, if (prompt) 0 else 1), y, x + 3, y + @as(u16, if (prompt) 0 else 1));
- const expected = if (prompt) "$ ab" else "lph\nrav";
- try std.testing.expectEqual(Pane.Mode.tty, pane.mode);
- try std.testing.expectEqualStrings(expected, pardes.test_api.heldSelection(p, 0).?);
- try std.testing.expectEqualStrings(expected, p.yank orelse return error.MissingAutomaticTtyYank);
+ const expected = if (prompt) "$ ab" else "lpha\nbrav";
+ try std.testing.expectEqual(panes.Text.Mode.tty, pane.body.mode);
+ try std.testing.expectEqualStrings(expected, pardes.exec.heldSelection(p, 0).?);
+ try std.testing.expectEqualStrings(expected, p.registers.text(p.gpa, '"') orelse return error.MissingAutomaticTtyYank);
try noChildInput(p);
try std.testing.expect(p.executeBuiltinLine(0, "ClipYank"));
try noChildInput(p);
try std.testing.expectEqualStrings(expected, p.fallback.clipboard.items);
p.update(.{ .key = .{ .cp = p.opts.tty_toggle, .ctrl = true } });
- try std.testing.expectEqual(Pane.Mode.normal, pane.mode);
+ try std.testing.expectEqual(panes.Text.Mode.normal, pane.body.mode);
const normal = try p.render(frame.allocator());
if (!prompt) {
- const selection_bg: pardes.Color = .{ .rgb = p.theme().sel_bg };
- try std.testing.expect(!std.meta.eql(selection_bg, normal.at(x + 4, y).style.bg));
- try std.testing.expect(!std.meta.eql(selection_bg, normal.at(x, y + 1).style.bg));
+ // A stream: the first row to its edge, the last from its
+ // start; (x + 1, y) is surely in it, whatever its tint.
+ const selected = normal.at(x + 1, y).style.bg;
+ try std.testing.expect(std.meta.eql(selected, normal.at(x + 4, y).style.bg));
+ try std.testing.expect(std.meta.eql(selected, normal.at(x, y + 1).style.bg));
+ try std.testing.expect(!std.meta.eql(selected, normal.at(x + 4, y + 1).style.bg));
+ try std.testing.expect(!std.meta.eql(selected, normal.at(x, y).style.bg));
}
- try std.testing.expectEqualStrings(expected, pardes.test_api.heldSelection(p, 0).?);
+ try std.testing.expectEqualStrings(expected, pardes.exec.heldSelection(p, 0).?);
p.update(.{ .key = .{ .cp = 'y' } });
- try std.testing.expectEqualStrings(expected, p.yank.?);
+ try std.testing.expectEqualStrings(expected, p.registers.text(p.gpa, '"').?);
try noChildInput(p);
p.update(.{ .key = .{ .cp = p.opts.tty_toggle, .ctrl = true } });
- try std.testing.expectEqual(Pane.Mode.tty, pane.mode);
+ try std.testing.expectEqual(panes.Text.Mode.tty, pane.body.mode);
try noChildInput(p);
_ = try p.render(frame.allocator());
- try std.testing.expectEqualStrings(expected, pardes.test_api.heldSelection(p, 0).?);
- p.update(.{ .output = .{ .pane = 0, .bytes = "\x1b]133;C\x07" ++ "\r\nnew output" ** 30 } });
+ try std.testing.expectEqualStrings(expected, pardes.exec.heldSelection(p, 0).?);
+ p.update(.{ .output = .{ .pane = 0, .bytes = "\x1b]133;C\x07" ++ std.mem.asBytes(&@as([30][12]u8, @splat("\r\nnew output".*))) } });
_ = try p.render(frame.allocator());
- try std.testing.expectEqual(Pane.Mode.tty, pane.mode);
- try std.testing.expectEqualStrings(expected, pardes.test_api.heldSelection(p, 0).?);
- try std.testing.expectEqualStrings(expected, p.yank.?);
+ try std.testing.expectEqual(panes.Text.Mode.tty, pane.body.mode);
+ try std.testing.expectEqualStrings(expected, pardes.exec.heldSelection(p, 0).?);
+ try std.testing.expectEqualStrings(expected, p.registers.text(p.gpa, '"').?);
try noChildInput(p);
}
}
test "tty selection pastes across panes once with existing bracket and mouse protocols" {
- if (comptime !panes.Terminal.enabled) return error.SkipZigTest;
+ if (comptime !panes.terminal.enabled) return error.SkipZigTest;
for ([_]bool{ false, true }) |bracketed| {
for ([_]bool{ false, true }) |reports_mouse| {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 40, .rows = 24 });
defer p.deinit();
p.presentation.enabled = false;
- p.spawnTty(0);
+ _ = pardes.exec.spawnTty(p, 0);
for (p.panes[0..2]) |slot| {
- slot.?.mode = .tty;
+ slot.?.body.mode = .tty;
slot.?.tty_filter = false;
slot.?.greet = false;
slot.?.vweight = 1;
@@ -699,18 +977,20 @@ const TtySelectionTests = struct {
_ = try p.render(frame.allocator());
const source = p.rects[0];
const sx = source.x + config.GUTTER;
- const sy = if (p.settings.tag_bottom) source.y else source.y + pardes.BOX_H;
+ const sy = bodyY(p, source);
JumpSelectionTests.drag(p, sx + 1, sy, sx + 3, sy + 1);
- try std.testing.expectEqualStrings("lph\nrav", p.yank orelse return error.MissingAutomaticTtyYank);
+ try std.testing.expectEqualStrings("lpha\nbrav", p.registers.text(p.gpa, '"') orelse return error.MissingAutomaticTtyYank);
try noChildInput(p);
const target = p.rects[1];
const tx = target.x + config.GUTTER + 2;
- const ty = if (p.settings.tag_bottom) target.y else target.y + pardes.BOX_H;
- p.update(.{ .mouse = .{ .button = .left, .kind = .press, .col = tx, .row = ty } });
+ const ty = bodyY(p, target);
+ // Over a program that tracks the mouse B1 is its own, so
+ // the chord's B1 holds Shift; B3 is pardes's either way.
+ p.update(.{ .mouse = .{ .button = .left, .kind = .press, .col = tx, .row = ty, .shift = true } });
p.update(.{ .mouse = .{ .button = .right, .kind = .press, .col = tx, .row = ty } });
p.update(.{ .mouse = .{ .button = .right, .kind = .release, .col = tx, .row = ty } });
- p.update(.{ .mouse = .{ .button = .left, .kind = .release, .col = tx, .row = ty } });
+ p.update(.{ .mouse = .{ .button = .left, .kind = .release, .col = tx, .row = ty, .shift = true } });
var written: std.Io.Writer.Allocating = .init(p.gpa);
defer written.deinit();
while (p.nextEffect()) |effect| {
@@ -721,16 +1001,82 @@ const TtySelectionTests = struct {
}
const expected = try std.fmt.allocPrint(p.gpa, "{s}{s}", .{
if (reports_mouse) "\x1b[<0;3;1M\x1b[<0;3;1m" else "",
- if (bracketed) "\x1b[200~lph\nrav\x1b[201~" else "lph\rrav",
+ if (bracketed) "\x1b[200~lpha\nbrav\x1b[201~" else "lpha\rbrav",
});
defer p.gpa.free(expected);
try std.testing.expectEqualStrings(expected, written.written());
- try std.testing.expectEqual(Pane.Mode.tty, p.panes[0].?.mode);
- try std.testing.expectEqual(Pane.Mode.tty, p.panes[1].?.mode);
- try std.testing.expectEqualStrings("lph\nrav", pardes.test_api.heldSelection(p, 0).?);
+ try std.testing.expectEqual(panes.Text.Mode.tty, p.panes[0].?.body.mode);
+ try std.testing.expectEqual(panes.Text.Mode.tty, p.panes[1].?.body.mode);
+ try std.testing.expectEqualStrings("lpha\nbrav", pardes.exec.heldSelection(p, 0).?);
}
}
}
+
+ /// Every byte the pane's program would have read off its pty since the
+ /// last call, joined.
+ fn childInput(p: *Pardes, buf: []u8) []const u8 {
+ var n: usize = 0;
+ while (p.nextEffect()) |effect| switch (effect) {
+ .write => |w| {
+ const bytes = w.bytes.slice();
+ if (n + bytes.len > buf.len) break;
+ @memcpy(buf[n..][0..bytes.len], bytes);
+ n += bytes.len;
+ },
+ else => {},
+ };
+ return buf[0..n];
+ }
+
+ // Raw tty mode forwards nearly every key to the child; the two paste
+ // chords are the exception, and forwarding them instead is what broke
+ // pasting into a terminal pane. An application that gets Ctrl-V rather
+ // than the text goes and reads the desktop clipboard on its own account,
+ // and a coding agent reading it is looking for an image, not for words.
+ test "raw tty paste chords type at the program instead of reaching it as keys" {
+ if (comptime !panes.terminal.enabled) return error.SkipZigTest;
+ for ([_]bool{ false, true }) |bracketed| {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 40, .rows = 12 });
+ defer p.deinit();
+ const pane = p.panes[0].?;
+ try std.testing.expectEqual(panes.Text.Mode.tty, pane.body.mode);
+ if (bracketed) p.update(.{ .output = .{ .pane = 0, .bytes = "\x1b[?2004h" } });
+ try std.testing.expectEqual(bracketed, panes.terminal.bracketedPaste(pane));
+ p.registers.put(p.gpa, '"', "one\ntwo", 0, 1, true); // what a `y` anywhere left behind
+ var buf: [256]u8 = undefined;
+ _ = childInput(p, &buf);
+
+ // Ctrl-V types the register straight at the program, asking the
+ // desktop for nothing. Under DECSET 2004 the program's own fences
+ // carry it, which is what stops readline RUNNING a multi-line paste.
+ p.update(.{ .key = .{ .cp = 'v', .ctrl = true } });
+ try std.testing.expectEqualStrings(
+ if (bracketed) "\x1b[200~one\ntwo\x1b[201~" else "one\rtwo",
+ childInput(p, &buf),
+ );
+ try std.testing.expect(p.clip_pending == null);
+
+ // Ctrl-Shift-V is the other store: it ASKS, types nothing yet, and
+ // the answer lands at the program rather than in an edit buffer. A
+ // host that folds the Shift into the letter says the same thing.
+ for ([_]Key{
+ .{ .cp = 'v', .ctrl = true, .shift = true },
+ .{ .cp = 'V', .ctrl = true },
+ }) |chord| {
+ p.update(.{ .key = chord });
+ try std.testing.expect(p.clip_pending != null);
+ try std.testing.expectEqualStrings("", childInput(p, &buf));
+ p.update(.{ .paste = "from-desktop" });
+ try std.testing.expect(p.clip_pending == null);
+ try std.testing.expectEqualStrings(
+ if (bracketed) "\x1b[200~from-desktop\x1b[201~" else "from-desktop",
+ childInput(p, &buf),
+ );
+ }
+ // ...and neither chord put the clipboard in the register on its way.
+ try std.testing.expectEqualStrings("one\ntwo", p.registers.text(p.gpa, '"') orelse "");
+ }
+ }
};
const ClickCursorTests = struct {
@@ -739,6 +1085,107 @@ const ClickCursorTests = struct {
p.update(.{ .mouse = .{ .button = button, .kind = .release, .col = x, .row = y } });
}
+ test "a B1 sweep held past a pane's bottom scrolls the body and keeps its start" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 60, .rows = 12 });
+ defer p.deinit();
+ var text: std.ArrayList(u8) = .empty;
+ defer text.deinit(std.testing.allocator);
+ for (0..60) |i| try text.print(std.testing.allocator, "line{d}\n", .{i});
+ const pane = try p.setTestFile(text.items);
+ var frame = std.heap.ArenaAllocator.init(p.gpa);
+ defer frame.deinit();
+ _ = try p.render(frame.allocator());
+ const rect = p.rects[0];
+ const x = rect.x + config.GUTTER + panes.File.gutterWidth(pane);
+ const y = p.bodyTop(pane, rect);
+ // The pane reaches the screen's bottom: its last row is the edge.
+ const below = rect.y + rect.h - 1;
+ p.update(.{ .mouse = .{ .button = .left, .kind = .press, .col = x, .row = y + 1 } });
+ p.update(.{ .mouse = .{ .button = .left, .kind = .drag, .col = x + 2, .row = below } });
+ for (0..20) |_| p.update(.tick);
+ try std.testing.expect(pane.scroll() >= 20);
+ _ = try p.render(frame.allocator()); // a frame between the ticks and the release
+ p.update(.{ .mouse = .{ .button = .left, .kind = .release, .col = x + 2, .row = below } });
+ const got = pardes.edit.currentSelText(p, pane).?;
+ try std.testing.expect(std.mem.startsWith(u8, got, "line1\nline2\n"));
+ try std.testing.expect(std.mem.count(u8, got, "\n") > 20);
+ }
+
+ test "everything a B1 chord does while B1 is down is one undo step" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 60, .rows = 12 });
+ defer p.deinit();
+ const pane = try p.setTestFile("one two three\n");
+ var frame = std.heap.ArenaAllocator.init(p.gpa);
+ defer frame.deinit();
+ _ = try p.render(frame.allocator());
+ const rect = p.rects[0];
+ const x = rect.x + config.GUTTER + panes.File.gutterWidth(pane);
+ const y = p.bodyTop(pane, rect);
+ const M = struct {
+ fn ev(pp: *Pardes, b: pardes.Mouse.Button, k: pardes.Mouse.Kind, cx: u16, cy: u16) void {
+ pp.update(.{ .mouse = .{ .button = b, .kind = k, .col = cx, .row = cy } });
+ }
+ };
+ // B1-B2 then B1-B3: cut, then paste back: a copy, one step.
+ const before = pane.file.?.history.undo_len;
+ M.ev(p, .left, .press, x + 4, y);
+ M.ev(p, .left, .drag, x + 6, y);
+ M.ev(p, .middle, .press, x + 6, y);
+ M.ev(p, .middle, .release, x + 6, y);
+ M.ev(p, .right, .press, x + 6, y);
+ M.ev(p, .right, .release, x + 6, y);
+ M.ev(p, .left, .release, x + 6, y);
+ try std.testing.expectEqualStrings("one two three\n", pane.file.?.content);
+ try std.testing.expectEqualStrings("two", p.registers.text(p.gpa, '"').?);
+ try std.testing.expect(pane.file.?.history.undo_len <= before + 1);
+ // A cut alone comes back with one Undo.
+ M.ev(p, .left, .press, x + 4, y);
+ M.ev(p, .left, .drag, x + 6, y);
+ M.ev(p, .middle, .press, x + 6, y);
+ M.ev(p, .middle, .release, x + 6, y);
+ M.ev(p, .left, .release, x + 6, y);
+ try std.testing.expectEqualStrings("one three\n", pane.file.?.content);
+ try std.testing.expect(p.executeBuiltinLine(0, "Undo"));
+ try std.testing.expectEqualStrings("one two three\n", pane.file.?.content);
+ }
+
+ test "a double-click selects a word, a line, a bracketed or quoted text, as acme's" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 60, .rows = 12 });
+ defer p.deinit();
+ const pane = try p.setTestFile("call foo_bar(a, b)\nsay \"hi there\"\n");
+ var frame = std.heap.ArenaAllocator.init(p.gpa);
+ defer frame.deinit();
+ _ = try p.render(frame.allocator());
+ const rect = p.rects[0];
+ const x = rect.x + config.GUTTER + panes.File.gutterWidth(pane);
+ const y = p.bodyTop(pane, rect);
+ const Want = struct { col: u16, row: u16, text: []const u8 };
+ for ([_]Want{
+ .{ .col = 6, .row = 0, .text = "foo_bar" },
+ .{ .col = 13, .row = 0, .text = "a, b" },
+ .{ .col = 0, .row = 0, .text = "call foo_bar(a, b)\n" },
+ .{ .col = 5, .row = 1, .text = "hi there" },
+ }) |w| {
+ click(p, .left, x + w.col, y + w.row);
+ click(p, .left, x + w.col, y + w.row);
+ try std.testing.expectEqualStrings(w.text, pardes.edit.currentSelText(p, pane).?);
+ // A third click is a plain click again: the caret, no selection.
+ click(p, .left, x + w.col, y + w.row);
+ try std.testing.expect(!pane.body.vsel.active);
+ }
+ // In the tag too.
+ const tag_text = try pardes.tagline.tagText(p, frame.allocator(), pane);
+ const del: u16 = @intCast(std.mem.indexOf(u8, tag_text, "Del").? + 1);
+ const tag_x = rect.x + pardes.TAG_TEXT_INSET + del;
+ click(p, .left, tag_x, p.tagTop(pane, rect));
+ click(p, .left, tag_x, p.tagTop(pane, rect));
+ try std.testing.expect(pane.tag.vsel.active);
+ const tag_now = try pardes.tagline.tagText(p, frame.allocator(), pane);
+ const a = modal.offsetAt(tag_now, .{ .row = @intCast(pane.tag.vsel.row), .col = @intCast(pane.tag.vsel.col) });
+ const h = modal.offsetAt(tag_now, .{ .row = @intCast(pane.tag.cur_row), .col = @intCast(pane.tag.cur_col) });
+ try std.testing.expectEqualStrings("Del", tag_now[a .. h + 1]);
+ }
+
test "click cursor and insertion agree beyond line and file ends" {
for ([_]bool{ false, true }) |already_insert| {
for ([_]bool{ false, true }) |bottom_tag| {
@@ -759,15 +1206,15 @@ const ClickCursorTests = struct {
_ = try p.render(frame.allocator());
const rect = p.rects[0];
const x = rect.x + config.GUTTER + panes.File.gutterWidth(pane);
- const y = if (bottom_tag) rect.y else rect.y + pardes.BOX_H;
+ const y = bodyY(p, rect);
click(p, .left, x + 15, y + case.click_row);
- try std.testing.expectEqual(case.row, pane.cur_row);
- try std.testing.expectEqual(case.col, pane.cur_col);
+ try std.testing.expectEqual(case.row, pane.body.cur_row);
+ try std.testing.expectEqual(case.col, pane.body.cur_col);
const clicked = (try p.render(frame.allocator())).cursor orelse return error.MissingClickCursor;
try std.testing.expectEqual(x + @as(u16, @intCast(case.col)), clicked.x);
try std.testing.expectEqual(y + @as(u16, @intCast(case.row)), clicked.y);
if (!already_insert) p.update(.{ .key = .{ .cp = 'i' } });
- try std.testing.expectEqual(Pane.Mode.insert, pane.mode);
+ try std.testing.expectEqual(panes.Text.Mode.insert, pane.body.mode);
const insert = (try p.render(frame.allocator())).cursor orelse return error.MissingInsertCursor;
try std.testing.expectEqual(clicked.x, insert.x);
try std.testing.expectEqual(clicked.y, insert.y);
@@ -800,12 +1247,12 @@ const ClickCursorTests = struct {
if (wrap) try std.testing.expect(glyph.y > p.rects[0].y + pardes.BOX_H);
click(p, .left, glyph.x + 1, glyph.y);
const byte = std.mem.indexOf(u8, source, "界").?;
- try std.testing.expectEqual(@as(i32, @intCast(byte)), pane.cur_col);
+ try std.testing.expectEqual(@as(i32, @intCast(byte)), pane.body.cur_col);
const clicked = (try p.render(frame.allocator())).cursor orelse return error.MissingClickCursor;
try std.testing.expectEqual(glyph.x, clicked.x);
try std.testing.expectEqual(glyph.y, clicked.y);
if (!already_insert) p.update(.{ .key = .{ .cp = 'i' } });
- try std.testing.expectEqual(Pane.Mode.insert, pane.mode);
+ try std.testing.expectEqual(panes.Text.Mode.insert, pane.body.mode);
const insert = (try p.render(frame.allocator())).cursor orelse return error.MissingInsertCursor;
try std.testing.expectEqual(clicked.x, insert.x);
try std.testing.expectEqual(clicked.y, insert.y);
@@ -820,7 +1267,7 @@ const ClickCursorTests = struct {
test "click operands and hover follow the scrolled source selection" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 40, .rows = 14 });
defer p.deinit();
- const pane = try p.setTestFile("zero\none\ntwo\nthree\nalpha beta\nfive\ngamma delta\nseven\n" ++ "tail\n" ** 20);
+ const pane = try p.setTestFile("zero\none\ntwo\nthree\nalpha beta\nfive\ngamma delta\nseven\n" ++ std.mem.asBytes(&@as([20][5]u8, @splat("tail\n".*))));
p.presentation.enabled = false;
p.settings.wrap = false;
var frame = std.heap.ArenaAllocator.init(p.gpa);
@@ -828,9 +1275,9 @@ const ClickCursorTests = struct {
_ = try p.render(frame.allocator());
const rect = p.rects[0];
const x = rect.x + config.GUTTER + panes.File.gutterWidth(pane);
- const y = if (p.settings.tag_bottom) rect.y else rect.y + pardes.BOX_H;
+ const y = bodyY(p, rect);
JumpSelectionTests.drag(p, x + 1, y + 4, x + 3, y + 4);
- try std.testing.expectEqualStrings("lph", pardes.test_api.heldSelection(p, 0).?);
+ try std.testing.expectEqualStrings("lph", pardes.exec.heldSelection(p, 0).?);
for (0..2) |_| p.update(.{ .mouse = .{ .button = .wheel_down, .kind = .press, .col = x + 2, .row = y + 4 } });
try std.testing.expectEqual(@as(usize, 2), pane.file.?.scroll);
_ = try p.render(frame.allocator());
@@ -840,7 +1287,7 @@ const ClickCursorTests = struct {
defer _ = pardes.ctlfs.handle(p, .{ .tag = 0, .op = .release, .node = event_node, .handle = opened.handle });
for ([_]pardes.Mouse.Button{ .middle, .right }) |button| {
- const events = &p.fs.panes[0].events;
+ const events = &p.panes[0].?.fs.events;
while (!events.empty()) events.pop();
click(p, button, x + 2, y + 2);
const selected = events.peek() orelse return error.MissingSelectionGesture;
@@ -877,7 +1324,7 @@ const JumpSelectionTests = struct {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 34, .rows = 10 });
defer p.deinit();
p.settings.wrap = wrap;
- const text = try std.fmt.allocPrint(p.gpa, "{s}{s}", .{ prefix, "unrelated destination text\n" ** 80 });
+ const text = try std.fmt.allocPrint(p.gpa, "{s}{s}", .{ prefix, std.mem.asBytes(&@as([80][27]u8, @splat("unrelated destination text\n".*))) });
defer p.gpa.free(text);
const pane = try p.setTestFile(text);
var frame = std.heap.ArenaAllocator.init(p.gpa);
@@ -886,13 +1333,13 @@ const JumpSelectionTests = struct {
if (wrap) try std.testing.expectEqual(pane.wrap_line[0], pane.wrap_line[1]);
const rect = p.rects[0];
const x = rect.x + config.GUTTER + panes.File.gutterWidth(pane);
- const y = if (p.settings.tag_bottom) rect.y else rect.y + pardes.BOX_H;
+ const y = p.bodyTop(pane, rect);
if (reverse)
drag(p, x + last_col, y + 1, x + first_col, y)
else
drag(p, x + first_col, y, x + last_col, y + 1);
- const selected = try p.gpa.dupe(u8, pardes.test_api.heldSelection(p, 0) orelse return error.MissingMouseSelection);
+ const selected = try p.gpa.dupe(u8, pardes.exec.heldSelection(p, 0) orelse return error.MissingMouseSelection);
defer p.gpa.free(selected);
if (expected) |want| try std.testing.expectEqualStrings(want, selected);
try std.testing.expect(std.mem.indexOfScalar(u8, selected, '\n') != null);
@@ -910,29 +1357,64 @@ const JumpSelectionTests = struct {
try std.testing.expectEqual(@as(usize, 0), p.jcur);
try std.testing.expect(pane.file.?.scroll > 20);
try LookResetTests.cleared(pane);
- try std.testing.expect(!pane.vsel.active);
- try std.testing.expect(pardes.test_api.heldSelection(p, 0) == null);
- try std.testing.expectEqual(@as(i32, 59), pane.cur_row);
- try std.testing.expectEqual(@as(i32, 0), pane.cur_col);
+ try std.testing.expect(!pane.body.vsel.active);
+ try std.testing.expect(pardes.exec.heldSelection(p, 0) == null);
+ try std.testing.expectEqual(@as(i32, 59), pane.body.cur_row);
+ try std.testing.expectEqual(@as(i32, 0), pane.body.cur_col);
// A selection created after Back must also disappear on Forward.
- drag(p, x + 1, y, x + 3, y + 1);
- try std.testing.expect(pardes.test_api.heldSelection(p, 0) != null);
+ // Back announces itself, so the body sits under a notice band now.
+ const y2 = p.bodyTop(pane, p.rects[0]);
+ drag(p, x + 1, y2, x + 3, y2 + 1);
+ try std.testing.expect(pardes.exec.heldSelection(p, 0) != null);
p.update(.{ .key = .{ .cp = 'i', .ctrl = true } });
_ = frame.reset(.retain_capacity);
_ = try p.render(frame.allocator());
try std.testing.expectEqual(@as(usize, 1), p.jcur);
try std.testing.expectEqual(@as(usize, 0), pane.file.?.scroll);
try LookResetTests.cleared(pane);
- try std.testing.expect(!pane.vsel.active);
- try std.testing.expect(pardes.test_api.heldSelection(p, 0) == null);
- try std.testing.expectEqual(@as(i32, 0), pane.cur_row);
- try std.testing.expectEqual(@as(i32, 0), pane.cur_col);
+ try std.testing.expect(!pane.body.vsel.active);
+ try std.testing.expect(pardes.exec.heldSelection(p, 0) == null);
+ try std.testing.expectEqual(@as(i32, 0), pane.body.cur_row);
+ try std.testing.expectEqual(@as(i32, 0), pane.body.cur_col);
}
- test "jump selection clears copied rectangles in both history directions" {
+ test "a B1 sweep over several lines is a stream, as acme's, in a body and a tag" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 60, .rows = 12 });
+ defer p.deinit();
+ const pane = try p.setTestFile("alpha\nbravo\ncharlie\n");
+ var frame = std.heap.ArenaAllocator.init(p.gpa);
+ defer frame.deinit();
+ _ = try p.render(frame.allocator());
+ const rect = p.rects[0];
+ const x = rect.x + config.GUTTER + panes.File.gutterWidth(pane);
+ const y = p.bodyTop(pane, rect);
+ // From the press to the end of its line, the line between whole, the
+ // last from its start: no line numbers, no rectangle.
+ drag(p, x + 2, y, x + 1, y + 2);
+ try std.testing.expectEqualStrings("pha\nbravo\nch", pardes.exec.heldSelection(p, 0).?);
+ // Upward, the same text.
+ drag(p, x + 1, y + 2, x + 2, y);
+ try std.testing.expectEqualStrings("pha\nbravo\nch", pardes.exec.heldSelection(p, 0).?);
+ // A tag of several rows sweeps the same way.
+ if (pane.tag.own) |own| p.gpa.free(own);
+ pane.tag.own = try p.gpa.dupe(u8, "Save Del\nLook Edit");
+ p.sync();
+ _ = try p.render(frame.allocator());
+ p.sync();
+ try std.testing.expectEqual(@as(u16, 2), pane.tag_rows);
+ const sl: panes.Pane.Sel = .{ .state = .done, .r0 = 0, .c0 = 3, .r1 = 1, .c1 = 1 };
+ const text = try pardes.edit.paneText(p, pane);
+ const swept = try pardes.edit.selectionText(p, pane, sl);
+ const first_line = text[0 .. std.mem.indexOfScalar(u8, text, '\n') orelse text.len];
+ const second = std.mem.sliceTo(text[first_line.len + 1 ..], '\n');
+ const want = try std.fmt.allocPrint(frame.allocator(), "{s}\n{s}", .{ first_line[3..], second[0..@min(2, second.len)] });
+ try std.testing.expectEqualStrings(want, swept);
+ }
+
+ test "jump selection clears copied sweeps in both history directions" {
for ([_]bool{ false, true }) |reverse|
- try exercise("alpha\nbravo\n", false, reverse, 1, 3, "lph\nrav");
+ try exercise("alpha\nbravo\n", false, reverse, 1, 3, "lpha\nbrav");
}
test "jump selection clears wrapped Unicode and tab rectangles" {
@@ -965,9 +1447,9 @@ const JumpSelectionTests = struct {
try std.testing.expectEqual(@as(usize, 0), p.jcur);
try LookResetTests.cleared(source);
try LookResetTests.cleared(destination);
- try std.testing.expect(!source.vsel.active and !destination.vsel.active);
- try std.testing.expectEqual(@as(i32, 2), destination.cur_row);
- try std.testing.expectEqual(@as(i32, 1), destination.cur_col);
+ try std.testing.expect(!source.body.vsel.active and !destination.body.vsel.active);
+ try std.testing.expectEqual(@as(i32, 2), destination.body.cur_row);
+ try std.testing.expectEqual(@as(i32, 1), destination.body.cur_col);
try LookResetTests.seed(source, "new source held text");
try LookResetTests.seed(destination, "new destination held text");
@@ -976,9 +1458,9 @@ const JumpSelectionTests = struct {
try std.testing.expectEqual(@as(usize, 1), p.jcur);
try LookResetTests.cleared(source);
try LookResetTests.cleared(destination);
- try std.testing.expect(!source.vsel.active and !destination.vsel.active);
- try std.testing.expectEqual(@as(i32, 1), source.cur_row);
- try std.testing.expectEqual(@as(i32, 0), source.cur_col);
+ try std.testing.expect(!source.body.vsel.active and !destination.body.vsel.active);
+ try std.testing.expectEqual(@as(i32, 1), source.body.cur_row);
+ try std.testing.expectEqual(@as(i32, 0), source.body.cur_col);
}
};
@@ -1002,22 +1484,29 @@ const TagNameTintTests = struct {
var arena = std.heap.ArenaAllocator.init(p.gpa);
defer arena.deinit();
const surface = try p.render(arena.allocator());
- const text = try p.tagText(arena.allocator(), pane);
+ // The tag as shown: its rows wrapped, each offset mapped back to the
+ // tag's own to say whether it is in the name.
+ const shown = try pardes.tagline.shownTag(p, arena.allocator(), pane);
const base = std.mem.lastIndexOfScalar(u8, name, '/') orelse return error.MissingDirectory;
const rect = p.rects[id];
- const y = if (p.settings.tag_bottom) rect.y + rect.h - pardes.BOX_H else rect.y;
const left = rect.x + pardes.TAG_TEXT_INSET;
var visible_name: usize = 0;
- var at: usize = 0;
- while (at < text.len) : (at = modal.nextGrapheme(text, at)) {
- const start: i32 = @as(i32, @intCast(panes.File.rawDisplayCol(text, at))) - pane.tag_scroll;
- const end = start + @as(i32, @intCast(panes.File.displayWidth(text[at..modal.nextGrapheme(text, at)])));
- var col = @max(0, start);
- while (col < end and col < rect.w - pardes.TAG_TEXT_INSET) : (col += 1) {
- const in_name = at > base and at < name.len;
- const fg = if (in_name) name_fg else tag_fg;
- try std.testing.expectEqual(pardes.Color{ .rgb = fg }, surface.at(left + @as(u16, @intCast(col)), y).style.fg);
- if (in_name) visible_name += 1;
+ for (0..pane.tag_rows) |row| {
+ const line_start = modal.lineStartOffset(shown.text, row + pane.tag_top);
+ const line = modal.lineSlice(shown.text, row + pane.tag_top);
+ const y = tagY(p, rect) + @as(u16, @intCast(row));
+ var at: usize = 0;
+ while (at < line.len) : (at = modal.nextGrapheme(line, at)) {
+ const real = shown.toReal(line_start + at);
+ const start: i32 = @intCast(panes.File.rawDisplayCol(line, at));
+ const end = start + @as(i32, @intCast(panes.File.displayWidth(line[at..modal.nextGrapheme(line, at)])));
+ var col = start;
+ while (col < end and col < rect.w - pardes.TAG_TEXT_INSET) : (col += 1) {
+ const in_name = real > base and real < name.len;
+ const fg = if (in_name) name_fg else tag_fg;
+ try std.testing.expectEqual(pardes.Color{ .rgb = fg }, surface.at(left + @as(u16, @intCast(col)), y).style.fg);
+ if (in_name) visible_name += 1;
+ }
}
}
return visible_name;
@@ -1043,38 +1532,35 @@ const TagNameTintTests = struct {
}
}
- test "tag filename tint follows scrolled Unicode staged names and yields to selection" {
+ test "tag filename tint follows wrapped Unicode drafted names and yields to selection" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 38, .rows = 14 });
defer p.deinit();
const pane = try p.setTestFile("body\n");
- const old = pane.file.?.path.len;
configure(p);
defer p.custom_theme = null;
- p.update(.{ .key = .{ .cp = ':' } });
- p.update(.{ .key = .{ .cp = 'i' } });
- pane.tag_anchor = 0;
- pane.tag_col = @intCast(old - 1);
- pane.tag_sel = true;
const name = "/a/very/long/directory/that/extends/past/the/tag/界e\u{301}name-with-a-long-tail.zig";
- p.update(.{ .paste = name });
- try std.testing.expectEqualStrings(name, pane.tag_name[0..pane.tag_name_len.?]);
- pane.tag_col = @intCast(std.mem.indexOf(u8, name, "界").?);
- pane.tag_sel = false;
+ pardes.tagline.draftName(p, pane, 0);
+ redraft(pane, name);
+ pane.input.cur_col = @intCast(std.mem.indexOf(u8, name, "界").?);
+ p.sync(); // the drafted name's rows
try std.testing.expect((try check(p, 0, name)) > 0);
- try std.testing.expect(pane.tag_scroll > 0);
- pane.tag_anchor = pane.tag_col;
- pane.tag_sel = true;
- pane.tag_scroll += 4; // bring both cells of the selected wide glyph into view
+ try std.testing.expect(pane.tag_rows > 1); // the long name wraps
+ // A sweep over the wide glyph, on the row it wrapped to, wears the
+ // selection over the tint.
var arena = std.heap.ArenaAllocator.init(p.gpa);
defer arena.deinit();
+ const shown = try pardes.tagline.shownTag(p, arena.allocator(), pane);
+ const pos = modal.positionAt(shown.text, shown.fromReal(@intCast(pane.input.cur_col)));
+ const col: i32 = @intCast(panes.File.rawDisplayCol(modal.lineSlice(shown.text, pos.row), pos.col));
+ pane.sel[0] = .{ .state = .done, .c0 = col, .c1 = col + 1, .r0 = @intCast(pos.row), .r1 = @intCast(pos.row) };
const surface = try p.render(arena.allocator());
- const x = p.rects[0].x + pardes.TAG_TEXT_INSET + @as(u16, @intCast(panes.File.rawDisplayCol(name, pane.tag_col) - pane.tag_scroll));
- const y = if (p.settings.tag_bottom) p.rects[0].y + p.rects[0].h - pardes.BOX_H else p.rects[0].y;
+ const x = p.rects[0].x + pardes.TAG_TEXT_INSET + @as(u16, @intCast(col));
+ const y = tagY(p, p.rects[0]) + @as(u16, @intCast(pos.row));
try std.testing.expectEqual(pardes.Color{ .rgb = p.theme().sel_fg }, surface.at(x, y).style.fg);
try std.testing.expectEqual(pardes.Color{ .rgb = p.theme().sel_fg }, surface.at(x + 1, y).style.fg);
}
- test "tag filename tint legacy themes retain distinct active foreground" {
+ test "tag filename tint legacy themes keep their active foreground and tint the name with a hue of their own" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 70, .rows = 14 });
defer p.deinit();
const pane = try p.setTestFile("body\n");
@@ -1092,70 +1578,88 @@ const TagNameTintTests = struct {
p.settings.focus_tint = active;
const surface = try p.render(arena.allocator());
const x = p.rects[0].x + pardes.TAG_TEXT_INSET;
- const y = if (p.settings.tag_bottom) p.rects[0].y + p.rects[0].h - pardes.BOX_H else p.rects[0].y;
+ const y = tagY(p, p.rects[0]);
const fg = if (active) active_fg else tag_fg;
+ // The directory in the ink; the name tinted, never in it.
+ const chrome = p.chromeTheme();
+ const tint = if (active) chrome.tag_active_name_fg else chrome.tag_name_fg;
+ try std.testing.expect(!std.meta.eql(tint, fg));
try std.testing.expectEqual(pardes.Color{ .rgb = fg }, surface.at(x + 1, y).style.fg);
- try std.testing.expectEqual(pardes.Color{ .rgb = fg }, surface.at(x + 5, y).style.fg);
+ try std.testing.expectEqual(pardes.Color{ .rgb = tint }, surface.at(x + 5, y).style.fg);
}
}
};
-test "pane filename edits stage commit and cancel without changing body or command tail" {
+/// Replace a name draft's text, the caret after it, as clearing it and
+/// typing would.
+fn redraft(pane: *Pane, name: []const u8) void {
+ if (pane.input.own) |own| pane.gpa.free(own);
+ pane.input.own = pane.gpa.dupe(u8, name) catch unreachable;
+ pane.input.cur_col = @intCast(name.len);
+}
+
+/// Click the tagline at the end of the path: a name draft, caret there.
+fn clickPathEnd(p: *Pardes, pane: *Pane) void {
+ const rect = p.rects[p.active];
+ const y = tagY(p, rect);
+ const x = rect.x + pardes.TAG_TEXT_INSET + @as(u16, @intCast(panes.File.displayWidth(pane.file.?.path) - 1));
+ ClickCursorTests.click(p, .left, x, y);
+ std.debug.assert(pane.prompt == .name);
+ pane.input.cur_col = @intCast(pane.input.own.?.len);
+}
+
+test "pane filename drafts commit and cancel without changing body or command tail" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 70, .rows = 12 });
defer p.deinit();
const pane = try p.setTestFile("original body\n");
const original = try p.gpa.dupe(u8, pane.file.?.path);
defer p.gpa.free(original);
- p.seedTail(pane);
- try std.testing.expect(pane.appendTag(" SyntaxBold"));
- const tail = try p.gpa.dupe(u8, pane.tagSlice());
+ try pane.appendTag(" SyntaxBold");
+ const tail = try p.gpa.dupe(u8, pardes.tagline.curTail(pane));
defer p.gpa.free(tail);
for ([_]bool{ false, true }) |commit| {
- p.update(.{ .key = .{ .cp = ':' } });
- p.update(.{ .key = .{ .cp = 'i' } });
- pane.tag_anchor = 0;
- pane.tag_col = @intCast(original.len - 1);
- pane.tag_sel = true;
+ clickPathEnd(p, pane);
+ p.update(.{ .key = .{ .cp = 'u', .ctrl = true } });
p.update(.{ .paste = "/new name.zig" });
try std.testing.expectEqualStrings(original, pane.file.?.path);
- try std.testing.expectEqualStrings("/new name.zig", pane.tag_name[0..pane.tag_name_len.?]);
- try std.testing.expectEqualStrings(tail, pane.tagSlice());
+ try std.testing.expectEqualStrings("/new name.zig", pane.input.own.?);
+ try std.testing.expectEqualStrings(tail, pardes.tagline.curTail(pane));
try std.testing.expectEqualStrings("original body\n", pane.file.?.content);
+ // Esc keeps the draft pending; a second drops it.
p.update(.{ .key = .{ .cp = if (commit) Key.enter else Key.escape } });
- try std.testing.expect(!pane.tag_edit);
- try std.testing.expect(pane.tag_name_len == null);
+ if (!commit) p.update(.{ .key = .{ .cp = Key.escape } });
+ try std.testing.expect(pane.focus == .body);
+ try std.testing.expect(pane.prompt == .none);
try std.testing.expectEqualStrings(if (commit) "/new name.zig" else original, pane.file.?.path);
- try std.testing.expectEqualStrings(tail, pane.tagSlice());
+ try std.testing.expectEqualStrings(tail, pardes.tagline.curTail(pane));
while (p.nextEffect()) |effect| try std.testing.expect(std.meta.activeTag(effect) != .save_file);
}
- try std.testing.expect(pane.file.?.revision != pane.file.?.saved_revision);
+ // A name alone is no edit: the pane stays clean.
+ try std.testing.expect(pane.file.?.revision == pane.file.?.saved_revision);
}
test "pane filename grapheme edits and invalid empty commits preserve the buffer" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true });
defer p.deinit();
const pane = try p.setTestFile("untouched\n");
- p.update(.{ .key = .{ .cp = ':' } });
- p.update(.{ .key = .{ .cp = 'i' } });
- pane.tag_anchor = 0;
- pane.tag_col = @intCast(pane.file.?.path.len - 1);
- pane.tag_sel = true;
+ clickPathEnd(p, pane);
+ p.update(.{ .key = .{ .cp = 'u', .ctrl = true } });
p.update(.{ .paste = "/café界" });
p.update(.{ .key = .{ .cp = Key.backspace } });
- try std.testing.expectEqualStrings("/café", pane.tag_name[0..pane.tag_name_len.?]);
+ try std.testing.expectEqualStrings("/café", pane.input.own.?);
p.update(.{ .key = .{ .cp = Key.backspace } });
- try std.testing.expectEqualStrings("/caf", pane.tag_name[0..pane.tag_name_len.?]);
- pane.tag_anchor = 0;
- pane.tag_col = 3;
- pane.tag_sel = true;
- p.update(.{ .key = .{ .cp = Key.delete } });
- try std.testing.expectEqual(@as(u16, 0), pane.tag_name_len.?);
+ try std.testing.expectEqualStrings("/caf", pane.input.own.?);
+ p.update(.{ .key = .{ .cp = 'u', .ctrl = true } });
+ try std.testing.expectEqualStrings("", pane.input.own.?);
p.update(.{ .key = .{ .cp = Key.enter } });
- try std.testing.expect(pane.tag_edit);
+ try std.testing.expect(pane.prompt == .name);
try std.testing.expectEqualStrings("/test.txt", pane.file.?.path);
try std.testing.expectEqualStrings("untouched\n", pane.file.?.content);
+ // Esc keeps the draft pending; a second drops it.
+ p.update(.{ .key = .{ .cp = Key.escape } });
+ try std.testing.expect(pane.prompt == .name);
p.update(.{ .key = .{ .cp = Key.escape } });
- try std.testing.expect(pane.tag_name_len == null);
+ try std.testing.expect(pane.prompt == .none);
}
test "leaving a pane or entering a header cancels an uncommitted filename" {
@@ -1164,39 +1668,35 @@ test "leaving a pane or entering a header cancels an uncommitted filename" {
const pane = try p.setTestFile("untouched\n");
for ([_]bool{ false, true }) |header| {
p.active = 0;
- p.topbar_col = null;
- p.update(.{ .key = .{ .cp = ':' } });
- p.update(.{ .key = .{ .cp = 'i' } });
- p.update(.{ .key = .{ .cp = Key.home } });
+ pardes.tagline.exitHeader(p);
+ p.update(.tick);
+ clickPathEnd(p, pane);
p.update(.{ .paste = "/draft" });
- try std.testing.expect(pane.tag_name_len != null);
+ try std.testing.expect(pane.prompt == .name);
if (header) {
- p.topbar_col = 0;
+ pardes.tagline.enterHeader(p, null);
p.update(.tick);
} else {
try std.testing.expect(p.executeBuiltinLine(0, "New"));
p.update(.tick);
}
- try std.testing.expect(pane.tag_name_len == null);
- try std.testing.expect(!pane.tag_edit);
+ try std.testing.expect(pane.prompt == .none);
+ try std.testing.expect(pane.focus == .body);
try std.testing.expectEqualStrings("/test.txt", pane.file.?.path);
}
}
-test "middle clicking Save commits the staged filename before issuing a save" {
+test "middle clicking Save commits the drafted filename before issuing a save" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 70, .rows = 12 });
defer p.deinit();
const pane = try p.setTestFile("untouched\n");
- p.update(.{ .key = .{ .cp = ':' } });
- p.update(.{ .key = .{ .cp = 'i' } });
- pane.tag_anchor = 0;
- pane.tag_col = @intCast(pane.file.?.path.len - 1);
- pane.tag_sel = true;
+ clickPathEnd(p, pane);
+ p.update(.{ .key = .{ .cp = 'u', .ctrl = true } });
p.update(.{ .paste = "/renamed.txt" });
var arena = std.heap.ArenaAllocator.init(p.gpa);
defer arena.deinit();
_ = try p.render(arena.allocator());
- const text = try p.tagText(arena.allocator(), pane);
+ const text = try pardes.tagline.tagText(p, arena.allocator(), pane);
const save_at = std.mem.indexOf(u8, text, "Save").?;
const x: u16 = @intCast(p.rects[0].x + pardes.TAG_TEXT_INSET + save_at - pane.tag_scroll);
const y = p.rects[0].y;
@@ -1204,7 +1704,7 @@ test "middle clicking Save commits the staged filename before issuing a save" {
p.update(.{ .mouse = .{ .col = x, .row = y, .button = config.exec_button, .kind = .press } });
p.update(.{ .mouse = .{ .col = x, .row = y, .button = config.exec_button, .kind = .release } });
try std.testing.expectEqualStrings("/renamed.txt", pane.file.?.path);
- try std.testing.expect(pane.tag_name_len == null);
+ try std.testing.expect(pane.prompt == .none);
try std.testing.expectEqualStrings("untouched\n", pane.file.?.content);
var saves: usize = 0;
while (p.nextEffect()) |effect| if (effect == .save_file) {
@@ -1214,24 +1714,19 @@ test "middle clicking Save commits the staged filename before issuing a save" {
try std.testing.expectEqual(@as(usize, 1), saves);
}
-test "oversized filename paste refuses atomically across a selected tag boundary" {
+test "an oversized drafted name is refused at commit and the draft stays to correct" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true });
defer p.deinit();
const pane = try p.setTestFile("untouched\n");
- p.update(.{ .key = .{ .cp = ':' } });
- p.update(.{ .key = .{ .cp = 'i' } });
- const before = try p.tagText(p.gpa, pane);
- defer p.gpa.free(before);
- pane.tag_anchor = 0;
- pane.tag_col = @intCast(before.len - 1);
- pane.tag_sel = true;
- const excess = try p.gpa.alloc(u8, pane.tag_name.len + 1);
+ clickPathEnd(p, pane);
+ const excess = try p.gpa.alloc(u8, 5000);
defer p.gpa.free(excess);
@memset(excess, 'x');
+ excess[0] = '/';
p.update(.{ .paste = excess });
- try std.testing.expect(pane.tag_name_len == null);
- try std.testing.expect(pane.tag_sel);
- try std.testing.expectEqualStrings(before, try p.tagText(p.scratch.allocator(), pane));
+ p.update(.{ .key = .{ .cp = Key.enter } });
+ try std.testing.expect(pane.prompt == .name);
+ try std.testing.expectEqualStrings("/test.txt", pane.file.?.path);
try std.testing.expectEqualStrings("untouched\n", pane.file.?.content);
}
@@ -1241,42 +1736,97 @@ test "paste into pane commands and prompts never inserts into the body" {
const pane = try p.setTestFile("one two one\n");
p.update(.{ .key = .{ .cp = ':' } });
p.update(.{ .key = .{ .cp = 'A' } });
- p.update(.{ .paste = " Custom\r\nCommand" });
- try std.testing.expect(std.mem.endsWith(u8, pane.tagSlice(), " CustomCommand"));
+ // A tag takes a paste as a body does, newline and all.
+ p.update(.{ .paste = " Custom\nCommand" });
+ try std.testing.expect(std.mem.indexOf(u8, pardes.tagline.curTail(pane), " Custom\nCommand") != null);
p.update(.{ .key = .{ .cp = Key.escape } });
- p.startPrompt(pane, .{ .search = config.search_marker });
- p.update(.{ .paste = "two" });
- try std.testing.expect(std.mem.endsWith(u8, pane.tagSlice(), "two"));
+ p.startPrompt(pane, &pane.body, .{ .search = config.search_marker });
+ p.update(.{ .paste = "t\r\nwo" });
+ try std.testing.expectEqualStrings(config.search_marker ++ "two", pane.promptText().?);
+ try std.testing.expect(std.mem.indexOf(u8, pardes.tagline.curTail(pane), " Custom\nCommand") != null);
try std.testing.expectEqualStrings("one two one\n", pane.file.?.content);
p.update(.{ .key = .{ .cp = Key.escape } });
- try std.testing.expect(std.mem.endsWith(u8, pane.tagSlice(), " CustomCommand"));
+ try std.testing.expect(std.mem.indexOf(u8, pardes.tagline.curTail(pane), " Custom\nCommand") != null);
}
-test "long pane tags reveal commands and map visible clicks to whole tag addresses" {
+test "a tag that exactly fills its row stays one row, its caret at the edge as acme's tick" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 50, .rows = 12 });
+ defer p.deinit();
+ const pane = try p.setTestFile("body\n");
+ const width = pardes.tagline.tagWidth(p, 0);
+ // Pad the path until the whole tag is exactly the row.
+ const bare = try pardes.tagline.tagText(p, p.scratch.allocator(), pane);
+ const pad = width - bare.len + pane.file.?.path.len;
+ p.gpa.free(pane.file.?.path);
+ const path = try p.gpa.alloc(u8, pad);
+ @memset(path, 'a');
+ path[0] = '/';
+ pane.file.?.path = path;
+ try std.testing.expectEqual(width, (try pardes.tagline.tagText(p, p.scratch.allocator(), pane)).len);
+ p.update(.{ .key = .{ .cp = ':' } });
+ p.update(.{ .key = .{ .cp = 'A' } });
+ var arena = std.heap.ArenaAllocator.init(p.gpa);
+ defer arena.deinit();
+ const surface = try p.render(arena.allocator());
+ try std.testing.expectEqual(@as(u16, 1), pane.tag_rows);
+ // The layer's caret is past the last character; the grid's, on the pane's
+ // last cell, since it has none past it.
+ try std.testing.expectEqual(@as(u16, @intCast(width)), surface.tag_layers[0].cursor.?.x);
+ try std.testing.expectEqual(p.rects[0].x + p.rects[0].w - 1, surface.cursor.?.x);
+}
+
+test "a long pane tag wraps onto rows, and a click on a wrapped row maps to the whole tag's address" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 50, .rows = 12 });
defer p.deinit();
const pane = try p.setTestFile("body\n");
p.gpa.free(pane.file.?.path);
pane.file.?.path = try p.gpa.dupe(u8, "/an/especially/deep/project/path/with/a/long/component/filename.zig");
- p.seedTail(pane);
- try std.testing.expect(pane.appendTag(" SyntaxBold"));
+ try pane.appendTag(" SyntaxBold");
p.update(.{ .key = .{ .cp = ':' } });
p.update(.{ .key = .{ .cp = 'A' } });
var arena = std.heap.ArenaAllocator.init(p.gpa);
defer arena.deinit();
const surface = try p.render(arena.allocator());
- try std.testing.expect(pane.tag_scroll > 0);
+ try std.testing.expect(pane.tag_rows > 1);
try std.testing.expect(surface.cursor.?.x < p.rects[0].x + p.rects[0].w);
- const text = try p.tagText(p.gpa, pane);
+ const text = try pardes.tagline.tagText(p, p.gpa, pane);
defer p.gpa.free(text);
- const offset = std.mem.indexOf(u8, text, "SyntaxBold").?;
- const x: u16 = @intCast(p.rects[0].x + pardes.TAG_TEXT_INSET + panes.File.rawDisplayCol(text, offset) - pane.tag_scroll);
- const y = p.rects[0].y;
+ const shown = try pardes.tagline.shownTag(p, arena.allocator(), pane);
+ const at = shown.fromReal(std.mem.indexOf(u8, text, "SyntaxBold").?);
+ const pos = modal.positionAt(shown.text, at);
+ const x: u16 = @intCast(p.rects[0].x + pardes.TAG_TEXT_INSET + panes.File.rawDisplayCol(modal.lineSlice(shown.text, pos.row), pos.col));
+ const y = p.tagTop(pane, p.rects[0]) + @as(u16, @intCast(pos.row));
+ const before = p.settings.syntax_bold;
+ p.update(.{ .mouse = .{ .col = x, .row = y, .button = config.exec_button, .kind = .press } });
+ p.update(.{ .mouse = .{ .col = x, .row = y, .button = config.exec_button, .kind = .release } });
+ try std.testing.expectEqual(!before, p.settings.syntax_bold);
+ try std.testing.expectEqualStrings(text, try pardes.tagline.tagText(p, p.scratch.allocator(), pane));
+}
+
+test "a word the tag's wrapping breaks across rows is still one word to a click" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 50, .rows = 12 });
+ defer p.deinit();
+ const pane = try p.setTestFile("body\n");
+ try pane.appendTag(" SyntaxBold");
+ var arena = std.heap.ArenaAllocator.init(p.gpa);
+ defer arena.deinit();
+ // Lengthen the path until the wrap splits the word after "Synt".
+ var pad: usize = 1;
+ const shown = while (pad < 80) : (pad += 1) {
+ p.gpa.free(pane.file.?.path);
+ const path = try std.fmt.allocPrint(arena.allocator(), "/{s}/f.zig", .{(&@as([80]u8, @splat('a')))[0..pad]});
+ pane.file.?.path = try p.gpa.dupe(u8, path);
+ p.sync();
+ const s = try pardes.tagline.shownTag(p, arena.allocator(), pane);
+ if (std.mem.indexOf(u8, s.text, "Synt\n") != null) break s;
+ } else return error.NoSplit;
+ const pos = modal.positionAt(shown.text, std.mem.indexOf(u8, shown.text, "Synt").?);
+ const x: u16 = @intCast(p.rects[0].x + pardes.TAG_TEXT_INSET + pos.col + 1);
+ const y = p.tagTop(pane, p.rects[0]) + @as(u16, @intCast(pos.row));
const before = p.settings.syntax_bold;
p.update(.{ .mouse = .{ .col = x, .row = y, .button = config.exec_button, .kind = .press } });
p.update(.{ .mouse = .{ .col = x, .row = y, .button = config.exec_button, .kind = .release } });
try std.testing.expectEqual(!before, p.settings.syntax_bold);
- try std.testing.expectEqualStrings(text, try p.tagText(p.scratch.allocator(), pane));
}
test "terminal overlay recoloring never materializes unrelated history" {
@@ -1287,46 +1837,46 @@ test "terminal overlay recoloring never materializes unrelated history" {
const pane = p.panes[0].?;
pane.tty_filter = false;
for (0..1000) |_| p.update(.{ .output = .{ .pane = 0, .bytes = "\x1b[32mcaf\xc3\xa9 \xe7\x95\x8c\x1b[0m\r\n" } });
- pane.mode = .normal;
+ pane.body.mode = .normal;
pane.ovl = .{ .row = 0, .rows = 1, .text = try p.gpa.dupe(u8, "edited history") };
var frame = std.heap.ArenaAllocator.init(testing.allocator);
defer frame.deinit();
_ = try p.render(frame.allocator());
try testing.expect(p.shell_rows.pane == null);
- pane.ovl.?.row = panes.Terminal.gridOffset(pane);
+ pane.ovl.?.row = panes.terminal.gridOffset(pane);
p.gpa.free(pane.ovl.?.text);
pane.ovl.?.text = try p.gpa.dupe(u8, "caf\xc3\xa9 \xe7\x95\x8c");
_ = frame.reset(.retain_capacity);
const surface = try p.render(frame.allocator());
try testing.expect(p.shell_rows.pane == null);
const rect = p.rects[0];
- const body_y = if (p.settings.tag_bottom) rect.y else rect.y + pardes.BOX_H;
+ const body_y = bodyY(p, rect);
const cell = surface.at(rect.x + config.GUTTER, body_y);
try testing.expectEqualStrings("c", cell.grapheme());
try testing.expectEqual(pardes.Color{ .rgb = p.theme().palette.?[2] }, cell.style.fg);
}
test "terminal output keeps following new rows after scrollback eviction" {
- if (comptime !panes.Terminal.enabled) return error.SkipZigTest;
+ if (comptime !panes.terminal.enabled) return error.SkipZigTest;
const gpa = std.testing.allocator;
const p = try Pardes.init(gpa, .{ .tty_only = true, .cols = 80, .rows = 24 });
defer p.deinit();
while (p.nextEffect()) |_| {}
const pane = p.panes[0].?;
- pane.mode = .tty;
+ pane.body.mode = .tty;
pane.tty_filter = false;
const pages = &pane.terminal.?.vt.screens.active.pages;
- pages.explicit_max_size = 64 * 1024;
+ pages.limits.set(.bytes, 64 * 1024);
var frame = std.heap.ArenaAllocator.init(gpa);
defer frame.deinit();
var evictions: usize = 0;
for (0..3) |phase| {
if (phase > 0) {
- pane.mode = .normal;
- panes.Terminal.scrollGrid(pane, -30);
+ pane.body.mode = .normal;
+ panes.terminal.scrollGrid(pane, -30);
try std.testing.expect(pages.scrollbar().offset < pages.scrollbar().total - pane.rows);
- panes.Terminal.enterTty(p, 0);
+ panes.terminal.enterTty(p, 0);
}
for (phase * 20_000..(phase + 1) * 20_000) |n| {
var buf: [64]u8 = undefined;
@@ -1336,10 +1886,10 @@ test "terminal output keeps following new rows after scrollback eviction" {
if (pages.scrollbar().total < previous) evictions += 1;
}
try std.testing.expect(evictions > phase);
- try std.testing.expect(pages.page_size <= pages.maxSize());
+ try std.testing.expect(pages.page_size <= pages.limits.max(.bytes));
const sb = pages.scrollbar();
try std.testing.expectEqual(sb.total - pane.rows, sb.offset);
- const full = try panes.Terminal.screenTextAlloc(pane, gpa);
+ const full = try panes.terminal.screenTextAlloc(pane, gpa);
defer gpa.free(full);
var last_buf: [16]u8 = undefined;
const last = try std.fmt.bufPrint(&last_buf, "row-{d:0>5}", .{(phase + 1) * 20_000 - 1});
@@ -1349,7 +1899,7 @@ test "terminal output keeps following new rows after scrollback eviction" {
const surface = try p.render(frame.allocator());
const rect = p.rects[0];
const x = rect.x + config.GUTTER;
- const y = (if (p.settings.tag_bottom) rect.y else rect.y + pardes.BOX_H) + pane.rows - 2;
+ const y = (bodyY(p, rect)) + pane.rows - 2;
for (last, 0..) |byte, col| {
const cell = surface.at(x + @as(u16, @intCast(col)), y);
try std.testing.expectEqualStrings(&.{byte}, cell.grapheme());
@@ -1363,21 +1913,18 @@ test "terminal output keeps following new rows after scrollback eviction" {
try std.testing.expectEqualStrings("f", effect.write.bytes.slice());
try std.testing.expect(p.nextEffect() == null);
}
- const replay = &pane.terminal.?.replay;
- try std.testing.expectEqual(replay.bytes.len, replay.len);
- try std.testing.expect(replay.head > 0);
}
test "terminal edit stays on its surviving row when old scrollback is evicted" {
- if (comptime !panes.Terminal.enabled) return error.SkipZigTest;
+ if (comptime !panes.terminal.enabled) return error.SkipZigTest;
const gpa = std.testing.allocator;
const p = try Pardes.init(gpa, .{ .tty_only = true, .cols = 80, .rows = 24 });
defer p.deinit();
while (p.nextEffect()) |_| {}
const pane = p.panes[0].?;
- pane.mode = .tty;
+ pane.body.mode = .tty;
const pages = &pane.terminal.?.vt.screens.active.pages;
- pages.explicit_max_size = 64 * 1024;
+ pages.limits.set(.bytes, 64 * 1024);
var next: usize = 0;
while (next < 3000) {
var buf: [32]u8 = undefined;
@@ -1389,12 +1936,12 @@ test "terminal edit stays on its surviving row when old scrollback is evicted" {
try std.testing.expect(next < 3000);
var last_buf: [16]u8 = undefined;
const last = try std.fmt.bufPrint(&last_buf, "row-{d:0>5}", .{next - 1});
- pane.mode = .normal;
+ pane.body.mode = .normal;
const original_row: i32 = @intCast(pages.scrollbar().total - 2);
pane.ovl = .{ .row = original_row, .rows = 1, .text = try gpa.dupe(u8, "my unsent edit") };
- pane.cur_row = original_row;
- pane.cur_col = 3;
- pane.cur_pinned = true;
+ pane.body.cur_row = original_row;
+ pane.body.cur_col = 3;
+ pane.body.cur_pinned = true;
var removed: usize = 0;
for (next..next + 3000) |n| {
var buf: [32]u8 = undefined;
@@ -1407,17 +1954,17 @@ test "terminal edit stays on its surviving row when old scrollback is evicted" {
}
}
try std.testing.expect(removed > 0 and removed < original_row);
- const full = try panes.Terminal.screenTextAlloc(pane, gpa);
+ const full = try panes.terminal.screenTextAlloc(pane, gpa);
defer gpa.free(full);
const row = original_row - @as(i32, @intCast(removed));
try std.testing.expectEqualStrings(last, modal.lineSlice(full, @intCast(row)));
try std.testing.expectEqual(row, pane.ovl.?.row);
- try std.testing.expectEqual(row, pane.cur_row);
+ try std.testing.expectEqual(row, pane.body.cur_row);
try std.testing.expectEqualStrings("my unsent edit", pane.ovl.?.text);
}
test "terminal edits and undo survive partial history clearing and whole-screen loss" {
- if (comptime !panes.Terminal.enabled) return error.SkipZigTest;
+ if (comptime !panes.terminal.enabled) return error.SkipZigTest;
const gpa = std.testing.allocator;
const Action = enum { clear_history, partial_clear_history, reset_primary, reset_alternate, evict_all, hidden_undo };
for (std.enums.values(Action)) |action| {
@@ -1425,91 +1972,105 @@ test "terminal edits and undo survive partial history clearing and whole-screen
defer p.deinit();
while (p.nextEffect()) |_| {}
const pane = p.panes[0].?;
- pane.mode = .tty;
+ pane.body.mode = .tty;
if (action == .reset_alternate)
p.update(.{ .output = .{ .pane = 0, .bytes = "\x1b[?1049h" } });
- p.update(.{ .output = .{ .pane = 0, .bytes = "old row\r\n" ** 40 } });
+ p.update(.{ .output = .{ .pane = 0, .bytes = std.mem.asBytes(&@as([40][9]u8, @splat("old row\r\n".*))) } });
const pages = &pane.terminal.?.vt.screens.active.pages;
- pages.explicit_max_size = 64 * 1024;
+ pages.limits.set(.bytes, 64 * 1024);
const row: i32 = @as(i32, @intCast(pages.total_rows - pane.rows)) +
@as(i32, if (action == .partial_clear_history) -1 else 2);
- pane.mode = .normal;
+ pane.body.mode = .normal;
pane.ovl = .{ .row = row, .rows = if (action == .partial_clear_history) 3 else 2, .text = try gpa.dupe(u8, "edit one\nedit two") };
- pane.cur_row = row + 1;
- pane.cur_col = 4;
- pane.cur_pinned = true;
- pane.vsel = .{ .active = true, .row = row, .col = 1 };
- panes.Terminal.pushUndo(p, pane);
- pane.ed_redo[0] = panes.Terminal.snap(p, pane) orelse return error.SnapshotFailed;
- pane.ed_redo_len = 1;
+ pane.body.cur_row = row + 1;
+ pane.body.cur_col = 4;
+ pane.body.cur_pinned = true;
+ pane.body.vsel = .{ .active = true, .row = row, .col = 1 };
+ panes.terminal.pushUndo(p, pane);
+ const overlay = pane.ovl.?;
+ pane.body.ed_redo[0] = .{
+ .ovl = .{ .row = overlay.row, .rows = overlay.rows, .text = try gpa.dupe(u8, overlay.text) },
+ .cur_row = pane.body.cur_row,
+ .cur_col = pane.body.cur_col,
+ .vsel = pane.body.vsel,
+ };
+ pane.body.ed_redo_len = 1;
if (action == .hidden_undo) {
gpa.free(pane.ovl.?.text);
pane.ovl = null;
- panes.Terminal.enterTty(p, 0);
+ panes.terminal.enterTty(p, 0);
}
const bytes = switch (action) {
.clear_history, .partial_clear_history => "\x1b[3J",
.reset_primary, .reset_alternate => "\x1bc",
- .evict_all, .hidden_undo => "new row\r\n" ** 4000,
+ .evict_all, .hidden_undo => std.mem.asBytes(&@as([4000][9]u8, @splat("new row\r\n".*))),
};
p.update(.{ .output = .{ .pane = 0, .bytes = bytes } });
const expected: i32 = if (action == .clear_history) 2 else 0;
+ // The copy's top row was in the history ED 3 erased: the copy goes
+ // with it (terminal.zig's rule for rows that are gone), and the
+ // selection made in it too. Undo still has it, at the top.
+ if (action == .partial_clear_history) {
+ try std.testing.expect(pane.ovl == null);
+ try std.testing.expect(!pane.body.vsel.active);
+ }
+ if (action == .clear_history) try std.testing.expect(pane.ovl != null);
if (pane.ovl) |edit| {
try std.testing.expectEqual(expected, edit.row);
try std.testing.expectEqual(@as(i32, if (action == .clear_history or action == .partial_clear_history) 2 else 1), edit.rows);
try std.testing.expectEqualStrings("edit one\nedit two", edit.text);
- try std.testing.expectEqual(expected + 1, pane.cur_row);
- try std.testing.expectEqual(expected, pane.vsel.row);
+ try std.testing.expectEqual(expected + 1, pane.body.cur_row);
+ try std.testing.expectEqual(expected, pane.body.vsel.row);
}
- for ([_]panes.Terminal.Snapshot{ pane.ed_undo[0], pane.ed_redo[0] }) |snapshot| {
+ for ([_]panes.terminal.Snapshot{ pane.body.ed_undo[0], pane.body.ed_redo[0] }) |snapshot| {
try std.testing.expectEqual(expected, snapshot.ovl.?.row);
try std.testing.expectEqual(expected + 1, snapshot.cur_row);
try std.testing.expectEqualStrings("edit one\nedit two", snapshot.ovl.?.text);
}
try std.testing.expectEqual(@as(usize, 2), pane.terminal.?.vt.screens.active.pages.countTrackedPins());
- panes.Terminal.undo(p, pane);
+ panes.terminal.undo(p, pane);
try std.testing.expectEqualStrings("edit one\nedit two", pane.ovl.?.text);
try std.testing.expectEqual(expected, pane.ovl.?.row);
}
}
test "terminal lower scroll regions do not move edits above them" {
- if (comptime !panes.Terminal.enabled) return error.SkipZigTest;
+ if (comptime !panes.terminal.enabled) return error.SkipZigTest;
const gpa = std.testing.allocator;
const p = try Pardes.init(gpa, .{ .tty_only = true, .cols = 80, .rows = 24 });
defer p.deinit();
while (p.nextEffect()) |_| {}
const pane = p.panes[0].?;
- pane.mode = .normal;
+ pane.body.mode = .normal;
p.update(.{ .output = .{ .pane = 0, .bytes = "top\r\nsecond\r\nthird" } });
pane.ovl = .{ .row = 1, .rows = 1, .text = try gpa.dupe(u8, "unsent") };
- pane.cur_row = 1;
- pane.cur_pinned = true;
- panes.Terminal.pushUndo(p, pane);
- const total = panes.Terminal.scrollbar(pane).total;
+ pane.body.cur_row = 1;
+ pane.body.cur_pinned = true;
+ panes.terminal.pushUndo(p, pane);
+ const total = panes.terminal.scrollbar(pane).total;
var setup: [64]u8 = undefined;
const bytes = try std.fmt.bufPrint(&setup, "\x1b[4;{d}r\x1b[{d};1H", .{ pane.rows, pane.rows });
p.update(.{ .output = .{ .pane = 0, .bytes = bytes } });
- p.update(.{ .output = .{ .pane = 0, .bytes = "tail\r\n" ** 50 } });
- try std.testing.expectEqual(total, panes.Terminal.scrollbar(pane).total);
+ p.update(.{ .output = .{ .pane = 0, .bytes = std.mem.asBytes(&@as([50][6]u8, @splat("tail\r\n".*))) } });
+ try std.testing.expectEqual(total, panes.terminal.scrollbar(pane).total);
try std.testing.expectEqual(@as(i32, 1), pane.ovl.?.row);
- try std.testing.expectEqual(@as(i32, 1), pane.cur_row);
- try std.testing.expectEqual(@as(i32, 1), pane.ed_undo[0].ovl.?.row);
- const full = try panes.Terminal.screenTextAlloc(pane, gpa);
+ try std.testing.expectEqual(@as(i32, 1), pane.body.cur_row);
+ try std.testing.expectEqual(@as(i32, 1), pane.body.ed_undo[0].ovl.?.row);
+ const full = try panes.terminal.screenTextAlloc(pane, gpa);
defer gpa.free(full);
try std.testing.expect(std.mem.startsWith(u8, full, "top\nsecond\nthird\n"));
}
test "terminal eviction and lower-region scrolling in one read preserve a surviving edit" {
- if (comptime !panes.Terminal.enabled) return error.SkipZigTest;
+ if (comptime !panes.terminal.enabled) return error.SkipZigTest;
const gpa = std.testing.allocator;
const p = try Pardes.init(gpa, .{ .tty_only = true, .cols = 80, .rows = 24 });
defer p.deinit();
while (p.nextEffect()) |_| {}
const pane = p.panes[0].?;
- pane.mode = .tty;
+ pane.body.mode = .tty;
const pages = &pane.terminal.?.vt.screens.active.pages;
- pages.explicit_max_size = 64 * 1024;
+ pages.limits.set(.bytes, 64 * 1024);
var next: usize = 0;
while (next < 3000) {
var buf: [32]u8 = undefined;
@@ -1522,23 +2083,23 @@ test "terminal eviction and lower-region scrolling in one read preserve a surviv
try std.testing.expect(next < 3000);
const removed = pages.pages.first.?.rows();
const old_row: i32 = @intCast(removed + 2);
- pane.mode = .normal;
+ pane.body.mode = .normal;
pane.ovl = .{ .row = old_row, .rows = 1, .text = try gpa.dupe(u8, "kept edit") };
- pane.cur_row = old_row;
- pane.cur_pinned = true;
- panes.Terminal.pushUndo(p, pane);
+ pane.body.cur_row = old_row;
+ pane.body.cur_pinned = true;
+ panes.terminal.pushUndo(p, pane);
const old_total = pages.total_rows;
var buf: [128]u8 = undefined;
const bytes = try std.fmt.bufPrint(&buf, "new\r\n\x1b[4;{d}r\x1b[{d};1Hregion\r\n", .{ pane.rows, pane.rows });
p.update(.{ .output = .{ .pane = 0, .bytes = bytes } });
try std.testing.expectEqual(old_total + 1 - removed, pages.total_rows);
try std.testing.expectEqual(@as(i32, 2), pane.ovl.?.row);
- try std.testing.expectEqual(@as(i32, 2), pane.cur_row);
- try std.testing.expectEqual(@as(i32, 2), pane.ed_undo[0].ovl.?.row);
+ try std.testing.expectEqual(@as(i32, 2), pane.body.cur_row);
+ try std.testing.expectEqual(@as(i32, 2), pane.body.ed_undo[0].ovl.?.row);
try std.testing.expectEqualStrings("kept edit", pane.ovl.?.text);
}
-test "tag prompt entry and cancellation preserve exact text and cursor state" {
+test "a prompt's entry and cancellation leave the tag, the body and its cursor as they were" {
const Case = struct { key: ?Key = null, save: bool = false, marker: []const u8 };
const cases = [_]Case{
.{ .marker = config.search_marker },
@@ -1554,61 +2115,52 @@ test "tag prompt entry and cancellation preserve exact text and cursor state" {
try pane.setOwnedCwd("/dír space");
const tail = " keep";
for (cases) |case| {
- @memcpy(pane.tag_tail[0..tail.len], tail);
- pane.tag_tail_len = tail.len;
- pane.tag_init = true;
- pane.tag_sel = true;
- pane.tag_col = 1;
- pane.cur_row = 1;
- pane.cur_col = 2;
- pane.cur_pinned = true;
+ try setTag(pane, tail);
+ pane.body.cur_row = 1;
+ pane.body.cur_col = 2;
+ pane.body.cur_pinned = true;
if (case.key) |key| {
p.update(.{ .key = key });
} else if (case.save) {
- p.startPrompt(pane, .save);
+ p.startPrompt(pane, &pane.body, .save);
} else {
- p.startPrompt(pane, .{ .search = config.search_marker });
+ p.startPrompt(pane, &pane.body, .{ .search = config.search_marker });
}
- try std.testing.expect(pane.tag_edit);
- try std.testing.expect(!pane.tag_sel);
- try std.testing.expectEqual(.insert, pane.mode);
- try std.testing.expectEqualDeep(modal.Normal.State{}, pane.normal);
- try std.testing.expectEqualStrings(tail, pane.tag_tail[0..tail.len]);
- try std.testing.expectEqualStrings(case.marker, pane.tag_tail[tail.len..pane.tag_tail_len]);
- try std.testing.expectEqual(pane.file.?.path.len + pane.tag_tail_len, pane.tag_col);
+ // The answer is typed into the prompt's own line, never the tag.
+ try std.testing.expect(pane.focus == .body);
+ try std.testing.expectEqual(.insert, pane.input.mode);
+ try std.testing.expectEqualStrings(case.marker, pane.promptText().?);
+ try std.testing.expectEqual(@as(i32, @intCast(case.marker.len)), pane.input.cur_col);
+ try std.testing.expectEqualStrings(tail, pane.tag.own.?);
+ try std.testing.expectEqualDeep(modal.Normal.State{}, pane.body.normal);
p.update(.{ .key = .{ .cp = Key.escape } });
try std.testing.expect(pane.prompt == .none);
- try std.testing.expect(!pane.tag_edit);
- try std.testing.expectEqual(.normal, pane.mode);
- try std.testing.expectEqualStrings(tail, pane.tag_tail[0..pane.tag_tail_len]);
- try std.testing.expectEqual(@as(i32, 1), pane.cur_row);
- try std.testing.expectEqual(@as(i32, 2), pane.cur_col);
+ try std.testing.expect(pane.input.own == null);
+ try std.testing.expectEqual(.normal, pane.body.mode);
+ try std.testing.expectEqualStrings(tail, pane.tag.own.?);
+ try std.testing.expectEqual(@as(i32, 1), pane.body.cur_row);
+ try std.testing.expectEqual(@as(i32, 2), pane.body.cur_col);
try std.testing.expectEqualStrings("one\ntwo\n", pane.file.?.content);
}
}
-test "tag prompt capacity refusal leaves the existing tail and input state untouched" {
+test "a prompt opens whatever the tag already holds" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true });
defer p.deinit();
const pane = try p.setTestFile("one\n");
- @memset(&pane.tag_tail, 'x');
- pane.tag_tail_len = pane.tag_tail.len - 1;
- pane.tag_init = true;
- pane.tag_col = 17;
- pane.tag_sel = true;
+ const full = try p.gpa.alloc(u8, pardes.memory.limits.max_tag_tail);
+ defer p.gpa.free(full);
+ @memset(full, 'x');
+ try setTag(pane, full);
for (0..3) |case| {
switch (case) {
- 0 => p.startPrompt(pane, .{ .search = config.search_marker }),
- 1 => p.startPrompt(pane, .save),
+ 0 => p.startPrompt(pane, &pane.body, .{ .search = config.search_marker }),
+ 1 => p.startPrompt(pane, &pane.body, .save),
else => p.update(.{ .key = .{ .cp = '|' } }),
}
- try std.testing.expect(pane.prompt == .none);
- try std.testing.expect(!pane.tag_edit);
- try std.testing.expect(pane.tag_sel);
- try std.testing.expectEqual(.normal, pane.mode);
- try std.testing.expectEqual(@as(u16, 17), pane.tag_col);
- try std.testing.expectEqual(pane.tag_tail.len - 1, pane.tag_tail_len);
- for (pane.tag_tail) |byte| try std.testing.expectEqual(@as(u8, 'x'), byte);
+ try std.testing.expect(pane.prompt != .none);
+ try std.testing.expectEqualStrings(full, pane.tag.own.?);
+ p.update(.{ .key = .{ .cp = Key.escape } });
}
}
@@ -1616,41 +2168,45 @@ test "generated output refuses every pipe prompt before seeding the tag" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true });
defer p.deinit();
const content = try p.gpa.dupe(u8, "generated\n");
- const pane = try panes.Output.open(p, 1, "/", .{ .cmd = .Help }, "", content);
+ const pane = try panes.Output.open(p, p.freeSlot().?, "/", .{ .cmd = .Help }, "", content);
p.active = 1;
for ([_]Key{ .{ .cp = '|' }, .{ .cp = '|', .alt = true }, .{ .cp = '!' }, .{ .cp = '!', .alt = true } }) |key| {
p.update(.{ .key = key });
try std.testing.expect(pane.prompt == .none);
- try std.testing.expect(!pane.tag_init);
- try std.testing.expect(!pane.tag_edit);
+ try std.testing.expect(pane.tag.own == null);
+ try std.testing.expect(pane.focus == .body);
try std.testing.expectEqualStrings("generated\n", pane.file.?.content);
}
}
-test "tag prompt owns the pipe behavior through cancellation and submission" {
+test "a prompt owns the pipe behavior through cancellation and submission" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true });
defer p.deinit();
const pane = try p.setTestFile("one\ntwo\n");
- pane.cur_row = 0;
- pane.cur_col = 2;
- pane.vsel = .{ .active = true, .row = 0, .col = 0, .explicit = true };
+ pane.body.cur_row = 0;
+ pane.body.cur_col = 2;
+ pane.body.vsel = .{ .active = true, .row = 0, .col = 0, .explicit = true };
for (std.enums.values(modal.Normal.PipeBehavior)) |how| {
- p.startPrompt(pane, .{ .pipe = .append });
+ p.startPrompt(pane, &pane.body, .{ .pipe = .append });
p.update(.{ .key = .{ .cp = Key.escape } });
- p.startPrompt(pane, .{ .pipe = how });
- try std.testing.expectEqual(how, pane.prompt.pipe.how);
+ p.startPrompt(pane, &pane.body, .{ .pipe = how });
+ try std.testing.expectEqual(how, pane.prompt.pipe);
p.update(.{ .key = .{ .cp = 'c', .text = "cat" } });
p.update(.{ .key = .{ .cp = Key.enter } });
- const pending = p.pipe_wait orelse return error.MissingPipe;
+ const pending = p.pipe.wait orelse return error.MissingPipe;
try std.testing.expectEqual(how, pending.how);
- try std.testing.expectEqualStrings("cat", pending.command);
+ // `$` runs the command in a subshell that reports its status
+ if (how == .keep)
+ try std.testing.expect(std.mem.indexOf(u8, pending.command, "\ncat\n") != null)
+ else
+ try std.testing.expectEqualStrings("cat", pending.command);
try std.testing.expectEqual(@as(usize, 1), pending.inputs.len);
try std.testing.expectEqualStrings(if (how.pipes()) "one" else "", pending.inputs[0].bytes);
try std.testing.expect(pane.prompt == .none);
}
}
-test "tag prompt cancellation restores the selection before regex previews" {
+test "prompt cancellation restores the selection before regex previews" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true });
defer p.deinit();
const pane = try p.setTestFile("one two one");
@@ -1659,152 +2215,76 @@ test "tag prompt cancellation restores the selection before regex previews" {
.{ .key = 'S', .pattern = " ", .secondary = 2 },
};
for (cases) |case| {
- pane.cur_row = 0;
- pane.cur_col = 10;
- pane.cur_pinned = true;
- pane.vsel = .{ .active = true, .row = 0, .col = 0, .explicit = true };
- pane.nsel = 0;
+ pane.body.cur_row = 0;
+ pane.body.cur_col = 10;
+ pane.body.cur_pinned = true;
+ pane.body.vsel = .{ .active = true, .row = 0, .col = 0, .explicit = true };
+ pane.body.nsel = 0;
p.update(.{ .key = .{ .cp = case.key } });
try std.testing.expect(pane.prompt == .search);
p.update(.{ .key = .{ .cp = case.pattern[0], .text = case.pattern } });
- try std.testing.expectEqual(case.secondary, pane.nsel);
+ try std.testing.expectEqual(case.secondary, pane.body.nsel);
p.update(.{ .key = .{ .cp = Key.escape } });
- try std.testing.expectEqual(@as(u8, 0), pane.nsel);
- try std.testing.expectEqual(@as(u8, 0), pane.nsel_snap);
- try std.testing.expectEqual(@as(i32, 10), pane.cur_col);
- try std.testing.expectEqual(@as(i32, 0), pane.vsel.col);
- try std.testing.expect(pane.vsel.active and pane.vsel.explicit);
+ try std.testing.expectEqual(@as(u16, 0), pane.body.nsel);
+ try std.testing.expectEqual(@as(u16, 0), pane.nsel_snap);
+ try std.testing.expectEqual(@as(i32, 10), pane.body.cur_col);
+ try std.testing.expectEqual(@as(i32, 0), pane.body.vsel.col);
+ try std.testing.expect(pane.body.vsel.active and pane.body.vsel.explicit);
try std.testing.expectEqualStrings("one two one", pane.file.?.content);
}
}
-test "tag prompt prefix allocation failure preserves an already seeded prompt" {
- const Request = @typeInfo(@TypeOf(Pardes.startPrompt)).@"fn".params[2].type.?;
+test "a prompt that cannot be opened leaves the open one as it was" {
+ const Request = @typeInfo(@TypeOf(Pardes.startPrompt)).@"fn".param_types[3].?;
for ([_]Request{ .{ .search = config.search_marker }, .save, .{ .pipe = .replace }, .{ .pipe = .ignore }, .{ .pipe = .insert }, .{ .pipe = .append } }) |request| {
var failing = std.testing.FailingAllocator.init(std.testing.allocator, .{});
const p = try Pardes.init(failing.allocator(), .{ .tty_only = true });
defer p.deinit();
const pane = try p.setTestFile("one\n");
- const tail = " keep /prior";
- @memcpy(pane.tag_tail[0..tail.len], tail);
- pane.tag_tail_len = tail.len;
- pane.tag_init = true;
- pane.prompt = .{ .search = 5 };
- pane.tag_edit = true;
- pane.tag_sel = true;
- pane.tag_col = 14;
- pane.tag_anchor = 7;
- pane.normal = .{ .count = 9, .prefix = .goto };
- const previous_prompt = pane.prompt;
- const previous_normal = pane.normal;
+ p.startPrompt(pane, &pane.body, .{ .search = config.search_marker });
+ p.update(.{ .key = .{ .cp = 'p', .text = "prior" } });
+ pane.body.normal = .{ .count = 9, .prefix = .goto };
+ const previous_normal = pane.body.normal;
_ = p.scratch.reset(.free_all);
failing.fail_index = failing.alloc_index;
- p.startPrompt(pane, request);
+ p.startPrompt(pane, &pane.body, request);
try std.testing.expect(failing.has_induced_failure);
- try std.testing.expectEqualDeep(previous_prompt, pane.prompt);
- try std.testing.expectEqualDeep(previous_normal, pane.normal);
- try std.testing.expectEqualStrings(tail, pane.tag_tail[0..pane.tag_tail_len]);
- try std.testing.expect(pane.tag_edit and pane.tag_sel);
- try std.testing.expectEqual(.normal, pane.mode);
- try std.testing.expectEqual(@as(u16, 14), pane.tag_col);
- try std.testing.expectEqual(@as(u16, 7), pane.tag_anchor);
+ try std.testing.expect(pane.prompt == .search);
+ try std.testing.expectEqualStrings(config.search_marker ++ "prior", pane.promptText().?);
+ try std.testing.expectEqualDeep(previous_normal, pane.body.normal);
+ try std.testing.expect(pane.tag.own == null and pane.focus == .body);
}
}
-test "tag prompt Save requires room for its complete directory prefix" {
+test "Save's prompt starts from the pane's directory" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true });
defer p.deinit();
const pane = try p.setTestFile("one\n");
for ([_][]const u8{ "/dír space", "/dír space/", "" }) |dir| {
try pane.setOwnedCwd(dir);
- const slash: usize = @intFromBool(dir.len == 0 or dir[dir.len - 1] != '/');
- const needed = config.save_marker.len + dir.len + slash;
- for ([_]usize{ 1, 0 }) |shortfall| {
- @memset(&pane.tag_tail, 'x');
- pane.tag_tail_len = pane.tag_tail.len - needed + shortfall;
- pane.tag_init = true;
- pane.tag_edit = false;
- pane.tag_sel = true;
- pane.tag_col = 17;
- const start = pane.tag_tail_len;
- p.startPrompt(pane, .save);
- if (shortfall != 0) {
- try std.testing.expect(pane.prompt == .none);
- try std.testing.expectEqual(start, pane.tag_tail_len);
- try std.testing.expect(!pane.tag_edit and pane.tag_sel);
- try std.testing.expectEqual(@as(u16, 17), pane.tag_col);
- for (pane.tag_tail) |byte| try std.testing.expectEqual(@as(u8, 'x'), byte);
- } else {
- try std.testing.expect(pane.prompt == .save);
- try std.testing.expectEqual(pane.tag_tail.len, pane.tag_tail_len);
- try std.testing.expectEqualStrings(config.save_marker, pane.tag_tail[start..][0..config.save_marker.len]);
- try std.testing.expectEqualStrings(dir, pane.tag_tail[start + config.save_marker.len ..][0..dir.len]);
- try std.testing.expectEqual(@as(u8, '/'), pane.tag_tail[pane.tag_tail_len - 1]);
- p.update(.{ .key = .{ .cp = Key.escape } });
- }
- }
+ const slash = if (dir.len == 0 or dir[dir.len - 1] != '/') "/" else "";
+ p.startPrompt(pane, &pane.body, .save);
+ try std.testing.expect(pane.prompt == .save);
+ const answer = pane.promptText().?;
+ try std.testing.expect(std.mem.startsWith(u8, answer, config.save_marker));
+ try std.testing.expectEqualStrings(dir, answer[config.save_marker.len..][0..dir.len]);
+ try std.testing.expectEqualStrings(slash, answer[config.save_marker.len + dir.len ..]);
+ p.update(.{ .key = .{ .cp = Key.escape } });
}
}
-test "tag prompt successful seeded entry needs one scratch allocation" {
- const Request = @typeInfo(@TypeOf(Pardes.startPrompt)).@"fn".params[2].type.?;
+test "a prompt opens with one allocation" {
+ const Request = @typeInfo(@TypeOf(Pardes.startPrompt)).@"fn".param_types[3].?;
for ([_]Request{ .{ .search = config.search_marker }, .save, .{ .pipe = .replace }, .{ .pipe = .ignore }, .{ .pipe = .insert }, .{ .pipe = .append } }) |request| {
var failing = std.testing.FailingAllocator.init(std.testing.allocator, .{});
const p = try Pardes.init(failing.allocator(), .{ .tty_only = true });
defer p.deinit();
const pane = try p.setTestFile("one\n");
- pane.tag_tail_len = 0;
- pane.tag_init = true;
_ = p.scratch.reset(.free_all);
const before = failing.alloc_index;
- p.startPrompt(pane, request);
+ p.startPrompt(pane, &pane.body, request);
try std.testing.expectEqual(before + 1, failing.alloc_index);
- try std.testing.expect(pane.tag_edit and pane.mode == .insert);
- }
-}
-
-test "tag prompt failure may initialize only the default tail" {
- const Request = @typeInfo(@TypeOf(Pardes.startPrompt)).@"fn".params[2].type.?;
- for ([_]Request{ .{ .search = config.search_marker }, .save, .{ .pipe = .replace }, .{ .pipe = .ignore }, .{ .pipe = .insert }, .{ .pipe = .append } }) |request| {
- var saw_seeded_failure = false;
- var succeeded = false;
- for (0..16) |failure| {
- var failing = std.testing.FailingAllocator.init(std.testing.allocator, .{});
- const p = try Pardes.init(failing.allocator(), .{ .tty_only = true });
- defer p.deinit();
- const pane = try p.setTestFile("one\n");
- const path = try p.gpa.dupe(u8, "/" ++ "a" ** 2048 ++ ".zig");
- p.gpa.free(pane.file.?.path);
- pane.file.?.path = path;
- p.seedTail(pane);
- try std.testing.expect(pane.tag_init);
- const default_tail = pane.tag_tail;
- const default_len = pane.tag_tail_len;
- pane.tag_init = false;
- pane.tag_tail_len = 0;
- pane.tag_col = 17;
- pane.tag_sel = true;
- pane.normal = .{ .count = 9, .prefix = .goto };
- const previous_normal = pane.normal;
- _ = p.scratch.reset(.free_all);
- failing.fail_index = failing.alloc_index + failure;
- p.startPrompt(pane, request);
- if (!failing.has_induced_failure) {
- try std.testing.expect(pane.tag_edit and pane.mode == .insert);
- succeeded = true;
- break;
- }
- try std.testing.expect(pane.prompt == .none);
- try std.testing.expect(!pane.tag_edit and pane.tag_sel);
- try std.testing.expectEqual(.normal, pane.mode);
- try std.testing.expectEqualDeep(previous_normal, pane.normal);
- try std.testing.expectEqual(@as(u16, 17), pane.tag_col);
- if (pane.tag_init) {
- saw_seeded_failure = true;
- try std.testing.expectEqualStrings(default_tail[0..default_len], pane.tag_tail[0..pane.tag_tail_len]);
- } else try std.testing.expectEqual(@as(usize, 0), pane.tag_tail_len);
- }
- try std.testing.expect(succeeded and saw_seeded_failure);
+ try std.testing.expect(pane.focus == .body and pane.input.mode == .insert);
}
}
@@ -1825,14 +2305,14 @@ test "file history construction failures preserve existing panes" {
defer if (incoming) |bytes| p.gpa.free(bytes);
failing.fail_index = failing.alloc_index + failure;
const result = switch (case) {
- .open => panes.File.open(p, 1, path, 0),
+ .open => panes.File.open(p, p.freeSlot().?, path, 0),
.restore => panes.File.restore(p, 1, .{
.kind = .file,
.tag = "",
.body = "",
.file = .{ .path = "/restored.zig", .content = "restored\n" },
}),
- .output => panes.Output.open(p, 1, "/", .{ .cmd = .Help }, "", incoming.?),
+ .output => panes.Output.open(p, p.freeSlot().?, "/", .{ .cmd = .Help }, "", incoming.?),
.tutor => p.openTutorView(1),
.replace => p.setTestFile("replacement\n"),
};
@@ -1900,14 +2380,14 @@ test "file history owns bounded snapshot storage without per-edit bookkeeping al
try std.testing.expectEqual(@as(usize, 0), history.redo_len);
}
-test "file history allocation precedes a filesystem read with side effects" {
+test "file history allocation precedes reading the served tree" {
var failing = std.testing.FailingAllocator.init(std.testing.allocator, .{});
const p = try Pardes.init(failing.allocator(), .{ .tty_only = true, .cols = 40, .rows = 12 });
defer p.deinit();
const original = p.panes[0].?;
const serial = p.next_serial;
failing.fail_index = failing.alloc_index + 2;
- try std.testing.expectError(error.OutOfMemory, panes.File.open(p, 1, "/n/self/new", 0));
+ try std.testing.expectError(error.OutOfMemory, panes.File.open(p, p.freeSlot().?, "/n/self/index", 0));
try std.testing.expect(failing.has_induced_failure);
try std.testing.expectEqual(original, p.panes[0].?);
try std.testing.expectEqual(serial, p.next_serial);
@@ -1931,7 +2411,7 @@ test "file history survives PDF fallback restoration and allocation failures" {
var succeeded = false;
for (0..256) |failure| {
var failing = std.testing.FailingAllocator.init(std.testing.allocator, .{ .fail_index = failure });
- if (Pardes.initFromDump(failing.allocator(), .{ .tty_only = true }, saved)) |p| {
+ if (pardes.dump.initFromDump(failing.allocator(), .{ .tty_only = true }, saved)) |p| {
defer p.deinit();
const pane = p.panes[0].?;
try std.testing.expect(pane.file != null);
@@ -2041,21 +2521,48 @@ test "Save on a scratch does not watch a path the host could not create" {
const id = p.active;
while (p.nextEffect()) |_| {}
p.host = .{ .ctx = p, .vtable = &.{ .write_file = Refusing.write } };
+ const file = &p.panes[id].?.file.?;
+ const scratch_name = try std.testing.allocator.dupe(u8, file.path);
+ defer std.testing.allocator.free(scratch_name);
+ const was_dirty = file.revision != file.saved_revision;
try std.testing.expect(p.executeBuiltinLine(id, "Save /new-file.txt"));
while (p.nextEffect()) |effect| p.perform(effect);
- const file = &p.panes[id].?.file.?;
- try std.testing.expect(file.output == null);
- try std.testing.expect(file.watch_after_save);
- try std.testing.expect(file.revision != file.saved_revision);
+ // Failed, it changed nothing: still the scratch, its name and dirty
+ // flag as they were, unwatched.
+ try std.testing.expect(file.output != null);
+ try std.testing.expectEqualStrings(scratch_name, file.path);
+ try std.testing.expectEqual(was_dirty, file.revision != file.saved_revision);
try std.testing.expect(!p.fallback.watched[id]);
p.host = .{};
- try std.testing.expect(p.executeBuiltinLine(id, "Save"));
+ try std.testing.expect(p.executeBuiltinLine(id, "Save /new-file.txt"));
while (p.nextEffect()) |effect| p.perform(effect);
- try std.testing.expect(!file.watch_after_save);
+ try std.testing.expect(file.output == null);
+ try std.testing.expectEqualStrings("/new-file.txt", file.path);
try std.testing.expectEqual(file.revision, file.saved_revision);
try std.testing.expect(p.fallback.watched[id]);
}
+test "a failed Save to another name leaves a clean named file clean" {
+ const Refusing = struct {
+ fn write(ctx: ?*anyopaque, id: u8, _: []const u8, _: []const u8) void {
+ const p: *Pardes = @ptrCast(@alignCast(ctx.?));
+ p.saveFailed(id, "save", error.AccessDenied);
+ }
+ };
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 40, .rows = 12 });
+ defer p.deinit();
+ const pane = try p.setTestFile("clean\n");
+ while (p.nextEffect()) |_| {}
+ const file = &pane.file.?;
+ try std.testing.expectEqual(file.revision, file.saved_revision);
+ p.host = .{ .ctx = p, .vtable = &.{ .write_file = Refusing.write } };
+ try std.testing.expect(p.executeBuiltinLine(0, "Save /root/x.txt"));
+ while (p.nextEffect()) |effect| p.perform(effect);
+ try std.testing.expectEqual(file.revision, file.saved_revision);
+ try std.testing.expectEqualStrings("/test.txt", file.path);
+ p.host = .{};
+}
+
test "unplaced terminal panes keep their allocated grid until placement" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 100, .rows = 30 });
defer p.deinit();
@@ -2077,7 +2584,7 @@ test "unplaced terminal panes keep their allocated grid until placement" {
p.update(.tick);
try std.testing.expect(p.rects[id].w > 0 and p.rects[id].h > pardes.BOX_H);
try std.testing.expectEqual(p.rects[id].w - config.GUTTER, pane.cols);
- try std.testing.expectEqual(p.rects[id].h - pardes.BOX_H, pane.rows);
+ try std.testing.expectEqual(bodyH(p, p.rects[id]), pane.rows);
}
test "document panes ignore terminal output without allocating terminal state" {
@@ -2085,6 +2592,7 @@ test "document panes ignore terminal output without allocating terminal state" {
const p = try Pardes.init(allocator.allocator(), .{ .tty_only = true });
defer p.deinit();
const pane = try p.setTestFile("document body\n");
+ p.update(.tick); // the step that installed it records it in /log
while (p.nextEffect()) |_| {}
const revision = pane.file.?.revision;
const allocations = allocator.alloc_index;
@@ -2234,6 +2742,146 @@ const OutputTests = struct {
}
}
+ test "stacked Callstack aligns source below locations and keeps exact emphasis and navigation" {
+ if (!syntax.enabled) return error.SkipZigTest;
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 80, .rows = 30 });
+ defer p.deinit();
+ const source = " pub fn caller(\n value: u32,\n ) void {\n work(value);\n }\n";
+ const pane = try TreeContextTests.setZigFile(p, source);
+ try std.testing.expectEqual(config.Runtime.CallstackLayout.stacked, p.settings.callstack_layout);
+ 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 });
+ try fillResults(p, 0, "/", .{ .query = .callstack }, "", input, null);
+ const result_id = pane.search_pane.?;
+ const result = p.panes[result_id].?;
+ const file = &result.file.?;
+ try std.testing.expectEqual(@as(usize, 6), file.location_rows.len);
+ try std.testing.expectEqualStrings(" │ pub fn caller(", modal.lineSlice(file.content, 1));
+ try std.testing.expectEqualStrings(" │ value: u32,", modal.lineSlice(file.content, 2));
+ try std.testing.expectEqualStrings(" │ ) void {", modal.lineSlice(file.content, 3));
+ try std.testing.expectEqualStrings(" work(value);", modal.lineSlice(file.content, 5));
+ const site = file.location_rows[5];
+ try std.testing.expectEqual(@as(usize, 8), site.source_column);
+ try std.testing.expect(site.colors.len > 0);
+ const text = modal.lineSlice(file.content, 5);
+ const decoration = panes.Output.decorateRow(file.output, text, site);
+ try std.testing.expectEqualStrings("work", text[decoration.mark_start..decoration.mark_end]);
+ for (file.location_rows, 0..) |row, i| {
+ try std.testing.expectEqual(i == 0 or i == 4, panes.Output.isResultRow(file, i));
+ if (i != 5) try std.testing.expect(!row.mark_occurrence);
+ }
+ p.active = result_id;
+ result.body.cur_row = 4;
+ result.body.cur_col = " └─ ".len;
+ p.update(.{ .key = .{ .cp = Key.enter } });
+ try std.testing.expectEqual(@as(usize, 0), p.active);
+ try std.testing.expectEqual(@as(i32, 3), pane.body.cur_row);
+ try pardes.dump.dumpState(p);
+ const restored = try pardes.dump.initFromDump(p.gpa, .{ .tty_only = true }, p.dump_out.?);
+ defer restored.deinit();
+ try std.testing.expectEqual(config.Runtime.CallstackLayout.stacked, restored.settings.callstack_layout);
+ const after = restored.panes[result_id].?.file.?;
+ try std.testing.expectEqualStrings(file.content, after.content);
+ try std.testing.expectEqual(@as(usize, 8), after.location_rows[5].source_column);
+ const restored_decoration = panes.Output.decorateRow(after.output, text, after.location_rows[5]);
+ try std.testing.expectEqual(decoration, restored_decoration);
+ try std.testing.expect(p.executeBuiltinLine(0, "CallstackLayout inline"));
+ try fillResults(p, 0, "/", .{ .query = .callstack }, "", try p.gpa.dupe(u8, "No callers reported\n"), null);
+ try std.testing.expectEqual(config.Runtime.CallstackLayout.@"inline", p.settings.callstack_layout);
+ }
+
+ test "Callstack signatures share unsaved tree context and keep guides out of Look selections" {
+ if (!syntax.enabled) return error.SkipZigTest;
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 110, .rows = 30 });
+ defer p.deinit();
+ p.settings.callstack_layout = .@"inline";
+ const source = "const Box = struct {\n" ++
+ " pub fn caller(\n" ++
+ " value: u32,\n" ++
+ " ) void {\n" ++
+ " work(value);\n" ++
+ " }\n};\n";
+ const pane = try TreeContextTests.setZigFile(p, source);
+ const path = pane.file.?.path;
+ const input = try std.fmt.allocPrint(p.gpa, "├──┬ {s}:2:12-17 caller\n@callstack-match │ └─ {s}:5:9-12 work(value);\n└─── missing.zig:3:4-8 other ↻ recursion\n", .{ path, path });
+ try fillResults(p, 0, "/", .{ .query = .callstack }, "", input, null);
+ const result_id = pane.search_pane.?;
+ const result = p.panes[result_id].?;
+ const file = &result.file.?;
+ try std.testing.expect(std.mem.indexOf(u8, file.content, "pub fn caller(") != null);
+ try std.testing.expect(std.mem.indexOf(u8, file.content, "value: u32,") != null);
+ try std.testing.expect(std.mem.indexOf(u8, file.content, "const Box") == null);
+ try std.testing.expect(std.mem.indexOf(u8, file.content, "other ↻ recursion") != null);
+ try std.testing.expectEqual(@as(usize, 5), file.location_rows.len);
+ for (file.location_rows[0..3]) |row| {
+ try std.testing.expect(!row.declaration);
+ try std.testing.expect(!row.mark_occurrence);
+ try std.testing.expect(row.colors.len > 0);
+ }
+ for (1..3) |index| try std.testing.expect(std.mem.startsWith(u8, modal.lineSlice(file.content, index), "│ │ "));
+ const analysis = try syntax.analyzeSource(p.scratch.allocator(), path, source, true, true);
+ for (file.location_rows[0..3], 1..) |row, source_row| {
+ const offset = modal.lineStartOffset(source, source_row);
+ try std.testing.expectEqualSlices(u8, analysis.colors[offset..][0..row.colors.len], row.colors);
+ }
+ try std.testing.expect(file.location_rows[3].mark_occurrence);
+ try std.testing.expect(!file.location_rows[3].declaration);
+ try std.testing.expect(!panes.Output.isWalkRow(file, 1, modal.lineSlice(file.content, 1)));
+ p.active = result_id;
+ result.body.cur_row = 0;
+ result.body.cur_col = 0;
+ p.update(.{ .key = .{ .cp = ' ' } });
+ p.update(.{ .key = .{ .cp = 'j' } });
+ p.update(.{ .key = .{ .cp = 'n' } });
+ try std.testing.expectEqual(@as(i32, 0), result.body.cur_row);
+ try std.testing.expectEqual(@as(i32, "├──┬ ".len), result.body.cur_col);
+ // Enter on the selected signature address must open source, not a path
+ // accidentally prefixed with tree glyphs.
+ p.update(.{ .key = .{ .cp = Key.enter } });
+ try std.testing.expectEqual(@as(usize, 0), p.active);
+ try std.testing.expectEqual(@as(i32, 1), pane.body.cur_row);
+ p.settings.callstack_depth = 16;
+ try pardes.dump.dumpState(p);
+ const restored = try pardes.dump.initFromDump(p.gpa, .{ .tty_only = true }, p.dump_out.?);
+ defer restored.deinit();
+ try std.testing.expectEqual(@as(u8, 16), restored.settings.callstack_depth);
+ const restored_file = restored.panes[result_id].?.file.?;
+ try std.testing.expectEqualStrings(file.content, restored_file.content);
+ try std.testing.expectEqual(file.location_rows.len, restored_file.location_rows.len);
+ for (file.location_rows, restored_file.location_rows) |before, after| {
+ try std.testing.expectEqual(before.mark_occurrence, after.mark_occurrence);
+ try std.testing.expectEqual(before.at, after.at);
+ try std.testing.expectEqual(before.code_start, after.code_start);
+ try std.testing.expectEqualSlices(u8, before.colors, after.colors);
+ }
+ // Narrow enough that the location itself wraps. The repeated guide
+ // consumes cells, but neither changes the source address nor steals
+ // a click from the wrapped portion of that address.
+ p.active = result_id;
+ p.row_metrics = .{ .body_w = 10, .body_h = 20, .tagline_w = 8, .tagline_h = 10 };
+ p.update(.{ .resize = .{ .cols = 28, .rows = 40 } });
+ result.file.?.scroll = 0;
+ var frame = std.heap.ArenaAllocator.init(p.gpa);
+ defer frame.deinit();
+ _ = try p.render(frame.allocator());
+ const wrapped = for (0..result.wrap_n) |vr| {
+ const w = result.wrapAt(@intCast(vr));
+ if (w.line == 0 and w.pad > 0 and w.at < file.location_rows[0].location_end) break vr;
+ } else return error.MissingWrappedLocation;
+ const w = result.wrapAt(@intCast(wrapped));
+ const shown = try panes.File.bodyText(frame.allocator(), result, file, true);
+ const shown_line = modal.lineSlice(shown, wrapped);
+ try std.testing.expect(std.mem.startsWith(u8, shown_line[panes.File.gutterWidth(result)..], "│ │ "));
+ const rect = p.rects[result_id];
+ const press: pardes.Mouse = .{ .button = .right, .kind = .press, .col = @intCast(rect.x + config.GUTTER + panes.File.gutterWidth(result) + w.pad + 1), .row = @intCast(p.bodyTop(result, rect) + wrapped) };
+
+ var release = press;
+ release.kind = .release;
+ p.update(.{ .mouse = press });
+ p.update(.{ .mouse = release });
+ try std.testing.expectEqual(@as(usize, 0), p.active);
+ try std.testing.expectEqual(@as(i32, 1), pane.body.cur_row);
+ }
+
test "Locations context uses unsaved sources and navigation visits only matches" {
if (!syntax.enabled) return error.SkipZigTest;
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 100, .rows = 30 });
@@ -2279,17 +2927,17 @@ const OutputTests = struct {
}
try std.testing.expectEqual(@as(usize, 2), count);
try std.testing.expectEqual(matches[1], pane.search_row.?);
- try std.testing.expect(pardes.test_api.searchStep(p, 0, -1));
+ try std.testing.expect(pardes.look.searchStep(p, 0, -1));
try std.testing.expectEqual(matches[0], pane.search_row.?);
- try std.testing.expectEqual(@as(i32, 3), pane.cur_row);
- try std.testing.expect(pardes.test_api.searchStep(p, 0, 1));
+ try std.testing.expectEqual(@as(i32, 3), pane.body.cur_row);
+ try std.testing.expect(pardes.look.searchStep(p, 0, 1));
try std.testing.expectEqual(matches[1], pane.search_row.?);
- try std.testing.expectEqual(@as(i32, 5), pane.cur_row);
- try std.testing.expect(pardes.test_api.searchStep(p, 0, 1));
+ try std.testing.expectEqual(@as(i32, 5), pane.body.cur_row);
+ try std.testing.expect(pardes.look.searchStep(p, 0, 1));
try std.testing.expectEqual(matches[1], pane.search_row.?);
pane.search_row = null;
- try std.testing.expect(pardes.test_api.searchStep(p, 0, 1));
+ try std.testing.expect(pardes.look.searchStep(p, 0, 1));
try std.testing.expectEqual(matches[0], pane.search_row.?);
var frame = std.heap.ArenaAllocator.init(p.gpa);
defer frame.deinit();
@@ -2307,8 +2955,8 @@ const OutputTests = struct {
neighbor_colored = neighbor_colored or style != 0;
try std.testing.expect(neighbor_colored);
- try p.dumpState();
- const restored = try Pardes.initFromDump(p.gpa, .{ .tty_only = true }, p.dump_out.?);
+ try pardes.dump.dumpState(p);
+ const restored = try pardes.dump.initFromDump(p.gpa, .{ .tty_only = true }, p.dump_out.?);
defer restored.deinit();
const restored_source = restored.panes[0].?;
const restored_id = pane.search_pane.?;
@@ -2331,11 +2979,11 @@ const OutputTests = struct {
// still governs stepping when that output is attached to a source.
restored_source.search_pane = restored_id;
restored_source.search_row = null;
- try std.testing.expect(pardes.test_api.searchStep(restored, 0, 1));
+ try std.testing.expect(pardes.look.searchStep(restored, 0, 1));
try std.testing.expectEqual(matches[0], restored_source.search_row.?);
- try std.testing.expect(pardes.test_api.searchStep(restored, 0, 1));
+ try std.testing.expect(pardes.look.searchStep(restored, 0, 1));
try std.testing.expectEqual(matches[1], restored_source.search_row.?);
- try std.testing.expect(pardes.test_api.searchStep(restored, 0, -1));
+ try std.testing.expect(pardes.look.searchStep(restored, 0, -1));
try std.testing.expectEqual(matches[0], restored_source.search_row.?);
// Editing drops source metadata; hidden context padding still keeps
@@ -2343,9 +2991,9 @@ const OutputTests = struct {
panes.File.setContent(p, file, try p.gpa.dupe(u8, file.content));
try std.testing.expectEqual(@as(usize, 0), file.location_rows.len);
pane.search_row = null;
- try std.testing.expect(pardes.test_api.searchStep(p, 0, 1));
+ try std.testing.expect(pardes.look.searchStep(p, 0, 1));
try std.testing.expectEqual(matches[0], pane.search_row.?);
- try std.testing.expect(pardes.test_api.searchStep(p, 0, 1));
+ try std.testing.expect(pardes.look.searchStep(p, 0, 1));
try std.testing.expectEqual(matches[1], pane.search_row.?);
}
@@ -2411,8 +3059,8 @@ const OutputTests = struct {
try std.testing.expectEqual(.match, file.location_rows[next].kind);
const wrapped = panes.Output.nextResult(file.content, file.location_rows, path, .{ .line = 99 });
try std.testing.expectEqual(@as(usize, 2), file.location_rows[wrapped].at.line);
- try p.dumpState();
- const restored = try Pardes.initFromDump(p.gpa, .{ .tty_only = true }, p.dump_out.?);
+ try pardes.dump.dumpState(p);
+ const restored = try pardes.dump.initFromDump(p.gpa, .{ .tty_only = true }, p.dump_out.?);
defer restored.deinit();
const restored_file = &restored.panes[pane.search_pane.?].?.file.?;
try std.testing.expectEqualStrings(file.content, restored_file.content);
@@ -2429,7 +3077,7 @@ const OutputTests = struct {
layout.compute(p);
const surface = try p.render(frame.allocator());
const rect = p.rects[pane.search_pane.?];
- const body_y = if (p.settings.tag_bottom) rect.y else rect.y + pardes.BOX_H;
+ const body_y = bodyY(p, rect);
for (file.location_rows, 0..) |row, index| {
if (!row.declaration) continue;
const line = modal.lineSlice(file.content, index);
@@ -2462,9 +3110,9 @@ const OutputTests = struct {
const id = p.active;
const help = p.panes[id].?;
for ("gevkk") |key| p.update(.{ .key = .{ .cp = key } });
- try std.testing.expect(help.vsel.active);
- try std.testing.expect(help.vsel.row > 5);
- try std.testing.expect(help.cur_row != help.vsel.row);
+ try std.testing.expect(help.body.vsel.active);
+ try std.testing.expect(help.body.vsel.row > 5);
+ try std.testing.expect(help.body.cur_row != help.body.vsel.row);
for (" h?") |key| p.update(.{ .key = .{ .cp = key } });
try std.testing.expectEqual(id, p.active);
const content = help.file.?.content;
@@ -2477,7 +3125,7 @@ const OutputTests = struct {
_ = try p.render(frame.allocator());
const rect = p.rects[id];
const x = rect.x + config.GUTTER + panes.File.gutterWidth(help) + @as(u16, @intCast(at - line_start + 2));
- const y = (if (p.settings.tag_bottom) rect.y else rect.y + pardes.BOX_H) + @as(u16, @intCast(row));
+ const y = (bodyY(p, rect)) + @as(u16, @intCast(row));
p.update(.{ .mouse = .{ .button = config.exec_button, .kind = .press, .col = x, .row = y } });
p.update(.{ .mouse = .{ .button = config.exec_button, .kind = .release, .col = x, .row = y } });
try std.testing.expect(p.active != id);
@@ -2498,35 +3146,35 @@ const OutputTests = struct {
const result = p.panes[id].?;
p.active = id;
for ("Cv3") |key| p.update(.{ .key = .{ .cp = key } });
- try std.testing.expect(result.nsel > 0);
- try std.testing.expect(result.select);
- try std.testing.expect(result.vsel.active);
- try std.testing.expect(result.normal.count > 0);
+ try std.testing.expect(result.body.nsel > 0);
+ try std.testing.expect(result.body.select);
+ try std.testing.expect(result.body.vsel.active);
+ try std.testing.expect(result.body.normal.count > 0);
result.file.?.scroll = 1;
result.hscroll = 2;
- const selected = result.vsel;
- const selections = result.nsel;
- const cursor_row = result.cur_row;
- const cursor_col = result.cur_col;
+ const selected = result.body.vsel;
+ const selections = result.body.nsel;
+ const cursor_row = result.body.cur_row;
+ const cursor_col = result.body.cur_col;
try fillResults(p, 0, "/", .{ .query = .hover }, "", try p.gpa.dupe(u8, content), null);
- try std.testing.expectEqual(selected, result.vsel);
- try std.testing.expectEqual(selections, result.nsel);
- try std.testing.expectEqual(cursor_row, result.cur_row);
- try std.testing.expectEqual(cursor_col, result.cur_col);
+ try std.testing.expectEqual(selected, result.body.vsel);
+ try std.testing.expectEqual(selections, result.body.nsel);
+ try std.testing.expectEqual(cursor_row, result.body.cur_row);
+ try std.testing.expectEqual(cursor_col, result.body.cur_col);
try std.testing.expectEqual(@as(usize, 1), result.file.?.scroll);
try std.testing.expectEqual(@as(i32, 2), result.hscroll);
- try std.testing.expect(result.normal.count > 0);
+ try std.testing.expect(result.body.normal.count > 0);
try fillResults(p, 0, "/", .{ .query = .hover }, "", try p.gpa.dupe(u8, "short\n"), null);
try std.testing.expectEqualStrings("short\n", result.file.?.content);
- try std.testing.expect(!result.vsel.active and !result.msel.active and !result.select);
- try std.testing.expectEqual(@as(u8, 0), result.nsel);
- try std.testing.expectEqual(@as(i32, 0), result.cur_row);
- try std.testing.expectEqual(@as(i32, 0), result.cur_col);
+ try std.testing.expect(!result.body.vsel.active and !result.body.msel.active and !result.body.select);
+ try std.testing.expectEqual(@as(u16, 0), result.body.nsel);
+ try std.testing.expectEqual(@as(i32, 0), result.body.cur_row);
+ try std.testing.expectEqual(@as(i32, 0), result.body.cur_col);
try std.testing.expectEqual(@as(usize, 0), result.file.?.scroll);
try std.testing.expectEqual(@as(i32, 0), result.hscroll);
- try std.testing.expectEqual(modal.Normal.State{}, result.normal);
+ try std.testing.expectEqual(modal.Normal.State{}, result.body.normal);
}
test "generated result replacement cancels an in-progress body selection" {
@@ -2547,16 +3195,16 @@ const OutputTests = struct {
p.acknowledgePanelPresentation(&.{});
const rect = p.rects[id];
const x = rect.x + config.GUTTER + panes.File.gutterWidth(result);
- const y = if (p.settings.tag_bottom) rect.y else rect.y + pardes.BOX_H;
+ const y = bodyY(p, rect);
p.update(.{ .mouse = .{ .button = config.select_button, .kind = .press, .col = x, .row = y } });
p.update(.{ .mouse = .{ .button = config.select_button, .kind = .drag, .col = x + 2, .row = y + 1 } });
try std.testing.expect(p.drag == .select);
- try std.testing.expectEqual(.dragging, result.sel[@intFromEnum(config.select_button)].state);
+ try std.testing.expectEqual(.dragging, result.sel[@backingInt(config.select_button)].state);
try fillResults(p, 0, "/", .{ .query = .hover }, "", try p.gpa.dupe(u8, "short\n"), null);
try std.testing.expect(p.drag == .none);
p.update(.{ .mouse = .{ .button = config.select_button, .kind = .release, .col = x + 2, .row = y + 1 } });
for (result.sel) |selection| try std.testing.expectEqual(.none, selection.state);
- try std.testing.expect(!result.vsel.active and !result.msel.active);
+ try std.testing.expect(!result.body.vsel.active and !result.body.msel.active);
}
test "dump origins accept only builtins that actually own output panes" {
@@ -2642,23 +3290,18 @@ const ImageTests = struct {
const togglePalette = panes.Image.togglePalette;
const toggleAscii = panes.Image.toggleAscii;
const tagPrefix = panes.Image.tagPrefix;
- const legacySavedPrefix = panes.Image.legacySavedPrefix;
test "pane-local renderer choices are visible in the image tag" {
var state: State = .{ .path = @constCast("/tmp/picture.ppm") };
toggleGlyphArt(&state);
togglePalette(&state);
toggleAscii(&state);
- const tag = try tagPrefix(std.testing.allocator, &state);
+ const tag = try tagPrefix(std.testing.allocator, &state, state.glyph_art);
defer std.testing.allocator.free(tag);
try std.testing.expectEqualStrings(
config.tag_image ++ " petscii:on palette:terminal ascii:off /tmp/picture.ppm",
tag,
);
- try std.testing.expectEqualStrings(
- "img /tmp/picture.ppm",
- legacySavedPrefix(&state, "img /tmp/picture.ppm Keep Del").?,
- );
}
test "dump restore propagates malformed embedded image bytes" {
@@ -2681,7 +3324,6 @@ const PdfTests = struct {
const Point = panes.Pdf.Point;
const Document = panes.Pdf.Document;
const isPath = panes.Pdf.isPath;
- const legacySavedPrefix = panes.Pdf.legacySavedPrefix;
const State = panes.Pdf.State;
const probeWord = panes.Pdf.probeWord;
const pointAtGeometry = panes.Pdf.pointAtGeometry;
@@ -2694,26 +3336,10 @@ const PdfTests = struct {
try std.testing.expect(!isPath("pdf"));
}
- test "legacy PDF prefix is delimited by its stable marker and exact path" {
- const path = "/tmp/a document.pdf";
- const tag = "pdf 2/9 height PdfFit full PdfTint PdfSections " ++ path ++ " Keep Del";
- try std.testing.expectEqualStrings(
- "pdf 2/9 height PdfFit full PdfTint PdfSections " ++ path,
- legacySavedPrefix(path, tag).?,
- );
- }
-
test "feature-off PDF state is zero-sized" {
if (!enabled) try std.testing.expectEqual(@as(usize, 0), @sizeOf(State));
}
- test "compact PDF saved prefix separates page status from editable commands" {
- const path = "/tmp/a document.pdf";
- try std.testing.expectEqualStrings(path ++ " [2/9]", legacySavedPrefix(path, path ++ " [2/9] Keep Del").?);
- try std.testing.expect(legacySavedPrefix(path, path ++ " [oops] Keep Del") == null);
- try std.testing.expect(legacySavedPrefix(path, path ++ " [2/9/4] Keep Del") == null);
- }
-
test "PDF section rows preserve DFS ordinals and sanitise hierarchy" {
if (!enabled) return;
const entries = [_]pdf.OutlineEntry{
@@ -2803,7 +3429,9 @@ const PdfTests = struct {
test "PDF word probe owns quads and text without a selection object" {
if (comptime !enabled) return;
- var document = try Document.open("docs/design.pdf");
+ const bytes = try std.Io.Dir.cwd().readFileAlloc(std.testing.io, "docs/design.pdf", std.testing.allocator, .unlimited);
+ defer std.testing.allocator.free(bytes);
+ var document = try Document.openBytes(bytes);
defer document.deinit();
var found = try document.search(std.testing.allocator, 0, "Pardes");
defer found.deinit(std.testing.allocator);
@@ -2821,7 +3449,7 @@ const PdfTests = struct {
defer probe.deinit(std.testing.allocator);
try std.testing.expectEqual(@as(usize, 0), probe.page);
try std.testing.expect(probe.quads.len > 0);
- try std.testing.expect(std.ascii.indexOfIgnoreCase(probe.text, "Pardes") != null);
+ try std.testing.expect(std.ascii.findIgnoreCase(probe.text, "Pardes") != null);
}
test "PDF point mapping restores band origin and fractional placement" {
@@ -2850,11 +3478,11 @@ const TerminalTests = struct {
// Tests asserting raw ANSI indices explicitly select helix, whose palette
// is inherited. Native-palette coverage lives in the overlay/eviction and
// trailing-blank tests and checks their concrete RGB values instead.
- const gridOffset = panes.Terminal.gridOffset;
- const scrollGrid = panes.Terminal.scrollGrid;
- const promptInputReady = panes.Terminal.promptInputReady;
- const forwardKey = panes.Terminal.forwardKey;
- const enterTty = panes.Terminal.enterTty;
+ const gridOffset = panes.terminal.gridOffset;
+ const scrollGrid = panes.terminal.scrollGrid;
+ const promptInputReady = panes.terminal.promptInputReady;
+ const forwardKey = panes.terminal.forwardKey;
+ const enterTty = panes.terminal.enterTty;
// Align normal-mode glyphs with the VT grid and compare their styles.
fn modeStyleDiffs(p: *Pardes, pane: *Pane, gpa: std.mem.Allocator, note: []const u8) !usize {
@@ -2862,8 +3490,8 @@ const TerminalTests = struct {
defer frame.deinit();
const r = p.rects[0];
const tx = r.x + config.GUTTER;
- const body_y = if (p.settings.tag_bottom) r.y else r.y + pardes.BOX_H;
- const rows: usize = r.h - pardes.BOX_H;
+ const body_y = bodyY(p, r);
+ const rows: usize = bodyH(p, r);
const cols: usize = r.w -| config.GUTTER;
const Snap = struct { text: [][7]u8, len: []u8, style: []pardes.CellStyle };
@@ -2884,8 +3512,8 @@ const TerminalTests = struct {
gpa.free(sn.style);
};
- for ([_]pardes.Pane.Mode{ .tty, .normal }, 0..) |mode, i| {
- pane.mode = mode;
+ for ([_]panes.Text.Mode{ .tty, .normal }, 0..) |mode, i| {
+ pane.body.mode = mode;
p.shell_rows.stale = true;
_ = frame.reset(.retain_capacity);
const s = try p.render(frame.allocator());
@@ -2978,14 +3606,14 @@ const TerminalTests = struct {
.write => return error.GreetedBeforePrompt,
else => {},
};
- p.update(.{ .output = .{ .pane = 0, .bytes = "\x1b]133;A\x07prompt$ " } });
+ p.update(.{ .output = .{ .pane = 0, .bytes = "\x1b]133;A;aid=pardes\x07prompt$ " } });
try std.testing.expect(!promptInputReady(pane));
while (p.nextEffect()) |effect| switch (effect) {
.write => return error.GreetedDuringPrompt,
else => {},
};
- p.update(.{ .output = .{ .pane = 0, .bytes = "\x1b]133;B\x07" } });
+ p.update(.{ .output = .{ .pane = 0, .bytes = "\x1b]133;B;aid=pardes\x07" } });
try std.testing.expect(promptInputReady(pane));
var greeted = false;
while (p.nextEffect()) |effect| switch (effect) {
@@ -2996,14 +3624,38 @@ const TerminalTests = struct {
try std.testing.expect(!pane.greet);
}
+ test "the greeting is dropped, never typed later, once something ran or was typed first" {
+ if (pardes.platform == .web) return;
+ for ([_][]const u8{
+ // A command ran before the first prompt was seen at rest.
+ "\x1b]133;A;aid=pardes\x07$ \x1b]133;B;aid=pardes\x07\x1b]133;C;aid=pardes\x07out\r\n\x1b]133;D;0;aid=pardes\x07\x1b]133;A;aid=pardes\x07$ \x1b]133;B;aid=pardes\x07",
+ // Someone typed at the first prompt.
+ "\x1b]133;A;aid=pardes\x07$ \x1b]133;B;aid=pardes\x07vim",
+ }) |output| {
+ const p = try Pardes.init(std.testing.allocator, .{ .cols = 80, .rows = 24 });
+ defer p.deinit();
+ const pane = p.panes[0].?;
+ while (p.nextEffect()) |_| {}
+ p.update(.{ .resize = .{ .cols = 80, .rows = 24 } });
+ p.update(.{ .output = .{ .pane = 0, .bytes = output } });
+ // and a later, quiet prompt changes nothing
+ p.update(.{ .output = .{ .pane = 0, .bytes = "\r\n\x1b]133;A;aid=pardes\x07$ \x1b]133;B;aid=pardes\x07" } });
+ while (p.nextEffect()) |effect| switch (effect) {
+ .write => |write| if (std.mem.eql(u8, write.bytes.slice(), "ls\r")) return error.GreetedLate,
+ else => {},
+ };
+ try std.testing.expect(!pane.greet);
+ }
+ }
+
test "fresh-shell commands preserve order and wait for OSC 133 B" {
if (pardes.platform == .web) return;
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true });
defer p.deinit();
while (p.nextEffect()) |_| {} // the host has not acknowledged spawn yet
- try std.testing.expectEqual(@as(?usize, 0), p.execute(0, "echo first"));
- try std.testing.expectEqual(@as(?usize, 0), p.execute(0, "echo second"));
+ try std.testing.expectEqual(@as(?usize, 0), pardes.exec.execute(p, 0, "echo first"));
+ try std.testing.expectEqual(@as(?usize, 0), pardes.exec.execute(p, 0, "echo second"));
while (p.nextEffect()) |effect| switch (effect) {
.write => return error.CommandEscapedBeforeFork,
else => {},
@@ -3095,7 +3747,7 @@ const TerminalTests = struct {
while (p.nextEffect()) |_| {}
const pane = p.panes[0].?;
pane.tty_filter = false;
- pane.mode = .normal;
+ pane.body.mode = .normal;
p.update(.{ .output = .{ .pane = 0, .bytes = "\x1b[31mAAA\x1b[0m\r\n\x1b[32mBBB\x1b[0m\r\n\x1b[34mCCC\x1b[0m" } });
@@ -3103,7 +3755,7 @@ const TerminalTests = struct {
defer frame.deinit();
const r = p.rects[0];
const tx = r.x + config.GUTTER;
- const body_y = if (p.settings.tag_bottom) r.y else r.y + pardes.BOX_H;
+ const body_y = bodyY(p, r);
const red: pardes.Color = .{ .index = 1 };
const green: pardes.Color = .{ .index = 2 };
const blue: pardes.Color = .{ .index = 4 };
@@ -3145,7 +3797,7 @@ const TerminalTests = struct {
while (p.nextEffect()) |_| {}
const pane = p.panes[0].?;
pane.tty_filter = false;
- pane.mode = .normal;
+ pane.body.mode = .normal;
// A ONE-cell prompt carrying a combining mark — an NFD `e` — then `ABC`
// typed at it. The cell walk that finds the prompt's end must step ONE
@@ -3158,7 +3810,7 @@ const TerminalTests = struct {
defer frame.deinit();
const r = p.rects[0];
const tx = r.x + config.GUTTER;
- const body_y = if (p.settings.tag_bottom) r.y else r.y + pardes.BOX_H;
+ const body_y = bodyY(p, r);
p.shell_rows.stale = true;
const s = try p.render(frame.allocator());
@@ -3181,7 +3833,7 @@ const TerminalTests = struct {
// Raw palette, so a leaked background reads back as `.index` — the theme
// filter would repaint every blank cell and hide the evidence.
pane.tty_filter = false;
- pane.mode = .normal;
+ pane.body.mode = .normal;
// Sixty rows, each a distinct background, so a leaked colour names the row
// it leaked from.
@@ -3206,8 +3858,8 @@ const TerminalTests = struct {
defer frame.deinit();
const r = p.rects[0];
const tx = r.x + config.GUTTER;
- const body_y = if (p.settings.tag_bottom) r.y else r.y + pardes.BOX_H;
- const body_h = r.h - pardes.BOX_H;
+ const body_y = bodyY(p, r);
+ const body_h = bodyH(p, r);
p.shell_rows.stale = true;
const s = try p.render(frame.allocator());
@@ -3237,7 +3889,7 @@ const TerminalTests = struct {
while (p.nextEffect()) |_| {}
const pane = p.panes[0].?;
pane.tty_filter = false;
- pane.mode = .normal;
+ pane.body.mode = .normal;
p.update(.{ .output = .{ .pane = 0, .bytes = "\x1b[31mAAA\x1b[0m\r\n\x1b[32mBBB\x1b[0m\r\n\x1b[34mCCC\x1b[0m" } });
@@ -3245,7 +3897,7 @@ const TerminalTests = struct {
defer frame.deinit();
const r = p.rects[0];
const tx = r.x + config.GUTTER;
- const body_y = if (p.settings.tag_bottom) r.y else r.y + pardes.BOX_H;
+ const body_y = bodyY(p, r);
const red: pardes.Color = .{ .index = 1 };
const green: pardes.Color = .{ .index = 2 };
const blue: pardes.Color = .{ .index = 4 };
@@ -3274,7 +3926,7 @@ const TerminalTests = struct {
while (p.nextEffect()) |_| {}
const pane = p.panes[0].?;
pane.tty_filter = false;
- pane.mode = .normal;
+ pane.body.mode = .normal;
p.update(.{ .output = .{ .pane = 0, .bytes = "\x1b[31mAAA\x1b[0m\r\n\x1b[32mBBB\x1b[0m\r\n\x1b[34mCCC\x1b[0m" } });
@@ -3282,7 +3934,7 @@ const TerminalTests = struct {
defer frame.deinit();
const r = p.rects[0];
const tx = r.x + config.GUTTER;
- const body_y = if (p.settings.tag_bottom) r.y else r.y + pardes.BOX_H;
+ const body_y = bodyY(p, r);
const red: pardes.Color = .{ .index = 1 };
// Covers far more rows than the grid was ever dumped for, so the anchor
@@ -3350,7 +4002,7 @@ const TerminalTests = struct {
while (p.nextEffect()) |_| {}
const pane = p.panes[0].?;
pane.tty_filter = filter;
- pane.mode = .normal;
+ pane.body.mode = .normal;
var buf: [256]u8 = undefined;
const bytes = try std.fmt.bufPrint(
@@ -3364,7 +4016,7 @@ const TerminalTests = struct {
defer frame.deinit();
const r = p.rects[0];
const tx = r.x + config.GUTTER;
- const body_y = if (p.settings.tag_bottom) r.y else r.y + pardes.BOX_H;
+ const body_y = bodyY(p, r);
p.shell_rows.stale = true;
const s = try p.render(frame.allocator());
@@ -3430,7 +4082,7 @@ const TerminalTests = struct {
while (p.nextEffect()) |_| {}
const pane = p.panes[0].?;
pane.tty_filter = false;
- pane.mode = .tty;
+ pane.body.mode = .tty;
for (0..60) |i| {
var buf: [40]u8 = undefined;
@@ -3442,8 +4094,8 @@ const TerminalTests = struct {
defer frame.deinit();
const r = p.rects[0];
const tx = r.x + config.GUTTER;
- const body_y = if (p.settings.tag_bottom) r.y else r.y + pardes.BOX_H;
- const rows: usize = r.h - pardes.BOX_H;
+ const body_y = bodyY(p, r);
+ const rows: usize = bodyH(p, r);
const cols: usize = r.w -| config.GUTTER;
// What tty mode shows with nothing left behind: the reference.
@@ -3489,20 +4141,22 @@ const TerminalTests = struct {
// ABSOLUTE assertions: both modes were wrong identically here, so a
// tty/normal differential says nothing.
for ([_]bool{ false, true }) |filter| {
- for ([_]pardes.Pane.Mode{ .tty, .normal }) |mode| {
+ for ([_]panes.Text.Mode{ .tty, .normal }) |mode| {
const p = try Pardes.init(testing.allocator, .{ .tty_only = true, .cols = 12, .rows = 8 });
defer p.deinit();
while (p.nextEffect()) |_| {}
const pane = p.panes[0].?;
+ pane.tag_expanded = false; // a one-row tag keeps this small screen's rows
+ p.sync();
pane.tty_filter = filter;
- pane.mode = mode;
+ pane.body.mode = mode;
p.update(.{ .output = .{ .pane = 0, .bytes = "\x1b[32m\u{754C}\x1b[41m\x1b[K\x1b[7G\x1b[44m\x1b[K\r\n" } });
var frame = std.heap.ArenaAllocator.init(testing.allocator);
defer frame.deinit();
const r = p.rects[0];
const tx = r.x + config.GUTTER;
- const body_y = if (p.settings.tag_bottom) r.y else r.y + pardes.BOX_H;
+ const body_y = bodyY(p, r);
p.shell_rows.stale = true;
const s = try p.render(frame.allocator());
@@ -3525,20 +4179,20 @@ const TerminalTests = struct {
// ghostty leaves a `spacer_head` in that last column, carrying the row's
// 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 ([_]pardes.Pane.Mode{ .tty, .normal }) |mode| {
+ 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 });
defer p.deinit();
while (p.nextEffect()) |_| {}
const pane = p.panes[0].?;
pane.tty_filter = false;
- pane.mode = mode;
+ pane.body.mode = mode;
p.update(.{ .output = .{ .pane = 0, .bytes = "\x1b[41mzzzzzzzzzzzzz\u{754C}\x1b[0m\r\n" } });
var frame = std.heap.ArenaAllocator.init(testing.allocator);
defer frame.deinit();
const r = p.rects[0];
const tx = r.x + config.GUTTER;
- const body_y = if (p.settings.tag_bottom) r.y else r.y + pardes.BOX_H;
+ const body_y = bodyY(p, r);
p.shell_rows.stale = true;
const s = try p.render(frame.allocator());
@@ -3558,7 +4212,7 @@ const TerminalTests = struct {
while (p.nextEffect()) |_| {}
const pane = p.panes[0].?;
pane.tty_filter = false;
- pane.mode = .tty;
+ pane.body.mode = .tty;
for (0..40) |i| {
var buf: [64]u8 = undefined;
const bytes = std.fmt.bufPrint(&buf, "\x1b[38;5;{d}mline-{d:0>2}\x1b[0m\r\n", .{ 20 + i, i }) catch unreachable;
@@ -3571,10 +4225,10 @@ const TerminalTests = struct {
const s = try p.render(frame.allocator());
const r = p.rects[0];
const tx = r.x + config.GUTTER;
- const body_y = if (p.settings.tag_bottom) r.y else r.y + pardes.BOX_H;
+ const body_y = bodyY(p, r);
var bad: usize = 0;
- for (0..r.h -| pardes.BOX_H) |vr| {
+ for (0..bodyH(p, r)) |vr| {
var buf: [16]u8 = undefined;
var n: usize = 0;
for (0..10) |c| {
@@ -3608,13 +4262,13 @@ const TerminalTests = struct {
while (p.nextEffect()) |_| {}
const pane = p.panes[0].?;
pane.tty_filter = filter;
- pane.mode = .normal;
+ pane.body.mode = .normal;
var frame = std.heap.ArenaAllocator.init(testing.allocator);
defer frame.deinit();
const r = p.rects[0];
const tx = r.x + config.GUTTER;
- const body_y = if (p.settings.tag_bottom) r.y else r.y + pardes.BOX_H;
+ const body_y = bodyY(p, r);
p.update(.{ .output = .{ .pane = 0, .bytes = "plain text\r\n" } });
p.shell_rows.stale = true;
@@ -3640,7 +4294,7 @@ const TerminalTests = struct {
while (p.nextEffect()) |_| {}
const pane = p.panes[0].?;
pane.tty_filter = false;
- pane.mode = .normal;
+ pane.body.mode = .normal;
for (0..6) |i| {
var buf: [40]u8 = undefined;
@@ -3652,7 +4306,7 @@ const TerminalTests = struct {
defer frame.deinit();
const r = p.rects[0];
const tx = r.x + config.GUTTER;
- const body_y = if (p.settings.tag_bottom) r.y else r.y + pardes.BOX_H;
+ const body_y = bodyY(p, r);
// The state two ordinary edits reach: one at the bottom, one that split a
// line further up. The buffer now spans rows 2..6 and diverges at BOTH
@@ -3682,7 +4336,7 @@ const TerminalTests = struct {
while (p.nextEffect()) |_| {}
const pane = p.panes[0].?;
pane.tty_filter = false;
- pane.mode = .normal;
+ pane.body.mode = .normal;
p.update(.{ .output = .{ .pane = 0, .bytes = "\x1b[31m000\x1b[0m\r\n\x1b[32m111\x1b[0m\r\n\r\n\x1b[34m333\x1b[0m\r\n\x1b[35m444\x1b[0m" } });
@@ -3690,7 +4344,7 @@ const TerminalTests = struct {
defer frame.deinit();
const r = p.rects[0];
const tx = r.x + config.GUTTER;
- const body_y = if (p.settings.tag_bottom) r.y else r.y + pardes.BOX_H;
+ const body_y = bodyY(p, r);
// The state three keystrokes reach on any blank shell row: type a character
// and delete it, and the buffer holds NO text while still standing in for
@@ -3715,8 +4369,10 @@ const TerminalTests = struct {
defer p.deinit();
while (p.nextEffect()) |_| {}
const pane = p.panes[0].?;
+ pane.tag_expanded = false; // a one-row tag keeps this small screen's rows
+ p.sync();
pane.tty_filter = false;
- pane.mode = .tty;
+ pane.body.mode = .tty;
p.update(.{ .output = .{ .pane = 0, .bytes = "\x1b[31mAAA\x1b[0m\r\n\x1b[32mBBB\x1b[0m\r\n\x1b[34mCCC\x1b[0m" } });
@@ -3724,7 +4380,7 @@ const TerminalTests = struct {
defer frame.deinit();
const r = p.rects[0];
const tx = r.x + config.GUTTER;
- const body_y = if (p.settings.tag_bottom) r.y else r.y + pardes.BOX_H;
+ const body_y = bodyY(p, r);
const blue: pardes.Color = .{ .index = 4 };
p.shell_rows.stale = true;
@@ -3753,7 +4409,7 @@ const TerminalTests = struct {
while (p.nextEffect()) |_| {}
const pane = p.panes[0].?;
pane.tty_filter = false;
- pane.mode = .normal;
+ pane.body.mode = .normal;
for (0..6) |i| {
var buf: [64]u8 = undefined;
const bytes = std.fmt.bufPrint(&buf, "\x1b[38;5;{d}mrow-{d}-abcdefgh\x1b[0m\r\n", .{ 30 + i, i }) catch unreachable;
@@ -3767,12 +4423,12 @@ const TerminalTests = struct {
defer frame.deinit();
const r = p.rects[0];
const tx = r.x + config.GUTTER;
- const body_y = if (p.settings.tag_bottom) r.y else r.y + pardes.BOX_H;
+ const body_y = bodyY(p, r);
const s = try p.render(frame.allocator());
const want = pardes.Color{ .index = 33 };
var seen = false;
- for (0..@as(usize, r.h -| pardes.BOX_H)) |vr| {
+ for (0..@as(usize, bodyH(p, r))) |vr| {
var buf: [15]u8 = undefined;
for (0..15) |c| {
const g = s.at(tx + @as(u16, @intCast(c)), body_y + @as(u16, @intCast(vr))).grapheme();
@@ -3803,7 +4459,7 @@ const TerminalTests = struct {
while (p.nextEffect()) |_| {}
const pane = p.panes[0].?;
pane.tty_filter = false;
- pane.mode = .normal;
+ pane.body.mode = .normal;
for (0..26) |i| {
var buf: [64]u8 = undefined;
const bytes = std.fmt.bufPrint(&buf, "\x1b[38;5;{d}mrow-{d:0>2}-xyzzy\x1b[0m\r\n", .{ 20 + i, i }) catch unreachable;
@@ -3820,11 +4476,11 @@ const TerminalTests = struct {
defer frame.deinit();
const r = p.rects[0];
const tx = r.x + config.GUTTER;
- const body_y = if (p.settings.tag_bottom) r.y else r.y + pardes.BOX_H;
+ const body_y = bodyY(p, r);
const s = try p.render(frame.allocator());
var seen = false;
- for (0..@as(usize, r.h -| pardes.BOX_H)) |vr| {
+ for (0..@as(usize, bodyH(p, r))) |vr| {
var buf: [12]u8 = undefined;
for (0..12) |c| {
const g = s.at(tx + @as(u16, @intCast(c)), body_y + @as(u16, @intCast(vr))).grapheme();
@@ -3862,7 +4518,7 @@ const TerminalTests = struct {
// The raw palette, so a row's text names its exact colour instead of one
// this test would have to re-derive from the theme.
pane.tty_filter = false;
- pane.mode = .normal;
+ pane.body.mode = .normal;
for (0..26) |i| {
var buf: [64]u8 = undefined;
const bytes = std.fmt.bufPrint(&buf, "\x1b[38;5;{d}mrow-{d:0>2}-xyzzy\x1b[0m\r\n", .{ 20 + i, i }) catch unreachable;
@@ -3874,8 +4530,8 @@ const TerminalTests = struct {
defer frame.deinit();
const r = p.rects[0];
const tx = r.x + config.GUTTER;
- const body_y = if (p.settings.tag_bottom) r.y else r.y + pardes.BOX_H;
- const body_h = r.h -| pardes.BOX_H;
+ const body_y = bodyY(p, r);
+ const body_h = bodyH(p, r);
var step: usize = 0;
while (step < 12) : (step += 1) {
@@ -3950,7 +4606,7 @@ const TerminalTests = struct {
while (p.nextEffect()) |_| {}
const pane = p.panes[0].?;
pane.tty_filter = false;
- pane.mode = .normal;
+ pane.body.mode = .normal;
for (0..26) |i| {
var buf: [64]u8 = undefined;
const bytes = std.fmt.bufPrint(&buf, "\x1b[38;5;{d}mrow-{d:0>2}-xyzzy\x1b[0m\r\n", .{ 20 + i, i }) catch unreachable;
@@ -3969,11 +4625,11 @@ const TerminalTests = struct {
defer frame.deinit();
const r = p.rects[0];
const tx = r.x + config.GUTTER;
- const body_y = if (p.settings.tag_bottom) r.y else r.y + pardes.BOX_H;
+ const body_y = bodyY(p, r);
const s = try p.render(frame.allocator());
var seen: usize = 0;
- for (0..@as(usize, r.h -| pardes.BOX_H)) |vr| {
+ for (0..@as(usize, bodyH(p, r))) |vr| {
var buf: [12]u8 = undefined;
for (0..12) |c| {
const g = s.at(tx + @as(u16, @intCast(c)), body_y + @as(u16, @intCast(vr))).grapheme();
@@ -3997,6 +4653,7 @@ test {
_ = TagNameTintTests;
_ = TreeContextTests;
_ = BodyHitTests;
+ _ = LineNumberLookTests;
_ = TtySelectionTests;
_ = ClickCursorTests;
_ = JumpSelectionTests;
@@ -4018,11 +4675,11 @@ test "an empty counted paste leaves no count for the next motion" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 60, .rows = 12 });
defer p.deinit();
const pane = try p.setTestFile("abcdefgh\n");
- if (empty_register) p.yank = try p.gpa.dupe(u8, "");
+ if (empty_register) p.registers.put(p.gpa, '"', "", 0, 1, true);
for ("3p") |cp| p.update(.{ .key = .{ .cp = cp } });
- try std.testing.expectEqual(modal.Normal.State{}, pane.normal);
+ try std.testing.expectEqual(modal.Normal.State{}, pane.body.normal);
p.update(.{ .key = .{ .cp = 'l' } });
- try std.testing.expectEqual(@as(i32, 1), pane.cur_col);
+ try std.testing.expectEqual(@as(i32, 1), pane.body.cur_col);
try std.testing.expectEqualStrings("abcdefgh\n", pane.file.?.content);
}
}
@@ -4046,39 +4703,45 @@ test "cancelled normal gestures leave no count or subprefix after mouse and focu
defer frame.deinit();
_ = try p.render(frame.allocator());
for (keys) |cp| p.update(.{ .key = .{ .cp = cp } });
- try std.testing.expect(!std.meta.eql(modal.Normal.State{}, pane.normal));
+ try std.testing.expect(!std.meta.eql(modal.Normal.State{}, pane.body.normal));
switch (gesture) {
.body, .tag => {
const rect = p.rects[0];
- const tag_y = if (p.settings.tag_bottom) rect.y + rect.h - pardes.BOX_H else rect.y;
- const body_y = if (p.settings.tag_bottom) rect.y else rect.y + pardes.BOX_H;
- const x = rect.x + config.GUTTER + @as(u16, @intCast(panes.File.gutterWidth(pane))) + 3;
+ const tag_y = tagY(p, rect);
+ const body_y = p.bodyTop(pane, rect);
+ const x = if (gesture == .tag)
+ rect.x + pardes.TAG_TEXT_INSET + @as(u16, @intCast(panes.File.displayWidth(try pardes.tagline.tagPrefix(p, pane)))) + 3
+ else
+ rect.x + config.GUTTER + @as(u16, @intCast(panes.File.gutterWidth(pane))) + 3;
const y = if (gesture == .tag) tag_y else body_y;
p.update(.{ .mouse = .{ .button = config.select_button, .kind = .press, .col = x, .row = y } });
p.update(.{ .mouse = .{ .button = config.select_button, .kind = .release, .col = x, .row = y } });
if (gesture == .tag) {
- try std.testing.expect(pane.tag_edit);
+ try std.testing.expect(pane.focus == .tag);
p.update(.{ .key = .{ .cp = Key.escape } });
- try std.testing.expect(!pane.tag_edit);
+ p.update(.{ .key = .{ .cp = ':' } });
+ try std.testing.expect(pane.focus == .body);
}
},
.focus, .last => {
p.update(.{ .key = .{ .cp = 'w', .ctrl = true } });
p.update(.{ .key = .{ .cp = 'l' } });
+ p.update(.{ .key = .{ .cp = Key.enter } });
try std.testing.expectEqual(other, p.active);
if (gesture == .last) {
p.update(.{ .key = .{ .cp = Key.escape } });
} else {
p.update(.{ .key = .{ .cp = 'w', .ctrl = true } });
p.update(.{ .key = .{ .cp = 'h' } });
+ p.update(.{ .key = .{ .cp = Key.enter } });
}
try std.testing.expectEqual(@as(usize, 0), p.active);
},
}
- try std.testing.expectEqual(modal.Normal.State{}, pane.normal);
- const col = pane.cur_col;
+ try std.testing.expectEqual(modal.Normal.State{}, pane.body.normal);
+ const col = pane.body.cur_col;
p.update(.{ .key = .{ .cp = 'l' } });
- try std.testing.expectEqual(col + 1, pane.cur_col);
+ try std.testing.expectEqual(col + 1, pane.body.cur_col);
try std.testing.expectEqualStrings("abcdefghij\n", pane.file.?.content);
}
}
@@ -4089,16 +4752,16 @@ test "cancelled normal gestures leave no count or subprefix through raw tty mode
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 80, .rows = 12 });
defer p.deinit();
const pane = p.panes[0].?;
- pane.mode = .normal;
+ pane.body.mode = .normal;
p.update(.{ .output = .{ .pane = 0, .bytes = "abcdefghij\r\n" } });
for (keys) |cp| p.update(.{ .key = .{ .cp = cp } });
- try std.testing.expect(!std.meta.eql(modal.Normal.State{}, pane.normal));
+ try std.testing.expect(!std.meta.eql(modal.Normal.State{}, pane.body.normal));
p.update(.{ .key = .{ .cp = p.opts.tty_toggle, .ctrl = true } });
- try std.testing.expectEqual(pardes.Pane.Mode.tty, pane.mode);
- try std.testing.expectEqual(modal.Normal.State{}, pane.normal);
+ try std.testing.expectEqual(panes.Text.Mode.tty, pane.body.mode);
+ try std.testing.expectEqual(modal.Normal.State{}, pane.body.normal);
p.update(.{ .key = .{ .cp = p.opts.tty_toggle, .ctrl = true } });
- try std.testing.expectEqual(pardes.Pane.Mode.normal, pane.mode);
- try std.testing.expectEqual(modal.Normal.State{}, pane.normal);
+ try std.testing.expectEqual(panes.Text.Mode.normal, pane.body.mode);
+ try std.testing.expectEqual(modal.Normal.State{}, pane.body.normal);
}
}
@@ -4159,7 +4822,7 @@ test "growing a file pane colors every newly visible Zig keyword" {
const gpa = std.testing.allocator;
const p = try Pardes.init(gpa, .{ .tty_only = true, .cols = 80, .rows = 8 });
defer p.deinit();
- const pane = try p.setTestFile("pub fn f() void { if (true) {} }\n" ** 100);
+ const pane = try p.setTestFile(std.mem.asBytes(&@as([100][33]u8, @splat("pub fn f() void { if (true) {} }\n".*))));
const file = &pane.file.?;
gpa.free(file.path);
file.path = try gpa.dupe(u8, "/resize.zig");
@@ -4176,9 +4839,9 @@ test "growing a file pane colors every newly visible Zig keyword" {
_ = frame.reset(.retain_capacity);
const surface = try p.render(frame.allocator());
const rect = p.rects[0];
- const body_y = if (p.settings.tag_bottom) rect.y else rect.y + pardes.BOX_H;
+ const body_y = bodyY(p, rect);
var seen: usize = 0;
- for (body_y..body_y + rect.h - pardes.BOX_H) |y| {
+ for (body_y..body_y + bodyH(p, rect)) |y| {
for (rect.x + config.GUTTER..rect.x + rect.w - 1) |x| {
const first = surface.at(@intCast(x), @intCast(y));
const second = surface.at(@intCast(x + 1), @intCast(y));
@@ -4219,12 +4882,14 @@ test "Zig keywords keep every rendered byte colored across line-number widths" {
const p = try Pardes.init(gpa, .{ .tty_only = true, .cols = view.cols, .rows = 10 });
defer p.deinit();
const pane = try p.setTestFile(source);
+ pane.tag_expanded = false; // a one-row tag keeps this small screen's rows
+ p.sync();
const file = &pane.file.?;
gpa.free(file.path);
file.path = try gpa.dupe(u8, "/highlight.zig");
file.scroll = line - 1;
- pane.cur_row = @intCast(line - 1);
- pane.cur_col = @intCast(std.mem.indexOf(u8, sample, "fn").?);
+ pane.body.cur_row = @intCast(line - 1);
+ pane.body.cur_col = @intCast(std.mem.indexOf(u8, sample, "fn").?);
pane.hscroll = view.horizontal;
p.settings.colors = true;
p.settings.wrap = view.wrap;
@@ -4235,8 +4900,8 @@ test "Zig keywords keep every rendered byte colored across line-number widths" {
var seen: usize = 0;
var if_position: ?struct { x: u16, y: u16 } = null;
const rect = p.rects[0];
- const body_y = if (p.settings.tag_bottom) rect.y else rect.y + pardes.BOX_H;
- for (body_y..body_y + rect.h - pardes.BOX_H) |y| {
+ const body_y = bodyY(p, rect);
+ for (body_y..body_y + bodyH(p, rect)) |y| {
for (rect.x + config.GUTTER..rect.x + rect.w - 1) |x| {
const first = surface.at(@intCast(x), @intCast(y));
const second = surface.at(@intCast(x + 1), @intCast(y));
@@ -4263,15 +4928,15 @@ test "Zig keywords keep every rendered byte colored across line-number widths" {
const clicked = if_position.?;
p.update(.{ .mouse = .{ .button = config.select_button, .kind = .press, .col = clicked.x, .row = clicked.y } });
p.update(.{ .mouse = .{ .button = config.select_button, .kind = .release, .col = clicked.x, .row = clicked.y } });
- try std.testing.expectEqual(@as(i32, @intCast(line - 1)), pane.cur_row);
- try std.testing.expectEqual(@as(i32, @intCast(std.mem.indexOf(u8, sample, "if").?)), pane.cur_col);
+ try std.testing.expectEqual(@as(i32, @intCast(line - 1)), pane.body.cur_row);
+ try std.testing.expectEqual(@as(i32, @intCast(std.mem.indexOf(u8, sample, "if").?)), pane.body.cur_col);
}
}
}
}
test "terminal overlays preserve trailing blank styles without coloring inserted rows" {
- if (comptime !panes.Terminal.enabled) return error.SkipZigTest;
+ if (comptime !panes.terminal.enabled) return error.SkipZigTest;
const gpa = std.testing.allocator;
const p = try Pardes.init(gpa, .{ .tty_only = true, .cols = 40, .rows = 12 });
defer p.deinit();
@@ -4279,13 +4944,13 @@ test "terminal overlays preserve trailing blank styles without coloring inserted
const pane = p.panes[0].?;
pane.tty_filter = false;
p.update(.{ .output = .{ .pane = 0, .bytes = "A\r\n\x1b[41m\x1b[2K\r\n\x1b[42m\x1b[2K\r\n\x1b[44m\x1b[2K\x1b[0m" } });
- pane.mode = .normal;
+ pane.body.mode = .normal;
pane.ovl = .{ .row = 0, .rows = 3, .text = try gpa.dupe(u8, "A\n\n") };
var frame = std.heap.ArenaAllocator.init(gpa);
defer frame.deinit();
const rect = p.rects[0];
const x = rect.x + config.GUTTER;
- const y = if (p.settings.tag_bottom) rect.y else rect.y + pardes.BOX_H;
+ const y = bodyY(p, rect);
const palette = p.theme().palette.?;
const colors = [_]pardes.Color{ .{ .rgb = palette[1] }, .{ .rgb = palette[2] }, .{ .rgb = palette[4] } };
const original = try p.render(frame.allocator());
@@ -4311,16 +4976,17 @@ test "terminal overlays preserve trailing blank styles without coloring inserted
const LookResetTests = struct {
fn seed(pane: *Pane, operand: []const u8) !void {
- pane.cur_row = 0;
- pane.cur_col = 3;
- pane.vsel = .{ .active = true, .explicit = true, .row = 0, .col = 0 };
- pane.msel = .{ .active = true, .r0 = 0, .r1 = 1 };
- pane.sels[0] = .{ .row = 1, .col = 2, .arow = 0, .acol = 1 };
- pane.nsel = 1;
- pane.select = true;
- pane.normal.count = 5;
- pane.append_at = .{ .row = 0, .col = 3 };
- pane.sticky_col = 7;
+ pane.body.cur_row = 0;
+ pane.body.cur_col = 3;
+ pane.body.vsel = .{ .active = true, .explicit = true, .row = 0, .col = 0 };
+ pane.body.msel = .{ .active = true, .r0 = 0, .r1 = 1 };
+ _ = pane.body.reserveSels();
+ pane.body.sels[0] = .{ .row = 1, .col = 2, .arow = 0, .acol = 1 };
+ pane.body.nsel = 1;
+ pane.body.select = true;
+ pane.body.normal.count = 5;
+ pane.body.restore_cursor = true;
+ pane.body.sticky_col = 7;
for (0..pane.sel.len) |slot| {
pane.clearPointerSelection(slot);
pane.sel[slot] = .{ .state = .done, .source_id = slot + 1, .r0 = 1, .r1 = 1, .c0 = 0, .c1 = 3 };
@@ -4335,21 +5001,21 @@ const LookResetTests = struct {
}
fn cleared(pane: *const Pane) !void {
- try std.testing.expect(!pane.msel.active);
- try std.testing.expectEqual(@as(u8, 0), pane.nsel);
- try std.testing.expect(!pane.select);
- try std.testing.expectEqual(modal.Normal.State{}, pane.normal);
- try std.testing.expect(pane.append_at == null);
- try std.testing.expectEqual(@as(i32, -1), pane.sticky_col);
+ try std.testing.expect(!pane.body.msel.active);
+ try std.testing.expectEqual(@as(u16, 0), pane.body.nsel);
+ try std.testing.expect(!pane.body.select);
+ try std.testing.expectEqual(modal.Normal.State{}, pane.body.normal);
+ try std.testing.expect(!pane.body.restore_cursor);
+ try std.testing.expectEqual(@as(i32, -1), pane.body.sticky_col);
for (pane.sel) |selection| try std.testing.expectEqual(.none, selection.state);
for (pane.pointer_selections) |selection| try std.testing.expect(selection == null);
}
fn selected(pane: *const Pane) []const u8 {
- if (!pane.vsel.active or pane.cur_row != pane.vsel.row) return "";
- const line = modal.lineSlice(pane.file.?.content, @intCast(pane.cur_row));
- const lo: usize = @intCast(@min(pane.cur_col, pane.vsel.col));
- const hi: usize = @intCast(@max(pane.cur_col, pane.vsel.col));
+ if (!pane.body.vsel.active or pane.body.cur_row != pane.body.vsel.row) return "";
+ const line = modal.lineSlice(pane.file.?.content, @intCast(pane.body.cur_row));
+ const lo: usize = @intCast(@min(pane.body.cur_col, pane.body.vsel.col));
+ const hi: usize = @intCast(@max(pane.body.cur_col, pane.body.vsel.col));
return line[lo..modal.nextGrapheme(line, hi)];
}
@@ -4359,29 +5025,29 @@ const LookResetTests = struct {
const pane = try p.setTestFile("alpha\nbravo\ncharlie\nneedle\n");
try seed(pane, "/test.txt:3:2");
// This operand is released by Look's selection cleanup.
- p.lookAt(0, pane.pointer_selections[0].?.raw_text.?);
+ pardes.look.lookAt(p, 0, pane.pointer_selections[0].?.raw_text.?);
try cleared(pane);
try std.testing.expectEqual(@as(usize, 0), p.active);
- try std.testing.expectEqual(@as(i32, 2), pane.cur_row);
- try std.testing.expectEqual(@as(i32, 1), pane.cur_col);
- try std.testing.expect(!pane.vsel.active);
+ try std.testing.expectEqual(@as(i32, 2), pane.body.cur_row);
+ try std.testing.expectEqual(@as(i32, 1), pane.body.cur_col);
+ try std.testing.expect(!pane.body.vsel.active);
try seed(pane, "/test.txt:2:2-4");
- p.lookAt(0, pane.pointer_selections[0].?.raw_text.?);
+ pardes.look.lookAt(p, 0, pane.pointer_selections[0].?.raw_text.?);
try cleared(pane);
- try std.testing.expectEqual(@as(i32, 1), pane.cur_row);
+ try std.testing.expectEqual(@as(i32, 1), pane.body.cur_row);
try std.testing.expectEqualStrings("rav", selected(pane));
p.gpa.free(pane.file.?.path);
pane.file.?.path = try p.gpa.dupe(u8, "/tmp/look-selection-source.txt");
try seed(pane, "needle");
- p.lookAt(0, pane.pointer_selections[0].?.raw_text.?);
+ pardes.look.lookAt(p, 0, pane.pointer_selections[0].?.raw_text.?);
try cleared(pane);
- try std.testing.expectEqual(@as(i32, 3), pane.cur_row);
+ try std.testing.expectEqual(@as(i32, 3), pane.body.cur_row);
try std.testing.expectEqualStrings("needle", selected(pane));
}
- test "Look clears both source and existing destination selections before focus" {
+ test "Look clears the source's click highlight, not its dot, and the destination's selections before focus" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 100, .rows = 30 });
defer p.deinit();
const source = try p.setTestFile("source\nlines\n");
@@ -4398,18 +5064,21 @@ const LookResetTests = struct {
p.active = 0;
try seed(source, if (range) "/look-destination.txt:2:2-4" else "/look-destination.txt:3:2");
try seed(destination, "previous destination");
- p.lookAt(0, source.pointer_selections[0].?.raw_text.?);
+ pardes.look.lookAt(p, 0, source.pointer_selections[0].?.raw_text.?);
try std.testing.expectEqual(id, p.active);
- try cleared(source);
+ // The source keeps its dot (acme's look leaves it); the click's
+ // highlight goes.
+ for (source.sel) |selection| try std.testing.expectEqual(.none, selection.state);
+ for (source.pointer_selections) |selection| try std.testing.expect(selection == null);
+ try std.testing.expect(source.body.vsel.active);
try cleared(destination);
- try std.testing.expect(!source.vsel.active);
if (range) {
- try std.testing.expectEqual(@as(i32, 1), destination.cur_row);
+ try std.testing.expectEqual(@as(i32, 1), destination.body.cur_row);
try std.testing.expectEqualStrings("rav", selected(destination));
} else {
- try std.testing.expectEqual(@as(i32, 2), destination.cur_row);
- try std.testing.expectEqual(@as(i32, 1), destination.cur_col);
- try std.testing.expect(!destination.vsel.active);
+ try std.testing.expectEqual(@as(i32, 2), destination.body.cur_row);
+ try std.testing.expectEqual(@as(i32, 1), destination.body.cur_col);
+ try std.testing.expect(!destination.body.vsel.active);
}
}
}
@@ -4418,3 +5087,47 @@ const LookResetTests = struct {
test {
_ = LookResetTests;
}
+
+test "a terminal keeps its tag and two body rows through a squeeze, a drag and a smaller window; a text pane does not" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 100, .rows = 30 });
+ defer p.deinit();
+ p.presentation.enabled = false;
+ p.sync();
+ while (p.nextEffect()) |_| {}
+ const term = for (p.panes, 0..) |slot, i| {
+ if (slot) |pane| if (pane.isTerminal()) break i;
+ } else return error.NoTerminal;
+ p.newScratchBelow(term);
+ p.sync();
+ while (p.nextEffect()) |_| {}
+ const col = layout.findPane(p, term).?.col;
+ const floor = p.panes[term].?.tag_rows + layout.min_body_rows;
+ // Squeezed by the weights: the others give it its floor.
+ p.panes[term].?.vweight = 0.01;
+ for (p.col_panes[col][0..p.col_n[col]]) |k| if (k != term) {
+ p.panes[k].?.vweight = 1000;
+ };
+ p.sync();
+ try std.testing.expectEqual(floor, p.rects[term].h);
+ var rows: ?u16 = null;
+ while (p.nextEffect()) |effect| if (effect == .resize_pty and effect.resize_pty.pane == term) {
+ rows = effect.resize_pty.rows;
+ };
+ try std.testing.expectEqual(@as(?u16, layout.min_body_rows), rows);
+ // A drag of the grip under it up to its tag stops at the floor; one
+ // the other way takes a text pane down to its tag alone.
+ const k = layout.findPane(p, term).?.idx;
+ if (k + 1 < p.col_n[col]) {
+ layout.applyRowSplit(p, col, k, p.rects[term].y);
+ p.sync();
+ try std.testing.expectEqual(floor, p.rects[term].h);
+ const text = p.col_panes[col][k + 1];
+ layout.applyRowSplit(p, col, k, p.screen_h);
+ p.sync();
+ try std.testing.expect(p.rects[text].h <= p.panes[text].?.tag_rows);
+ }
+ // A window too short for all: the terminal keeps its floor still.
+ p.update(.{ .resize = .{ .cols = 100, .rows = 10 } });
+ p.sync();
+ try std.testing.expect(p.rects[term].h >= p.panes[term].?.tag_rows + layout.min_body_rows);
+}
diff --git a/test/pdf.zig b/test/pdf.zig
index beeb0b40..3f84195c 100644
--- a/test/pdf.zig
+++ b/test/pdf.zig
@@ -7,13 +7,14 @@ const image = pardes.image;
const config = pardes.config;
const builtins = pardes.builtins;
const layout = pardes.layout;
+const animation = pardes.animation;
const dump = pardes.dump;
const Pardes = pardes.Pardes;
const Builtin = builtins.registry.Builtin();
const Key = pardes.Key;
const Event = pardes.Event;
-const Mode = pardes.Pane.Mode;
+const Mode = panes.Text.Mode;
const Surface = pardes.Surface;
const ImagePlace = pardes.ImagePlace;
const PdfFitMode = panes.Pdf.FitMode;
@@ -24,7 +25,7 @@ const themes = pardes.themes;
const pdf_raster_policy = pardes.pdf_raster_policy;
const PDF_PAGE_GAP_PX = pardes.PDF_PAGE_GAP_PX;
const BOX_H = pardes.BOX_H;
-const sel_slot = @intFromEnum(config.select_button);
+const sel_slot = @backingInt(config.select_button);
const pane_tail = " " ++ config.pdf_pane_builtins_str;
fn hasPdf(pane: *const pardes.Pane) bool {
@@ -135,9 +136,9 @@ const PdfLinkTests = struct {
const choices_id = for (p.panes, 0..) |slot, id| {
if (slot == choices) break id;
} else return error.MissingPdfLinkChoices;
- p.lookAt(choices_id, "https://example.com/embedded");
+ pardes.look.lookAt(p, choices_id, "https://example.com/embedded");
try expectOpened(p, "https://example.com/embedded");
- p.lookAt(choices_id, "target.txt");
+ pardes.look.lookAt(p, choices_id, "target.txt");
try std.testing.expectEqualStrings("chosen file\n", p.panes[p.active].?.file.?.content);
p.active = 0;
_ = try p.render(frame.allocator());
@@ -211,11 +212,13 @@ test "PDF mounted bytes own their source after the caller frees it" {
gpa.free(source);
defer document.deinit();
- var original = try pdf_impl.Document.open("docs/design.pdf");
+ const again = try pardes.filesystem.readFile(gpa, "docs/design.pdf");
+ defer gpa.free(again);
+ var original = try pdf_impl.Document.openBytes(again);
defer original.deinit();
try std.testing.expectEqual(original.pages, document.pages);
try std.testing.expectEqual(try original.pageSize(0), try document.pageSize(0));
- const raster = try document.render(gpa, 0);
+ const raster = try document.render(gpa, 0, .{}, &.{});
defer gpa.free(raster.rgba);
try std.testing.expect(raster.rgba.len > 0);
}
@@ -286,6 +289,7 @@ test "PDF dump fallback remains a byte-preserving file" {
const saved_panes = [_]dump.Pane{.{
.kind = .image,
.tag = "pdf 3/9 height PdfFit full PdfTint PdfSections " ++ path ++ " Keep Del",
+ .tag_tail = " Keep Del",
.body = "",
.scroll = 2,
.cols = 80,
@@ -301,7 +305,7 @@ test "PDF dump fallback remains a byte-preserving file" {
defer out.deinit();
try std.zon.stringify.serialize(state, .{ .whitespace = true }, &out.writer);
- const restored = try Pardes.initFromDump(gpa, .{ .tty_only = true }, out.written());
+ const restored = try pardes.dump.initFromDump(gpa, .{ .tty_only = true }, out.written());
defer restored.deinit();
const pane = restored.panes[0].?;
try std.testing.expect(pane.file != null);
@@ -309,8 +313,58 @@ test "PDF dump fallback remains a byte-preserving file" {
try std.testing.expect(!hasPdf(pane));
try std.testing.expectEqualStrings(path, pane.file.?.path);
try std.testing.expectEqualSlices(u8, source, pane.file.?.content);
- try std.testing.expect(pane.tag_init);
- try std.testing.expectEqualStrings(" Keep Del", pane.tag_tail[0..pane.tag_tail_len]);
+ try std.testing.expect(pane.tag.own != null);
+ try std.testing.expectEqualStrings(" Keep Del", pane.tag.own.?);
+}
+
+test "a +PdfSections row's first number is the page: a section not there, or on another page, is a miss said" {
+ if (!pdf_enabled or platform == .web) return;
+ const gpa = std.testing.allocator;
+ var tmp = std.testing.tmpDir(.{});
+ defer tmp.cleanup();
+ const fixture = try pdf_impl.makeOutlineTestPdf(gpa);
+ defer gpa.free(fixture);
+ try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "outline.pdf", .data = fixture });
+ var path_buf: [256]u8 = undefined;
+ const path = try std.fmt.bufPrint(&path_buf, ".zig-cache/tmp/{s}/outline.pdf", .{tmp.sub_path});
+ const p = try Pardes.init(gpa, .{ .file = path, .cols = 80, .rows = 28 });
+ defer p.deinit();
+ panes.Pdf.openSections(p, 0);
+ const out_id = p.panes[0].?.search_pane orelse return error.MissingPdfSectionsOutput;
+ const out = p.panes[out_id].?;
+ const row = std.mem.sliceTo(out.file.?.content, '\n');
+ const place = row[0 .. std.mem.indexOfScalar(u8, row, ' ') orelse row.len]; // outline.pdf:P:1
+ var fields = std.mem.splitScalar(u8, place, ':');
+ _ = fields.next();
+ const page = try std.fmt.parseInt(usize, fields.next().?, 10);
+ var line: [128]u8 = undefined;
+ // As listed: found, no miss.
+ p.look_missed = false;
+ pardes.look.lookAt(p, out_id, place);
+ try std.testing.expect(!p.look_missed);
+ // The section on another page than the row says, and one not there.
+ for ([_][]const u8{ try std.fmt.bufPrint(&line, "outline.pdf:{d}:1", .{page + 1}), "outline.pdf:1:999" }) |bad| {
+ var copy: [128]u8 = undefined;
+ @memcpy(copy[0..bad.len], bad);
+ p.look_missed = false;
+ const failures = p.fs.failures;
+ pardes.look.lookAt(p, out_id, copy[0..bad.len]);
+ try std.testing.expect(p.look_missed);
+ try std.testing.expect(p.fs.failures != failures);
+ }
+}
+
+test "a PDF's body puts each line of its text on a line of its own, never a heading run into the text under it" {
+ if (!pdf_enabled or platform == .web) return;
+ var tmp = std.testing.tmpDir(.{});
+ defer tmp.cleanup();
+ const p = try PdfLinkTests.init(tmp);
+ defer p.deinit();
+ const text = p.panes[0].?.pdf.?.ensureText(p.pdf_gpa);
+ // The page's three text runs, each its own line.
+ try std.testing.expect(std.mem.indexOf(u8, text, "target.txt\n") != null);
+ try std.testing.expect(std.mem.indexOf(u8, text, "https://example.com/same\n") != null);
+ try std.testing.expect(std.mem.indexOf(u8, text, "label\n") != null);
}
test "PdfSections Look follows the exact owning PDF, not an equal path" {
@@ -341,28 +395,28 @@ test "PdfSections Look follows the exact owning PDF, not an equal path" {
try std.testing.expectEqual(first_revision, first_output.file.?.revision);
const duplicate_id = p.freeSlot() orelse return error.NoDuplicatePdfSlot;
- const duplicate = try panes.Pdf.openPane(p, duplicate_id, path, 0);
- p.placeDoc(0, duplicate_id, duplicate);
+ const duplicate = try panes.Pdf.openPane(p, duplicate_id, path, 0, .last);
+ pardes.exec.placeNew(p, 0, 0, duplicate_id, .doc);
layout.compute(p);
panes.Pdf.openSections(p, duplicate_id);
const duplicate_output_id = duplicate.search_pane orelse return error.MissingDuplicatePdfSections;
const first_row = std.mem.sliceTo(first_output.file.?.content, '\n');
const target = first_row[0 .. std.mem.indexOfScalar(u8, first_row, ' ') orelse first_row.len];
- p.lookAt(first_output_id, target);
+ pardes.look.lookAt(p, first_output_id, target);
try std.testing.expectEqual(@as(usize, 0), p.active);
- p.lookAt(duplicate_output_id, target);
+ pardes.look.lookAt(p, duplicate_output_id, target);
try std.testing.expectEqual(duplicate_id, p.active);
// Once the original document is gone, its output cannot reinterpret an
// old ordinal against the still-open equal-path duplicate.
try std.testing.expect(pardes.test_api.runBuiltin(p, "Del", 0, "", null));
p.active = first_output_id;
- p.lookAt(first_output_id, target);
+ pardes.look.lookAt(p, first_output_id, target);
try std.testing.expectEqual(first_output_id, p.active);
}
-test "PdfSections caches an empty outline output" {
+test "PdfSections on a PDF with no outline says so and opens nothing" {
if (!pdf_enabled or platform == .web) return;
const gpa = std.testing.allocator;
var tmp = std.testing.tmpDir(.{});
@@ -374,14 +428,130 @@ test "PdfSections caches an empty outline output" {
const path = try std.fmt.bufPrint(&path_buf, ".zig-cache/tmp/{s}/plain.pdf", .{tmp.sub_path});
const p = try Pardes.init(gpa, .{ .file = path });
defer p.deinit();
- panes.Pdf.openSections(p, 0);
const pane = p.panes[0].?;
- const output_id = pane.search_pane orelse return error.MissingEmptyPdfSections;
- try std.testing.expectEqual(@as(usize, 0), p.panes[output_id].?.file.?.content.len);
- const serial = p.panes[output_id].?.serial;
- panes.Pdf.openSections(p, 0);
- try std.testing.expectEqual(output_id, pane.search_pane.?);
- try std.testing.expectEqual(serial, p.panes[output_id].?.serial);
+ for (0..2) |_| {
+ panes.Pdf.openSections(p, 0);
+ try std.testing.expect(pane.search_pane == null);
+ try std.testing.expectEqualStrings("PdfSections: this PDF has no outline", pane.msg[0..pane.msg_len]);
+ }
+}
+
+test "Recent keeps a PDF as it keeps a file: open, then closed at its page" {
+ if (!pdf_enabled or platform == .web) return;
+ const gpa = std.testing.allocator;
+ var tmp = std.testing.tmpDir(.{});
+ defer tmp.cleanup();
+ const fixture = try pdf_impl.makeNoOutlineTestPdf(gpa);
+ defer gpa.free(fixture);
+ try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "plain.pdf", .data = fixture });
+ var dir_buf: [4096]u8 = undefined;
+ const dir = dir_buf[0..try tmp.dir.realPath(std.testing.io, &dir_buf)];
+ var path_buf: [4200]u8 = undefined;
+ const path = try std.fmt.bufPrint(&path_buf, "{s}/plain.pdf", .{dir});
+ const p = try Pardes.init(gpa, .{ .cols = 80, .rows = 28 });
+ defer p.deinit();
+ pardes.look.lookAt(p, p.active, path);
+ p.update(.{ .resize = .{ .cols = 80, .rows = 28 } }); // an update's end announces it
+ var out: std.Io.Writer.Allocating = .init(gpa);
+ defer out.deinit();
+ try panes.Output.recentText(p, &out.writer, true);
+ var want: [4300]u8 = undefined;
+ try std.testing.expect(std.mem.indexOf(u8, out.written(), try std.fmt.bufPrint(&want, "{s}:1:1 open\n", .{path})) != null);
+}
+
+test "`:N` on a PDF turns to page N, from the pane and from the root's look, and `@pN:N` logs no err" {
+ if (!pdf_enabled or platform == .web) return;
+ const gpa = std.testing.allocator;
+ var tmp = std.testing.tmpDir(.{});
+ defer tmp.cleanup();
+ const fixture = try pdf_impl.makeOutlineTestPdf(gpa);
+ defer gpa.free(fixture);
+ try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "outline.pdf", .data = fixture });
+ var path_buf: [256]u8 = undefined;
+ const path = try std.fmt.bufPrint(&path_buf, ".zig-cache/tmp/{s}/outline.pdf", .{tmp.sub_path});
+ const p = try Pardes.init(gpa, .{ .file = path, .cols = 80, .rows = 28 });
+ defer p.deinit();
+ const doc = p.panes[0].?;
+ const pages = doc.pdf.?.page_count;
+ try std.testing.expect(pages >= 2);
+ const failures = p.fs.failures;
+ pardes.look.lookAt(p, 0, ":2");
+ try std.testing.expect(!p.look_missed);
+ try std.testing.expectEqual(@as(usize, 1), doc.pdf.?.page);
+ var line: [64]u8 = undefined;
+ pardes.look.lookAt(p, 0, try std.fmt.bufPrint(&line, "@p{d}:1", .{doc.serial}));
+ try std.testing.expect(!p.look_missed);
+ try std.testing.expectEqual(@as(usize, 0), doc.pdf.?.page);
+ try std.testing.expectEqual(failures, p.fs.failures);
+ // Over 9P too: the root's look at `@pN:2` answers ok and logs no err.
+ const ctlfs = pardes.ctlfs;
+ const written = p.serveFs(.{ .tag = 1, .op = .write, .node = @backingInt(ctlfs.TopFile.look), .data = try std.fmt.bufPrint(&line, "@p{d}:2\n", .{doc.serial}) });
+ try std.testing.expectEqual(ctlfs.Status.ok, written.status);
+ try std.testing.expectEqual(@as(usize, 1), doc.pdf.?.page);
+ const log = @backingInt(ctlfs.TopFile.log);
+ const h = p.serveFs(.{ .tag = 2, .op = .open, .node = log }).handle;
+ const record = p.fsPayload(p.serveFs(.{ .tag = 3, .op = .read, .node = log, .handle = h, .size = 1 << 16 }));
+ try std.testing.expect(std.mem.indexOf(u8, record, "\nerr ") == null);
+ _ = p.serveFs(.{ .tag = 4, .op = .release, .node = log, .handle = h });
+ while (p.nextEffect()) |_| {}
+ // `:N:H` on the pane is hit H of its search on page N, as `file.pdf:N:H`
+ // (a search row) is: with no search there is no hit 3, a miss that
+ // turns no page.
+ p.look_missed = false;
+ pardes.look.lookAt(p, 0, ":1");
+ pardes.look.lookAt(p, 0, ":2:3");
+ try std.testing.expect(p.look_missed);
+ try std.testing.expect(std.mem.indexOf(u8, doc.msg[0..doc.msg_len], "has no search hit 3 on page 2") != null);
+ try std.testing.expectEqual(@as(usize, 0), doc.pdf.?.page);
+ pardes.look.lookAt(p, 0, ":2");
+ // Page 0 is no page: the has-no-page miss.
+ p.look_missed = false;
+ pardes.look.lookAt(p, 0, ":0");
+ try std.testing.expect(p.look_missed);
+ try std.testing.expect(std.mem.indexOf(u8, doc.msg[0..doc.msg_len], "has no page 0") != null);
+ p.look_missed = false;
+ // A byte offset or a pattern is no PDF address: refused with words.
+ pardes.look.lookAt(p, 0, ":#3");
+ try std.testing.expect(p.look_missed);
+ try std.testing.expect(std.mem.indexOf(u8, doc.msg[0..doc.msg_len], "its address is a page, :N") != null);
+ p.look_missed = false;
+ pardes.look.lookAt(p, 0, try std.fmt.bufPrint(&line, ":{d}", .{pages + 1}));
+ try std.testing.expect(p.look_missed);
+ try std.testing.expectEqual(@as(usize, 1), doc.pdf.?.page); // where the 9P look left it
+}
+
+test "a look at a PDF's page past its last is a miss, never the last page" {
+ if (!pdf_enabled or platform == .web) return;
+ const gpa = std.testing.allocator;
+ var tmp = std.testing.tmpDir(.{});
+ defer tmp.cleanup();
+ const fixture = try pdf_impl.makeNoOutlineTestPdf(gpa);
+ defer gpa.free(fixture);
+ try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "plain.pdf", .data = fixture });
+ try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "other.pdf", .data = fixture });
+ var dir_buf: [4096]u8 = undefined;
+ const dir = dir_buf[0..try tmp.dir.realPath(std.testing.io, &dir_buf)];
+ var path_buf: [4200]u8 = undefined;
+ const path = try std.fmt.bufPrint(&path_buf, "{s}/plain.pdf", .{dir});
+ const p = try Pardes.init(gpa, .{ .file = path, .cols = 80, .rows = 28 });
+ defer p.deinit();
+ const doc = p.panes[0].?;
+ try std.testing.expect(doc.hasPdf());
+ var line: [4300]u8 = undefined;
+ // Open: it stays on its page.
+ const page = doc.pdf.?.page;
+ pardes.look.lookAt(p, 0, try std.fmt.bufPrint(&line, "{s}:999", .{path}));
+ try std.testing.expect(p.look_missed);
+ try std.testing.expectEqual(page, doc.pdf.?.page);
+ // Not open: nothing opens.
+ p.look_missed = false;
+ var before: usize = 0;
+ for (p.panes) |slot| before += @intFromBool(slot != null);
+ pardes.look.lookAt(p, 0, try std.fmt.bufPrint(&line, "{s}/other.pdf:999", .{dir}));
+ try std.testing.expect(p.look_missed);
+ var after: usize = 0;
+ for (p.panes) |slot| after += @intFromBool(slot != null);
+ try std.testing.expectEqual(before, after);
}
test "SDL PDF raster policy is materially denser than Kitty" {
@@ -457,8 +627,8 @@ test "watched PDF reload replaces MuPDF state and preserves the reading view" {
anchor_fraction * @as(f64, @floatFromInt(state.page_heights[2]));
state.scroll_to_page_pending = false;
state.layout_anchor_pending = false;
- pane.cur_row = 9;
- pane.cur_col = 8;
+ pane.body.cur_row = 9;
+ pane.body.cur_col = 8;
try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "live.pdf", .data = replacement });
try std.testing.expect(p.reloadWatchedFile(0, &.{}));
@@ -482,8 +652,8 @@ test "watched PDF reload replaces MuPDF state and preserves the reading view" {
try std.testing.expect(state.layout_anchor_pending);
try std.testing.expectEqual(@as(usize, 2), state.layout_anchor_page);
try std.testing.expectApproxEqAbs(anchor_fraction, state.layout_anchor_fraction, 0.0001);
- try std.testing.expectEqual(@as(i32, 0), pane.cur_row);
- try std.testing.expectEqual(@as(i32, 0), pane.cur_col);
+ try std.testing.expectEqual(@as(i32, 0), pane.body.cur_row);
+ try std.testing.expectEqual(@as(i32, 0), pane.body.cur_col);
_ = state.ensureText(p.pdf_gpa);
const text_lines = std.mem.count(u8, state.text, "\n") + 1;
try std.testing.expect(state.text_scroll < text_lines);
@@ -604,6 +774,7 @@ test "MuPDF pane renders, navigates, searches, and round-trips its page" {
.rows = 24,
});
defer p.deinit();
+ p.settings.motion = .off; // placements, not the glide (anim 11)
const pane = p.panes[0].?;
try std.testing.expect(hasPdf(pane));
try std.testing.expect(pane.pdf.?.page_count > 1);
@@ -612,7 +783,7 @@ test "MuPDF pane renders, navigates, searches, and round-trips its page" {
try std.testing.expectEqual(@as(u16, 0), pane.pdf.?.pan_y);
try std.testing.expectEqual(@as(u16, 8), p.cell_pixels.w);
try std.testing.expectEqual(@as(u16, 16), p.cell_pixels.h);
- const initial_tag = try pardes.test_api.tagText(p, p.scratch.allocator(), pane);
+ const initial_tag = try pardes.tagline.tagText(p, p.scratch.allocator(), pane);
const expected_tag = try std.fmt.allocPrint(p.scratch.allocator(), "{s} [1/{d}]{s}", .{ pane.pdf.?.path, pane.pdf.?.page_count, pane_tail });
try std.testing.expectEqualStrings(expected_tag, initial_tag);
try std.testing.expect(std.mem.endsWith(u8, initial_tag, pane_tail));
@@ -628,6 +799,7 @@ test "MuPDF pane renders, navigates, searches, and round-trips its page" {
const request = panes.Pdf.renderRequest(
panes.Pdf.paneViewport(p, pane) orelse return error.MissingPdfViewport,
pdf_raster_policy,
+ pane.pdf.?.fit,
);
try std.testing.expectEqual(pdf_raster_policy.dpi, request.dpi);
try std.testing.expectEqual(pdf_raster_policy.max_dimension, request.max_dimension);
@@ -651,7 +823,7 @@ test "MuPDF pane renders, navigates, searches, and round-trips its page" {
// SDL's raw dy path retains fractions in the placement itself; it does
// not leave native pixels fixed while only the underlying cells slide.
- p.update(.{ .pdf_scroll = .{ .pane = 0, .delta_pixels = 0.25 } });
+ p.update(.{ .pdf_scroll = .{ .pane = 0, .delta_pixels = 0.25, .glide = false } });
try std.testing.expectEqual(@as(f64, 0.25), pane.pdf.?.document_scroll_y);
_ = frame.reset(.retain_capacity);
const fractional = try p.render(frame.allocator());
@@ -690,8 +862,8 @@ test "MuPDF pane renders, navigates, searches, and round-trips its page" {
p.update(.{ .key = .{ .cp = '4' } });
p.update(.{ .key = .{ .cp = 'g' } });
p.update(.{ .key = .{ .cp = '?' } });
- try std.testing.expectEqual(.none, pane.normal.prefix);
- try std.testing.expectEqual(@as(u32, 0), pane.normal.count);
+ try std.testing.expectEqual(.none, pane.body.normal.prefix);
+ try std.testing.expectEqual(@as(u32, 0), pane.body.normal.count);
p.update(.{ .key = .{ .cp = 'j' } });
try std.testing.expectEqual(row_scroll, pane.pdf.?.document_scroll_y);
@@ -769,7 +941,7 @@ test "MuPDF pane renders, navigates, searches, and round-trips its page" {
page0_revision,
panes.Pdf.rasterForPage(&pane.pdf.?, 0).?.revision,
);
- try std.testing.expect(panes.Pdf.scrollPane(p, pane, 1));
+ try std.testing.expect(panes.Pdf.scrollPane(p, pane, 1, false));
try std.testing.expectEqual(@as(usize, 1), pane.pdf.?.page);
try std.testing.expectEqual(
page1_revision,
@@ -833,7 +1005,7 @@ test "MuPDF pane renders, navigates, searches, and round-trips its page" {
revision_before_toggle,
panes.Pdf.rasterForPage(&pane.pdf.?, pane.pdf.?.page).?.revision,
);
- const height_tag = try pardes.test_api.tagText(p, p.scratch.allocator(), pane);
+ const height_tag = try pardes.tagline.tagText(p, p.scratch.allocator(), pane);
const expected_height_tag = try std.fmt.allocPrint(p.scratch.allocator(), "{s} [{d}/{d}]{s}", .{ pane.pdf.?.path, pane.pdf.?.page + 1, pane.pdf.?.page_count, pane_tail });
try std.testing.expectEqualStrings(expected_height_tag, height_tag);
for (p.panes) |slot| {
@@ -859,7 +1031,8 @@ test "MuPDF pane renders, navigates, searches, and round-trips its page" {
p.update(.{ .key = .{ .cp = '2' } });
p.update(.{ .key = .{ .cp = 'l' } });
try std.testing.expect(pane.pdf.?.pan_x > 0);
- p.update(.{ .key = .{ .cp = '$' } });
+ p.update(.{ .key = .{ .cp = 'g' } });
+ p.update(.{ .key = .{ .cp = 'l' } });
try std.testing.expectEqual(std.math.maxInt(u16), pane.pdf.?.pan_x);
p.update(.{ .key = .{ .cp = '2' } });
p.update(.{ .key = .{ .cp = 'h' } });
@@ -881,7 +1054,7 @@ test "MuPDF pane renders, navigates, searches, and round-trips its page" {
try std.testing.expect(pane.pdf.?.document_scroll_y > before_height_scroll);
const revision_before_search = active_raster.revision;
- try p.runSearch(0, "Pardes", .text, .top);
+ _ = try pardes.look.runSearch(p, 0, "Pardes", .top, true);
try std.testing.expectEqualStrings("Pardes", pane.pdf.?.search_query);
try std.testing.expectEqual(revision_before_search, active_raster.revision);
const results_id = pane.search_pane orelse return error.MissingPdfSearchResults;
@@ -893,9 +1066,9 @@ test "MuPDF pane renders, navigates, searches, and round-trips its page" {
p.update(.{ .key = .{ .cp = 'n' } });
try std.testing.expectEqual(results_id, p.active);
const results_pane = p.panes[results_id].?;
- try std.testing.expect(results_pane.vsel.active and results_pane.vsel.explicit);
- try std.testing.expectEqual(@as(i32, 0), results_pane.cur_row);
- try std.testing.expectEqual(@as(i32, 0), results_pane.cur_col);
+ try std.testing.expect(results_pane.body.vsel.active and results_pane.body.vsel.explicit);
+ try std.testing.expectEqual(@as(i32, 0), results_pane.body.cur_row);
+ try std.testing.expectEqual(@as(i32, 0), results_pane.body.cur_col);
p.update(.{ .key = .{ .cp = Key.enter } });
try std.testing.expectEqual(@as(usize, 0), p.active);
try std.testing.expectEqualStrings("Pardes", pane.pdf.?.search_query);
@@ -911,28 +1084,26 @@ test "MuPDF pane renders, navigates, searches, and round-trips its page" {
panes.Pdf.setPage(p, pane, next_page);
try std.testing.expectEqualStrings(long_query, pane.pdf.?.search_query);
- // PDF dumps intentionally retain the existing image-compatible schema:
- // page/path and the exact editable tail are restored, while pane-local
- // tint starts from the fresh-PDF default rather than being serialized.
+ // PDF dumps keep the image-compatible schema: page/path, the exact
+ // editable tail, and the pane's fit and tint (pdf_fit, pdf_tint).
panes.Pdf.toggleTint(pane);
try std.testing.expectEqual(PdfTintMode.full, pane.pdf.?.tint);
pane.pdf.?.fit = .height;
const custom_tail = " Keep Del";
- @memcpy(pane.tag_tail[0..custom_tail.len], custom_tail);
- pane.tag_tail_len = custom_tail.len;
- pane.tag_init = true;
- try p.dumpState();
- const restored = try Pardes.initFromDump(gpa, .{}, p.dump_out.?);
+ if (pane.tag.own) |own| p.gpa.free(own);
+ pane.tag.own = try p.gpa.dupe(u8, custom_tail);
+ try pardes.dump.dumpState(p);
+ const restored = try pardes.dump.initFromDump(gpa, .{}, p.dump_out.?);
defer restored.deinit();
try std.testing.expect(hasPdf(restored.panes[0].?));
try std.testing.expectEqual(pane.pdf.?.page, restored.panes[0].?.pdf.?.page);
- try std.testing.expectEqual(PdfFitMode.width, restored.panes[0].?.pdf.?.fit);
- try std.testing.expectEqual(PdfTintMode.filtered, restored.panes[0].?.pdf.?.tint);
+ try std.testing.expectEqual(PdfFitMode.height, restored.panes[0].?.pdf.?.fit);
+ try std.testing.expectEqual(PdfTintMode.full, restored.panes[0].?.pdf.?.tint);
const restored_pane = restored.panes[0].?;
- try std.testing.expect(restored_pane.tag_init);
+ try std.testing.expect(restored_pane.tag.own != null);
try std.testing.expectEqualStrings(
custom_tail,
- restored_pane.tag_tail[0..restored_pane.tag_tail_len],
+ restored_pane.tag.own.?,
);
}
@@ -972,7 +1143,7 @@ test "a fling's banded pages show the reader exactly what whole pages would" {
// is counted the way a wheel batch counts it.
pv.document_scroll_y = 0;
pv.scroll_travel = 0;
- try std.testing.expect(panes.Pdf.scrollPane(p, pane, landing));
+ try std.testing.expect(panes.Pdf.scrollPane(p, pane, landing, false));
_ = frame.reset(.retain_capacity);
const flung = try p.render(frame.allocator());
try std.testing.expect(flung.nimages >= 2);
@@ -1017,6 +1188,171 @@ test "a fling's banded pages show the reader exactly what whole pages would" {
}
}
+/// MuPDF clips the edges of a path to the pixmap, and an edge that crosses a
+/// band's clip is stepped from a different start: along its whole length in
+/// the band, its antialiased pixels can be a level or two off the whole
+/// page's. Never more.
+const band_tolerance: u8 = 4;
+
+fn expectNearRows(expected: []const u8, got: []const u8) !void {
+ try std.testing.expectEqual(expected.len, got.len);
+ var worst: u8 = 0;
+ for (expected, got) |a, b| worst = @max(worst, if (a > b) a - b else b - a);
+ if (worst > band_tolerance) {
+ std.debug.print("band rows are {d} levels off the whole page's\n", .{worst});
+ return error.TestExpectedEqual;
+ }
+}
+
+test "a tall page is drawn at the display's resolution, in bands that are the whole page's rows" {
+ if (!pdf_enabled or platform == .web) return;
+
+ // The page is fifteen A4 heights tall. Squeezed whole into the raster
+ // budget it was a third as wide as the pane and blown up, blurred; it is
+ // drawn instead at the pane's own resolution, a band around the screen at
+ // a time, and every band row must be the row a whole-page render makes
+ // (to `band_tolerance`), and the same row however it was scrolled to.
+ const gpa = std.testing.allocator;
+ var tmp = std.testing.tmpDir(.{});
+ defer tmp.cleanup();
+ const bytes = try pdf_impl.makeTallTestPdf(gpa);
+ defer gpa.free(bytes);
+ try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "tall.pdf", .data = bytes });
+ var dir_buf: [4096]u8 = undefined;
+ const dir_len = try tmp.dir.realPath(std.testing.io, &dir_buf);
+ const path = try std.fmt.allocPrint(gpa, "{s}/tall.pdf", .{dir_buf[0..dir_len]});
+ defer gpa.free(path);
+ const p = try Pardes.init(gpa, .{ .file = path, .cols = 120, .rows = 40 });
+ defer p.deinit();
+ p.native_images = true;
+ const pane = p.panes[0].?;
+ const pv = &pane.pdf.?;
+ var frame = std.heap.ArenaAllocator.init(gpa);
+ defer frame.deinit();
+ _ = try p.render(frame.allocator());
+
+ const viewport = panes.Pdf.paneViewport(p, pane) orelse return error.MissingPdfViewport;
+ const request = panes.Pdf.renderRequest(viewport, pdf_raster_policy, pv.fit);
+ const shape = try pv.document.measureRenderAt(0, request);
+ if (pdf_raster_policy.match_viewport) {
+ // The rendered scale IS the screen's: one raster pixel per pixel of
+ // the pane's width, so nothing is scaled up.
+ try std.testing.expectEqual(@as(usize, viewport.pixel_w), shape.width);
+ } else {
+ // Kitty's policy is a dpi, kept low for the wire; the tall page gets
+ // it as every other page does, not a quarter of it.
+ try std.testing.expectEqual(
+ @as(usize, @intFromFloat(pdf_impl.tall_test_page.width)) * pdf_raster_policy.dpi / 72,
+ shape.width,
+ );
+ }
+ try std.testing.expect(panes.Pdf.isBanded(shape));
+
+ // The reference: the whole page in one render, before highlights and
+ // tint, and tinted as the pane tints.
+ const plain = try gpa.alloc(u8, shape.len);
+ defer gpa.free(plain);
+ try pv.document.renderIntoAtWithPaper(0, request, shape, shape.wholePage(), &.{}, plain, false);
+ const whole = try gpa.dupe(u8, plain);
+ defer gpa.free(whole);
+ try pdf_impl.tintRgba(whole, pv.tint, panes.Pdf.tintColors(p));
+
+ const max_scroll = @as(f64, @floatFromInt(pv.document_height - viewport.pixel_h));
+ var middle: []u8 = &.{};
+ defer gpa.free(middle);
+ var middle_y: usize = 0;
+ for ([_]f64{ 0, @round(max_scroll / 2), max_scroll }, 0..) |at, step| {
+ _ = panes.Pdf.scrollPane(p, pane, at - pv.document_scroll_y, false);
+ pv.scroll_travel = 0; // read, not flung
+ _ = frame.reset(.retain_capacity);
+ const surface = try p.render(frame.allocator());
+ try std.testing.expectEqual(@as(usize, 1), surface.nimages);
+ const place = surface.images[0].?;
+ const geometry = place.native.geometry orelse return error.MissingPdfGeometry;
+ const raster = panes.Pdf.rasterForPage(pv, 0) orelse return error.MissingPdfRaster;
+ // Bounded: a band, never the page, and within one buffer's budget.
+ try std.testing.expectEqual(shape.width, place.iw);
+ try std.testing.expect(raster.band_h < raster.ih);
+ try std.testing.expect(place.rgba.len <= pdf_impl.max_owned_raster_bytes);
+ // Prefetched: a screenful beyond what is shown, both ways, where the
+ // page goes on.
+ const seen_top = raster.band_y + geometry.src.y;
+ const seen_end = seen_top + geometry.src.h;
+ try std.testing.expect(raster.band_y <= seen_top -| geometry.src.h);
+ try std.testing.expect(raster.band_y + raster.band_h >= @min(raster.ih, seen_end + geometry.src.h));
+ // ...and every row of the band is the whole page's row.
+ const stride = shape.stride;
+ try expectNearRows(whole[raster.band_y * stride ..][0 .. raster.band_h * stride], place.rgba);
+ if (step == 1) {
+ middle = try gpa.dupe(u8, place.rgba);
+ middle_y = raster.band_y;
+ }
+ }
+
+ // Straight back to the middle from the foot: the rows rendered afresh
+ // are the very rows rendered on the way down, so no seam moves with the
+ // path a reader took.
+ _ = panes.Pdf.scrollPane(p, pane, @round(max_scroll / 2) - pv.document_scroll_y, false);
+ pv.scroll_travel = 0;
+ _ = frame.reset(.retain_capacity);
+ const again = (try p.render(frame.allocator())).images[0].?;
+ const again_y = panes.Pdf.rasterForPage(pv, 0).?.band_y;
+ const stride = shape.stride;
+ const common_top = @max(middle_y, again_y);
+ const common_end = @min(middle_y + middle.len / stride, again_y + again.rgba.len / stride);
+ try std.testing.expect(common_end > common_top);
+ try std.testing.expectEqualSlices(
+ u8,
+ middle[(common_top - middle_y) * stride .. (common_end - middle_y) * stride],
+ again.rgba[(common_top - again_y) * stride .. (common_end - again_y) * stride],
+ );
+ _ = panes.Pdf.scrollPane(p, pane, max_scroll - pv.document_scroll_y, false);
+ pv.scroll_travel = 0;
+ _ = frame.reset(.retain_capacity);
+ const foot = try gpa.dupe(u8, (try p.render(frame.allocator())).images[0].?.rgba);
+ defer gpa.free(foot);
+
+ // At the foot of the page, a search hit: its highlight lands on exactly
+ // the rows and pixels it would on the whole page, and a pointer over the
+ // word finds the word.
+ try pv.setSearchQuery(gpa, "bottommost");
+ _ = frame.reset(.retain_capacity);
+ const lit = try p.render(frame.allocator());
+ const place = lit.images[0].?;
+ const raster = panes.Pdf.rasterForPage(pv, 0) orelse return error.MissingPdfRaster;
+ const highlights = try panes.Pdf.buildHighlights(pv, frame.allocator(), panes.Pdf.highlightInput(p, 0, pane));
+ const marks = highlights.forPage(0);
+ try std.testing.expect(marks.len > 0);
+ const rows = try pv.document.highlightRows(0, request, marks);
+ try std.testing.expect(rows.start >= raster.band_y and rows.end <= raster.band_y + raster.band_h);
+ // Exactly the highlight's rows changed, and nothing else...
+ try std.testing.expectEqual(foot.len, place.rgba.len);
+ const from = (rows.start - raster.band_y) * stride;
+ const to = (rows.end - raster.band_y) * stride;
+ try std.testing.expectEqualSlices(u8, foot[0..from], place.rgba[0..from]);
+ try std.testing.expectEqualSlices(u8, foot[to..], place.rgba[to..]);
+ try std.testing.expect(!std.mem.eql(u8, foot[from..to], place.rgba[from..to]));
+ // ...to what the whole page painted with them is.
+ const expected = try gpa.dupe(u8, plain[rows.start * stride .. rows.end * stride]);
+ defer gpa.free(expected);
+ try pv.document.paintHighlightsAt(0, request, shape, shape.band(rows.start, rows.end - rows.start), marks, expected);
+ try pdf_impl.tintRgba(expected, pv.tint, panes.Pdf.tintColors(p));
+ try expectNearRows(expected, place.rgba[from..to]);
+
+ const quad = pv.search_results.?.quads[0].quad;
+ const left = @min(quad.ul.x, quad.ll.x);
+ const right = @max(quad.ur.x, quad.lr.x);
+ const top = @min(quad.ul.y, quad.ur.y);
+ const bottom = @max(quad.ll.y, quad.lr.y);
+ const rect = p.rects[0];
+ var inside: usize = 0;
+ for (rect.y..rect.y + rect.h) |row| for (rect.x..rect.x + rect.w) |col| {
+ const point = panes.Pdf.panePointAtPage(p, pane, 0, @intCast(col), @intCast(row), false) orelse continue;
+ if (point.x >= left and point.x <= right and point.y >= top and point.y <= bottom) inside += 1;
+ };
+ try std.testing.expect(inside > 0);
+}
+
/// The pixels a backend samples out of one placement: the source rectangle,
/// row by row, at the texture's own stride. Test-only, and the one operation
/// that makes "same picture" mean something when the textures differ in shape.
@@ -1097,25 +1433,25 @@ test "PDF normal adapter consumes unsupported actions and navigates page fallbac
p.update(.{ .key = .{ .cp = '|' } });
try std.testing.expectEqual(page_before_noop, pv.page);
try std.testing.expectEqual(revision_before_noop, pv.next_raster_revision);
- try std.testing.expectEqual(@as(u32, 0), pane.normal.count);
- try std.testing.expectEqual(.none, pane.normal.prefix);
- try std.testing.expect(!pane.vsel.active and !pane.msel.active and pane.nsel == 0);
- try std.testing.expect(!pane.tag_edit);
+ try std.testing.expectEqual(@as(u32, 0), pane.body.normal.count);
+ try std.testing.expectEqual(.none, pane.body.normal.prefix);
+ try std.testing.expect(!pane.body.vsel.active and !pane.body.msel.active and pane.body.nsel == 0);
+ try std.testing.expect(pane.focus == .body);
// Cross-pane BODY-NORMAL actions keep their established shared paths.
p.update(.{ .key = .{ .cp = ':' } });
- try std.testing.expect(pane.tag_edit);
- try std.testing.expectEqual(Mode.normal, pane.mode);
- p.update(.{ .key = .{ .cp = Key.escape } });
- try std.testing.expect(!pane.tag_edit);
+ try std.testing.expect(pane.focus == .tag);
+ try std.testing.expectEqual(Mode.normal, pane.body.mode);
+ p.update(.{ .key = .{ .cp = ':' } });
+ try std.testing.expect(pane.focus == .body);
p.update(.{ .key = .{ .cp = ' ' } });
try std.testing.expect(p.leader_on);
p.update(.{ .key = .{ .cp = '!' } });
try std.testing.expect(!p.leader_on);
p.update(.{ .key = .{ .cp = '/' } });
- try std.testing.expect(pane.tag_edit);
+ try std.testing.expect(pane.prompt == .search and pane.focus == .body);
p.update(.{ .key = .{ .cp = Key.escape } });
- try std.testing.expect(!pane.tag_edit);
+ try std.testing.expect(pane.prompt == .none);
}
test "Escape cancels PDF chrome in place and Shift-Escape leaves the pane" {
@@ -1137,9 +1473,11 @@ test "Escape cancels PDF chrome in place and Shift-Escape leaves the pane" {
panes.Pdf.openSections(p, 0);
p.update(.{ .key = .{ .cp = 'w', .ctrl = true } });
p.update(.{ .key = .{ .cp = 'j' } });
+ p.update(.{ .key = .{ .cp = Key.enter } });
try std.testing.expectEqual(@as(usize, 1), p.active);
p.update(.{ .key = .{ .cp = 'w', .ctrl = true } });
p.update(.{ .key = .{ .cp = 'k' } });
+ p.update(.{ .key = .{ .cp = Key.enter } });
try std.testing.expectEqual(@as(usize, 0), p.active);
// Everything a reader can see over the page: a search overlay and a live
@@ -1167,8 +1505,8 @@ test "Escape cancels PDF chrome in place and Shift-Escape leaves the pane" {
try std.testing.expect(!pv.highlights_dirty and !pv.search_reveal_pending);
try std.testing.expectEqual(page_before, pv.page);
try std.testing.expectEqual(scroll_before, pv.document_scroll_y);
- try std.testing.expectEqual(@as(u32, 0), pane.normal.count);
- try std.testing.expectEqual(.none, pane.normal.prefix);
+ try std.testing.expectEqual(@as(u32, 0), pane.body.normal.count);
+ try std.testing.expectEqual(.none, pane.body.normal.prefix);
// A second Escape on a bare document is inert rather than an exit.
p.update(.{ .key = .{ .cp = Key.escape } });
try std.testing.expectEqual(@as(usize, 0), p.active);
@@ -1204,7 +1542,7 @@ test "PDF continuous strip renders every intersecting short page" {
const viewport = panes.Pdf.ensurePaneLayout(p, pane).?;
const visible = panes.Pdf.visiblePages(pv, viewport);
try std.testing.expectEqual(pv.page_count, visible.len);
- const request = panes.Pdf.renderRequest(viewport, pdf_raster_policy);
+ const request = panes.Pdf.renderRequest(viewport, pdf_raster_policy, pv.fit);
try std.testing.expect(pv.page_count <= pv.rasters.len);
for (0..pv.page_count) |page| {
const rgba = try gpa.alloc(u8, @as(usize, viewport.pixel_w) * 4);
@@ -1251,9 +1589,9 @@ test "PdfTint cycles pane-local state without adding tag clutter" {
return error.MissingPdfTintBuiltin;
try std.testing.expectEqual(PdfTintMode.filtered, pv.tint);
- const initial_tag = try pardes.test_api.tagText(p, p.scratch.allocator(), pane);
+ const initial_tag = try pardes.tagline.tagText(p, p.scratch.allocator(), pane);
try std.testing.expect(std.mem.startsWith(u8, initial_tag, pv.path));
- try std.testing.expect(std.mem.endsWith(u8, initial_tag, " PdfSections PdfTint Collapse"));
+ try std.testing.expect(std.mem.endsWith(u8, initial_tag, " PdfSections PdfTint PdfFit Collapse Del"));
try std.testing.expect(std.mem.indexOf(u8, initial_tag, "filtered") == null);
try std.testing.expect(pardes.test_api.runBuiltin(
@@ -1264,7 +1602,7 @@ test "PdfTint cycles pane-local state without adding tag clutter" {
null,
));
try std.testing.expectEqual(PdfTintMode.full, pv.tint);
- const full_tag = try pardes.test_api.tagText(p, p.scratch.allocator(), pane);
+ const full_tag = try pardes.tagline.tagText(p, p.scratch.allocator(), pane);
try std.testing.expectEqualStrings(initial_tag, full_tag);
try std.testing.expect(std.mem.indexOf(u8, full_tag, "full") == null);
@@ -1273,7 +1611,7 @@ test "PdfTint cycles pane-local state without adding tag clutter" {
// here rather than inherited from init.
_ = try p.newShell(1, "");
_ = layout.splitColumn(p, 0, 1, false);
- pardes.test_api.sync(p); // rects for the new column, exactly as the two-pane boot did
+ p.sync(); // rects for the new column, exactly as the two-pane boot did
try std.testing.expect(!hasPdf(p.panes[1].?));
try std.testing.expect(pardes.test_api.runBuiltin(
p,
@@ -1292,7 +1630,7 @@ test "PdfTint cycles pane-local state without adding tag clutter" {
null,
));
try std.testing.expectEqual(PdfTintMode.disabled, pv.tint);
- const disabled_tag = try pardes.test_api.tagText(p, p.scratch.allocator(), pane);
+ const disabled_tag = try pardes.tagline.tagText(p, p.scratch.allocator(), pane);
try std.testing.expectEqualStrings(initial_tag, disabled_tag);
try std.testing.expect(std.mem.indexOf(u8, disabled_tag, "disabled") == null);
try std.testing.expect(pardes.test_api.runBuiltin(
@@ -1310,7 +1648,7 @@ test "PdfTint cycles pane-local state without adding tag clutter" {
const dark_index = for (themes, 0..) |th, i| {
if (std.mem.eql(u8, th.name, "dark")) break i;
} else return error.MissingDarkTheme;
- p.setThemeIndex(dark_index);
+ pardes.colors.setThemeIndex(p, dark_index);
const colors = panes.Pdf.tintColors(p);
try std.testing.expectEqual(p.theme().tag_bg, colors.background);
try std.testing.expectEqual(p.theme().tag_fg, colors.foreground);
@@ -1326,6 +1664,7 @@ test "PDF tint and tinted theme changes rebuild every visible raster only" {
.rows = 24,
});
defer p.deinit();
+ p.settings.motion = .off; // placements, not the glide (anim 11)
const pane = p.panes[0].?;
const pv = &pane.pdf.?;
p.native_images = true;
@@ -1386,7 +1725,7 @@ test "PDF tint and tinted theme changes rebuild every visible raster only" {
const dark_index = for (themes, 0..) |th, i| {
if (std.mem.eql(u8, th.name, "dark")) break i;
} else return error.MissingDarkTheme;
- p.setThemeIndex(dark_index);
+ pardes.colors.setThemeIndex(p, dark_index);
for (pv.rasters[0..pv.rasters_len]) |raster| try std.testing.expect(!raster.tried);
_ = frame.reset(.retain_capacity);
const themed_surface = try p.render(frame.allocator());
@@ -1400,7 +1739,7 @@ test "PDF tint and tinted theme changes rebuild every visible raster only" {
// Chrome animation reads a separate palette. Its ticks must never disturb
// the target-theme tint key or ask MuPDF for the same pixels again.
try std.testing.expect(p.animationActive());
- for (0..layout.Animation.transition_steps) |_| {
+ for (0..animation.transition_steps) |_| {
p.update(.tick);
_ = frame.reset(.retain_capacity);
const tick_surface = try p.render(frame.allocator());
@@ -1440,7 +1779,7 @@ test "PDF tint and tinted theme changes rebuild every visible raster only" {
if (std.mem.eql(u8, th.name, "acme")) break i;
} else return error.MissingAcmeTheme;
for (pv.rasters[0..pv.rasters_len]) |raster| try std.testing.expect(raster.tried);
- p.setThemeIndex(acme_index);
+ pardes.colors.setThemeIndex(p, acme_index);
// Disabled keys ignore theme colors, so neither explicit invalidation nor
// the per-raster key comparison asks MuPDF for replacement pixels.
for (pv.rasters[0..pv.rasters_len]) |raster| try std.testing.expect(raster.tried);
@@ -1515,7 +1854,7 @@ test "PDF pane geometry change preserves its page-relative position" {
// so the divider drag below needs a second column to take the width from.
_ = try p.newShell(1, "");
_ = layout.splitColumn(p, 0, 1, false);
- pardes.test_api.sync(p); // rects for the new column, exactly as the two-pane boot did
+ p.sync(); // rects for the new column, exactly as the two-pane boot did
const pane = p.panes[0].?;
const pv = &pane.pdf.?;
p.native_images = true;
@@ -1578,7 +1917,7 @@ test "PDF n/N addresses and reveals distinct MuPDF hits on one page" {
p.locations_config.context = 2;
p.locations_config.tscontext = true;
- try p.runSearch(0, "Pardes", .text, .top);
+ _ = try pardes.look.runSearch(p, 0, "Pardes", .top, true);
const results_id = pane.search_pane orelse return error.MissingPdfSearchResults;
const results = p.panes[results_id].?.file.?;
var found: [3]bool = @splat(false);
@@ -1612,7 +1951,7 @@ test "PDF n/N addresses and reveals distinct MuPDF hits on one page" {
var frame = std.heap.ArenaAllocator.init(gpa);
defer frame.deinit();
- try std.testing.expect(pardes.test_api.searchStep(p, 0, 1));
+ try std.testing.expect(pardes.look.searchStep(p, 0, 1));
try std.testing.expectEqual(@as(usize, 0), pv.search_hit);
try std.testing.expectEqual(@as(usize, 0), pane.search_row.?);
const first = try p.render(frame.allocator());
@@ -1631,14 +1970,14 @@ test "PDF n/N addresses and reveals distinct MuPDF hits on one page" {
try std.testing.expect(first_y >= first_geometry.src.y and
first_y < first_geometry.src.y + first_geometry.src.h);
- try std.testing.expect(pardes.test_api.searchStep(p, 0, 1));
+ try std.testing.expect(pardes.look.searchStep(p, 0, 1));
try std.testing.expectEqual(@as(usize, 1), pv.search_hit);
try std.testing.expectEqual(@as(usize, 2), pane.search_row.?);
_ = frame.reset(.retain_capacity);
const second = try p.render(frame.allocator());
try std.testing.expectEqual(revision, second.images[0].?.native.revision);
- try std.testing.expect(pardes.test_api.searchStep(p, 0, 1));
+ try std.testing.expect(pardes.look.searchStep(p, 0, 1));
try std.testing.expectEqual(@as(usize, 2), pv.search_hit);
try std.testing.expectEqual(@as(usize, 4), pane.search_row.?);
_ = frame.reset(.retain_capacity);
@@ -1747,15 +2086,15 @@ test "PDF native mouse selection, Look, and highlights share page geometry" {
@as(i32, r.y + r.h - 1),
));
if (!panes.Pdf.beginSelection(p, pane, col, row)) continue;
- if (std.ascii.indexOfIgnoreCase(pv.selection_text, "Pardes") != null) {
+ if (std.ascii.findIgnoreCase(pv.selection_text, "Pardes") != null) {
selected_col = col;
selected_row = row;
break :find_word;
}
};
const word_col = selected_col orelse return error.PdfMouseMappingMissedWord;
- try std.testing.expect(std.ascii.indexOfIgnoreCase(
- pardes.test_api.heldSelection(p, 0).?,
+ try std.testing.expect(std.ascii.findIgnoreCase(
+ pardes.exec.heldSelection(p, 0).?,
"Pardes",
) != null);
@@ -1781,8 +2120,8 @@ test "PDF native mouse selection, Look, and highlights share page geometry" {
const page_before = pv.page;
const scroll_before = pv.document_scroll_y;
const sels_before = pane.sel;
- const cursor_before = .{ pane.cur_row, pane.cur_col };
- const modal_before = .{ pane.msel, pane.vsel, pane.nsel };
+ const cursor_before = .{ pane.body.cur_row, pane.body.cur_col };
+ const modal_before = .{ pane.body.msel, pane.body.vsel, pane.body.nsel };
const selection_before = pv.selection orelse return error.MissingPdfSelection;
const selection_quads_before = try gpa.dupe(pdf_impl.Quad, selection_before.quads);
defer gpa.free(selection_quads_before);
@@ -1809,7 +2148,7 @@ test "PDF native mouse selection, Look, and highlights share page geometry" {
const hover = p.pdf_hover_preview orelse return error.MissingPdfHoverPreview;
try std.testing.expectEqual(@as(usize, 0), hover.probe.page);
try std.testing.expect(hover.probe.quads.len > 0);
- try std.testing.expect(std.ascii.indexOfIgnoreCase(hover.probe.text, "Pardes") != null);
+ try std.testing.expect(std.ascii.findIgnoreCase(hover.probe.text, "Pardes") != null);
try std.testing.expect(p.look_hover_preview == null);
try std.testing.expect(p.look_hover_wait == null);
@@ -1836,8 +2175,8 @@ test "PDF native mouse selection, Look, and highlights share page geometry" {
try std.testing.expectEqual(page_before, pv.page);
try std.testing.expectEqual(scroll_before, pv.document_scroll_y);
try std.testing.expect(std.meta.eql(sels_before, pane.sel));
- try std.testing.expectEqual(cursor_before, .{ pane.cur_row, pane.cur_col });
- try std.testing.expect(std.meta.eql(modal_before, .{ pane.msel, pane.vsel, pane.nsel }));
+ try std.testing.expectEqual(cursor_before, .{ pane.body.cur_row, pane.body.cur_col });
+ try std.testing.expect(std.meta.eql(modal_before, .{ pane.body.msel, pane.body.vsel, pane.body.nsel }));
const selection_after = pv.selection orelse return error.HoverDroppedPdfSelection;
try std.testing.expectEqualSlices(pdf_impl.Quad, selection_quads_before, selection_after.quads);
try std.testing.expectEqualStrings(selection_text_before, pv.selection_text);
@@ -1855,7 +2194,7 @@ test "PDF native mouse selection, Look, and highlights share page geometry" {
// search highlights without carrying an old selection into the result.
p.update(.{ .mouse = .{ .button = config.look_button, .kind = .press, .col = word_col, .row = selected_row } });
p.update(.{ .mouse = .{ .button = config.look_button, .kind = .release, .col = word_col, .row = selected_row } });
- try std.testing.expect(std.ascii.indexOfIgnoreCase(pv.search_query, "Pardes") != null);
+ try std.testing.expect(std.ascii.findIgnoreCase(pv.search_query, "Pardes") != null);
pv.resolveSearch(p.pdf_gpa);
const highlights = (try panes.Pdf.buildHighlights(
pv,
@@ -1938,7 +2277,7 @@ test "PDF native mouse selection, Look, and highlights share page geometry" {
try std.testing.expect(panes.Pdf.beginSelection(p, pane, word_col, selected_row));
p.update(.{ .key = .{ .cp = 'v' } });
try std.testing.expect(pv.selection != null);
- try std.testing.expect(!pane.vsel.active);
+ try std.testing.expect(!pane.body.vsel.active);
p.update(.{ .mouse = .{ .button = config.select_button, .kind = .press, .col = word_col, .row = selected_row } });
p.update(.{ .mouse = .{ .button = config.select_button, .kind = .release, .col = word_col, .row = selected_row } });
try std.testing.expect(pv.selection == null);
@@ -2031,7 +2370,7 @@ test "Esc back into a PDF keeps the offset within its page" {
const doc = p.active;
const dp = p.panes[doc].?;
try std.testing.expect(dp.pdf != null);
- pardes.test_api.sync(p);
+ p.sync();
// Read a little way DOWN the page you are on, then step away.
const pv = &dp.pdf.?;
@@ -2039,12 +2378,12 @@ test "Esc back into a PDF keeps the offset within its page" {
const mid = pv.document_scroll_y;
pv.scroll_to_page_pending = false;
p.update(.{ .key = .{ .cp = 'n', .alt = true } }); // a shell under the doc
- pardes.test_api.sync(p);
+ p.sync();
const shell = p.active;
try std.testing.expect(shell != doc);
p.update(.{ .key = .{ .cp = Key.escape } }); // Esc: back into the PDF
- pardes.test_api.sync(p);
+ p.sync();
try std.testing.expectEqual(doc, p.active);
// The jumps stack records a PDF as its PAGE, so returning revealed the page
@@ -2082,3 +2421,140 @@ test "PDF Back and Forward clear selections and land on recorded pages" {
try std.testing.expect(state.drag_anchor == null and state.drag_head == null);
}
}
+
+test "a PDF's fit and tint, and Collapse, read in its ctl and come back from a Dump" {
+ if (!pdf_enabled or platform == .web) return;
+ const gpa = std.testing.allocator;
+ var tmp = std.testing.tmpDir(.{});
+ defer tmp.cleanup();
+ const fixture = try pdf_impl.makeOutlineTestPdf(gpa);
+ defer gpa.free(fixture);
+ try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "outline.pdf", .data = fixture });
+ var path_buf: [256]u8 = undefined;
+ const path = try std.fmt.bufPrint(&path_buf, ".zig-cache/tmp/{s}/outline.pdf", .{tmp.sub_path});
+ const p = try Pardes.init(gpa, .{ .file = path, .cols = 80, .rows = 28 });
+ defer p.deinit();
+ const doc = p.panes[0].?;
+ try std.testing.expect(p.executeBuiltinLine(0, "PdfFit height"));
+ try std.testing.expect(p.executeBuiltinLine(0, "PdfTint full"));
+ const ctlfs = pardes.ctlfs;
+ const ctl_node = ctlfs.Node.of(doc.serial, .ctl);
+ const read = p.fsPayload(p.serveFs(.{ .tag = 1, .op = .read, .node = ctl_node, .size = 4096 }));
+ try std.testing.expect(std.mem.endsWith(u8, read, "fit:height tint:full "));
+ try pardes.dump.dumpState(p);
+ const restored = try pardes.dump.restore(p, p.dump_out.?, "/tmp/pardes.dump.zon");
+ defer restored.deinit();
+ const pv = &restored.panes[0].?.pdf.?;
+ try std.testing.expectEqualStrings("height", @tagName(pv.fit));
+ try std.testing.expectEqualStrings("full", @tagName(pv.tint));
+}
+
+/// The jumplist's PDF (pdfrender): the Intel SDM (5363 pages, the author's
+/// stress file) when this machine has it, else the docs' PDF; the same
+/// checks either way.
+fn jumpPdf() []const u8 {
+ const sdm = "/home/goblin/00-projects/kvmctf/harnesses/contained-official/visor-uefi/intel-ia32-manual.pdf";
+ std.Io.Dir.accessAbsolute(std.testing.io, sdm, .{}) catch return "docs/design.pdf";
+ return sdm;
+}
+
+/// Lays the PDF pane out (a frame drawn) and syncs, so the jumplist sees it.
+fn jumpFrame(p: *Pardes) !void {
+ var frame: std.heap.ArenaAllocator = .init(std.testing.allocator);
+ defer frame.deinit();
+ _ = try p.render(frame.allocator());
+ p.sync();
+}
+
+fn stripAtPlace(p: *Pardes, pane: *pardes.Pane, page: usize, fraction: f64) !f64 {
+ const pv = &pane.pdf.?;
+ pv.document_scroll_y = @as(f64, @floatFromInt(pv.page_starts[page])) + fraction * @as(f64, @floatFromInt(pv.page_heights[page]));
+ try jumpFrame(p);
+ return pv.document_scroll_y;
+}
+
+test "a PDF's jumps: Back after a far jump returns to the exact offset, two places on one page are two entries" {
+ if (!pdf_enabled or platform == .web) return error.SkipZigTest;
+ const p = try Pardes.init(std.testing.allocator, .{ .file = jumpPdf(), .cols = 80, .rows = 28 });
+ defer p.deinit();
+ p.native_images = true;
+ p.presentation.enabled = false;
+ const id = p.active;
+ const pane = p.panes[id].?;
+ const pv = &pane.pdf.?;
+ try jumpFrame(p);
+ try std.testing.expect(pv.page_count > 3);
+ // Two places on page 1, more than a body apart: two entries.
+ const before = p.njumps;
+ _ = try stripAtPlace(p, pane, 1, 0.05);
+ const near = try stripAtPlace(p, pane, 1, 0.8);
+ try std.testing.expectEqual(before + 2, p.njumps);
+ try std.testing.expect(p.jumps[p.njumps - 1].pdf);
+ // A far jump (a Look at a page), then Back: the exact offset, not the
+ // page's top, and its page.
+ look.lookAt(p, id, if (pv.page_count > 3000) ":3000" else ":4");
+ try jumpFrame(p);
+ try std.testing.expect(pv.page >= 3);
+ p.jumpBy(-1);
+ try jumpFrame(p);
+ try std.testing.expectEqual(@as(usize, 1), pv.page);
+ try std.testing.expectApproxEqAbs(near, pv.document_scroll_y, 0.5);
+ // A wheel's small steps are the same visit: the entry follows them.
+ const n = p.njumps;
+ for (0..4) |_| {
+ _ = panes.Pdf.scrollPane(p, pane, 30, true);
+ try jumpFrame(p);
+ }
+ try std.testing.expectEqual(n, p.njumps);
+}
+
+test "a PDF's jumps: JumpScope file keeps to the PDF, and a closed PDF reopens at its place" {
+ if (!pdf_enabled or platform == .web) return error.SkipZigTest;
+ // Recent keeps a file by the path it was opened as: a real one here,
+ // as a Look opens one.
+ var cwd_buf: [4096]u8 = undefined;
+ const cwd = cwd_buf[0..try std.Io.Dir.cwd().realPath(std.testing.io, &cwd_buf)];
+ var path_buf: [4200]u8 = undefined;
+ const path = try std.fmt.bufPrint(&path_buf, "{s}/docs/design.pdf", .{cwd});
+ const p = try Pardes.init(std.testing.allocator, .{ .file = path, .cols = 80, .rows = 28 });
+ defer p.deinit();
+ p.native_images = true;
+ p.presentation.enabled = false;
+ try std.testing.expectEqual(config.Runtime.JumpScope.file, p.settings.jump_scope);
+ const doc = p.active;
+ const pane = p.panes[doc].?;
+ try jumpFrame(p);
+ const first = try stripAtPlace(p, pane, 1, 0.3);
+ // A text between, then a far place in the PDF.
+ look.lookAt(p, doc, "../build.zig:10");
+ try jumpFrame(p);
+ try std.testing.expect(p.active != doc);
+ p.active = doc;
+ _ = try stripAtPlace(p, pane, 3, 0.5);
+ // Back from the PDF keeps to it: its own earlier place, not the text.
+ p.jumpBy(-1);
+ try jumpFrame(p);
+ try std.testing.expectEqual(doc, p.active);
+ try std.testing.expectApproxEqAbs(first, pane.pdf.?.document_scroll_y, 0.5);
+ // Closed, its entries stay; Back from the text reopens it at the place.
+ p.jumpBy(1);
+ try jumpFrame(p);
+ try p.removePane(doc, null);
+ try jumpFrame(p);
+ var closed = false;
+ for (p.jumps[0..p.njumps]) |j| closed = closed or (j.serial == 0 and j.pdf);
+ try std.testing.expect(closed);
+ var tries: usize = 0;
+ while (tries < 4) : (tries += 1) {
+ p.jumpBy(-1);
+ try jumpFrame(p);
+ if (p.panes[p.active].?.pdf != null) break;
+ }
+ const reopened = p.panes[p.active].?;
+ try std.testing.expect(reopened.pdf != null);
+ const pv = &reopened.pdf.?;
+ // The newest PDF place before the text: page 4, half way down.
+ try std.testing.expectEqual(@as(usize, 3), pv.page);
+ const want = @as(f64, @floatFromInt(pv.page_starts[3])) + 0.5 * @as(f64, @floatFromInt(pv.page_heights[3]));
+ try std.testing.expectApproxEqAbs(want, pv.document_scroll_y, 0.5);
+}
diff --git a/test/pdf_bench.zig b/test/pdf_bench.zig
index 0f09f72a..9054698b 100644
--- a/test/pdf_bench.zig
+++ b/test/pdf_bench.zig
@@ -9,10 +9,13 @@
//! ReleaseFast. Timed regions include MuPDF rasterization directly into the
//! allocator-owned RGBA output; tint scenarios additionally include the exact
//! in-place PDF transform used by the core. Checksum/free/reporting stay
-//! outside. "cold" means a fresh Document and MuPDF page cache (the OS
-//! filesystem cache is deliberately uncontrolled), while warm scenarios
-//! retain one Document.
+//! outside. "cold" means a fresh Document and MuPDF page cache, opened from
+//! the file's bytes (read once, untimed, as the view reads a file whole),
+//! while warm scenarios retain one Document.
const std = @import("std");
+const bench_util = @import("bench_util.zig");
+const nowNs = bench_util.nowNs;
+const fatal = bench_util.Fatal("pdf-bench").f;
const pdf = @import("mupdf");
pub const std_options: std.Options = .{ .log_level = .err };
@@ -25,6 +28,8 @@ const checksum_seed: u64 = 0x7061_7264_6573_5044;
const Config = struct {
path: []const u8 = "docs/design.pdf",
+ /// the file at `path`, read whole before anything is timed
+ bytes: []const u8 = "",
page: usize = 0,
reps: usize = default_reps,
warmup: usize = default_warmup,
@@ -137,9 +142,11 @@ const Result = struct {
pub fn main(init: std.process.Init) !void {
const args = try init.minimal.args.toSlice(init.arena.allocator());
- const config = parseArgs(args);
+ var config = parseArgs(args);
+ config.bytes = std.Io.Dir.cwd().readFileAlloc(init.io, config.path, gpa, .unlimited) catch |err|
+ fatal("cannot read {s}: {t}", .{ config.path, err });
- var probe = pdf.Document.open(config.path) catch |err|
+ var probe = pdf.Document.openBytes(config.bytes) catch |err|
fatal("cannot open {s}: {t}", .{ config.path, err });
const document_pages = probe.pages;
probe.deinit();
@@ -205,14 +212,6 @@ fn parseArgs(args: []const []const u8) Config {
return config;
}
-fn parsePositive(name: []const u8, text: []const u8, maximum: usize) usize {
- const value = std.fmt.parseUnsigned(usize, text, 10) catch
- fatal("{s} expects a positive integer", .{name});
- if (value == 0 or value > maximum)
- fatal("{s} must be in 1..{d}", .{ name, maximum });
- return value;
-}
-
fn usage() noreturn {
printUsage();
std.process.exit(2);
@@ -226,13 +225,6 @@ fn printUsage() void {
);
}
-fn nowNs() u64 {
- var ts: std.c.timespec = undefined;
- _ = std.c.clock_gettime(.MONOTONIC, &ts);
- return @as(u64, @intCast(ts.sec)) *| 1_000_000_000 +|
- @as(u64, @intCast(ts.nsec));
-}
-
fn measure(
config: Config,
profile_index: usize,
@@ -251,7 +243,7 @@ fn measure(
if (scenario.lifecycle == .cold_document_page) {
for (0..rounds) |round| {
const timed = try timeCold(
- config.path,
+ config.bytes,
config.page,
profile.request,
scenario.decoration,
@@ -265,7 +257,7 @@ fn measure(
}
}
} else {
- var document = try pdf.Document.open(config.path);
+ var document = try pdf.Document.openBytes(config.bytes);
defer document.deinit();
for (0..rounds) |round| {
const timed = switch (scenario.lifecycle) {
@@ -310,14 +302,14 @@ fn measure(
}
fn timeCold(
- path: []const u8,
+ bytes: []const u8,
page: usize,
request: pdf.RenderRequest,
decoration: Decoration,
tint: pdf.TintMode,
) !Timed {
const started = nowNs();
- var document = try pdf.Document.open(path);
+ var document = try pdf.Document.openBytes(bytes);
errdefer document.deinit();
const rendered = try renderPage(&document, page, request, decoration, tint);
const elapsed = @max(@as(u64, 1), nowNs() -| started);
@@ -376,8 +368,8 @@ fn renderPage(
tint: pdf.TintMode,
) !pdf.Render {
const rendered = switch (decoration) {
- .plain => document.renderAt(gpa, page, request),
- .highlighted => document.renderWithHighlightsAt(gpa, page, request, &highlights),
+ .plain => document.render(gpa, page, request, &.{}),
+ .highlighted => document.render(gpa, page, request, &highlights),
};
const fresh = try rendered;
errdefer gpa.free(fresh.rgba);
@@ -617,7 +609,6 @@ fn reportJson(
std.Io.File.stdout().writeStreamingAll(io, out.buffered()) catch {};
}
-fn fatal(comptime format: []const u8, args: anytype) noreturn {
- std.debug.print("pdf-bench: " ++ format ++ "\n", args);
- std.process.exit(1);
+fn parsePositive(name: []const u8, text: []const u8, maximum: usize) usize {
+ return bench_util.parsePositive(fatal, name, text, maximum);
}
diff --git a/test/pdf_pointer_bench.zig b/test/pdf_pointer_bench.zig
new file mode 100644
index 00000000..ae2de2f5
--- /dev/null
+++ b/test/pdf_pointer_bench.zig
@@ -0,0 +1,216 @@
+//! Pointer gestures over a native PDF pane: hovering words (the Look preview
+//! highlight), and dragging a selection to its release.
+//!
+//! zig build pdf-pointer-bench -Doptimize=ReleaseFast -- [--label L] [--reps N] [--path FILE]
+//! [--cell WxH] [--scroll NOTCHES] [--verify 1] [--live 1]
+//!
+//! Every frame is timed the way a shell pump spends it: the event through
+//! `Pardes.update`, one `render()` into a reset arena, the effect drain. A
+//! hover step is its motion frame plus every tick frame the preview animates
+//! before settling, which is when the highlight lands. Stdout is CSV,
+//! `label,scenario:kind,round,ns`, one row per frame and one per step
+//! (`kind=step`), for an external statistics pass.
+//!
+//! `visual` hashes every presented raster in full, with its placement, on the
+//! frame each step settles on. It is the no-regression proof: a change to how highlights
+//! are painted may change what it costs, never one presented pixel.
+const std = @import("std");
+const bench_util = @import("bench_util.zig");
+const nowNs = bench_util.nowNs;
+const mix = bench_util.mix;
+const pardes = @import("pardes");
+const pdf = @import("mupdf");
+
+pub const std_options: std.Options = .{ .log_level = .err };
+
+const gpa = std.heap.smp_allocator;
+const cols: u16 = 120;
+const rows: u16 = 40;
+
+const Config = struct {
+ path: []const u8 = "docs/design.pdf",
+ label: []const u8 = "run",
+ reps: usize = 5,
+ /// Wheel notches before the gestures, off the sparse title page.
+ scroll: usize = 40,
+ /// 8x16 is the Kitty policy's cell; the SDL shell's is closer to 16x35.
+ cell_w: u16 = 8,
+ cell_h: u16 = 16,
+ /// Re-render every raster that claims to hold the current highlights and
+ /// compare it row by row: exactness without a baseline build.
+ verify: bool = false,
+ /// A shell that takes row patches: selections repaint while dragged.
+ live: bool = false,
+};
+
+pub fn main(init: std.process.Init) !void {
+ const args = try init.minimal.args.toSlice(init.arena.allocator());
+ var config: Config = .{};
+ var i: usize = 1;
+ while (i + 1 < args.len) : (i += 2) {
+ const value = args[i + 1];
+ if (std.mem.eql(u8, args[i], "--path")) config.path = value else if (std.mem.eql(u8, args[i], "--label")) config.label = value else if (std.mem.eql(u8, args[i], "--reps")) config.reps = try std.fmt.parseUnsigned(usize, value, 10) else if (std.mem.eql(u8, args[i], "--scroll")) config.scroll = try std.fmt.parseUnsigned(usize, value, 10) else if (std.mem.eql(u8, args[i], "--verify")) config.verify = std.mem.eql(u8, value, "1") else if (std.mem.eql(u8, args[i], "--live")) config.live = std.mem.eql(u8, value, "1") else if (std.mem.eql(u8, args[i], "--cell")) {
+ var it = std.mem.splitScalar(u8, value, 'x');
+ config.cell_w = try std.fmt.parseUnsigned(u16, it.next() orelse "", 10);
+ config.cell_h = try std.fmt.parseUnsigned(u16, it.next() orelse "", 10);
+ } else return error.UnknownOption;
+ }
+ if (i != args.len) return error.MissingValue;
+
+ var visual: ?u64 = null;
+ for (0..config.reps) |round| {
+ const got = try measure(config, round);
+ if (visual) |want| if (want != got) {
+ std.debug.print("pdf-pointer-bench: visual changed between rounds: {x} vs {x}\n", .{ want, got });
+ return error.Unstable;
+ };
+ visual = got;
+ }
+ std.debug.print("pdf-pointer-bench {s}: visual={x:0>16}\n", .{ config.label, visual.? });
+}
+
+const Run = struct {
+ core: *pardes.Pardes,
+ arena: std.heap.ArenaAllocator,
+ config: Config,
+ round: usize,
+ visual: u64 = 0x7061_7264_6573_5050,
+ step_ns: u64 = 0,
+ frames: usize = 0,
+ steps: usize = 0,
+ last: ?*const pardes.Surface = null,
+
+ fn frame(run: *Run, scenario: []const u8, kind: []const u8, event: pardes.Event) !void {
+ const started = nowNs();
+ run.core.update(event);
+ while (run.core.nextEffect()) |_| {}
+ _ = run.arena.reset(.retain_capacity);
+ const surface = try run.core.render(run.arena.allocator());
+ while (run.core.nextEffect()) |_| {}
+ const elapsed = nowNs() - started;
+ run.step_ns += elapsed;
+ run.frames += 1;
+ print("{s},{s}:{s},{d},{d}\n", .{ run.config.label, scenario, kind, run.round, elapsed });
+ run.last = surface;
+ if (run.config.verify) try verify(run.core, run.arena.allocator());
+ }
+
+ /// The step, then the tick frames its animation asks for (a hover's
+ /// preview arrives on one of them), as a pump with nothing else queued.
+ fn step(run: *Run, scenario: []const u8, kind: []const u8, event: pardes.Event) !void {
+ run.step_ns = 0;
+ try run.frame(scenario, kind, event);
+ var ticks: usize = 0;
+ while (run.core.animationActive() and ticks < 32) : (ticks += 1)
+ try run.frame(scenario, "tick", .tick);
+ print("{s},{s}:step,{d},{d}\n", .{ run.config.label, scenario, run.round, run.step_ns });
+ // Only the settled frame is the invariant: how many frames a preview
+ // takes to arrive is a setting (look_preview_delay_frames).
+ run.observe(run.last.?);
+ run.steps += 1;
+ }
+
+ fn observe(run: *Run, surface: *const pardes.Surface) void {
+ for (surface.images[0..surface.nimages]) |maybe| {
+ const place = maybe orelse continue;
+ run.visual = mix(run.visual, [_]u64{ place.pane, place.x, place.y, place.w, place.h, place.native.page, place.iw, place.ih });
+ if (place.native.geometry) |g| run.visual = mix(run.visual, [_]u64{ g.src.x, g.src.y, g.src.w, g.src.h, g.dst.x, g.dst.y, g.dst.w, g.dst.h });
+ run.visual = std.hash.Wyhash.hash(run.visual, place.rgba);
+ }
+ }
+};
+
+var verify_failures: usize = 0;
+
+fn verify(core: *pardes.Pardes, arena: std.mem.Allocator) !void {
+ const Pdf = pardes.panes.Pdf;
+ const pane = core.panes[0] orelse return;
+ const state = &(pane.pdf orelse return);
+ const highlights = try Pdf.buildHighlights(state, arena, Pdf.highlightInput(core, 0, pane));
+ for (state.rasters[0..state.rasters_len]) |*r| {
+ if (!r.valid or r.rgba.len == 0 or r.tint_key == null) continue;
+ const want = highlights.forPage(r.page);
+ if (comptime !@hasField(@TypeOf(r.*), "baked")) return else if (!std.mem.eql(u8, std.mem.sliceAsBytes(want), std.mem.sliceAsBytes(r.baked))) continue;
+ const shape = try state.document.measureRenderAt(r.page, r.request);
+ // The oracle is the WHOLE page: a band's own edge rows can differ.
+ const whole = try arena.alloc(u8, shape.len);
+ try state.document.renderIntoAtWithPaper(r.page, r.request, shape, shape.wholePage(), want, whole, false);
+ try pdf.tintRgba(whole, r.tint_key.?.mode, r.tint_key.?.colors);
+ const fresh = whole[r.band_y * shape.stride ..][0 .. r.band_h * shape.stride];
+ var first: ?usize = null;
+ var last: usize = 0;
+ var count: usize = 0;
+ for (0..r.band_h) |y| {
+ const row = fresh[y * shape.stride ..][0..shape.stride];
+ if (std.mem.eql(u8, row, r.rgba[y * shape.stride ..][0..shape.stride])) continue;
+ if (first == null) first = y;
+ last = y;
+ count += 1;
+ }
+ if (first) |f| {
+ verify_failures += 1;
+ if (verify_failures <= 20) std.debug.print("verify: page {d} rows {d}..{d} ({d} differ), highlights {d}, band {d}+{d}\n", .{ r.page, f + r.band_y, last + r.band_y, count, want.len, r.band_y, r.band_h });
+ }
+ }
+}
+
+fn measure(config: Config, round: usize) !u64 {
+ const core = try pardes.Pardes.init(gpa, .{ .file = config.path, .cols = cols, .rows = rows });
+ defer core.deinit();
+ core.native_images = true;
+ if (comptime @hasField(pardes.Pardes, "native_image_patches")) core.native_image_patches = config.live;
+ var run: Run = .{ .core = core, .arena = .init(gpa), .config = config, .round = round };
+ defer run.arena.deinit();
+ const cell: pardes.CellPixels = .{ .w = config.cell_w, .h = config.cell_h };
+ core.update(.{ .resize = .{ .cols = cols, .rows = rows, .cell_pixels = cell } });
+ _ = try core.render(run.arena.allocator());
+ const pane = core.panes[0] orelse return error.NoPane;
+ if (pane.pdf == null) return error.NotPdf;
+ const rect = core.rects[0];
+ const mid_col = rect.x + rect.w / 2;
+ const mid_row = rect.y + rect.h / 2;
+ for (0..config.scroll) |_| {
+ core.update(.{ .mouse = .{ .button = .wheel_down, .kind = .press, .col = mid_col, .row = mid_row } });
+ _ = run.arena.reset(.retain_capacity);
+ _ = try core.render(run.arena.allocator());
+ while (core.nextEffect()) |_| {}
+ }
+
+ const top = rect.y + 4;
+ const bottom = rect.y + rect.h -| 3;
+ const left = rect.x + 4;
+ const right = rect.x + rect.w -| 4;
+
+ // Hover: walk four rows of the body, a word-ish stride at a time.
+ var row: u16 = top;
+ while (row < bottom) : (row += (bottom - top) / 4) {
+ var col: u16 = left;
+ while (col < right) : (col += 3)
+ try run.step("hover", "motion", .{ .mouse = .{ .button = .none, .kind = .motion, .col = col, .row = row } });
+ }
+ // Leave the page so the last preview is withdrawn like a real exit.
+ try run.step("hover", "leave", .pointer_leave);
+
+ // Select: press, drag across three lines, release; five times down the page.
+ row = top;
+ while (row + 3 < bottom) : (row += (bottom - top) / 5) {
+ try run.step("select", "press", .{ .mouse = .{ .button = .left, .kind = .press, .col = left, .row = row } });
+ var n: u16 = 1;
+ while (n <= 24) : (n += 1) {
+ const col = left + (right - left) * (n % 8) / 8;
+ try run.step("select", "drag", .{ .mouse = .{ .button = .left, .kind = .drag, .col = col, .row = row + n / 8 } });
+ }
+ try run.step("select", "release", .{ .mouse = .{ .button = .left, .kind = .release, .col = right, .row = row + 3 } });
+ }
+ return mix(run.visual, @as(u64, run.steps));
+}
+
+fn print(comptime format: []const u8, args: anytype) void {
+ var buf: [256]u8 = undefined;
+ const line = std.fmt.bufPrint(&buf, format, args) catch return;
+ _ = std.c.write(1, line.ptr, line.len);
+}
+
+comptime {
+ _ = pdf.Document;
+}
diff --git a/test/pdf_scroll_bench.zig b/test/pdf_scroll_bench.zig
index 33dfe70a..0f93068d 100644
--- a/test/pdf_scroll_bench.zig
+++ b/test/pdf_scroll_bench.zig
@@ -4,6 +4,7 @@
//! zig build pdf-scroll-bench -Doptimize=ReleaseFast -- --json
//! zig build pdf-scroll-bench -Doptimize=ReleaseFast -- --warmup 1 --reps 15
//! zig build pdf-scroll-bench -Doptimize=ReleaseFast -- --path other.pdf
+//! zig build pdf-scroll-bench -Doptimize=ReleaseFast -- --cell 16x32 a 2x display
//! zig build pdf-scroll-bench -Doptimize=Debug -- --reps 1 the diagnosis
//! zig build pdf-scroll-bench -Dtracy=~/05-genizah/tracy the zones
//!
@@ -42,6 +43,11 @@
//!
//! Setup, teardown, checksumming, and reporting are outside every timer.
const std = @import("std");
+const bench_util = @import("bench_util.zig");
+const nowNs = bench_util.nowNs;
+const fatal = bench_util.Fatal("pdf-scroll-bench").f;
+const mix = bench_util.mix;
+const drainEffects = bench_util.drainEffects;
const libc = std.c;
const pardes = @import("pardes");
const pdf = @import("mupdf");
@@ -57,7 +63,7 @@ const gpa = std.heap.smp_allocator;
// is what the tty shell actually ships.
const bench_cols: u16 = 120;
const bench_rows: u16 = 40;
-const bench_cell_pixels: pardes.CellPixels = .{ .w = 8, .h = 16 };
+const default_cell_pixels: pardes.CellPixels = .{ .w = 8, .h = 16 };
/// config.wheel_rows is one cell per notch, so a notch is `cell_pixels.h`
/// display pixels. 192 notches is ~3072px — between two and three fit-width
@@ -69,7 +75,7 @@ const slow_ticks_per_frame: usize = 1;
/// The control row is a fixed wall of frames rather than a whole-document
/// traversal: one notch per frame over a real document is tens of thousands of
/// frames, and 240 already crosses several page boundaries at reading speed.
-const slow_frames: usize = 240;
+const default_slow_frames: usize = 240;
/// Guard against a pathological document turning one row into a multi-minute
/// run. Deterministic either way: the frame count is derived from layout.
const max_frames: usize = 2048;
@@ -86,6 +92,10 @@ const Config = struct {
/// Override `max_frames` for one run: a 5000-page manual is 2000 frames of
/// travel per round, which is a fine scoreboard and a poor edit-run loop.
frames: ?usize = null,
+ /// One cell in display pixels: 16x32 is the same window on a 2x display.
+ cell: pardes.CellPixels = default_cell_pixels,
+ /// Frames of the one-notch control row.
+ slow_frames: usize = default_slow_frames,
};
/// The bit-exact description of one scrolling run. `visual` is the invariant;
@@ -115,6 +125,9 @@ const Result = struct {
total_ns: u64,
rasterizations: u64,
rasters_retained: u64,
+ /// Most bytes the pane's rasters held after any frame: every slot's
+ /// pixels, its clean copy, and the spare buffers kept for reuse.
+ peak_raster_bytes: u64,
identity: Identity,
};
@@ -169,13 +182,13 @@ pub fn main(init: std.process.Init) !void {
// One untimed probe boot supplies the strip height every plan is sized
// from, so the frame counts below are a property of the document and the
// viewport rather than of the machine.
- const travel = probeTravel(config.path);
+ const travel = probeTravel(config);
const cap = config.frames orelse max_frames;
const results = [_]Result{
- try measure(config, planFor(.fling_down, travel, cap)),
- try measure(config, planFor(.fling_reverse, travel, cap)),
- try measure(config, planFor(.slow_scroll, travel, cap)),
+ try measure(config, planFor(.fling_down, travel, cap, config.slow_frames)),
+ try measure(config, planFor(.fling_reverse, travel, cap, config.slow_frames)),
+ try measure(config, planFor(.slow_scroll, travel, cap, config.slow_frames)),
};
if (config.json)
@@ -202,23 +215,25 @@ fn parseArgs(args: []const []const u8) Config {
} else if (std.mem.eql(u8, args[i], "--frames") and i + 1 < args.len) {
i += 1;
config.frames = parseCount("--frames", args[i]);
+ } else if (std.mem.eql(u8, args[i], "--slow-frames") and i + 1 < args.len) {
+ i += 1;
+ config.slow_frames = parseCount("--slow-frames", args[i]);
+ } else if (std.mem.eql(u8, args[i], "--cell") and i + 1 < args.len) {
+ i += 1;
+ var it = std.mem.splitScalar(u8, args[i], 'x');
+ const w = parseCount("--cell", it.next() orelse "");
+ const h = parseCount("--cell", it.next() orelse "");
+ if (w > std.math.maxInt(u16) or h > std.math.maxInt(u16)) fatal("--cell {s} is too large", .{args[i]});
+ config.cell = .{ .w = @intCast(w), .h = @intCast(h) };
} else fatal(
"usage: pardes-pdf-scroll-bench [--json] [--warmup N] [--reps N]" ++
- " [--path FILE] [--frames N]",
+ " [--path FILE] [--frames N] [--slow-frames N] [--cell WxH]",
.{},
);
}
return config;
}
-fn parseCount(flag: []const u8, text: []const u8) usize {
- const value = std.fmt.parseUnsigned(usize, text, 10) catch
- fatal("{s} expects a positive integer", .{flag});
- if (value == 0 or value > 10_000)
- fatal("{s} must be in 1..10000", .{flag});
- return value;
-}
-
const Travel = struct {
/// Scrollable display pixels: the whole strip minus one screenful.
max_scroll: f64,
@@ -229,28 +244,35 @@ const Travel = struct {
/// same benchmark and the report must not pretend otherwise.
pages: usize,
strip_px: u64,
+ /// The first frame of a fresh pane: opening the document and rasterizing
+ /// what it shows first. One sample, from the probe boot.
+ first_frame_ns: u64,
};
-fn probeTravel(path: []const u8) Travel {
- const core = bootCore(path) catch |err|
+fn probeTravel(config: Config) Travel {
+ const path = config.path;
+ const core = bootCore(config) catch |err|
fatal("cannot boot a PDF pane on {s}: {t}", .{ path, err });
defer core.deinit();
var frame_arena = std.heap.ArenaAllocator.init(gpa);
defer frame_arena.deinit();
+ const started = nowNs();
_ = core.render(frame_arena.allocator()) catch |err|
fatal("first render failed: {t}", .{err});
drainEffects(core);
+ const first_frame_ns = nowNs() -| started;
const pane = core.panes[0] orelse fatal("PDF pane disappeared", .{});
if (pane.pdf == null) fatal("{s} did not open as a PDF", .{path});
const pv = &pane.pdf.?;
- if (pv.page_count < 4)
- fatal("{s} has {d} pages; a fling benchmark needs at least 4", .{ path, pv.page_count });
if (!pv.layout_valid or pv.document_height == 0)
fatal("the pixel strip never laid out; is native_images/cell_pixels wired?", .{});
// Exactly the clamp scrollPdfDocument enforces, so the last fling frame
// lands on the document end instead of adding a no-op frame to the row.
- const viewport_h: u64 = @as(u64, bench_rows -| pardes.BOX_H) * bench_cell_pixels.h;
- const notch: f64 = @floatFromInt(bench_cell_pixels.h);
+ const viewport_h: u64 = @as(u64, bench_rows -| pardes.BOX_H) * config.cell.h;
+ // Four screenfuls of strip, in pages or in one tall page.
+ if (pv.document_height < 4 * viewport_h)
+ fatal("{s} is {d}px of strip; a fling benchmark needs at least four screenfuls", .{ path, pv.document_height });
+ const notch: f64 = @floatFromInt(config.cell.h);
if (!std.math.isFinite(notch) or notch <= 0)
fatal("a notch of {d} display pixels cannot size a fling", .{notch});
const strip = @as(f64, @floatFromInt(pv.document_height -| viewport_h));
@@ -261,6 +283,7 @@ fn probeTravel(path: []const u8) Travel {
.per_frame = notch * @as(f64, @floatFromInt(fling_ticks_per_frame)),
.pages = pv.page_count,
.strip_px = pv.document_height,
+ .first_frame_ns = first_frame_ns,
};
}
@@ -270,7 +293,7 @@ fn probeTravel(path: []const u8) Travel {
/// The cap is applied before any arithmetic on the count, so a document the
/// float division cannot describe still produces a runnable plan instead of an
/// overflow.
-fn planFor(scenario: Scenario, travel: Travel, cap: usize) Plan {
+fn planFor(scenario: Scenario, travel: Travel, cap: usize, slow: usize) Plan {
const wanted = travel.max_scroll / travel.per_frame;
const whole: usize = if (std.math.isFinite(wanted) and wanted >= 1)
@intFromFloat(@min(@as(f64, @floatFromInt(cap)), @ceil(wanted)))
@@ -285,15 +308,15 @@ fn planFor(scenario: Scenario, travel: Travel, cap: usize) Plan {
.frames = @max(2, down),
.down_frames = @max(1, down / 2),
},
- .slow_scroll => .{ .scenario = scenario, .frames = slow_frames, .down_frames = slow_frames },
+ .slow_scroll => .{ .scenario = scenario, .frames = slow, .down_frames = slow },
};
}
/// A pane on a real multi-page document with the native pixel-strip path live
/// and a genuine pixel viewport delivered the way a shell delivers one.
-fn bootCore(path: []const u8) !*pardes.Pardes {
+fn bootCore(config: Config) !*pardes.Pardes {
const core = try pardes.Pardes.init(gpa, .{
- .file = path,
+ .file = config.path,
.cols = bench_cols,
.rows = bench_rows,
});
@@ -302,7 +325,7 @@ fn bootCore(path: []const u8) !*pardes.Pardes {
core.update(.{ .resize = .{
.cols = bench_cols,
.rows = bench_rows,
- .cell_pixels = bench_cell_pixels,
+ .cell_pixels = config.cell,
} });
drainEffects(core);
return core;
@@ -321,9 +344,10 @@ fn measure(config: Config, plan: Plan) !Result {
var expected: ?Identity = null;
var rasterizations: u64 = 0;
var rasters_retained: u64 = 0;
+ var peak_raster_bytes: u64 = 0;
for (0..config.warmup + config.reps) |round| {
- const core = try bootCore(config.path);
+ const core = try bootCore(config);
defer core.deinit();
var frame_arena = std.heap.ArenaAllocator.init(gpa);
defer frame_arena.deinit();
@@ -358,6 +382,7 @@ fn measure(config: Config, plan: Plan) !Result {
const elapsed = nowNs() -| started;
total += elapsed;
recorder.observe(frame, surface);
+ peak_raster_bytes = @max(peak_raster_bytes, rasterBytes(pv));
// The same frame boundary src/tty/tty.zig marks, so a Tracy capture
// of this benchmark reads like a capture of the real shell.
pardes.frameMark();
@@ -391,10 +416,19 @@ fn measure(config: Config, plan: Plan) !Result {
.total_ns = totals[totals.len / 2],
.rasterizations = rasterizations,
.rasters_retained = rasters_retained,
+ .peak_raster_bytes = peak_raster_bytes,
.identity = expected.?,
};
}
+/// What the pane's rasters hold right now (untimed: outside the frame).
+fn rasterBytes(pv: anytype) u64 {
+ var total: u64 = 0;
+ for (pv.rasters[0..pv.rasters_len]) |raster| total += raster.rgba.len + raster.clean.len;
+ for (pv.spare[0..pv.spare_len]) |spare| total += spare.len;
+ return total;
+}
+
/// Accumulates the two checksums across one run. Raster generations are
/// rebased on the counter's value at run start so the trace describes the
/// ORDER textures were produced in rather than absolute counter values, which
@@ -441,7 +475,7 @@ const Recorder = struct {
self.visual = mix(self.visual, place.w);
self.visual = mix(self.visual, place.h);
self.visual = mix(self.visual, place.native.page);
- self.visual = mix(self.visual, @intFromEnum(place.native.fit));
+ self.visual = mix(self.visual, @backingInt(place.native.fit));
self.visual = mix(self.visual, place.native.pan_x);
self.visual = mix(self.visual, place.native.pan_y);
self.visual = mix(self.visual, @as(u32, @bitCast(place.native.pixel_offset_y)));
@@ -520,20 +554,6 @@ fn stridedHash(seed: u64, rgba: []const u8) u64 {
return hash;
}
-fn mix(seed: u64, value: anytype) u64 {
- const Value = @TypeOf(value);
- const Stable = switch (@typeInfo(Value)) {
- .comptime_int => u64,
- else => Value,
- };
- var stable: Stable = value;
- return std.hash.Wyhash.hash(seed, std.mem.asBytes(&stable));
-}
-
-fn drainEffects(core: *pardes.Pardes) void {
- while (core.nextEffect()) |_| {}
-}
-
fn verifyIdentity(
name: []const u8,
expected: *?Identity,
@@ -557,35 +577,29 @@ fn verifyIdentity(
} else expected.* = got;
}
-fn nowNs() u64 {
- var ts: std.c.timespec = undefined;
- _ = std.c.clock_gettime(.MONOTONIC, &ts);
- return @as(u64, @intCast(ts.sec)) *| 1_000_000_000 +|
- @as(u64, @intCast(ts.nsec));
-}
-
fn reportText(config: Config, travel: Travel, results: []const Result) void {
std.debug.print("pardes PDF fast-scroll benchmark ({s})\n", .{bench_config.core_optimize});
std.debug.print(
"{s}: {d} pages, {d}px strip at {d}x{d} cells of {d}x{d}px\n",
.{
- config.path, travel.pages, travel.strip_px, bench_cols,
- bench_rows, bench_cell_pixels.w, bench_cell_pixels.h,
+ config.path, travel.pages, travel.strip_px, bench_cols,
+ bench_rows, config.cell.w, config.cell.h,
},
);
+ std.debug.print("first frame of a fresh pane: {d}us\n", .{travel.first_frame_ns / 1000});
std.debug.print(
"warmup: {d}, sampled reps: {d}; every number is ONE FRAME (notch batch + render + drain)\n\n",
.{ config.warmup, config.reps },
);
- std.debug.print("{s:<16} {s:>6} {s:>7} {s:>10} {s:>10} {s:>10} {s:>10} {s:>10} {s:>11} {s:>7} {s:>5} {s:<16} {s}\n", .{
- "scenario", "frames", "notches", "min",
- "median", "p90", "p99", "max",
- "total_us", "rasters", "kept", "visual",
- "transport",
+ std.debug.print("{s:<16} {s:>6} {s:>7} {s:>10} {s:>10} {s:>10} {s:>10} {s:>10} {s:>11} {s:>7} {s:>5} {s:>9} {s:<16} {s}\n", .{
+ "scenario", "frames", "notches", "min",
+ "median", "p90", "p99", "max",
+ "total_us", "rasters", "kept", "peak_kib",
+ "visual", "transport",
});
- std.debug.print("{s}\n", .{"-" ** 160});
+ std.debug.print("{s}\n", .{&@as([160]u8, @splat('-'))});
for (results) |result| std.debug.print(
- "{s:<16} {d:>6} {d:>7} {d:>10} {d:>10} {d:>10} {d:>10} {d:>10} {d:>11} {d:>7} {d:>5} {x:0>16} {x:0>16}\n",
+ "{s:<16} {d:>6} {d:>7} {d:>10} {d:>10} {d:>10} {d:>10} {d:>10} {d:>11} {d:>7} {d:>5} {d:>9} {x:0>16} {x:0>16}\n",
.{
result.name,
result.frames,
@@ -598,12 +612,14 @@ fn reportText(config: Config, travel: Travel, results: []const Result) void {
result.total_ns / 1000,
result.rasterizations,
result.rasters_retained,
+ result.peak_raster_bytes / 1024,
result.identity.visual,
result.identity.transport,
},
);
std.debug.print(
- "\n`rasters` counts MuPDF page rasterizations over one run; `kept` is the retained raster count at the end.\n" ++
+ "\n`rasters` counts MuPDF page rasterizations over one run; `kept` is the retained raster count at the end;\n" ++
+ "`peak_kib` is the most the pane's rasters, clean copies and spares held after any frame.\n" ++
"`visual` pins presented pixels and placement and must never change; `transport` traces texture uploads.\n",
.{},
);
@@ -616,16 +632,17 @@ fn reportJson(io: std.Io, config: Config, travel: Travel, results: []const Resul
var out: std.Io.Writer = .fixed(&storage);
out.print(
"{{\"benchmark\":\"pardes-pdf-scroll\",\"build\":\"{s}\",\"path\":\"{s}\"," ++
- "\"pages\":{d},\"strip_px\":{d},\"warmup\":{d},\"reps\":{d},\"results\":[",
+ "\"pages\":{d},\"strip_px\":{d},\"first_frame_ns\":{d},\"warmup\":{d},\"reps\":{d},\"results\":[",
.{
- bench_config.core_optimize, config.path, travel.pages,
- travel.strip_px, config.warmup, config.reps,
+ bench_config.core_optimize, config.path, travel.pages,
+ travel.strip_px, travel.first_frame_ns, config.warmup,
+ config.reps,
},
) catch return;
for (results, 0..) |result, i| out.print(
"{s}{{\"scenario\":\"{s}\",\"frames\":{d},\"notches_per_frame\":{d}," ++
"\"min_ns\":{d},\"median_ns\":{d},\"p90_ns\":{d},\"p99_ns\":{d},\"max_ns\":{d},\"total_ns\":{d}," ++
- "\"rasterizations\":{d},\"rasters_retained\":{d},\"images\":{d}," ++
+ "\"rasterizations\":{d},\"rasters_retained\":{d},\"peak_raster_bytes\":{d},\"images\":{d}," ++
"\"visual\":\"{x:0>16}\",\"transport\":\"{x:0>16}\"}}",
.{
if (i == 0) "" else ",",
@@ -640,6 +657,7 @@ fn reportJson(io: std.Io, config: Config, travel: Travel, results: []const Resul
result.total_ns,
result.rasterizations,
result.rasters_retained,
+ result.peak_raster_bytes,
result.identity.images,
result.identity.visual,
result.identity.transport,
@@ -649,13 +667,12 @@ fn reportJson(io: std.Io, config: Config, travel: Travel, results: []const Resul
std.Io.File.stdout().writeStreamingAll(io, out.buffered()) catch {};
}
-fn fatal(comptime format: []const u8, args: anytype) noreturn {
- std.debug.print("pdf-scroll-bench: " ++ format ++ "\n", args);
- std.process.exit(1);
-}
-
comptime {
// The bench links the real MuPDF wrapper the core uses; keep the import
// load-bearing so a build that silently dropped it fails here.
_ = pdf.Document;
}
+
+fn parseCount(flag: []const u8, text: []const u8) usize {
+ return bench_util.parsePositive(fatal, flag, text, 10_000);
+}
diff --git a/test/pdf_sections_bench.zig b/test/pdf_sections_bench.zig
index b08af552..ce548924 100644
--- a/test/pdf_sections_bench.zig
+++ b/test/pdf_sections_bench.zig
@@ -9,6 +9,11 @@
//! report nanoseconds per operation; `operations_per_sample` makes that
//! normalization explicit in both output formats.
const std = @import("std");
+const bench_util = @import("bench_util.zig");
+const nowNs = bench_util.nowNs;
+const fatal = bench_util.Fatal("pdf-sections-bench").f;
+const mix = bench_util.mix;
+const drainEffects = bench_util.drainEffects;
const libc = std.c;
const pardes = @import("pardes");
const pdf = @import("mupdf");
@@ -67,7 +72,7 @@ pub fn main(init: std.process.Init) !void {
try writeFile(path, fixture);
defer unlink(path);
- var document = try pdf.Document.open(path);
+ var document = try pdf.Document.openBytes(fixture);
defer document.deinit();
var outline = try document.outline(gpa);
defer outline.deinit(gpa);
@@ -76,7 +81,7 @@ pub fn main(init: std.process.Init) !void {
defer gpa.free(synthetic);
const results = [_]Result{
- try measureOutline(path, config),
+ try measureOutline(fixture, config),
try measureMaterialize(path, outline.entries, config),
try measureCachedControl(path, config),
try measureCachedReopen(path, config),
@@ -107,22 +112,14 @@ fn parseArgs(args: []const []const u8) Config {
return config;
}
-fn parseCount(flag: []const u8, text: []const u8) usize {
- const value = std.fmt.parseUnsigned(usize, text, 10) catch
- fatal("{s} expects a positive integer", .{flag});
- if (value == 0 or value > 10_000)
- fatal("{s} must be in 1..10000", .{flag});
- return value;
-}
-
-fn measureOutline(path: []const u8, config: Config) !Result {
+fn measureOutline(fixture: []const u8, config: Config) !Result {
const samples = try gpa.alloc(u64, config.reps);
defer gpa.free(samples);
var expected: ?Identity = null;
for (0..config.warmup + config.reps) |round| {
// Document open/close is setup: this row isolates MuPDF outline load,
// bridge flattening, and the Zig-owned two-allocation copy.
- var document = try pdf.Document.open(path);
+ var document = try pdf.Document.openBytes(fixture);
defer document.deinit();
const started = nowNs();
var outline = try document.outline(gpa);
@@ -145,7 +142,7 @@ fn measureMaterialize(
var expected: ?Identity = null;
for (0..config.warmup + config.reps) |round| {
const started = nowNs();
- const content = try pardes.PdfSectionRows.render(gpa, path, entries);
+ const content = try pardes.panes.Pdf.SectionRows.render(gpa, path, entries);
const elapsed = nowNs() -| started;
const identity = contentIdentity(content);
gpa.free(content);
@@ -255,7 +252,7 @@ fn measureWorstShape(entries: []const pdf.OutlineEntry, config: Config) !Result
var expected: ?Identity = null;
for (0..config.warmup + config.reps) |round| {
const started = nowNs();
- const content = try pardes.PdfSectionRows.render(gpa, "/tmp/near-limit.pdf", entries);
+ const content = try pardes.panes.Pdf.SectionRows.render(gpa, "/tmp/near-limit.pdf", entries);
const elapsed = nowNs() -| started;
const identity = contentIdentity(content);
gpa.free(content);
@@ -300,11 +297,11 @@ fn perturbReopen(prepared: PreparedReopen, operation: usize) void {
const marker: i32 = @intCast(operation % 31 + 1);
const output_file = &prepared.output.file.?;
output_file.scroll = @intCast(operation % 17 + 1);
- prepared.output.cur_row = marker;
- prepared.output.cur_col = marker + 1;
- prepared.output.msel.active = true;
- prepared.output.vsel.active = true;
- prepared.output.nsel = 1;
+ prepared.output.body.cur_row = marker;
+ prepared.output.body.cur_col = marker + 1;
+ prepared.output.body.msel.active = true;
+ prepared.output.body.vsel.active = true;
+ prepared.output.body.nsel = 1;
prepared.owner.search_pane = null;
prepared.owner.search_row = operation % 23;
prepared.core.active = prepared.output_id;
@@ -313,21 +310,17 @@ fn perturbReopen(prepared: PreparedReopen, operation: usize) void {
fn observeReopen(prepared: PreparedReopen) u64 {
const file = prepared.output.file.?;
var observed: u64 = file.scroll;
- observed = observed *% 131 +% @as(u64, @intCast(@max(0, prepared.output.cur_row)));
- observed = observed *% 131 +% @as(u64, @intCast(@max(0, prepared.output.cur_col)));
- observed = observed *% 131 +% @intFromBool(prepared.output.msel.active);
- observed = observed *% 131 +% @intFromBool(prepared.output.vsel.active);
- observed = observed *% 131 +% prepared.output.nsel;
+ observed = observed *% 131 +% @as(u64, @intCast(@max(0, prepared.output.body.cur_row)));
+ observed = observed *% 131 +% @as(u64, @intCast(@max(0, prepared.output.body.cur_col)));
+ observed = observed *% 131 +% @intFromBool(prepared.output.body.msel.active);
+ observed = observed *% 131 +% @intFromBool(prepared.output.body.vsel.active);
+ observed = observed *% 131 +% prepared.output.body.nsel;
observed = observed *% 131 +% (prepared.owner.search_pane orelse std.math.maxInt(usize));
observed = observed *% 131 +% (prepared.owner.search_row orelse std.math.maxInt(usize));
observed = observed *% 131 +% prepared.core.active;
return observed;
}
-fn drainEffects(core: *pardes.Pardes) void {
- while (core.nextEffect()) |_| {}
-}
-
fn sectionsOutputIdentity(core: *pardes.Pardes) Identity {
const owner = core.panes[0] orelse fatal("PDF pane disappeared", .{});
const output_id = owner.search_pane orelse fatal("+PdfSections was not armed", .{});
@@ -347,7 +340,7 @@ fn stepIdentity(core: *pardes.Pardes) Identity {
identity.checksum = mix(identity.checksum, view.page);
identity.checksum = mix(identity.checksum, @as(u64, @bitCast(view.document_scroll_y)));
identity.checksum = mix(identity.checksum, owner.search_row orelse std.math.maxInt(usize));
- identity.checksum = mix(identity.checksum, view.render_revision);
+ identity.checksum = mix(identity.checksum, view.next_raster_revision);
return identity;
}
@@ -389,16 +382,6 @@ fn outlineIdentity(entries: []const pdf.OutlineEntry) Identity {
return .{ .items = entries.len, .bytes = bytes, .checksum = checksum };
}
-fn mix(seed: u64, value: anytype) u64 {
- const Value = @TypeOf(value);
- const Stable = switch (@typeInfo(Value)) {
- .comptime_int => u64,
- else => Value,
- };
- var stable: Stable = value;
- return std.hash.Wyhash.hash(seed, std.mem.asBytes(&stable));
-}
-
fn makeWorstShape() ![]pdf.OutlineEntry {
const entries = try gpa.alloc(pdf.OutlineEntry, near_limit_items);
for (entries, 0..) |*entry, ordinal| {
@@ -457,13 +440,6 @@ fn summarize(
};
}
-fn nowNs() u64 {
- var ts: std.c.timespec = undefined;
- _ = std.c.clock_gettime(.MONOTONIC, &ts);
- return @as(u64, @intCast(ts.sec)) *| 1_000_000_000 +|
- @as(u64, @intCast(ts.nsec));
-}
-
/// A host benchmark compiler barrier. MuPDF benchmarks are build-and-run
/// steps, so they never target the freestanding web backend; an empty volatile
/// asm with only the abstract memory clobber is valid on every native backend
@@ -478,7 +454,7 @@ fn reportText(config: Config, results: []const Result) void {
std.debug.print("{s:<42} {s:>10} {s:>10} {s:>10} {s:>10} {s:>8} {s:>8} {s}\n", .{
"scenario", "min", "median", "p90", "max", "items", "bytes", "checksum",
});
- std.debug.print("{s}\n", .{"-" ** 124});
+ std.debug.print("{s}\n", .{&@as([124]u8, @splat('-'))});
for (results) |result| std.debug.print(
"{s:<42} {d:>10} {d:>10} {d:>10} {d:>10} {d:>8} {d:>8} {x:0>16}\n",
.{
@@ -545,7 +521,6 @@ fn unlink(path: []const u8) void {
_ = libc.unlink(path_z);
}
-fn fatal(comptime format: []const u8, args: anytype) noreturn {
- std.debug.print("pdf-sections-bench: " ++ format ++ "\n", args);
- std.process.exit(1);
+fn parseCount(flag: []const u8, text: []const u8) usize {
+ return bench_util.parsePositive(fatal, flag, text, 10_000);
}
diff --git a/test/perf-baseline-gui-debug.json b/test/perf-baseline-gui-debug.json
new file mode 100644
index 00000000..a41c92b2
--- /dev/null
+++ b/test/perf-baseline-gui-debug.json
@@ -0,0 +1 @@
+{"harness":"442f274a5da9136c","build":{"compiler":"0.17.0","target":"x86_64-linux.5.10...7.2-gnu.2.38","cpu":"x86_64","driver_optimize":"fast","core_optimize":"debug","c_optimize":"fast","terminal_optimize":"safe","platform":"gui","grammars":"full","mupdf":true,"jpx":true,"tracy":false,"quic":false,"theme_animation":true,"terminal_simd":true,"prebuilt_shaders":false},"cols":120,"rows":40,"reps":10,"only":"medium","fixtures":[{"name":"small","lines":1000,"cols":60,"bytes":62694},{"name":"medium","lines":50000,"cols":60,"bytes":3201944},{"name":"large","lines":300000,"cols":60,"bytes":19464444},{"name":"longline","lines":400,"cols":8000,"bytes":3200400},{"name":"esp32p4","lines":12,"cols":240,"bytes":2892}],"cells":[{"op":"open","fixture":"medium","min_us":2253,"med_us":2626,"p90_us":3065,"max_us":3090},{"op":"render","fixture":"medium","min_us":100,"med_us":103,"p90_us":103,"max_us":110},{"op":"key-down","fixture":"medium","min_us":102,"med_us":103,"p90_us":105,"max_us":113},{"op":"key-right","fixture":"medium","min_us":98,"med_us":104,"p90_us":108,"max_us":113},{"op":"page-down","fixture":"medium","min_us":103,"med_us":104,"p90_us":111,"max_us":114},{"op":"wheel","fixture":"medium","min_us":98,"med_us":100,"p90_us":102,"max_us":108},{"op":"edit-char","fixture":"medium","min_us":1251,"med_us":1940,"p90_us":2652,"max_us":3041},{"op":"edit-twin","fixture":"medium","min_us":2779,"med_us":3177,"p90_us":3366,"max_us":3657},{"op":"body-2m","fixture":"medium","min_us":5812,"med_us":11423,"p90_us":13681,"max_us":13758},{"op":"body-appends","fixture":"medium","min_us":153898,"med_us":241075,"p90_us":284518,"max_us":305761},{"op":"deep-sel","fixture":"medium","min_us":86,"med_us":91,"p90_us":94,"max_us":122}]}
diff --git a/test/perf-baseline-tty-debug.json b/test/perf-baseline-tty-debug.json
new file mode 100644
index 00000000..dc37e033
--- /dev/null
+++ b/test/perf-baseline-tty-debug.json
@@ -0,0 +1 @@
+{"harness":"442f274a5da9136c","build":{"compiler":"0.17.0","target":"x86_64-linux.5.10...7.2-gnu.2.38","cpu":"x86_64","driver_optimize":"fast","core_optimize":"debug","c_optimize":"fast","terminal_optimize":"safe","platform":"tty","grammars":"full","mupdf":true,"jpx":true,"tracy":false,"quic":false,"theme_animation":true,"terminal_simd":true,"prebuilt_shaders":false},"cols":120,"rows":40,"reps":10,"only":"medium","fixtures":[{"name":"small","lines":1000,"cols":60,"bytes":62694},{"name":"medium","lines":50000,"cols":60,"bytes":3201944},{"name":"large","lines":300000,"cols":60,"bytes":19464444},{"name":"longline","lines":400,"cols":8000,"bytes":3200400},{"name":"esp32p4","lines":12,"cols":240,"bytes":2892}],"cells":[{"op":"open","fixture":"medium","min_us":2181,"med_us":2495,"p90_us":2621,"max_us":2660},{"op":"render","fixture":"medium","min_us":96,"med_us":98,"p90_us":102,"max_us":112},{"op":"key-down","fixture":"medium","min_us":101,"med_us":103,"p90_us":107,"max_us":108},{"op":"key-right","fixture":"medium","min_us":100,"med_us":112,"p90_us":118,"max_us":119},{"op":"page-down","fixture":"medium","min_us":97,"med_us":101,"p90_us":105,"max_us":107},{"op":"wheel","fixture":"medium","min_us":98,"med_us":100,"p90_us":108,"max_us":110},{"op":"edit-char","fixture":"medium","min_us":1377,"med_us":1842,"p90_us":2336,"max_us":2418},{"op":"edit-twin","fixture":"medium","min_us":2655,"med_us":3200,"p90_us":3321,"max_us":3660},{"op":"body-2m","fixture":"medium","min_us":5420,"med_us":10753,"p90_us":12826,"max_us":15385},{"op":"body-appends","fixture":"medium","min_us":153569,"med_us":232519,"p90_us":281625,"max_us":309036},{"op":"deep-sel","fixture":"medium","min_us":91,"med_us":98,"p90_us":111,"max_us":111}]}
diff --git a/test/perf-baseline-tty-fast.json b/test/perf-baseline-tty-fast.json
new file mode 100644
index 00000000..bd8f32dc
--- /dev/null
+++ b/test/perf-baseline-tty-fast.json
@@ -0,0 +1 @@
+{"harness":"442f274a5da9136c","build":{"compiler":"0.17.0","target":"x86_64-linux.5.10...7.2-gnu.2.38","cpu":"x86_64","driver_optimize":"fast","core_optimize":"fast","c_optimize":"fast","terminal_optimize":"fast","platform":"tty","grammars":"full","mupdf":true,"jpx":true,"tracy":false,"quic":false,"theme_animation":true,"terminal_simd":true,"prebuilt_shaders":false},"cols":120,"rows":40,"reps":10,"only":"medium","fixtures":[{"name":"small","lines":1000,"cols":60,"bytes":62694},{"name":"medium","lines":50000,"cols":60,"bytes":3201944},{"name":"large","lines":300000,"cols":60,"bytes":19464444},{"name":"longline","lines":400,"cols":8000,"bytes":3200400},{"name":"esp32p4","lines":12,"cols":240,"bytes":2892}],"cells":[{"op":"open","fixture":"medium","min_us":2283,"med_us":2611,"p90_us":2812,"max_us":2917},{"op":"render","fixture":"medium","min_us":89,"med_us":97,"p90_us":105,"max_us":119},{"op":"key-down","fixture":"medium","min_us":88,"med_us":95,"p90_us":100,"max_us":116},{"op":"key-right","fixture":"medium","min_us":90,"med_us":99,"p90_us":103,"max_us":106},{"op":"page-down","fixture":"medium","min_us":86,"med_us":90,"p90_us":96,"max_us":97},{"op":"wheel","fixture":"medium","min_us":85,"med_us":91,"p90_us":94,"max_us":101},{"op":"edit-char","fixture":"medium","min_us":1229,"med_us":1823,"p90_us":1874,"max_us":2101},{"op":"edit-twin","fixture":"medium","min_us":2196,"med_us":2745,"p90_us":2928,"max_us":2972},{"op":"body-2m","fixture":"medium","min_us":5606,"med_us":10369,"p90_us":14063,"max_us":14406},{"op":"body-appends","fixture":"medium","min_us":155867,"med_us":237195,"p90_us":289128,"max_us":306283},{"op":"deep-sel","fixture":"medium","min_us":82,"med_us":84,"p90_us":86,"max_us":91}]}
diff --git a/test/perf.zig b/test/perf.zig
index 5aa5c4d4..ab284739 100644
--- a/test/perf.zig
+++ b/test/perf.zig
@@ -46,6 +46,20 @@ const Op = enum {
page_down,
wheel,
edit_char,
+ /// edit_char with a Zerox twin open on the same file: the twin takes
+ /// the splice, not a copy of the text (File.setContentSpan).
+ edit_twin,
+ /// 2 MB appended to the file through 9P, on one open, in 256 KB
+ /// writes: linear, not a copy of the whole buffer per write.
+ body_write,
+ /// 64 appends to the file through 9P, each its own open, 8 KB write and
+ /// close, as a shell's `>>` loop makes: each costs its own bytes, not a
+ /// pass over the whole body for its cursor, line index and saved hash.
+ body_appends,
+ /// A render with the selection 2 MB into one line: only the columns
+ /// shown are measured, so it costs what a selection at the line's
+ /// start does (4.5 s a frame at 5 MB before).
+ deep_selection,
fn label(o: Op) []const u8 {
return switch (o) {
@@ -56,10 +70,52 @@ const Op = enum {
.page_down => "page-down",
.wheel => "wheel",
.edit_char => "edit-char",
+ .edit_twin => "edit-twin",
+ .body_write => "body-2m",
+ .body_appends => "body-appends",
+ .deep_selection => "deep-sel",
};
}
};
+var body_chunk: [256 * 1024]u8 = @splat('y');
+
+/// The body_write gesture: an open of the pane's body, eight 256 KB writes,
+/// a read (which the held writes go in before), the close.
+fn bodyWrite(core: *pardes.Pardes, serial: u32) void {
+ const Node = pardes.ctlfs.Node;
+ const body = Node.of(serial, .body);
+ for (&body_chunk, 0..) |*c, i| c.* = if (i % 64 == 63) '\n' else 'y';
+ const h = core.serveFs(.{ .tag = 1, .op = .open, .node = body, .omode = 1 }).handle;
+ for (0..8) |_| _ = core.serveFs(.{ .tag = 2, .op = .write, .node = body, .handle = h, .data = &body_chunk });
+ _ = core.serveFs(.{ .tag = 3, .op = .getattr, .node = body, .handle = h });
+ _ = core.serveFs(.{ .tag = 4, .op = .release, .node = body, .handle = h, .opened = true });
+}
+
+/// One line of 2 MB appended to the file, no newline in it.
+fn longLine(core: *pardes.Pardes, serial: u32) void {
+ const Node = pardes.ctlfs.Node;
+ const body = Node.of(serial, .body);
+ @memset(&body_chunk, 'z');
+ const h = core.serveFs(.{ .tag = 1, .op = .open, .node = body, .omode = 1 }).handle;
+ for (0..8) |_| _ = core.serveFs(.{ .tag = 2, .op = .write, .node = body, .handle = h, .data = &body_chunk });
+ _ = core.serveFs(.{ .tag = 4, .op = .release, .node = body, .handle = h, .opened = true });
+}
+
+const append_chunk_len = 8 * 1024;
+const append_count = 64;
+
+fn bodyAppends(core: *pardes.Pardes, serial: u32) void {
+ const Node = pardes.ctlfs.Node;
+ const body = Node.of(serial, .body);
+ for (body_chunk[0..append_chunk_len], 0..) |*c, i| c.* = if (i % 64 == 63) '\n' else 'y';
+ for (0..append_count) |_| {
+ const h = core.serveFs(.{ .tag = 1, .op = .open, .node = body, .omode = 1 }).handle;
+ _ = core.serveFs(.{ .tag = 2, .op = .write, .node = body, .handle = h, .data = body_chunk[0..append_chunk_len] });
+ _ = core.serveFs(.{ .tag = 4, .op = .release, .node = body, .handle = h, .opened = true });
+ }
+}
+
const TermFixture = struct {
name: []const u8,
kb: usize,
@@ -151,6 +207,93 @@ const Allocations = struct {
}
};
+/// What a session costs before it can show anything: the core's own boot, then
+/// the first frame built from it. The host's share — process spawn, dynamic
+/// linking, GPU and font setup — is not in here and has to be timed around the
+/// real binary; this is the half that a change to the editor can move.
+fn measureStartup(io: std.Io, reps: usize, json: bool) !void {
+ if (reps == 0 or screen_cols == 0 or screen_rows == 0) return error.InvalidMeasurement;
+ const init_samples = try gpa.alloc(u64, reps);
+ defer gpa.free(init_samples);
+ const frame_samples = try gpa.alloc(u64, reps);
+ defer gpa.free(frame_samples);
+
+ const cases = [_]struct { name: []const u8, boot: pardes.Boot }{
+ .{ .name = "startup-tty", .boot = .tty },
+ .{ .name = "startup-tty-shell", .boot = .tty_shell },
+ .{ .name = "startup-shell", .boot = .shell },
+ .{ .name = "startup-classic", .boot = .classic },
+ };
+ for (cases) |case| {
+ if (!pardes.terminal_panes) continue;
+ var cold_ns: u64 = 0;
+ var calls: usize = 0;
+ var bytes: usize = 0;
+ var peak: usize = 0;
+ for (0..reps + 1) |index| {
+ var counter: Allocations = .{};
+ const allocator = counter.allocator();
+ const begin = nowNs();
+ const core = try pardes.Pardes.init(allocator, .{
+ .tty_only = case.boot == .tty or case.boot == .tty_shell,
+ .boot = case.boot,
+ .shells = if (case.boot == .classic) 3 else 1,
+ .cols = screen_cols,
+ .rows = screen_rows,
+ });
+ const booted = nowNs();
+ var paint = std.heap.ArenaAllocator.init(allocator);
+ _ = try core.render(paint.allocator());
+ const painted = nowNs();
+ paint.deinit();
+ core.deinit();
+ if (index == 0) {
+ cold_ns = booted - begin;
+ } else {
+ init_samples[index - 1] = booted - begin;
+ frame_samples[index - 1] = painted - booted;
+ calls += counter.calls;
+ bytes += counter.bytes;
+ peak = @max(peak, counter.peak);
+ }
+ // Every other measurement in this file checks the session gave
+ // everything back; a boot that leaks is exactly what a startup
+ // benchmark should be the first to notice.
+ if (counter.live != 0) return error.LeakedStartupMemory;
+ }
+ std.mem.sort(u64, init_samples, {}, std.sort.asc(u64));
+ std.mem.sort(u64, frame_samples, {}, std.sort.asc(u64));
+ const result = .{
+ .build = build_identity,
+ .harness = harness_id,
+ .case = case.name,
+ .cols = screen_cols,
+ .rows = screen_rows,
+ .reps = reps,
+ .cold_ns = cold_ns,
+ .init_median_ns = init_samples[reps / 2],
+ // A p95 needs at least twenty samples to be one; below that this
+ // is the maximum and says so rather than dressing it up.
+ .init_p95_ns = if (reps >= 20) init_samples[reps * 95 / 100] else init_samples[reps - 1],
+ .init_max_ns = init_samples[reps - 1],
+ .frame_median_ns = frame_samples[reps / 2],
+ .allocations = calls / reps,
+ .allocated_bytes = bytes / reps,
+ .peak_bytes = peak,
+ };
+ const text = if (json)
+ try std.json.Stringify.valueAlloc(gpa, result, .{})
+ else
+ try std.fmt.allocPrint(gpa, "{s}: boot {d} ns (cold {d}), first frame {d} ns, {d} allocations / {d} B, peak {d} B", .{
+ result.case, result.init_median_ns, result.cold_ns, result.frame_median_ns,
+ result.allocations, result.allocated_bytes, result.peak_bytes,
+ });
+ defer gpa.free(text);
+ try std.Io.File.stdout().writeStreamingAll(io, text);
+ try std.Io.File.stdout().writeStreamingAll(io, "\n");
+ }
+}
+
fn measureCreation(io: std.Io, reps: usize, json: bool) !void {
if (reps == 0 or screen_cols == 0 or screen_rows == 0) return error.InvalidMeasurement;
const samples = try gpa.alloc(u64, reps);
@@ -170,12 +313,12 @@ fn measureCreation(io: std.Io, reps: usize, json: bool) !void {
const allocator = counter.allocator();
const begin = nowNs();
const pane = if (terminal)
- try pardes.panes.Terminal.create(allocator, screen_cols, screen_rows)
+ try pardes.panes.terminal.create(allocator, screen_cols, screen_rows)
else
- try pardes.panes.Terminal.createDoc(allocator, screen_cols, screen_rows);
+ try pardes.panes.terminal.createDoc(allocator, screen_cols, screen_rows);
const constructed = nowNs();
const retained = counter.live;
- pardes.panes.Terminal.deinitEmulator(pane, allocator);
+ pardes.panes.terminal.deinitEmulator(pane, allocator);
allocator.destroy(pane);
const destroyed = nowNs();
if (counter.live != 0) return error.LeakedPaneMemory;
@@ -232,9 +375,13 @@ const Options = struct {
base: ?[]const u8 = null,
only: ?[]const u8 = null,
creation: bool = false,
+ startup: bool = false,
mini: bool = false,
terminal_mib: ?usize = null,
self_test: bool = false,
+ /// A gate: fail when a cell's fastest sample is more than this many
+ /// times the baseline's fastest (--base's).
+ max_ratio: ?f64 = null,
fn parse(args: []const []const u8) !Options {
var opts: Options = .{};
@@ -242,11 +389,12 @@ 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, mini, @"terminal-mib", @"self-test", reps, cols, rows, base, only }, arg[2..]) orelse
+ const option = std.meta.stringToEnum(enum { json, creation, startup, mini, @"terminal-mib", @"self-test", reps, cols, rows, base, only, @"max-ratio" }, arg[2..]) orelse
return error.UnknownOption;
switch (option) {
.json => opts.json = true,
.creation => opts.creation = true,
+ .startup => opts.startup = true,
.mini => opts.mini = true,
.@"self-test" => opts.self_test = true,
else => {
@@ -260,6 +408,7 @@ const Options = struct {
.base => opts.base = value,
.only => opts.only = value,
.@"terminal-mib" => opts.terminal_mib = std.fmt.parseInt(usize, value, 10) catch return error.InvalidNumber,
+ .@"max-ratio" => opts.max_ratio = std.fmt.parseFloat(f64, value) catch return error.InvalidNumber,
else => unreachable,
}
},
@@ -274,6 +423,10 @@ const Options = struct {
if (opts.creation or opts.only != null or opts.base != null) return error.IncompatibleOptions;
}
if (opts.base) |path| if (path.len == 0) return error.MissingValue;
+ if (opts.max_ratio) |ratio| {
+ if (opts.base == null) return error.IncompatibleOptions;
+ if (!(ratio >= 1)) return error.InvalidMeasurement;
+ }
if (opts.mini and (opts.creation or opts.terminal_mib != null or opts.only != null or opts.base != null))
return error.IncompatibleOptions;
if (opts.only) |name| {
@@ -295,6 +448,7 @@ pub fn main(init: std.process.Init) !void {
screen_rows = opts.rows;
const reps = opts.reps;
const only = opts.only;
+ if (opts.startup) return measureStartup(init.io, reps, opts.json);
if (opts.creation) return measureCreation(init.io, reps, opts.json);
if (opts.terminal_mib) |mib| return measureTerminalSession(init.io, mib, reps, opts.json);
if (opts.mini) return measureMini(init.io, init.gpa, reps, opts.json);
@@ -341,8 +495,41 @@ pub fn main(init: std.process.Init) !void {
}
}
- if (opts.json) return reportJson(init.io, &cells, &term_cells, &bytes, opts);
- 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.base, base);
+ if (opts.max_ratio) |ratio| try gate(&cells, &base.?, ratio);
+}
+
+/// The performance gate (zig build perf-gate): every measured cell's
+/// fastest sample against the baseline's fastest. The fastest, not the
+/// median: a loaded machine slows the median, rarely the best of a run,
+/// while a regression slows every sample.
+fn gate(cells: *const [std.enums.values(Op).len][fixtures.len]Cell, base: *const Base, ratio: f64) !void {
+ var failed = false;
+ for (std.enums.values(Op), 0..) |op, oi| for (fixtures, 0..) |fx, fi| {
+ const then = base.min[oi][fi];
+ const now = cells[oi][fi].min_us;
+ if (then == 0 or now == 0) continue;
+ const x = @as(f64, @floatFromInt(now)) / @as(f64, @floatFromInt(then));
+ if (x > ratio) {
+ std.debug.print("perf gate: {s} on {s} took {d} us at best, {d:.1}x the baseline's {d} us (limit {d:.1}x)\n", .{ op.label(), fx.name, now, x, then, ratio });
+ failed = true;
+ }
+ };
+ // Typing beside a twin costs about what typing alone does, whatever the
+ // baseline: the twin takes the splice, never a copy of the text.
+ const twin_op = @backingInt(Op.edit_twin);
+ const alone_op = @backingInt(Op.edit_char);
+ for (fixtures, 0..) |fx, fi| {
+ const twin = cells[twin_op][fi].min_us;
+ const alone = cells[alone_op][fi].min_us;
+ if (twin == 0 or alone == 0) continue;
+ if (@as(f64, @floatFromInt(twin)) > ratio * @as(f64, @floatFromInt(alone))) {
+ std.debug.print("perf gate: edit-twin on {s} took {d} us at best, over {d:.1}x edit-char's {d} us\n", .{ fx.name, twin, ratio, alone });
+ failed = true;
+ }
+ }
+ if (failed) return error.PerformanceRegression;
+ std.debug.print("perf gate: every cell within {d:.1}x of the baseline\n", .{ratio});
}
fn measure(op: Op, fx: Fixture, path: []const u8, expected_bytes: usize, reps: usize) !Cell {
@@ -355,7 +542,7 @@ fn measure(op: Op, fx: Fixture, path: []const u8, expected_bytes: usize, reps: u
const core = try boot();
defer core.deinit();
const t0 = nowNs();
- core.lookAt(0, path);
+ pardes.look.lookAt(core, 0, path);
pump(core);
_ = try frame(core);
const dt = nowNs() -| t0;
@@ -369,52 +556,74 @@ fn measure(op: Op, fx: Fixture, path: []const u8, expected_bytes: usize, reps: u
const core = try boot();
defer core.deinit();
- core.lookAt(0, path);
+ pardes.look.lookAt(core, 0, path);
pump(core);
const id = filePane(core) orelse return error.OpenDidNotOpenFile;
core.active = id;
const pane = core.panes[id].?;
_ = try frame(core);
- if (op == .edit_char) {
+ if (op == .edit_twin) {
+ if (!core.executeBuiltinLine(id, "Zerox")) return error.ZeroxRefused;
+ pump(core);
+ core.active = id;
+ _ = try frame(core);
+ }
+ if (op == .edit_char or op == .edit_twin) {
core.update(.{ .key = .{ .cp = 'i', .text = "i" } });
pump(core);
}
+ if (op == .deep_selection) {
+ longLine(core, pane.serial);
+ pump(core);
+ const len: u32 = @intCast(pane.file.?.content.len);
+ pardes.ctlfs.pane.setDot(pane, .{ .q0 = len - 10, .q1 = len - 5 });
+ pump(core);
+ }
for (0..warmup + reps) |n| {
- seek(pane, fx, n);
+ if (op != .deep_selection) seek(pane, fx, n);
_ = try frame(core); // settle the view at the new spot, untimed
- const before = .{ .row = pane.cur_row, .col = pane.cur_col, .scroll = pane.scroll(), .len = pane.file.?.content.len };
+ const before = .{ .row = pane.body.cur_row, .col = pane.body.cur_col, .scroll = pane.scroll(), .len = pane.file.?.content.len };
const rect = core.rects[id];
const wheel_col = rect.x + pardes.config.GUTTER;
const wheel_row = if (core.settings.tag_bottom) rect.y else rect.y + pardes.BOX_H;
const t0 = nowNs();
switch (op) {
.open => unreachable,
- .render => {},
+ .render, .deep_selection => {},
.key_down => core.update(.{ .key = .{ .cp = 'j', .text = "j" } }),
.key_right => core.update(.{ .key = .{ .cp = 'l', .text = "l" } }),
.page_down => core.update(.{ .key = .{ .cp = pardes.Key.page_down } }),
.wheel => core.update(.{ .mouse = .{ .button = .wheel_down, .kind = .press, .col = wheel_col, .row = wheel_row } }),
- .edit_char => core.update(.{ .key = .{ .cp = 'x', .text = "x" } }),
+ .edit_char, .edit_twin => core.update(.{ .key = .{ .cp = 'x', .text = "x" } }),
+ .body_write => bodyWrite(core, pane.serial),
+ .body_appends => bodyAppends(core, pane.serial),
}
pump(core);
_ = try frame(core);
const dt = nowNs() -| t0;
switch (op) {
.open => unreachable,
- .render => if (pane.cur_row != before.row or pane.cur_col != before.col or pane.file.?.content.len != before.len)
+ .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)
return error.RenderChangedDocument,
- .key_down => if (pane.cur_row != before.row + 1) return error.DownDidNotMove,
- .key_right => if (pane.cur_row != before.row or pane.cur_col != before.col + 1) return error.RightDidNotMove,
+ .key_down => if (pane.body.cur_row != before.row + 1) return error.DownDidNotMove,
+ .key_right => if (pane.body.cur_row != before.row or pane.body.cur_col != before.col + 1) return error.RightDidNotMove,
.page_down => if (pane.scroll() <= before.scroll and before.scroll < @as(i32, @intCast(fx.lines)) - pane.rows)
return error.PageDidNotScroll,
.wheel => if (pane.scroll() <= before.scroll and before.scroll < @as(i32, @intCast(fx.lines)) - pane.rows)
return error.WheelDidNotScroll,
- .edit_char => {
- if (pane.file.?.content.len != before.len + 1 or pane.cur_row != before.row or pane.cur_col != before.col + 1)
+ .edit_char, .edit_twin => {
+ if (pane.file.?.content.len != before.len + 1 or pane.body.cur_row != before.row or pane.body.cur_col != before.col + 1)
return error.CharacterWasNotInserted;
const line = pardes.panes.File.sourceLine(pane, before.row);
if (line[@intCast(before.col)] != 'x') return error.CharacterWasNotInserted;
+ if (op == .edit_twin) for (core.panes, 0..) |slot, other| {
+ const twin = slot orelse continue;
+ if (other == id or twin.file == null or twin.file.?.twin != pane.file.?.twin) continue;
+ if (twin.file.?.content.ptr != pane.file.?.content.ptr) return error.TwinMissedTheEdit;
+ } else if (pane.file.?.twin == 0) return error.NoTwin;
},
}
if (n >= warmup) samples[n - warmup] = dt / 1000;
@@ -431,13 +640,13 @@ fn measureTerm(op: TermOp, fx: TermFixture, reps: usize) !Cell {
defer core.deinit();
const pane = core.panes[0] orelse return error.MissingTerminal;
const state = pane.terminal orelse return error.MissingTerminal;
- if (op == .key_down or op == .edit_char) pane.mode = .normal;
+ if (op == .key_down or op == .edit_char) pane.body.mode = .normal;
if (op == .edit_char) {
core.update(.{ .key = .{ .cp = 'i', .text = "i" } });
pump(core);
}
_ = try frame(core);
- const motion_rows = if (op == .key_down) (try core.paneCursorLines(pane)).len else 0;
+ const motion_rows = if (op == .key_down) (try pardes.edit.paneCursorLines(core, &pane.body)).len else 0;
if (op == .key_down and motion_rows < 3) return error.EmptyTerminalFixture;
var cols = screen_cols;
@@ -445,19 +654,17 @@ fn measureTerm(op: TermOp, fx: TermFixture, reps: usize) !Cell {
for (0..warmup + reps) |n| {
if (op == .key_down) {
const span = @max(1, motion_rows * 8 / 10);
- pane.cur_row = @intCast(@min(motion_rows - 2, motion_rows / 10 + (n *% 7919) % span));
- pane.cur_col = 0;
- pane.cur_pinned = true;
- pane.sticky_col = -1;
+ pane.body.cur_row = @intCast(@min(motion_rows - 2, motion_rows / 10 + (n *% 7919) % span));
+ pane.body.cur_col = 0;
+ pane.body.cur_pinned = true;
+ pane.body.sticky_col = -1;
pane.ensureCursorVisible();
_ = try frame(core);
}
const before = .{
- .row = pane.cur_row,
- .col = pane.cur_col,
+ .row = pane.body.cur_row,
+ .col = pane.body.cur_col,
.edit_len = if (pane.ovl) |overlay| overlay.text.len else 0,
- .replay_head = state.replay.head,
- .replay_len = state.replay.len,
.cols = pane.cols,
.rows = pane.rows,
};
@@ -480,32 +687,21 @@ fn measureTerm(op: TermOp, fx: TermFixture, reps: usize) !Cell {
_ = try frame(core);
const dt = nowNs() -| t0;
switch (op) {
- .render => if (pane.cur_row != before.row or pane.cur_col != before.col or
- state.replay.head != before.replay_head or state.replay.len != before.replay_len)
+ .render => if (pane.body.cur_row != before.row or pane.body.cur_col != before.col)
return error.RenderChangedTerminal,
- .output => {
- const capacity = state.replay.bytes.len;
- if (term_chunk.len == 0 or term_chunk.len >= capacity) return error.InvalidOutputFixture;
- const overflow = term_chunk.len -| (capacity - before.replay_len);
- if (state.replay.len != @min(capacity, before.replay_len + term_chunk.len) or
- state.replay.head != (before.replay_head + overflow) % capacity)
- return error.OutputWasNotRecorded;
- const start = (state.replay.head + state.replay.len - term_chunk.len) % capacity;
- const first = @min(term_chunk.len, capacity - start);
- if (!std.mem.eql(u8, term_chunk[0..first], state.replay.bytes[start..][0..first]) or
- !std.mem.eql(u8, term_chunk[first..], state.replay.bytes[0 .. term_chunk.len - first]))
- return error.WrongTerminalOutput;
- },
+ // What the output did to the screen is the snapshot suite's to
+ // check; here it is timed.
+ .output => if (term_chunk.len == 0) return error.InvalidOutputFixture,
.resize_rows => if (pane.rows == before.rows or pane.cols != before.cols or
state.vt.screens.active.pages.rows != pane.rows) return error.TerminalDidNotResize,
.resize_cols => if (pane.cols == before.cols or pane.rows != before.rows or
state.vt.screens.active.pages.cols != pane.cols) return error.TerminalDidNotResize,
- .key_down => if (pane.cur_row != before.row + 1) return error.DownDidNotMove,
+ .key_down => if (pane.body.cur_row != before.row + 1) return error.DownDidNotMove,
.edit_char => {
const overlay = pane.ovl orelse return error.CharacterWasNotInserted;
- if (overlay.text.len != before.edit_len + 1 or pane.cur_row != before.row or pane.cur_col != before.col + 1)
+ if (overlay.text.len != before.edit_len + 1 or pane.body.cur_row != before.row or pane.body.cur_col != before.col + 1)
return error.CharacterWasNotInserted;
- const line = pardes.modal.lineSlice(overlay.text, @intCast(pane.cur_row - overlay.row));
+ const line = pardes.modal.lineSlice(overlay.text, @intCast(pane.body.cur_row - overlay.row));
if (before.col < 0 or before.col >= line.len or line[@intCast(before.col)] != 'x')
return error.CharacterWasNotInserted;
},
@@ -569,7 +765,7 @@ fn checkTerminalTail(core: *pardes.Pardes, surface: *pardes.Surface, batch: usiz
const pane = core.panes[0] orelse return error.MissingTerminal;
const rect = core.rects[0];
const x = rect.x + pardes.config.GUTTER;
- const y = (if (core.settings.tag_bottom) rect.y else rect.y + pardes.BOX_H) + pardes.panes.Terminal.gridCursor(pane).y;
+ const y = (if (core.settings.tag_bottom) rect.y else rect.y + pardes.BOX_H) + pardes.panes.terminal.gridCursor(pane).y;
var expected_buffer: [32]u8 = undefined;
const expected = try std.fmt.bufPrint(&expected_buffer, "TURN {d:0>10} READY", .{batch});
for (expected, 0..) |byte, col| {
@@ -621,7 +817,7 @@ const UndoOutput = struct {
fn measureUndoOutput(core: *pardes.Pardes, counter: *Allocations, arena: *std.heap.ArenaAllocator, samples: []u64) ![3]UndoOutput {
const pane = core.panes[0].?;
const pages = &pane.terminal.?.vt.screens.active.pages;
- if (pane.ed_undo_len != 0 or pane.ed_redo_len != 0) return error.UnexpectedTerminalHistory;
+ if (pane.body.ed_undo_len != 0 or pane.body.ed_redo_len != 0) return error.UnexpectedTerminalHistory;
if (pane.ovl) |overlay| core.gpa.free(overlay.text);
pane.ovl = null;
var result: [3]UndoOutput = undefined;
@@ -632,19 +828,19 @@ fn measureUndoOutput(core: *pardes.Pardes, counter: *Allocations, arena: *std.he
const first: i32 = @intCast(@min(128, pages.total_rows - 2));
for (0..depth) |index| {
pane.ovl = .{ .row = first, .rows = 2, .text = try std.fmt.allocPrint(core.gpa, "saved edit {d}\nsecond row", .{index}) };
- pane.cur_row = first + 1;
- pane.cur_col = 1;
- pane.vsel = .{ .active = true, .row = first, .col = 0 };
- pardes.panes.Terminal.pushUndo(core, pane);
+ pane.body.cur_row = first + 1;
+ pane.body.cur_col = 1;
+ pane.body.vsel = .{ .active = true, .row = first, .col = 0 };
+ pardes.panes.terminal.pushUndo(core, pane);
core.gpa.free(pane.ovl.?.text);
pane.ovl = null;
- if (pane.ed_undo_len != index + 1) return error.TerminalUndoSnapshotFailed;
+ if (pane.body.ed_undo_len != index + 1) return error.TerminalUndoSnapshotFailed;
}
defer {
- for (pane.ed_undo[0..pane.ed_undo_len]) |snapshot| if (snapshot.ovl) |overlay| core.gpa.free(overlay.text);
- pane.ed_undo_len = 0;
+ for (pane.body.ed_undo[0..pane.body.ed_undo_len]) |snapshot| if (snapshot.ovl) |overlay| core.gpa.free(overlay.text);
+ pane.body.ed_undo_len = 0;
}
- pardes.panes.Terminal.enterTty(core, 0);
+ pardes.panes.terminal.enterTty(core, 0);
pump(core);
const tracked_before = pages.countTrackedPins();
const start = try pages.trackPin(pages.pin(.{ .screen = .{ .y = @intCast(first) } }).?);
@@ -677,7 +873,7 @@ fn measureUndoOutput(core: *pardes.Pardes, counter: *Allocations, arena: *std.he
if (pages.countTrackedPins() != tracked_before + 2) return error.TerminalPinsLeaked;
const expected: i32 = if (start.garbage) 0 else @intCast((pages.pointFromPin(.screen, start.*) orelse return error.TerminalAnchorLost).screen.y);
const last: i32 = if (end.garbage) 0 else @intCast((pages.pointFromPin(.screen, end.*) orelse return error.TerminalAnchorLost).screen.y);
- for (pane.ed_undo[0..pane.ed_undo_len], 0..) |snapshot, index| {
+ for (pane.body.ed_undo[0..pane.body.ed_undo_len], 0..) |snapshot, index| {
const overlay = snapshot.ovl orelse return error.TerminalUndoTextLost;
var expected_buffer: [64]u8 = undefined;
const text = try std.fmt.bufPrint(&expected_buffer, "saved edit {d}\nsecond row", .{index});
@@ -722,7 +918,7 @@ fn measureTerminalSession(io: std.Io, mib: usize, reps: usize, json: bool) !void
pump(core);
const pane = core.panes[0] orelse return error.MissingTerminal;
const state = pane.terminal orelse return error.MissingTerminal;
- pane.mode = .tty;
+ pane.body.mode = .tty;
pane.tty_filter = false;
var arena: std.heap.ArenaAllocator = .init(counter.allocator());
defer arena.deinit();
@@ -757,7 +953,7 @@ fn measureTerminalSession(io: std.Io, mib: usize, reps: usize, json: bool) !void
}
const stream_wall_ns = nowNs() - stream_begin;
const live_after_output = counter.live;
- const first_row = @as(i32, @intCast(state.vt.screens.active.pages.scrollbar().offset)) + @as(i32, pardes.panes.Terminal.gridCursor(pane).y);
+ const first_row = @as(i32, @intCast(state.vt.screens.active.pages.scrollbar().offset)) + @as(i32, pardes.panes.terminal.gridCursor(pane).y);
_ = arena.reset(.retain_capacity);
const modal_begin = nowNs();
core.update(.{ .key = .{ .cp = core.opts.tty_toggle, .ctrl = true } });
@@ -765,17 +961,17 @@ fn measureTerminalSession(io: std.Io, mib: usize, reps: usize, json: bool) !void
pump(core);
_ = try core.render(arena.allocator());
const first_modal_ns = nowNs() - modal_begin;
- if (pane.mode != .normal or !pane.cur_pinned or pane.cur_row != first_row - 1) return error.FirstModalKeyDidNotMove;
+ if (pane.body.mode != .normal or !pane.body.cur_pinned or pane.body.cur_row != first_row - 1) return error.FirstModalKeyDidNotMove;
for (modal_samples, 0..) |*sample, index| {
const down = index % 2 == 0;
- const before = pane.cur_row;
+ const before = pane.body.cur_row;
_ = arena.reset(.retain_capacity);
const begin = nowNs();
core.update(.{ .key = .{ .cp = if (down) 'j' else 'k' } });
pump(core);
_ = try core.render(arena.allocator());
sample.* = nowNs() - begin;
- if (pane.cur_row != before + @as(i32, if (down) 1 else -1)) return error.ModalKeyDidNotMove;
+ if (pane.body.cur_row != before + @as(i32, if (down) 1 else -1)) return error.ModalKeyDidNotMove;
}
core.update(.{ .key = .{ .cp = core.opts.tty_toggle, .ctrl = true } });
pump(core);
@@ -793,8 +989,8 @@ fn measureTerminalSession(io: std.Io, mib: usize, reps: usize, json: bool) !void
const live_after_modal = counter.live;
var overlay_median_ns: [2]u64 = undefined;
var overlay_p95_ns: [2]u64 = undefined;
- pane.mode = .normal;
- pane.cur_pinned = true;
+ pane.body.mode = .normal;
+ pane.body.cur_pinned = true;
pane.ovl = .{ .row = 0, .rows = 1, .text = try core.gpa.dupe(u8, "edited output") };
for (0..2) |phase| {
for (modal_samples, 0..) |*sample, index| {
@@ -805,10 +1001,10 @@ fn measureTerminalSession(io: std.Io, mib: usize, reps: usize, json: bool) !void
const begin = nowNs();
core.update(.{ .output = .{ .pane = 0, .bytes = update } });
pump(core);
- const cursor_row = pardes.panes.Terminal.gridOffset(pane) + @as(i32, pardes.panes.Terminal.gridCursor(pane).y);
+ const cursor_row = pardes.panes.terminal.gridOffset(pane) + @as(i32, pardes.panes.terminal.gridCursor(pane).y);
pane.ovl.?.row = if (phase == 0) 0 else cursor_row - 1;
- pane.cur_row = pane.ovl.?.row;
- pane.cur_col = 0;
+ pane.body.cur_row = pane.ovl.?.row;
+ pane.body.cur_col = 0;
const surface = try core.render(arena.allocator());
sample.* = nowNs() - begin;
try checkTerminalTail(core, surface, tail_id);
@@ -845,7 +1041,7 @@ fn measureTerminalSession(io: std.Io, mib: usize, reps: usize, json: bool) !void
.undo_output = undo_output,
.history_rows = state.vt.screens.active.pages.scrollbar().total,
.history_bytes = state.vt.screens.active.pages.page_size,
- .history_limit_bytes = state.vt.screens.active.pages.maxSize(),
+ .history_limit_bytes = state.vt.screens.active.pages.limits.max(.bytes),
.row_count_decreases = row_count_decreases,
.allocator_calls = counter.calls,
.allocator_live_after_output = live_after_output,
@@ -885,12 +1081,12 @@ const MiniMeasurement = struct {
live_after_deinit: usize = 0,
};
-fn checkMini(actual: pardes.panes.Mini.Result, expected: pardes.panes.Mini.Result) !void {
+fn checkMini(actual: pardes.panes.mini.Result, expected: pardes.panes.mini.Result) !void {
if (!std.mem.eql(u8, actual.content, expected.content) or !std.mem.eql(u8, actual.colors, expected.colors))
return error.MiniOutputMismatch;
}
-fn miniMeasurement(fallback: std.mem.Allocator, probe: MiniProbe, path: []const u8, source: []const u8, styles: []const u8, expected: pardes.panes.Mini.Result, reps: usize) !MiniMeasurement {
+fn miniMeasurement(fallback: std.mem.Allocator, probe: MiniProbe, path: []const u8, source: []const u8, styles: []const u8, expected: pardes.panes.mini.Result, reps: usize) !MiniMeasurement {
const samples = try gpa.alloc(u64, reps);
defer gpa.free(samples);
const allocators = pardes.memory.init(fallback);
@@ -921,8 +1117,8 @@ fn miniMeasurement(fallback: std.mem.Allocator, probe: MiniProbe, path: []const
defer arena.deinit();
if (core) |p| {
pump(p);
- try pardes.panes.Mini.open(p, 0, path);
- for (p.panes, 0..) |slot, id| if (slot != null and id != p.active) try p.removePane(id);
+ try pardes.panes.mini.open(p, 0, path);
+ for (p.panes, 0..) |slot, id| if (slot != null and id != p.active) try p.removePane(id, null);
pump(p);
p.settings.colors = true;
const file = p.panes[p.active].?.file.?;
@@ -957,7 +1153,7 @@ fn miniMeasurement(fallback: std.mem.Allocator, probe: MiniProbe, path: []const
else
styles;
defer if (probe == .highlight_generate) syntax_allocator.free(highlighted);
- const converted = try pardes.panes.Mini.generate(allocator, source, highlighted);
+ const converted = try pardes.panes.mini.generate(allocator, source, highlighted);
const elapsed = nowNs() - begin;
defer converted.deinit(allocator);
if (index == 0) result.cold_ns = elapsed else samples[index - 1] = elapsed;
@@ -1011,9 +1207,9 @@ fn measureMini(io: std.Io, fallback: std.mem.Allocator, reps: usize, json: bool)
break :blk try pardes.syntax.highlightFileRange(gpa, path, source, 0, source.len);
};
defer gpa.free(styles);
- if (styles.len != source.len or std.mem.indexOfScalar(u8, styles, @intFromEnum(pardes.syntax.Syn.comment)) == null)
+ if (styles.len != source.len or std.mem.indexOfScalar(u8, styles, @backingInt(pardes.syntax.Syn.comment)) == null)
return error.MiniSyntaxUnavailable;
- const expected = try pardes.panes.Mini.generate(gpa, source, styles);
+ const expected = try pardes.panes.mini.generate(gpa, source, styles);
defer expected.deinit(gpa);
if (expected.content.len == 0 or expected.content.len != expected.colors.len or !std.unicode.utf8ValidateSlice(expected.content))
return error.InvalidMiniOutput;
@@ -1056,11 +1252,11 @@ fn seek(pane: *pardes.Pane, fx: Fixture, n: usize) void {
const row = fx.lines / 10 + (n *% 7919) % span;
f.scroll = @min(row, fx.lines -| 1);
f.syntax_dirty = true;
- pane.cur_row = @intCast(f.scroll);
- pane.cur_col = if (fx.cols > 200) @intCast(fx.cols * 3 / 4) else 0;
- pane.cur_pinned = true;
- pane.hscroll = @max(0, pane.cur_col - 40);
- pane.sticky_col = -1;
+ pane.body.cur_row = @intCast(f.scroll);
+ pane.body.cur_col = if (fx.cols > 200) @intCast(fx.cols * 3 / 4) else 0;
+ pane.body.cur_pinned = true;
+ pane.hscroll = @max(0, pane.body.cur_col - 40);
+ pane.body.sticky_col = -1;
}
fn boot() !*pardes.Pardes {
@@ -1176,7 +1372,7 @@ fn reportText(
for (fixtures) |fx| {
if (base != null) o(" {s:>19}", .{fx.name}) else o(" {s:>12}", .{fx.name});
}
- o("\n{s}\n", .{if (base != null) "-" ** (12 + fixtures.len * 20) else "-" ** (12 + fixtures.len * 13)});
+ 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| {
o("{s:<12}", .{op.label()});
@@ -1203,7 +1399,7 @@ fn reportText(
for (term_fixtures) |fx| {
if (base != null) o(" {s:>19}", .{fx.name}) else o(" {s:>12}", .{fx.name});
}
- o("\n{s}\n", .{if (base != null) "-" ** (12 + term_fixtures.len * 20) else "-" ** (12 + term_fixtures.len * 13)});
+ o("\n{s}\n", .{if (base != null) &@as([12 + term_fixtures.len * 20]u8, @splat('-')) else &@as([12 + term_fixtures.len * 13]u8, @splat('-'))});
for (std.enums.values(TermOp), 0..) |op, oi| {
o("{s:<12}", .{op.label()});
for (0..term_fixtures.len) |fi| {
@@ -1288,6 +1484,7 @@ fn writeJson(
const Base = struct {
med: [std.enums.values(Op).len][fixtures.len]u64,
+ min: [std.enums.values(Op).len][fixtures.len]u64 = @splat(@splat(0)),
term_med: [std.enums.values(TermOp).len][term_fixtures.len]u64,
};
@@ -1314,10 +1511,11 @@ fn parseBase(src: []const u8, opts: Options, bytes: *const [fixtures.len]usize)
defer parsed.deinit();
const report = parsed.value;
if (!std.mem.eql(u8, report.harness, harness_id)) return error.BaselineHarnessMismatch;
- inline for (std.meta.fields(BuildIdentity)) |field| {
- const before = @field(report.build, field.name);
- const after = @field(build_identity, field.name);
- const same = if (field.type == []const u8) std.mem.eql(u8, before, after) else before == after;
+ const info = @typeInfo(BuildIdentity).@"struct";
+ inline for (info.field_names, info.field_types) |name, T| {
+ const before = @field(report.build, name);
+ const after = @field(build_identity, name);
+ const same = if (T == []const u8) std.mem.eql(u8, before, after) else before == after;
if (!same) return error.BaselineBuildMismatch;
}
if (report.cols != opts.cols or report.rows != opts.rows or report.reps != opts.reps or
@@ -1353,6 +1551,7 @@ fn parseBase(src: []const u8, opts: Options, bytes: *const [fixtures.len]usize)
if (file_seen[oi][index]) return error.BaselineCoverage;
file_seen[oi][index] = true;
base.med[oi][index] = cell.med_us;
+ base.min[oi][index] = cell.min_us;
} else {
if (opts.only != null) return error.BaselineCoverage;
const ti = for (term_fixtures, 0..) |fixture, index| {
@@ -1397,8 +1596,22 @@ fn selfTest() !void {
&.{ "--terminal-mib", "1", "--only", "small" }, &.{ "--terminal-mib", "1", "--creation" },
&.{ "--terminal-mib", "1", "--base", "old.json" }, &.{ "--mini", "--creation" },
&.{ "--mini", "--terminal-mib", "1" }, &.{ "--mini", "--base", "old.json" },
- &.{ "--mini", "--only", "small" },
+ &.{ "--mini", "--only", "small" }, &.{ "--max-ratio", "3" },
}) |args| try testing.expectError(error.IncompatibleOptions, Options.parse(args));
+ try testing.expectError(error.InvalidMeasurement, Options.parse(&.{ "--base", "old.json", "--max-ratio", "0.5" }));
+ const gated = try Options.parse(&.{ "--only", "medium", "--base", "old.json", "--max-ratio", "3" });
+ try testing.expectEqual(@as(f64, 3), gated.max_ratio.?);
+ {
+ // A cell three and a half times its baseline's best fails; the
+ // rest pass.
+ var cells: [std.enums.values(Op).len][fixtures.len]Cell = @splat(@splat(.{}));
+ var base: Base = .{ .med = @splat(@splat(0)), .term_med = @splat(@splat(0)) };
+ base.min[1][1] = 100;
+ cells[1][1] = .{ .min_us = 290, .med_us = 300, .p90_us = 300, .max_us = 300 };
+ try gate(&cells, &base, 3);
+ cells[1][1].min_us = 350;
+ try testing.expectError(error.PerformanceRegression, gate(&cells, &base, 3));
+ }
const selected = try Options.parse(&.{ "--only", "small", "--reps", "2", "--cols", "80", "--rows", "24" });
try testing.expectEqual(@as(usize, 2), selected.reps);
try testing.expectEqual(@as(u16, 80), selected.cols);
diff --git a/test/record_casts.py b/test/record_casts.py
new file mode 100644
index 00000000..13893517
--- /dev/null
+++ b/test/record_casts.py
@@ -0,0 +1,947 @@
+#!/usr/bin/env python3
+"""Record the documentation site's terminal casts (asciicast v2).
+
+zig build -Dplatform=tty -Doptimize=ReleaseSafe --prefix <scratch dir>
+python3 -B test/record_casts.py <scratch dir>/bin/pardes [cast ...] [--show]
+
+Each cast runs the tty pardes in a pty this script owns, sized 100x30 with
+TIOCSWINSZ, and plays the part of a plain xterm: it answers the queries an
+xterm answers (device attributes, device status, cursor position,
+XTVERSION, DECRQM as "not recognised", window sizes) and nothing else, so
+kitty graphics and the kitty keyboard stay unanswered: images are drawn
+as PETSCII glyph art, and a PDF as its text layer. Keys and SGR mouse
+reports are scripted.
+
+A cast is cut into steps: after each scripted input the recorder waits
+until the screen shows what the step waits for and pardes has drawn and
+gone idle, then stamps the step at its time on a virtual clock (starting
+at 0, a scripted hold between steps, no gap over 2 s). pyte follows the
+screen pardes draws, and an event is the cells the step changed, drawn
+afresh: how many frames pardes took to get there (a shell's output racing
+them) never reaches the file, so the same input makes the same cast.
+Wall-clock time never reaches it either. The bytes pardes wrote, stamped
+the same way, go to <work>/<name>.raw.cast beside it.
+
+--show replays each finished cast through pyte, prints its last frame
+(or the one --at seconds in) and draws it to <work>/<name>.png.
+
+Nothing of the caller's environment reaches the recording: the session
+gets a home, config, runtime and cache dirs under --work, a PATH with the
+recorded pardes first, and no PARDES_*, 9P mount, display or bus. The demo
+project and pictures live under /tmp/cast (short paths for the tags, a
+few hundred KB) and are removed after. The PDF (--pdf) is only read,
+through a symlink.
+
+Needs pyte and Pillow (in a venv), cc, make and git.
+"""
+import argparse
+import codecs
+import contextlib
+import fcntl
+import json
+import math
+import os
+from pathlib import Path
+import re
+import shutil
+import signal
+import struct
+import subprocess
+import termios
+import threading
+import time
+
+import pyte
+
+REPO = Path(__file__).resolve().parent.parent
+OUT = REPO / 'docs/site/casts'
+COLS, ROWS = 100, 30
+CELL_W, CELL_H = 10, 20 # the pixels a cell claims to be, for TIOCSWINSZ and CSI 14/16 t
+MAX_GAP = 2.0
+PROJECT = Path('/tmp/cast/hello')
+
+# ---------------------------------------------------------------------------
+# the terminal: queries answered as a plain xterm answers them
+
+DA1 = b'\x1b[?64;1;2;6;9;15;16;17;18;21;22;28c'
+XTVERSION = b'\x1bP>|XTerm(390)\x1b\\'
+
+# Everything pardes asks its terminal, answered in _answer as an xterm
+# would; what xterm ignores (kitty's queries, OSC 66) goes unanswered.
+# None of it reaches the cast.
+QUERY = re.compile(rb'''
+ \x1b\[\?(?P<decrqm>\d+)\$p # DECRQM: answered "not recognised"
+ | \x1b\[(?P<cpr>6)n # cursor position
+ | \x1b\[(?P<dsr>5)n # device status: each frame ends asking it
+ | \x1b\[(?P<da1>0?)c # primary device attributes
+ | \x1b\[>(?P<xtv>0?)q # XTVERSION
+ | \x1b\[(?P<winop>1[468])t # window/cell size in pixels, size in cells
+ | \x1b\[>\x20q # kitty multi-cursor query
+ | \x1b\[\?u # kitty keyboard query
+ | \x1b_G[^\x1b]*\x1b\\ # kitty graphics
+ | \x1b\]66;[^\x07\x1b]*(?:\x07|\x1b\\) # explicit width / scaled text
+ | \x1b\[\?2048h # in-band resize reports
+''', re.X)
+
+SGR = re.compile(rb'\x1b\[([0-9:;]*)m')
+
+
+def sgr_semicolons(m):
+ """Colon-form SGR (38:2:r:g:b, 4:3) in the semicolon form xterm, pyte
+ and asciinema's player all read; an underline colour (58) is dropped."""
+ params = m.group(1)
+ if b':' not in params:
+ return m.group(0)
+ out = []
+ for p in params.split(b';'):
+ if b':' not in p:
+ out.append(p)
+ continue
+ parts = p.split(b':')
+ if parts[0] in (b'38', b'48'):
+ if parts[1] == b'2' and len(parts) == 6: # 38:2:<colorspace>:r:g:b
+ parts = parts[:2] + parts[3:]
+ out.append(b';'.join(parts))
+ elif parts[0] == b'4':
+ out.append(b'4' if parts[1] != b'0' else b'24')
+ # 58:... (underline colour) has no semicolon form a player reads
+ return b'\x1b[' + b';'.join(out) + b'm'
+
+
+def incomplete_tail(buf):
+ """Where an escape sequence the buffer ends inside of starts, or None."""
+ i = buf.rfind(b'\x1b')
+ if i < 0:
+ return None
+ tail = buf[i:]
+ if len(tail) == 1:
+ return i
+ kind = tail[1:2]
+ if kind == b'[':
+ return None if re.match(rb'\x1b\[[\x30-\x3f]*[\x20-\x2f]*[\x40-\x7e]', tail) else i
+ if kind in (b']', b'_', b'P', b'^'):
+ # Ended by BEL, else open: its ST (ESC \\) would be a later ESC.
+ return None if b'\x07' in tail[2:] else i
+ return None
+
+
+def utf8_tail(buf):
+ """How many bytes at the end of buf start a UTF-8 sequence not yet whole."""
+ for back in range(1, min(4, len(buf)) + 1):
+ b = buf[-back]
+ if b & 0xC0 == 0x80:
+ continue
+ need = 2 if b & 0xE0 == 0xC0 else 3 if b & 0xF0 == 0xE0 else 4 if b & 0xF8 == 0xF0 else 1
+ return back if need > back else 0
+ return 0
+
+
+def clean_env(home, binary):
+ """The environment from nothing: no session, mount, display or bus of
+ the caller's, and the recorded pardes first on PATH."""
+ runtime = home / 'run'
+ env = dict(
+ PATH=f'{binary.parent}:/usr/local/bin:/usr/bin:/bin',
+ HOME=str(home), USER='demo', LOGNAME='demo',
+ SHELL='/bin/sh', TERM='xterm-256color', LANG='C.UTF-8', LC_ALL='C.UTF-8', TZ='UTC',
+ XDG_CONFIG_HOME=str(home / 'config'), XDG_DATA_HOME=str(home / 'data'),
+ XDG_STATE_HOME=str(home / 'state'), XDG_CACHE_HOME=str(home / 'cache'), XDG_RUNTIME_DIR=str(runtime),
+ PS1='$ ', GIT_CONFIG_NOSYSTEM='1',
+ GIT_AUTHOR_NAME='Demo', GIT_AUTHOR_EMAIL='[email protected]',
+ GIT_COMMITTER_NAME='Demo', GIT_COMMITTER_EMAIL='[email protected]',
+ # The session's own, set for the recording: no clock in messages, no
+ # language server racing the keys.
+ PARDES_NOTIME='1',
+ )
+ for language in ['RS', 'C', 'GO', 'TS', 'PY', 'ZIG']:
+ env['PARDES_LSP_' + language] = ''
+ return env
+
+
+def descendants(pid):
+ """pid's descendants, by /proc's parent links."""
+ children = {}
+ for d in Path('/proc').iterdir():
+ if not d.name.isdigit():
+ continue
+ try:
+ stat = (d / 'stat').read_text()
+ except OSError:
+ continue
+ ppid = int(stat[stat.rfind(')') + 2:].split()[1])
+ children.setdefault(ppid, []).append(int(d.name))
+ out, todo = [], [pid]
+ while todo:
+ for c in children.get(todo.pop(), []):
+ out.append(c)
+ todo.append(c)
+ return out
+
+
+class Recording:
+ """pardes in a pty of ours, the screen it draws, and the cast so far."""
+
+ def __init__(self, binary, home, args, cwd, log=None):
+ self.binary = Path(binary).resolve()
+ self.log = log
+ self.screen = pyte.Screen(COLS, ROWS)
+ self.stream = pyte.ByteStream(self.screen)
+ self.lock = threading.Lock()
+ self.carry = b'' # an escape sequence or UTF-8 character not yet whole
+ self.pending = bytearray() # cleaned output not yet in an event
+ self.events = [] # (seconds, the screen's changes as text)
+ self.raw_events = [] # (seconds, bytes pardes wrote)
+ self.shown = None # the screen as the cast has drawn it
+ self.clock = 0.0
+ self.last_out = time.monotonic()
+ env = clean_env(home, self.binary)
+ master, slave = os.openpty()
+ fcntl.ioctl(slave, termios.TIOCSWINSZ, struct.pack('HHHH', ROWS, COLS, COLS * CELL_W, ROWS * CELL_H))
+ self.master = master
+ self.child = subprocess.Popen(
+ [str(self.binary), *map(str, args)], cwd=cwd, env=env,
+ stdin=slave, stdout=slave, stderr=open(home / 'stderr.log', 'ab'), start_new_session=True,
+ preexec_fn=lambda: fcntl.ioctl(0, termios.TIOCSCTTY, 0))
+ os.close(slave)
+ self.reader = threading.Thread(target=self._read, daemon=True)
+ self.reader.start()
+
+ # output
+
+ def _read(self):
+ while True:
+ try:
+ data = os.read(self.master, 65536)
+ except OSError:
+ return
+ if not data:
+ return
+ with self.lock:
+ self._take(data)
+ self.last_out = time.monotonic()
+
+ def _take(self, data):
+ buf = self.carry + data
+ cut = incomplete_tail(buf)
+ if cut is None:
+ cut = len(buf) - utf8_tail(buf)
+ buf, self.carry = buf[:cut], buf[cut:]
+ at = 0
+ for m in QUERY.finditer(buf):
+ self._show(buf[at:m.start()])
+ at = m.end()
+ self._answer(m)
+ self._show(buf[at:])
+
+ def _show(self, data):
+ if not data:
+ return
+ data = SGR.sub(sgr_semicolons, data)
+ self.pending += data
+ self.stream.feed(data)
+
+ def _answer(self, m):
+ reply = None
+ if m.group('decrqm') is not None:
+ reply = b'\x1b[?%s;0$y' % m.group('decrqm')
+ elif m.group('cpr') is not None:
+ reply = b'\x1b[%d;%dR' % (self.screen.cursor.y + 1, self.screen.cursor.x + 1)
+ elif m.group('dsr') is not None:
+ reply = b'\x1b[0n'
+ elif m.group('da1') is not None:
+ reply = DA1
+ elif m.group('xtv') is not None:
+ reply = XTVERSION
+ elif m.group('winop') == b'14':
+ reply = b'\x1b[4;%d;%dt' % (ROWS * CELL_H, COLS * CELL_W)
+ elif m.group('winop') == b'16':
+ reply = b'\x1b[6;%d;%dt' % (CELL_H, CELL_W)
+ elif m.group('winop') == b'18':
+ reply = b'\x1b[8;%d;%dt' % (ROWS, COLS)
+ if reply:
+ os.write(self.master, reply)
+
+ # the screen
+
+ def lines(self):
+ with self.lock:
+ return list(self.screen.display)
+
+ def text(self):
+ return '\n'.join(self.lines())
+
+ def find(self, text, after=0, nth=0, before=None):
+ """(col, row) of `text` on screen, searching rows from `after`."""
+ for r, line in enumerate(self.lines()):
+ if r < after or (before is not None and r >= before):
+ continue
+ at = line.find(text)
+ while at >= 0:
+ if nth == 0:
+ return at, r
+ nth -= 1
+ at = line.find(text, at + 1)
+ raise LookupError(f'{text!r} not on screen:\n' + self.text())
+
+ def cursor(self):
+ with self.lock:
+ return self.screen.cursor.x, self.screen.cursor.y
+
+ # input
+
+ def send(self, data):
+ os.write(self.master, data.encode() if isinstance(data, str) else data)
+
+ def mouse(self, button, col, row, release=False, motion=False):
+ """An SGR mouse report: button 0 left, 1 middle, 2 right, 3 none;
+ col and row from 0."""
+ code = button + (32 if motion else 0)
+ self.send(f'\x1b[<{code};{col + 1};{row + 1}{"m" if release else "M"}')
+
+ # steps
+
+ def busy(self):
+ """Whether a thread of pardes is running (or in disk wait)."""
+ tasks = Path(f'/proc/{self.child.pid}/task')
+ with contextlib.suppress(OSError):
+ for t in tasks.iterdir():
+ with contextlib.suppress(OSError):
+ stat = (t / 'stat').read_text()
+ if stat[stat.rfind(')') + 2] in 'RD':
+ return True
+ return False
+
+ def settle(self, until=None, quiet=.15, timeout=20, what='', sent=None):
+ """Wait for `until` and for pardes to go quiet and idle, after
+ drawing at least once since the input sent at `sent` (or for .8 s
+ to pass without its drawing: an input that changes nothing)."""
+ deadline = time.monotonic() + timeout
+ while True:
+ now = time.monotonic()
+ with self.lock:
+ drew = sent is None or self.last_out > sent or now - sent > .8
+ idle = drew and now - self.last_out >= quiet
+ idle = idle and not self.busy()
+ ok = until is None or until(self)
+ if ok and idle:
+ return
+ if now > deadline:
+ raise RuntimeError(f'timed out waiting for {what or until}\n' + self.text())
+ if self.child.poll() is not None:
+ raise RuntimeError('pardes exited\n' + self.text())
+ time.sleep(.01)
+
+ def step(self, keys=None, hold=.5, until=None, quiet=.15, timeout=20, what=''):
+ """Send `keys` (bytes, str or a callable), wait for `until` and quiet,
+ stamp the output at the clock and move the clock on by `hold`."""
+ sent = time.monotonic() if keys else None
+ if callable(keys):
+ keys(self)
+ elif keys:
+ self.send(keys)
+ self.settle(until, quiet, timeout, what, sent)
+ self.flush()
+ self.clock += min(hold, MAX_GAP)
+ if self.log:
+ self.log.write(f'--- t={self.clock:.2f} {keys!r} {what}\n' + self.text() + '\n')
+
+ def flush(self):
+ """Stamp what pardes wrote since the last step at the clock: as the
+ screen cells it changed (the cast), and as its raw bytes (--raw)."""
+ with self.lock:
+ data, self.pending = bytes(self.pending), bytearray()
+ now = snapshot(self.screen)
+ t = round(self.clock, 3)
+ if data:
+ self.raw_events.append((t, data))
+ delta = repaint(self.shown, now)
+ if delta:
+ self.events.append((t, delta))
+ self.shown = now
+
+ def type(self, text, per_key=.09, last_hold=.4, until=None):
+ for i, ch in enumerate(text):
+ last = i == len(text) - 1
+ self.step(ch, hold=last_hold if last else per_key, until=until if last else None, quiet=.06)
+
+ def click(self, button, col, row, hold=.4, until=None, what='', quiet=.15):
+ """Press and release `button` over one cell."""
+ def act(s):
+ s.mouse(3, col, row, motion=True)
+ time.sleep(.03)
+ s.mouse(button, col, row)
+ time.sleep(.03)
+ s.mouse(button, col, row, release=True)
+ self.step(act, hold=hold, until=until, what=what, quiet=quiet)
+
+ def sweep(self, button, start, end, show=.6, hold=.6, until=None, what='', quiet=.15):
+ """Press `button` at `start`, drag to `end`, hold it there for a
+ frame (the sweep's colour shows), then release."""
+ def press(s):
+ s.mouse(3, *start, motion=True)
+ time.sleep(.03)
+ s.mouse(button, *start)
+ c0, r0 = start
+ c1, r1 = end
+ n = max(abs(c1 - c0), abs(r1 - r0))
+ for i in range(1, n + 1):
+ time.sleep(.01)
+ s.mouse(button, c0 + (c1 - c0) * i // n, r0 + (r1 - r0) * i // n, motion=True)
+ self.step(press, hold=show)
+ self.step(lambda s: s.mouse(button, *end, release=True), hold=hold, until=until, what=what, quiet=quiet)
+
+ def hover(self, col, row, hold=.3):
+ self.step(lambda s: s.mouse(3, col, row, motion=True), hold=hold)
+
+ def close(self):
+ pids = descendants(self.child.pid)
+ if self.child.poll() is None:
+ self.child.terminate()
+ try:
+ self.child.wait(timeout=5)
+ except subprocess.TimeoutExpired:
+ self.child.kill()
+ self.child.wait()
+ for pid in pids + descendants(self.child.pid):
+ with contextlib.suppress(ProcessLookupError, PermissionError):
+ os.kill(pid, signal.SIGKILL)
+ with contextlib.suppress(ProcessLookupError, PermissionError):
+ os.killpg(self.child.pid, signal.SIGKILL)
+ with contextlib.suppress(OSError):
+ os.close(self.master)
+ self.reader.join(timeout=2)
+
+ def cast(self, title, raw=False):
+ """The asciicast v2 text: the events, then the last hold as an
+ empty event so the player keeps the last frame up."""
+ head = dict(version=2, width=COLS, height=ROWS, title=title,
+ env=dict(TERM='xterm-256color', SHELL='/bin/sh'))
+ out = [json.dumps(head)]
+ if raw:
+ decoder = codecs.getincrementaldecoder('utf-8')('replace')
+ events = [(t, decoder.decode(data)) for t, data in self.raw_events]
+ else:
+ events = self.events
+ # Steps that changed nothing leave their holds end to end: no gap
+ # longer than MAX_GAP survives.
+ last = shift = 0.0
+ for t, text in events + [(self.clock, '')]:
+ shift += max(0.0, t - last - MAX_GAP)
+ last = t
+ out.append(json.dumps([round(t - shift, 3), 'o', text], ensure_ascii=False))
+ return '\n'.join(out) + '\n'
+
+
+# ---------------------------------------------------------------------------
+# the cast's own drawing: pyte's screen, cell by cell
+#
+# pardes draws diffs against its last frame, and how many frames a step
+# took (a shell's output racing the frames) varies from run to run while
+# the screen it ends on does not. So an event is the cells the step left
+# changed, drawn afresh: the same steps make the same file.
+
+NAMED = {name: i for i, name in enumerate(['black', 'red', 'green', 'brown', 'blue', 'magenta', 'cyan', 'white'])}
+
+
+def snapshot(screen):
+ """The screen's cells as tuples, and its cursor."""
+ cells = [[tuple(c) for c in (screen.buffer[y][x] for x in range(screen.columns))]
+ for y in range(screen.lines)]
+ return cells, (screen.cursor.x, screen.cursor.y, screen.cursor.hidden)
+
+
+def colour(name, base):
+ """SGR parameters for a pyte colour: base 30 for fg, 40 for bg."""
+ if name == 'default':
+ return [str(base + 9)]
+ if name in NAMED:
+ return [str(base + NAMED[name])]
+ if name.startswith('bright') and name[6:] in NAMED:
+ return [str(base + 60 + NAMED[name[6:]])]
+ r, g, b = (int(name[i:i + 2], 16) for i in (0, 2, 4))
+ return [str(base + 8), '2', str(r), str(g), str(b)]
+
+
+def pen(cell):
+ _, fg, bg, bold, italics, underscore, strikethrough, reverse, blink = cell
+ params = ['0'] + colour(fg, 30) + colour(bg, 40)
+ for on, code in ((bold, '1'), (italics, '3'), (underscore, '4'), (blink, '5'), (reverse, '7'), (strikethrough, '9')):
+ if on:
+ params.append(code)
+ return '\x1b[' + ';'.join(params) + 'm'
+
+
+def repaint(old, new):
+ """The text that turns screen `old` (None: a fresh terminal) into `new`."""
+ cells, (cx, cy, hidden) = new
+ out = []
+ if old is None:
+ out.append('\x1b[?25l\x1b[0m\x1b[2J')
+ blank = (' ', 'default', 'default', False, False, False, False, False, False)
+ old_cells, old_cursor = [[blank] * len(row) for row in cells], None
+ else:
+ old_cells, old_cursor = old
+ at, drawn_pen = None, None
+ for y, (row, old_row) in enumerate(zip(cells, old_cells)):
+ for x, cell in enumerate(row):
+ if cell == old_row[x] or cell[0] == '': # unchanged, or the right half of a wide character
+ continue
+ if at != (x, y):
+ out.append(f'\x1b[{y + 1};{x + 1}H')
+ p = pen(cell)
+ if p != drawn_pen:
+ out.append(p)
+ drawn_pen = p
+ out.append(cell[0])
+ at = (x + (2 if x + 1 < len(row) and row[x + 1][0] == '' else 1), y)
+ if not out and old_cursor == (cx, cy, hidden):
+ return ''
+ out.append(f'\x1b[0m\x1b[{cy + 1};{cx + 1}H' + ('\x1b[?25l' if hidden else '\x1b[?25h'))
+ return ''.join(out)
+
+
+# ---------------------------------------------------------------------------
+# the fixtures
+
+MAIN_C = '''#include <stdio.h>
+
+static int square(int n)
+{
+ return n * n;
+}
+
+int main(void)
+{
+ int sum = 0; /* 1 + 4 + 9 + 16 */
+ for (int i = 1; i <= 4; i++)
+ sum += square(i);
+ printf("squares: %d\\n", sum);
+ return 0;
+}
+'''
+
+MAKEFILE = '''CFLAGS = -Wall -fno-diagnostics-show-caret -fno-diagnostics-show-option -fno-diagnostics-color
+
+hello: main.c
+\t@cc $(CFLAGS) -o hello main.c
+'''
+
+README = '''hello: prints the sum of the first four squares.
+
+Build it with make, run it with ./hello.
+'''
+
+NOTES = '''hello: notes
+
+The sum of the squares of 1 to 4 is 30.
+What ./hello prints:
+
+'''
+
+
+def git(*args, cwd=PROJECT, env=None, date=None):
+ e = dict(env or {})
+ if date:
+ e.update(GIT_AUTHOR_DATE=date, GIT_COMMITTER_DATE=date)
+ subprocess.run(['git', *args], cwd=cwd, env=e, check=True, capture_output=True)
+
+
+def make_project(home):
+ shutil.rmtree(PROJECT, ignore_errors=True)
+ PROJECT.mkdir(parents=True)
+ env = clean_env(home, Path('/nonexistent/pardes'))
+ env.pop('PS1')
+ git('init', '-q', '-b', 'main', env=env)
+ git('config', 'color.ui', 'always', env=env)
+ history = [
+ ('2026-09-21T10:00:00Z', 'Start hello', {'README': README}),
+ ('2026-09-22T11:30:00Z', 'Add a Makefile', {'Makefile': MAKEFILE}),
+ ('2026-09-24T09:15:00Z', 'Print the sum of squares', {'main.c': MAIN_C}),
+ ('2026-09-27T16:40:00Z', 'Keep notes', {'NOTES': NOTES}),
+ ]
+ for date, message, files in history:
+ for name, body in files.items():
+ (PROJECT / name).write_text(body)
+ git('add', '.', env=env)
+ git('commit', '-q', '-m', message, env=env, date=date)
+ git('tag', 'v0.1', env=env)
+ (PROJECT / '.gitignore').write_text('hello\n')
+
+
+ART = PROJECT.parent / 'art'
+SDM = Path('/home/goblin/01-resources/intel-devref-ii.pdf')
+
+# The escape-time bands, outside in: deep blue to white to orange, chosen
+# to land on distinct C64 colours when the matcher picks its 16.
+CYCLE = [(20, 40, 160), (40, 120, 230), (120, 210, 250), (250, 250, 250),
+ (250, 220, 60), (230, 90, 20), (120, 30, 40), (20, 40, 160)]
+
+
+def band(t):
+ t = t % 1.0 * (len(CYCLE) - 1)
+ i, u = int(t), t % 1.0
+ return tuple(round(a + (b - a) * u) for a, b in zip(CYCLE[i], CYCLE[i + 1]))
+
+
+def mandelbrot(path, cx, cy, width, iterations, period, size=(480, 320)):
+ """The Mandelbrot set around cx+cy·i, `width` across: the set black,
+ the outside in smooth escape-time bands that repeat every `period`
+ (in √iterations). Pure Python, a few seconds."""
+ from PIL import Image
+ w, h = size
+ height = width * h / w
+ im = Image.new('RGB', size)
+ px = im.load()
+ for j in range(h):
+ y0 = cy + height / 2 - height * (j + .5) / h
+ for i in range(w):
+ x0 = cx - width / 2 + width * (i + .5) / w
+ x = y = 0.0
+ n = 0
+ while x * x + y * y <= 256 and n < iterations:
+ x, y = x * x - y * y + x0, 2 * x * y + y0
+ n += 1
+ if n == iterations:
+ px[i, j] = (0, 0, 0)
+ else:
+ nu = n + 1 - math.log2(math.log2(math.sqrt(x * x + y * y)))
+ px[i, j] = band(math.sqrt(max(nu, 0)) / period)
+ im.save(path)
+
+
+ART_README = '''pictures, right-click a name:
+
+ mandelbrot.png the whole set
+ seahorse.png a seahorse valley, zoomed in
+ sdm.pdf Intel SDM vol. 2, 2,515 pages
+'''
+
+
+def make_art(pdf):
+ """The classic view, a seahorse valley's spiral, a short name for the
+ manual (a symlink: the PDF is only read), and a README naming them."""
+ shutil.rmtree(ART, ignore_errors=True)
+ ART.mkdir(parents=True)
+ mandelbrot(ART / 'mandelbrot.png', -0.65, 0.0, 3.2, 96, 10.5)
+ mandelbrot(ART / 'seahorse.png', -0.7436, 0.1318, 0.0035, 400, 6.0)
+ (ART / 'sdm.pdf').symlink_to(pdf)
+ (ART / 'README').write_text(ART_README)
+
+
+# ---------------------------------------------------------------------------
+# checking: replay a cast through pyte, print and draw its last frame
+
+def replay(path, until=None):
+ """The pyte screen after the cast's events (up to `until` seconds)."""
+ screen = pyte.Screen(COLS, ROWS)
+ stream = pyte.Stream(screen)
+ with open(path) as f:
+ head = json.loads(f.readline())
+ assert head['width'] == COLS and head['height'] == ROWS
+ for line in f:
+ t, kind, data = json.loads(line)
+ if until is not None and t > until:
+ break
+ stream.feed(data)
+ return screen
+
+
+PYTE_COLOURS = dict(black=(0, 0, 0), red=(205, 0, 0), green=(0, 205, 0), brown=(205, 205, 0),
+ blue=(0, 0, 238), magenta=(205, 0, 205), cyan=(0, 205, 205), white=(229, 229, 229))
+
+
+def rgb(colour, default):
+ if colour == 'default':
+ return default
+ if colour in PYTE_COLOURS:
+ return PYTE_COLOURS[colour]
+ if colour.startswith('bright') and colour[6:] in PYTE_COLOURS:
+ return tuple(min(255, v + 50) for v in PYTE_COLOURS[colour[6:]])
+ with contextlib.suppress(ValueError):
+ return tuple(int(colour[i:i + 2], 16) for i in (0, 2, 4))
+ return default
+
+
+def block_rects(cp, w, h):
+ """The filled rectangles of a block element or sextant, else None."""
+ if 0x1FB00 <= cp <= 0x1FB3B: # sextants, skipping the four that are blocks
+ n = cp - 0x1FB00 + 1
+ n += n >= 21
+ n += n >= 42
+ bits = n
+ elif cp in (0x258C, 0x2590, 0x2588):
+ bits = {0x258C: 21, 0x2590: 42, 0x2588: 63}[cp]
+ else:
+ halves = {0x2580: [(0, 0, 1, .5)], 0x2584: [(0, .5, 1, 1)], 0x2596: [(0, .5, .5, 1)],
+ 0x2597: [(.5, .5, 1, 1)], 0x2598: [(0, 0, .5, .5)], 0x259D: [(.5, 0, 1, .5)],
+ 0x2599: [(0, 0, .5, 1), (.5, .5, 1, 1)], 0x259B: [(0, 0, 1, .5), (0, .5, .5, 1)],
+ 0x259C: [(0, 0, 1, .5), (.5, .5, 1, 1)], 0x259F: [(.5, 0, 1, 1), (0, .5, .5, 1)],
+ 0x259A: [(0, 0, .5, .5), (.5, .5, 1, 1)], 0x259E: [(.5, 0, 1, .5), (0, .5, .5, 1)]}
+ if cp not in halves:
+ return None
+ return [(x0 * w, y0 * h, x1 * w, y1 * h) for x0, y0, x1, y1 in halves[cp]]
+ rects = []
+ for k in range(6):
+ if bits >> k & 1:
+ col, row = k % 2, k // 2
+ rects.append((col * w / 2, row * h / 3, (col + 1) * w / 2, (row + 1) * h / 3))
+ return rects
+
+
+def render_png(screen, path, cw=10, ch=20):
+ """A picture of a pyte screen: blocks and sextants drawn, the rest in
+ the repo's Adwaita Mono."""
+ from PIL import Image, ImageDraw, ImageFont
+ font = ImageFont.truetype(str(REPO / 'assets/AdwaitaMono-Regular.ttf'), 16)
+ im = Image.new('RGB', (screen.columns * cw, screen.lines * ch), (0, 0, 0))
+ d = ImageDraw.Draw(im)
+ for y in range(screen.lines):
+ row = screen.buffer[y]
+ for x in range(screen.columns):
+ c = row[x]
+ fg, bg = rgb(c.fg, (229, 229, 229)), rgb(c.bg, (0, 0, 0))
+ if c.reverse != (not screen.cursor.hidden and (x, y) == (screen.cursor.x, screen.cursor.y)):
+ fg, bg = bg, fg
+ x0, y0 = x * cw, y * ch
+ d.rectangle((x0, y0, x0 + cw - 1, y0 + ch - 1), fill=bg)
+ if not c.data or c.data == ' ':
+ continue
+ rects = block_rects(ord(c.data[0]), cw, ch) if len(c.data) == 1 else None
+ if rects is not None:
+ for a, b, e, f in rects:
+ d.rectangle((x0 + a, y0 + b, x0 + e - 1, y0 + f - 1), fill=fg)
+ else:
+ d.text((x0, y0 + 1), c.data, font=font, fill=fg)
+ im.save(path)
+
+
+# ---------------------------------------------------------------------------
+# the casts
+
+def tag_end(r, row):
+ """Two cells past the last word of the tag on `row`: a B1 click there
+ types at the tag's end."""
+ return len(r.lines()[row].rstrip()) + 1, row
+
+
+def type_in_tag(r, row, text):
+ r.click(0, *tag_end(r, row), hold=.3)
+ r.type(text, until=lambda s: text.strip() in s.lines()[row], last_hold=.3)
+ r.step('\x1b', hold=.4)
+
+
+def word_at(r, word, row):
+ """(start, end) cells of `word` on `row`, end exclusive, as a sweep takes it."""
+ c, w = r.find(word, after=row, before=row + 1)
+ return (c, w), (c + len(word), w)
+
+
+def keys(r, seq, hold, per_key=.22):
+ for i, k in enumerate(seq):
+ r.step(k, hold=hold if i == len(seq) - 1 else per_key)
+
+
+def live_text(r):
+ """Helix keys rename a variable and save; B2 on make runs it, B3 on the
+ error it prints lands on the line, and the rename goes on there."""
+ r.step(None, until=lambda s: '#include' in s.text(), quiet=.4, hold=1.6)
+ for _ in range(9):
+ r.step('j', hold=.13, quiet=.05)
+ r.clock += .3
+ keys(r, 'wwe', .35)
+ keys(r, 'miw', .7)
+ r.step('c', hold=.3)
+ r.type('total', until=lambda s: 'int total' in s.text(), last_hold=.3)
+ r.step('\x1b', hold=.6)
+ keys(r, ' fs', 1.1)
+ type_in_tag(r, 2, ' make')
+ start, end = word_at(r, 'make', 2)
+ r.sweep(1, start, end, show=.8, hold=2.0, until=lambda s: 'exit 2' in s.text(), what='make')
+ c, w = r.find('main.c:12:9')
+ r.sweep(2, (c, w), (c + len('main.c:12:9'), w), show=.8, hold=1.6,
+ until=lambda s: s.cursor()[1] < 15, what='the look')
+ keys(r, 'miw', .6)
+ r.step('c', hold=.3)
+ r.type('total', until=lambda s: 'total += square' in s.text(), last_hold=.3)
+ r.step('\x1b', hold=2.0)
+
+
+def terminals(r):
+ """A shell beside the notes: run, Ctrl-b, copy a line of output into
+ the file; then git log paged through pardes - into a +Pager."""
+ r.step(None, until=lambda s: 'What ./hello prints' in s.text(), quiet=.4, hold=1.2)
+ start, end = word_at(r, 'Tty', 2)
+ r.sweep(1, start, end, show=.5, hold=.6, until=lambda s: 'Tty+sh' in s.text(), what='the shell')
+ r.step(None, until=lambda s: s.text().count('$') >= 2, hold=.4)
+ # Its own column, beside the file: Ctrl-b to normal, Alt-c, Ctrl-b back.
+ r.step('\x02', hold=.3)
+ r.step('\x1bc', hold=.4, until=lambda s: s.lines()[1].count('Delcol') == 2, what='the new column')
+ r.step('\x02', hold=.6)
+ r.type('make && ./hello', until=lambda s: 'make && ./hello' in s.text(), per_key=.07)
+ r.step('\r', hold=1.2, until=lambda s: 'squares: 30' in s.text(), what='./hello')
+ r.step('\x02', hold=.6)
+ r.step('k', hold=.4)
+ r.step('x', hold=.6)
+ r.step('y', hold=.5)
+ r.step('\x17', hold=.2)
+ r.step('h', hold=.6)
+ keys(r, 'ge', .5)
+ r.step('p', hold=1.0, until=lambda s: 'squares: 30' in s.lines()[8][:48], what='the paste')
+ r.step('\x17', hold=.2)
+ r.step('l', hold=.4)
+ r.step('\x02', hold=.6)
+ command = 'git log --stat | pardes -'
+ r.type(command, until=lambda s: command in s.text(), per_key=.07)
+ r.step('\r', hold=2.0, until=lambda s: '+Pager' in s.text() and 'Keep notes' in s.text(), quiet=.3,
+ what='the pager')
+
+
+def petscii(r):
+ """Right-click opens the Mandelbrot views, drawn as PETSCII glyph art;
+ then the Intel manual: its sections, a jump to CPUID and a search."""
+ def look(name, until, hold):
+ c, w = r.find(name)
+ r.sweep(2, (c, w), (c + len(name), w), show=.5, hold=hold, until=until, quiet=.4, what=name)
+
+ def close(name, hold):
+ c, w = r.find('art/' + name, after=2)
+ start, end = word_at(r, 'Del', w)
+ r.sweep(1, start, end, show=.4, hold=hold, until=lambda s: 'art/' + name not in s.text(), what='Del ' + name)
+
+ r.step(None, until=lambda s: 'sdm.pdf' in s.text(), quiet=.4, hold=1.6)
+ look('mandelbrot.png', lambda s: 'art/mandelbrot.png' in s.text(), 2.0)
+ close('mandelbrot.png', .5)
+ look('seahorse.png', lambda s: 'art/seahorse.png' in s.text(), 2.0)
+ close('seahorse.png', .5)
+ look('sdm.pdf', lambda s: '[1/2515]' in s.text(), 1.5)
+ c, w = r.find('PdfSections')
+ r.sweep(1, (c, w), (c + len('PdfSections'), w), show=.5, hold=1.3,
+ until=lambda s: 'Chapter 1' in s.text(), what='the sections')
+ c, w = r.find('+PdfSections')
+ type_in_tag(r, w, ' CPUID')
+ for _ in range(2): # B3 on a word in a tag finds it in the body
+ start, end = word_at(r, 'CPUID', w)
+ r.sweep(2, start, end, show=.4, hold=.9)
+ c, row = r.find('intel-devref-ii.pdf:317:200')
+ r.sweep(2, (c, row), (c + len('intel-devref-ii.pdf:317'), row), show=.5, hold=1.8,
+ until=lambda s: '[317/2515]' in s.text(), what='the jump')
+ start, end = word_at(r, 'Del', w)
+ r.sweep(1, start, end, show=.4, hold=.8, until=lambda s: '+PdfSections' not in s.text(), what='Del sections')
+ c, w = r.find('CPUID—CPU Identification')
+ r.click(0, c, w + 3, hold=.3)
+ r.step('/', hold=.3)
+ r.type('bit 21', until=lambda s: '/bit 21' in s.text(), last_hold=.3)
+ r.step('\r', hold=2.0, until=lambda s: '+Search' in s.text(), quiet=.4, timeout=60, what='the search')
+
+
+CASTS = {
+ 'live-text': dict(
+ run=live_text, cwd=PROJECT, args=['main.c'],
+ title='Live text',
+ caption='Helix keys edit; middle-click runs make; right-click the error opens its line.'),
+ 'terminals': dict(
+ run=terminals, cwd=PROJECT, args=['NOTES'],
+ title='Terminals as panes',
+ caption='A shell beside a file: Ctrl-b, copy a line, page git log.'),
+ 'petscii': dict(
+ run=petscii, cwd=ART, args=['README'],
+ title='Images and PDFs in a plain terminal',
+ caption='No kitty graphics: a Mandelbrot in PETSCII, then the Intel manual searched.'),
+}
+
+
+def make_home(work):
+ home = work / 'home'
+ shutil.rmtree(home, ignore_errors=True)
+ (home / 'config/pardes').mkdir(parents=True)
+ (home / 'run').mkdir(mode=0o700)
+ # No animation or blink: a frame drawn on a timer would land in the cast
+ # wherever the wall clock put it.
+ (home / 'config/pardes/init').write_text(
+ 'Theme orchard\nShell /bin/sh\nMessageLinger 0\nMessageAnimation off\nCursorBlink off\n'
+ 'SelectionGlow off\nHoverGlow off\nJumpTrail off\nThumbFlash off\n')
+ (home / '.gitconfig').write_text('[log]\n\tabbrevCommit = true\n[color]\n\tui = always\n')
+ return home
+
+
+def record(binary, work, name, pdf):
+ cast = CASTS[name]
+ home = make_home(work)
+ make_project(home)
+ make_art(pdf)
+ log = open(work / f'{name}.steps.log', 'w')
+ r = Recording(binary, home, cast['args'], cast['cwd'], log=log)
+ try:
+ cast['run'](r)
+ finally:
+ r.close()
+ log.close()
+ OUT.mkdir(parents=True, exist_ok=True)
+ out = OUT / f'{name}.cast'
+ out.write_text(r.cast(cast['title']))
+ (work / f'{name}.raw.cast').write_text(r.cast(cast['title'], raw=True))
+ length = json.loads(out.read_text().splitlines()[-1])[0]
+ print(f'{name}: {length:.1f} s, {out.stat().st_size / 1024:.0f} KB')
+
+
+def write_toml():
+ lines = ['# The landing page\'s terminal recordings (asciicast v2), in the order',
+ '# shown: casts/<name>.cast for each. The first plays by itself; all loop',
+ '# and fit the page\'s width. While `ready` is false the cast shows',
+ '# placeholder.svg, so the site builds before a recording exists.',
+ '# test/record_casts.py writes the casts and this file.', '']
+ for name, cast in CASTS.items():
+ lines += ['[[cast]]', f'name = "{name}"', f'title = "{cast["title"]}"',
+ f'caption = "{cast["caption"]}"', f'cols = {COLS}', f'rows = {ROWS}',
+ f'ready = {"true" if (OUT / f"{name}.cast").exists() else "false"}', '']
+ (OUT / 'casts.toml').write_text('\n'.join(lines))
+
+
+def show(name, work, at=None):
+ """Print a cast's frame (the last, or the one at `at` seconds) as text
+ and draw it to <work>/<name>.png."""
+ screen = replay(OUT / f'{name}.cast', at)
+ print(f'--- {name}' + (f' at {at} s' if at is not None else ''))
+ for line in screen.display:
+ print(line.rstrip())
+ render_png(screen, work / f'{name}.png')
+
+
+def main():
+ parser = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
+ parser.add_argument('binary', type=Path, nargs='?', help='a pardes built with -Dplatform=tty')
+ parser.add_argument('casts', nargs='*', help='which casts (default: all): ' + ', '.join(CASTS))
+ parser.add_argument('--work', type=Path, default=REPO.parent / '.scratch/casts/work',
+ help='the session home, step logs and check pictures (default %(default)s)')
+ parser.add_argument('--pdf', type=Path, default=SDM, help='the manual the petscii cast reads (default %(default)s)')
+ parser.add_argument('--show', action='store_true', help='print and draw each cast\'s last frame after')
+ parser.add_argument('--show-only', action='store_true', help='record nothing; print and draw the casts as they are')
+ parser.add_argument('--at', type=float, help='with --show: the frame at this many seconds instead')
+ args = parser.parse_args()
+ if args.binary is not None and args.binary.name in CASTS and not args.binary.exists():
+ args.casts.insert(0, args.binary.name)
+ args.binary = None
+ names = args.casts or list(CASTS)
+ for name in names:
+ if name not in CASTS:
+ parser.error(f'no cast {name!r}: ' + ', '.join(CASTS))
+ work = args.work.resolve()
+ work.mkdir(parents=True, exist_ok=True)
+ if not args.show_only:
+ if args.binary is None:
+ parser.error('the pardes binary to record is required')
+ if not args.pdf.is_file():
+ parser.error(f'no PDF at {args.pdf}')
+ try:
+ for name in names:
+ record(args.binary, work, name, args.pdf.resolve())
+ finally:
+ shutil.rmtree(PROJECT.parent, ignore_errors=True)
+ write_toml()
+ if args.show or args.show_only:
+ for name in names:
+ show(name, work, args.at)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/test/record_demos.py b/test/record_demos.py
new file mode 100644
index 00000000..3c64f55c
--- /dev/null
+++ b/test/record_demos.py
@@ -0,0 +1,1242 @@
+#!/usr/bin/env python3
+"""Record the documentation site's clips and theme shots from a hidden window.
+
+zig build -Dplatform=gui -Doptimize=ReleaseSafe --prefix <scratch dir>
+python3 -B test/record_demos.py <scratch dir>/bin/pardes-gui [clip ... | themes]
+
+Each clip drives a throwaway session (PARDES_TEST: an offscreen capture,
+the virtual clock) through its stdin's window-pixel mouse events, its keys
+and its 9P files, keeps the settled frame after every step, and lays the
+frames out on a timeline with a drawn pointer: a click glides there,
+stops, and presses and releases still, a ring and the button's name drawn.
+ffmpeg encodes the timeline to docs/site/media/<clip>.webm and .mp4, with
+<clip>.png as its poster and captions.txt beside them (clips.toml, which
+the site reads, is kept by hand). `themes` instead writes
+docs/site/media/themes/<theme>.png for each theme of src/themes, in the
+Themes builtin's order, and themes.toml.
+
+Needs a Wayland display for the hidden window, gcc and git for the demo
+project, 9ns (cloud9) for the scripting clip, Pillow and numpy, and the
+Intel SDM vol. 2 for the PDF clips (--pdf; read where it is, never copied).
+
+Frames and the intermediate video go under --work (default
+../.scratch/rec/work, beside the checkout). The demo project lives at
+/tmp/hello, a short path for the tags, and the session's home at
+/tmp/pardes-rec-home; both are removed after. Nothing of the caller's
+environment that names a session, a mount or a bus reaches the recording.
+"""
+import argparse
+import contextlib
+import fcntl
+import json
+import os
+from pathlib import Path
+import shutil
+import signal
+import struct
+import subprocess
+import sys
+import termios
+import threading
+import time
+
+from PIL import Image, ImageDraw, ImageFont
+
+sys.path.insert(0, str(Path(__file__).resolve().parent))
+from ninep import Client # noqa: E402
+
+REPO = Path(__file__).resolve().parent.parent
+MEDIA = REPO / 'docs/site/media'
+BADGE_FONT = REPO / 'assets/AdwaitaMono-Regular.ttf'
+FPS = 30
+COLS, ROWS = 60, 20
+# A test window's text is 27 px (16 px cells); tags draw at 82% of it
+# (config.gui_tagline_font_percent), 13 px a character.
+TAG_W = 13
+# acme's pale yellow and blue read at the size a landing page shows a clip,
+# and are the site's own colours.
+THEME = ['acme']
+WIDTH = 960 # the clips' width: the window's own, never scaled
+PROJECT = Path('/tmp/hello')
+HOME = Path('/tmp/pardes-rec-home')
+
+# Nothing of the caller's session reaches the recording: no live pardes,
+# no mount, no bus, no editor.
+SCRUB = ('NINE_MOUNT', 'NAMESPACE', 'DBUS_SESSION_BUS_ADDRESS', 'GIT_EDITOR', 'EDITOR', 'VISUAL', 'PAGER',
+ 'GIT_PAGER', 'MANPAGER', 'LESS', 'PROMPT_COMMAND', 'ENV', 'BASH_ENV', 'TMUX', 'ZMX_SESSION')
+
+
+def clean_env():
+ env = {k: v for k, v in os.environ.items() if not k.startswith('PARDES_') and k not in SCRUB}
+ display = Path(os.environ.get('WAYLAND_DISPLAY', 'wayland-0'))
+ if not display.is_absolute():
+ display = Path(os.environ.get('XDG_RUNTIME_DIR', '/run/user/%d' % os.getuid())) / display
+ env.update(WAYLAND_DISPLAY=str(display), SDL_VIDEODRIVER='wayland', TERM='xterm-256color',
+ LANG='C.UTF-8', LC_ALL='C.UTF-8', GIT_AUTHOR_DATE='2026-09-30T12:00:00', GIT_COMMITTER_DATE='2026-09-30T12:00:00')
+ return env
+
+
+MAIN_C = '''#include <stdio.h>
+
+static int square(int n)
+{
+ return n * n;
+}
+
+int main(void)
+{
+ int sum = 0;
+ for (int i = 1; i <= 4; i++) sum += square(i);
+ pritnf("sum: %d\\n", sum);
+ return 0;
+}
+'''
+
+README = '''hello: prints the sum of the first four squares.
+
+Build it with make, run it with ./hello.
+'''
+
+MAKEFILE = '''CFLAGS = -Wall -fno-diagnostics-show-caret -fno-diagnostics-show-option
+
+hello: src/main.c
+\t@cc $(CFLAGS) -o hello src/main.c
+'''
+
+
+def make_project():
+ shutil.rmtree(PROJECT, ignore_errors=True)
+ (PROJECT / 'src').mkdir(parents=True)
+ (PROJECT / 'src/main.c').write_text(MAIN_C)
+ (PROJECT / 'Makefile').write_text(MAKEFILE)
+ (PROJECT / 'README').write_text(README)
+ (PROJECT / 'notes.txt').write_text(NOTES)
+
+
+class Session:
+ """A hidden pardes-gui window, its capture directory, its 9P client."""
+
+ def __init__(self, binary, work, name, args, init='', cols=COLS, rows=ROWS):
+ self.binary, self.work, self.name = Path(binary).resolve(), work, name
+ self.cols, self.rows = cols, rows
+ self.caps = work / 'cap'
+ self.frames = work / 'frames'
+ for d in (self.caps, self.frames):
+ shutil.rmtree(d, ignore_errors=True)
+ d.mkdir(parents=True)
+ shutil.rmtree(HOME, ignore_errors=True)
+ HOME.mkdir(mode=0o700)
+ (HOME / 'config/pardes').mkdir(parents=True)
+ theme = '' if THEME[0] == 'default' else f'Theme {THEME[0]}\n'
+ (HOME / 'config/pardes/init').write_text('Shell /bin/sh\n' + theme + 'MessageLinger 0\n' + init)
+ env = clean_env()
+ env.update(HOME=str(HOME), XDG_RUNTIME_DIR=str(HOME), XDG_CONFIG_HOME=str(HOME / 'config'),
+ PARDES_NOTIME='1', PARDES_DUMP=str(HOME / 'demo.dump.zon'),
+ PARDES_TEST='1', PARDES_TEST_CLOCK='1', PARDES_TEST_COLS=str(cols), PARDES_TEST_ROWS=str(rows),
+ PARDES_TEST_CAPTURE_DIR=str(self.caps))
+ for language in ['RS', 'C', 'GO', 'TS', 'PY', 'ZIG']:
+ env['PARDES_LSP_' + language] = ''
+ master, slave = os.openpty()
+ fcntl.ioctl(slave, termios.TIOCSWINSZ, struct.pack('HHHH', rows, cols, 0, 0))
+ self.master = master
+ self.child = subprocess.Popen(
+ [str(self.binary), '--9p=' + name, *map(str, args)], cwd=PROJECT, env=env,
+ stdin=slave, stdout=slave, stderr=open(work / 'stderr.log', 'wb'), start_new_session=True,
+ preexec_fn=lambda: fcntl.ioctl(0, termios.TIOCSCTTY, 0))
+ os.close(slave)
+ self.reader = threading.Thread(target=self._drain, daemon=True)
+ self.reader.start()
+ address = HOME / f'pardes-9p-{name}.sock'
+ deadline = time.monotonic() + 30
+ while not address.exists():
+ if self.child.poll() is not None or time.monotonic() > deadline:
+ raise RuntimeError('session did not start; see ' + str(work / 'stderr.log'))
+ time.sleep(.01)
+ self.client = Client(str(address))
+ self.client.__enter__()
+ self.shots = [] # the timeline: see shot()
+ self.pointer = None # the drawn pointer's (x, y), None for none
+ self.button = None # the SDL button held, drawn as a ring and its name
+ self.badge = None # a key or two, drawn in the corner
+ self.held = [] # the buttons a chord holds, each drawn as a ring and on a mouse
+ self.settle()
+
+ def _drain(self):
+ try:
+ while os.read(self.master, 65536):
+ pass
+ except OSError:
+ pass
+
+ def close(self):
+ with contextlib.suppress(Exception):
+ self.client.__exit__(None, None, None)
+ if self.child.poll() is None:
+ self.child.terminate()
+ try:
+ self.child.wait(timeout=10)
+ except subprocess.TimeoutExpired:
+ self.child.kill()
+ self.child.wait()
+ # The session's own process group: its shells and their children.
+ with contextlib.suppress(ProcessLookupError, PermissionError):
+ os.killpg(self.child.pid, signal.SIGKILL)
+ with contextlib.suppress(OSError):
+ os.close(self.master)
+ self.reader.join(timeout=2)
+
+ # 9P
+
+ def read(self, path):
+ return self.client.read(path).decode(errors='replace')
+
+ def write(self, path, data):
+ self.client.write(path, data.encode() if isinstance(data, str) else data)
+
+ def panes(self):
+ return {int(r.split()[0]): r.split()[1] for r in self.read('/index').splitlines() if r.strip()}
+
+ def tag(self, serial):
+ return self.read(f'/pane/{serial}/tag')
+
+ def screen(self):
+ s = json.loads(self.client.read('/screen'))
+ cols = s['cols']
+ return [''.join((cell[0] or ' ') for cell in s['cells'][r * cols:(r + 1) * cols]) for r in range(s['rows'])]
+
+ def find(self, text, after=0, nth=0):
+ """The (col, row) of `text` on screen, searching rows from `after`."""
+ for r, line in enumerate(self.screen()):
+ if r < after:
+ continue
+ at = line.find(text)
+ while at >= 0:
+ if nth == 0:
+ return at, r
+ nth -= 1
+ at = line.find(text, at + 1)
+ raise LookupError(f'{text!r} not on screen:\n' + '\n'.join(self.screen()))
+
+ def terminal_rows(self):
+ """The screen's rows below the (one) terminal's tag."""
+ rows = self.screen()
+ return rows[next(i for i, line in enumerate(rows) if 'Tty+sh' in line) + 1:]
+
+ def wait(self, predicate, what, seconds=20):
+ deadline = time.monotonic() + seconds
+ while time.monotonic() < deadline:
+ with contextlib.suppress(Exception):
+ if predicate():
+ return
+ time.sleep(.03)
+ raise RuntimeError('timed out waiting for ' + what + '\n' + '\n'.join(self.screen()))
+
+ def wait_text(self, text, seconds=20):
+ self.wait(lambda: any(text in line for line in self.screen()), repr(text), seconds)
+
+ # the window
+
+ def cell_px(self, col, row):
+ """The pixel at the middle of a cell (the window is an exact grid)."""
+ w, h = self.size()
+ cw, ch = w / self.cols, h / self.rows
+ return int((col + .5) * cw), int((row + .55) * ch)
+
+ def tag_px(self, col, row, start=3, offset=.5):
+ """The pixel over a tag's character: a tag is drawn in the tagline
+ font, narrower than the grid, from its first column `start` (3 in a
+ pane's or column's tag, 0 in the workspace's)."""
+ w, h = self.size()
+ cw, ch = w / self.cols, h / self.rows
+ return int(start * cw + (col - start + offset) * TAG_W), int((row + .55) * ch)
+
+ def tag_word(self, serial, word):
+ """The pixel over the middle of `word` in pane `serial`'s tag, which
+ may run past the grid's columns (/screen cuts a tag at its width,
+ the window wraps it at its own): its rows hold (width - 3 cells) /
+ TAG_W characters each."""
+ tag = self.tag(serial)
+ w, h = self.size()
+ cw, ch = w / self.cols, h / self.rows
+ per_row = int((w - 3 * cw) // TAG_W)
+ top = self.find(tag[:min(len(tag), self.cols - 4)], 0)[1]
+ at = tag.index(word) + len(word) // 2
+ return int(3 * cw + (at % per_row + .5) * TAG_W), int((top + at // per_row + .55) * ch)
+
+ def size(self):
+ with open(self.caps / 'latest.ppm', 'rb') as f:
+ f.readline()
+ w, h = map(int, f.readline().split())
+ return w, h
+
+ def mouse(self, kind, button, x, y):
+ os.write(self.master, f'\x1b]777;mouse;{kind};{button};{x};{y}\x07'.encode())
+ time.sleep(.05)
+
+ def keys(self, data):
+ os.write(self.master, data.encode() if isinstance(data, str) else data)
+ time.sleep(.03)
+
+ def status(self):
+ try:
+ step, frames, idle = (self.caps / 'status').read_text().split()[:3]
+ return int(step), int(frames), idle == '1'
+ except (FileNotFoundError, ValueError):
+ return None
+
+ def settle(self):
+ """The frame once the window says it is idle (test/gui_golden.py)."""
+ deadline = time.monotonic() + 60
+ start = None
+ while time.monotonic() < deadline:
+ now = self.status()
+ if now is not None:
+ if start is None:
+ start = now[0]
+ elif now[0] >= start + 2 and now[2] and now[1] > 0:
+ data = (self.caps / 'latest.ppm').read_bytes()
+ if data.startswith(b'P6'):
+ return data
+ time.sleep(.02)
+ raise RuntimeError('the window never went idle')
+
+ # the timeline
+
+ def shot(self, seconds, poster=False, ring=None, ring_button=None):
+ """Hold the settled frame for `seconds`, the pointer where it is.
+ `poster` marks the frame drawn as the clip's still; `ring` draws a
+ click there ('press' while held, 'pulse' just after)."""
+ data = self.settle()
+ path = self.frames / f'{len(self.shots):04d}.ppm'
+ path.write_bytes(data)
+ self.shots.append(dict(frame=path, secs=seconds, start=self.pointer, end=self.pointer,
+ button=self.button, badge=self.badge, poster=poster, ring=ring,
+ ring_button=ring_button or self.button, held=tuple(self.held)))
+
+ def glide(self, x, y, seconds=.6):
+ """Glide the drawn pointer to (x, y) over the frame on screen, then
+ move the window's pointer there (dragging any button held)."""
+ if self.shots and self.pointer is not None:
+ last = self.shots[-1]
+ self.shots.append(dict(last, secs=seconds, start=self.pointer, end=(x, y), poster=False, ring=None,
+ held=tuple(self.held)))
+ self.pointer = (x, y)
+ self.mouse('motion', self.button or (self.held[0] if self.held else 0), x, y)
+
+ def chord_press(self, x, y, rest=.4, hold=.5):
+ """Glide to (x, y), stop, and press B1 there, holding it."""
+ if self.pointer != (x, y):
+ self.glide(x, y)
+ self.shot(rest)
+ self.mouse('down', 1, x, y)
+ self.held = [1]
+ self.shot(hold)
+
+ def chord_click(self, button, done, what, hold=.45, after=1.0):
+ """With B1 held and the pointer still, click `button`: both rings
+ and the mouse's two buttons lit on the press, then a pulse."""
+ self.mouse('down', button, *self.pointer)
+ self.held.append(button)
+ self.shot(hold, ring='press', ring_button=button)
+ self.mouse('up', button, *self.pointer)
+ self.held.remove(button)
+ self.wait(done, what)
+ self.shot(after, ring='pulse', ring_button=button)
+
+ def chord_release(self, after=.6):
+ """Let B1 go, the pointer still."""
+ self.mouse('up', 1, *self.pointer)
+ self.held = []
+ self.shot(after)
+
+ def click(self, button, x, y, done=None, what='the click', rest=.4, hold=.35, after=1.0):
+ """Glide to (x, y) and stop; a beat later press `button` (SDL: 1
+ left, 2 middle, 3 right) and release it with the pointer still, a
+ ring and the button's name drawn on the press; once `done()` says
+ the click took, hold the result `after` seconds, the ring pulsing
+ out, before anything moves again."""
+ if self.pointer != (x, y):
+ self.glide(x, y)
+ self.shot(rest)
+ self.mouse('down', button, x, y)
+ self.button = button
+ self.shot(hold, ring='press')
+ self.mouse('up', button, x, y)
+ self.button = None
+ if done is not None:
+ self.wait(done, what)
+ self.shot(after, ring='pulse', ring_button=button)
+
+ def press(self, keys, per_key=.4):
+ """Send each (key bytes, badge) of `keys`, a frame a key with the
+ badge in the corner."""
+ for key, badge in keys:
+ self.badge = badge
+ self.keys(key)
+ self.shot(per_key)
+ self.badge = None
+
+ def type(self, text, expect, per_key=.07):
+ """Type `text` a key at a time, a frame per key, once `expect(prefix)`
+ says the window shows what is typed so far."""
+ for i, ch in enumerate(text):
+ self.keys(ch)
+ prefix = text[:i + 1]
+ self.wait(lambda: expect(prefix), 'echo of ' + repr(prefix))
+ self.shot(per_key)
+
+
+# composing
+
+def pointer_sprite(scale):
+ """An arrow pointer, white with a dark outline, its hotspot at (1, 1)."""
+ pts = [(0, 0), (0, 17), (4, 13), (7, 20), (10, 19), (7, 12), (12, 12)]
+ pts = [(x * scale + 1, y * scale + 1) for x, y in pts]
+ im = Image.new('RGBA', (int(13 * scale) + 4, int(21 * scale) + 4), (0, 0, 0, 0))
+ ImageDraw.Draw(im).polygon(pts, fill=(255, 255, 255, 255), outline=(20, 20, 20, 255), width=2)
+ return im
+
+
+# acme's colours for the buttons: B2 red, B3 green; B1, which acme leaves
+# black, is blue here so a held left button shows on the mouse.
+BUTTONS = {1: ('click', (30, 80, 190)), 2: ('middle-click', (170, 0, 0)), 3: ('right-click', (0, 110, 40))}
+
+
+def draw_badge(img, text, xy, font, fill=(40, 40, 40), anchor='lt'):
+ d = ImageDraw.Draw(img, 'RGBA')
+ box = d.textbbox(xy, text, font=font, anchor=anchor)
+ pad = 7
+ d.rounded_rectangle((box[0] - pad, box[1] - pad, box[2] + pad, box[3] + pad), radius=8, fill=fill + (235,))
+ d.text(xy, text, font=font, fill=(255, 255, 255), anchor=anchor)
+
+
+class Painter:
+ def __init__(self, size):
+ self.sprite = pointer_sprite(1.7)
+ self.font = ImageFont.truetype(str(BADGE_FONT), 24)
+ self.size = size
+
+ def chord(self, img, x, y, held, ring, button, since):
+ """A chord: a ring for every button down (left inside, middle,
+ right outside), a mouse whose held buttons are lit, and its name."""
+ w, h = self.size
+ d = ImageDraw.Draw(img, 'RGBA')
+ radius = {1: 15, 2: 23, 3: 31}
+ for b in held:
+ r = radius[b]
+ d.ellipse((x - r, y - r, x + r, y + r), outline=BUTTONS[b][1] + (255,), width=4)
+ clicked = [b for b in held if b != 1]
+ if ring == 'pulse' and button and button not in held:
+ t = min(since / .45, 1)
+ r = radius[button] + 18 * t
+ if t < 1:
+ d.ellipse((x - r, y - r, x + r, y + r), outline=BUTTONS[button][1] + (int(255 * (1 - t)),), width=4)
+ if since < .7:
+ clicked = [button]
+ lit = set(held) | set(clicked)
+ names = {2: 'middle', 3: 'right'}
+ label = 'left held' + ''.join(f' + {names[b]}-click' for b in clicked)
+ width = self.font.getlength(label) + 14
+ # The mouse, below and right of the pointer (else left of it): three
+ # buttons over a body, the held ones lit, the name beside it.
+ mx, my, mw, mh = x + 40, y + 30, 52, 74
+ if my + mh + 8 > h:
+ my = y - 34 - mh
+ if mx + mw + 12 + width + 16 > w:
+ mx = x - 40 - mw
+ d.rounded_rectangle((mx, my, mx + mw, my + mh), radius=18, fill=(250, 250, 250, 245), outline=(30, 30, 30, 255),
+ width=3)
+ third = mw / 3
+ for b in (1, 2, 3):
+ box = (mx + third * (b - 1) + 3, my + 3, mx + third * b - 3, my + mh * .42)
+ if b in lit:
+ d.rectangle(box, fill=BUTTONS[b][1] + (255,))
+ d.line((mx + 3, my + mh * .42 + 2, mx + mw - 3, my + mh * .42 + 2), fill=(30, 30, 30, 255), width=2)
+ for b in (1, 2):
+ lx = mx + third * b
+ d.line((lx, my + 3, lx, my + mh * .42), fill=(30, 30, 30, 255), width=2)
+ colour = BUTTONS[clicked[-1]][1] if clicked else BUTTONS[1][1]
+ lx = mx + mw + 12 if mx > x else mx - 12 - width
+ draw_badge(img, label, (lx, my + mh / 2), self.font, fill=colour, anchor='lm')
+
+ def paint(self, img, pointer, badge, ring=None, button=None, since=0.0, held=()):
+ """`img` with the badge, the pointer, and a click: `ring` 'press'
+ (a ring and the button's name) or 'pulse' (`since` seconds after the
+ release: the ring widening and fading, the name kept a moment)."""
+ img = img.copy()
+ w, h = self.size
+ if badge:
+ draw_badge(img, badge, (w - 16, h - 16), self.font, anchor='rb')
+ if pointer is not None:
+ x, y = pointer
+ if held:
+ self.chord(img, x, y, held, ring, button, since)
+ elif ring and button:
+ label, colour = BUTTONS[button]
+ d = ImageDraw.Draw(img, 'RGBA')
+ if ring == 'press':
+ r, alpha, named = 16, 255, True
+ else:
+ t = min(since / .45, 1)
+ r, alpha, named = 16 + 22 * t, int(255 * (1 - t)), since < .6
+ if alpha > 0:
+ d.ellipse((x - r, y - r, x + r, y + r), outline=colour + (alpha,), width=4)
+ if named:
+ # The name sits below the pointer, kept inside the frame.
+ lx = min(x + 22, w - 16 - self.font.getlength(label))
+ ly = y + 40 if y + 70 < h else y - 60
+ draw_badge(img, label, (lx, ly), self.font, fill=colour)
+ img.paste(self.sprite, (int(x) - 1, int(y) - 1), self.sprite)
+ return img
+
+
+def ease(t):
+ return t * t * (3 - 2 * t)
+
+
+def lerp(a, b, t):
+ if a is None or b is None:
+ return b if t >= .5 else a
+ return (a[0] + (b[0] - a[0]) * t, a[1] + (b[1] - a[1]) * t)
+
+
+def compose(shots, out):
+ """The shots at FPS with the pointer drawn, ending in a dissolve back to
+ the first frame so the clip loops; written lossless (FFV1) to `out`.
+ Answers the clip's length in seconds and its poster image."""
+ first = Image.open(shots[0]['frame']).convert('RGB')
+ painter = Painter(first.size)
+ w, h = first.size
+ ff = subprocess.Popen(['ffmpeg', '-v', 'error', '-y', '-f', 'rawvideo', '-pix_fmt', 'rgb24', '-s', f'{w}x{h}',
+ '-r', str(FPS), '-i', '-', '-c:v', 'ffv1', str(out)], stdin=subprocess.PIPE)
+ poster = None
+ clock, emitted = 0.0, 0
+ loaded = (None, None)
+ for shot in shots:
+ if loaded[0] != shot['frame']:
+ loaded = (shot['frame'], Image.open(shot['frame']).convert('RGB'))
+ img = loaded[1]
+ clock += shot['secs']
+ n = round(clock * FPS) - emitted
+ for i in range(n):
+ t = ease((i + 1) / n)
+ frame = painter.paint(img, lerp(shot['start'], shot['end'], t), shot['badge'], shot['ring'],
+ shot['ring_button'], i / FPS, shot.get('held', ()))
+ ff.stdin.write(frame.tobytes())
+ if shot['poster'] and poster is None:
+ # A chord's still keeps its rings and mouse; a click's has none.
+ chord = shot.get('held') or ()
+ poster = painter.paint(img, shot['end'], None, shot['ring'] if chord else None, shot['ring_button'], 0.0,
+ chord)
+ emitted += n
+ last = shots[-1]
+ n = round(.7 * FPS)
+ for i in range(n):
+ t = ease((i + 1) / n)
+ frame = Image.blend(loaded[1], first, t)
+ ff.stdin.write(painter.paint(frame, lerp(last['end'], shots[0]['start'], t), None).tobytes())
+ emitted += n
+ ff.stdin.close()
+ if ff.wait() != 0:
+ raise RuntimeError('ffmpeg (lossless) failed')
+ return emitted / FPS, poster or painter.paint(first, None, None)
+
+
+def encode(lossless, name, poster, crf_webm=30, crf_mp4=20):
+ """<name>.webm (VP9) and .mp4 (H.264, yuv420p, faststart) and the poster
+ PNG, in MEDIA."""
+ MEDIA.mkdir(parents=True, exist_ok=True)
+ webm, mp4 = MEDIA / (name + '.webm'), MEDIA / (name + '.mp4')
+ scale = [] if poster.width == WIDTH else ['-vf', f'scale={WIDTH}:-2:flags=lanczos']
+ subprocess.run(['ffmpeg', '-v', 'error', '-y', '-i', str(lossless), *scale, '-c:v', 'libvpx-vp9',
+ '-b:v', '0', '-crf', str(crf_webm), '-row-mt', '1', '-deadline', 'good', '-cpu-used', '1',
+ '-g', '240', '-pix_fmt', 'yuv420p', '-an', str(webm)], check=True)
+ subprocess.run(['ffmpeg', '-v', 'error', '-y', '-i', str(lossless), *scale, '-c:v', 'libx264',
+ '-preset', 'veryslow', '-crf', str(crf_mp4), '-tune', 'animation', '-pix_fmt', 'yuv420p',
+ '-movflags', '+faststart', '-an', str(mp4)], check=True)
+ if poster.width != WIDTH:
+ poster = poster.resize((WIDTH, round(poster.height * WIDTH / poster.width)), Image.LANCZOS)
+ poster.save(MEDIA / (name + '.png'), optimize=True)
+ return [webm, mp4, MEDIA / (name + '.png')]
+
+
+# the clips
+
+def hero_setup(s):
+ """README and main.c under it."""
+ s.write('/pane/1/look', f'{PROJECT}/src/main.c\n')
+ s.wait(lambda: len(s.panes()) == 2, 'main.c')
+ s.mouse('motion', 0, *s.cell_px(36, 9))
+
+
+def pane_rows(s, name, rows=6):
+ """The first `rows` screen rows under the tag that starts with `name`."""
+ screen = s.screen()
+ top = next(i for i, line in enumerate(screen) if line[3:].startswith(name))
+ return screen[top + 1:top + 1 + rows]
+
+
+def text_is_the_interface(s):
+ """B2 on `make` in the README's text runs it, opening its output pane;
+ B3 on the error there puts main.c on line 12."""
+ s.pointer = s.cell_px(36, 9)
+ s.shot(1.4)
+ col, row = s.find('with make,', 0)
+ s.click(2, *s.cell_px(col + 6, row),
+ done=lambda: any(kind == 'cmd' and '(make) exit' in s.tag(n) for n, kind in s.panes().items()),
+ what='make', after=1.2)
+ col, row = s.find('src/main.c:12:5', 0)
+ s.click(3, *s.cell_px(col + 4, row),
+ done=lambda: any(line.startswith(' 12 ') for line in pane_rows(s, f'{PROJECT}/src/main.c')),
+ what='main.c at line 12', after=2.8)
+ s.shots[-1]['poster'] = True
+
+
+def shell_setup(s):
+ """A terminal under the file, at the project, with a short prompt."""
+ s.write('/pane/1/exec', 'Tty\n')
+ s.wait(lambda: 2 in s.panes(), 'the terminal')
+ s.write('/pane/2/pty/data', f"cd {PROJECT}; PS1='$ '; clear\r")
+ s.wait(lambda: any(line.rstrip() == ' $' for line in s.screen()), 'the prompt')
+ # The pointer rests off the tags, so no word's hint is up.
+ s.mouse('motion', 0, *s.cell_px(COLS - 2, ROWS - 1))
+
+
+def mounted_shell_setup(s):
+ """A terminal under the file whose shell sees the session as files:
+ cloud9's 9ns mounts the pane's $PARDES_9P in a private namespace."""
+ shell_setup(s)
+ mount = HOME / 'n'
+ mount.mkdir()
+ s.write('/pane/2/pty/data', f'exec 9ns --unix "$PARDES_9P" --mount {mount} -- /bin/sh\r')
+ time.sleep(1.5) # 9ns mounts and starts the shell that reads the next line
+ s.write('/pane/2/pty/data', "cd \"$NINE_MOUNT\" && PS1='$ ' && clear\r")
+ s.wait(lambda: [line.rstrip() for line in s.terminal_rows() if line.strip()] == [' $'], 'the mounted shell')
+
+
+def scripting_over_9p(s):
+ """A shell reads the session's files and writes a pane's body."""
+ s.shot(1.0)
+ for command, done in [('ls', lambda: any('index' in line for line in s.terminal_rows()[1:])),
+ ('cat index', lambda: any(' term ' in line for line in s.terminal_rows())),
+ ("echo 'hello from a script' > pane/1/body", lambda: 'hello from' in s.screen()[3])]:
+ s.type(command, lambda typed: at_prompt(s, typed)(), per_key=.06)
+ s.keys('\r')
+ s.wait(done, command)
+ s.wait(lambda: [line.rstrip() for line in s.terminal_rows() if line.strip()][-1] == ' $', 'the prompt')
+ s.shot(1.3)
+ s.shots[-1]['secs'] = 2.4
+ s.shots[-1]['poster'] = True
+
+
+def at_prompt(s, text):
+ return lambda: any(line.startswith(' $ ' + text) for line in s.screen())
+
+
+def terminals_are_panes(s):
+ """A shell under the file; Ctrl-b and its output is text to move over."""
+ s.write('/pane/1/dot', '12\n')
+ s.shot(1.0)
+ s.type('make', lambda typed: at_prompt(s, typed)())
+ s.keys('\r')
+ s.wait(lambda: 'Error 1' in '\n'.join(s.screen()), 'make')
+ s.wait(lambda: any(line.rstrip() == ' $' for line in s.screen()), 'the next prompt')
+ s.shot(1.4)
+ s.press([('\x02', 'Ctrl-b')], per_key=.8)
+ s.press([('k', 'k'), ('k', 'k k'), ('k', 'k k k')], per_key=.4)
+ s.press([('x', 'x')], per_key=2.4)
+ s.shots[-1]['poster'] = True
+
+
+def diff_setup(s):
+ """The project committed, then its typo fixed; a lone terminal."""
+ env = dict(clean_env(), HOME=str(HOME), GIT_AUTHOR_NAME='demo', GIT_AUTHOR_EMAIL='[email protected]',
+ GIT_COMMITTER_NAME='demo', GIT_COMMITTER_EMAIL='[email protected]')
+ for args in (['init', '-q'], ['add', '.'], ['commit', '-qm', 'hello'], ['config', 'diff.context', '1']):
+ subprocess.run(['git', '-C', str(PROJECT), *args], check=True, env=env, capture_output=True)
+ main = PROJECT / 'src/main.c'
+ main.write_text(main.read_text().replace('pritnf', 'printf'))
+ shell_setup(s)
+ s.write('/pane/1/exec', 'Del\n')
+ s.wait(lambda: list(s.panes()) == [2], 'the README to close')
+
+
+def diff_review(s):
+ """git diff in a shell pages into +Pager as a diff; B3 on its + line
+ opens the file at that line."""
+ s.pointer = s.cell_px(40, 6)
+ s.shot(.9)
+ s.type('git diff', lambda typed: at_prompt(s, typed)())
+ s.keys('\r')
+ s.wait(lambda: 'pager' in s.panes().values() or len(s.panes()) == 2, 'the pager')
+ s.wait_text('+ printf')
+ s.shot(1.4)
+ col, row = s.find('+ printf', 0)
+ s.click(3, *s.cell_px(col, row), done=lambda: len(s.panes()) == 3, what='main.c to open', after=2.6)
+ s.shots[-1]['poster'] = True
+
+
+def mandelbrot(path, center=(-0.75, 0.0), span=3.2, limit=200, width=1200, height=800, bands=40):
+ """The Mandelbrot set around `center`, `span` wide, smoothly coloured:
+ a deep blue through white to gold, the inside black. `bands` is the
+ escape count one sweep of the palette takes (a deep zoom cycles it)."""
+ import numpy as np
+ x = np.linspace(center[0] - span / 2, center[0] + span / 2, width)
+ half = span * height / width / 2
+ y = np.linspace(center[1] + half, center[1] - half, height)
+ c = x[None, :] + 1j * y[:, None]
+ z = np.zeros_like(c)
+ count = np.zeros(c.shape)
+ alive = np.ones(c.shape, bool)
+ for n in range(limit):
+ z[alive] = z[alive] ** 2 + c[alive]
+ escaped = alive & (np.abs(z) > 4)
+ # The smooth (normalised) iteration count, so the bands blend.
+ count[escaped] = n + 1 - np.log2(np.log2(np.abs(z[escaped])))
+ alive &= ~escaped
+ if limit > 2 * bands:
+ t = (count / bands) % 1 # a zoom: the palette repeats down the spirals
+ t = np.where(t < .5, t * 2, (1 - t) * 2)
+ else:
+ t = np.sqrt(np.clip(count / bands, 0, 1))
+ stops = np.array([[0, 7, 100], [32, 107, 203], [237, 255, 255], [255, 170, 0], [80, 2, 0]], float)
+ pos = np.linspace(0, 1, len(stops))
+ rgb = np.stack([np.interp(t, pos, stops[:, k]) for k in range(3)], axis=-1)
+ rgb[alive] = 0
+ Image.fromarray(rgb.astype(np.uint8)).save(path)
+
+
+def image_setup(s):
+ """A lone terminal at the project, which holds two pictures: the
+ Mandelbrot set and a zoom into its seahorse valley."""
+ mandelbrot(PROJECT / 'mandelbrot.png')
+ mandelbrot(PROJECT / 'seahorse.png', center=(-0.7453, 0.1127), span=0.012, limit=600, bands=60)
+ shell_setup(s)
+ s.write('/pane/1/exec', 'Del\n')
+ s.wait(lambda: list(s.panes()) == [2], 'the README to close')
+
+
+def image_pane(s):
+ """ls in a shell; B3 on each PNG's name opens it in a pane."""
+ s.pointer = s.cell_px(40, 8)
+ s.shot(1.0)
+ s.type('ls', lambda typed: at_prompt(s, typed)())
+ s.keys('\r')
+ s.wait(lambda: any('seahorse.png' in line for line in s.terminal_rows()), 'ls')
+ s.shot(.9)
+ col, row = s.find('mandelbrot.png', 0)
+ s.click(3, *s.cell_px(col + 4, row), done=lambda: len(s.panes()) == 2, what='the set', after=2.4)
+ s.shots[-1]['poster'] = True
+ # Del gives its rows back, so the zoom opens as large.
+ image = next(n for n, kind in s.panes().items() if kind == 'image')
+ s.click(2, *s.tag_word(image, 'Del'), done=lambda: len(s.panes()) == 1, what='Del', after=.6)
+ col, row = s.find('seahorse.png', 0)
+ s.click(3, *s.cell_px(col + 4, row), done=lambda: len(s.panes()) == 2, what='the zoom', after=3.0)
+
+
+# The Intel 64 and IA-32 SDM, vol. 2 (2,515 pages), opened where it is.
+PDF = [Path('/home/goblin/01-resources/intel-devref-ii.pdf')]
+
+
+def pdf_args():
+ return [PDF[0]]
+
+
+def pdf_setup(s):
+ s.mouse('motion', 0, *s.cell_px(COLS - 2, ROWS - 1))
+
+
+def pdf_tag(s, word, pane=None):
+ """The pixel over `word` in the PDF pane's tag."""
+ pane = pane or next(n for n, kind in s.panes().items() if kind == 'pdf')
+ return s.tag_word(pane, word)
+
+
+def page_of(s, pane):
+ tag = s.tag(pane)
+ return int(tag[tag.index('[') + 1:tag.index('/', tag.index('['))])
+
+
+def pdf_navigation(s):
+ """Page through the Intel SDM, jump to CPUID from its sections, search
+ a word and step through the hits."""
+ pdf = next(n for n, kind in s.panes().items() if kind == 'pdf')
+ s.pointer = s.cell_px(44, 12)
+ s.shot(1.2)
+ s.press([('\x06', 'Ctrl-f'), ('\x06', 'Ctrl-f Ctrl-f')], per_key=.7)
+ s.click(2, *pdf_tag(s, 'PdfSections'), done=lambda: len(s.panes()) == 2, what='the sections', after=.8)
+ listing = next(n for n in s.panes() if n != pdf)
+ top = s.find('+PdfSections', 0)[1]
+ s.write('/focus', f'{listing}\n')
+ s.badge = '200G'
+ for key in '200G':
+ s.keys(key)
+ s.wait(lambda: any('CPUID' in line for line in s.screen()[top:]), 'the CPUID row')
+ s.shot(1.0)
+ s.badge = None
+ # A row's file.pdf:PAGE:SECTION is the place to look at.
+ col, row = s.find('pdf:317:200', after=top + 1)
+ s.click(3, *s.cell_px(col + 4, row), done=lambda: page_of(s, pdf) == 317, what='page 317', after=1.2)
+ s.click(2, *s.tag_word(listing, 'Del'), done=lambda: list(s.panes()) == [pdf], what='the listing to close',
+ after=.8)
+ s.write('/focus', f'{pdf}\n')
+ s.badge = '/'
+ s.keys('/')
+ s.shot(.25)
+ # Its first hits are on the pages after CPUID's first.
+ s.type('apic id', lambda typed: True, per_key=.08)
+ s.badge = '/apic id Enter'
+ s.keys('\r')
+ s.wait(lambda: any(kind == 'text' for kind in s.panes().values()), 'the hits')
+ s.shot(1.0)
+ s.badge = None
+ hits = next(n for n, kind in s.panes().items() if kind == 'text')
+ # The hit list folds to its tag, and the page has the column again.
+ s.click(2, *s.tag_word(hits, 'Collapse'), done=lambda: 'collapsed' in s.read(f'/pane/{hits}/ctl'),
+ what='the hits to fold', after=.8)
+ s.write('/focus', f'{pdf}\n')
+ for k in range(1, 4):
+ s.badge = ' '.join(['n'] * k)
+ s.keys('n')
+ s.shot(.8)
+ s.badge = None
+ s.shots[-1]['secs'] = 1.6
+ s.shots[-1]['poster'] = True
+
+
+def pdf_tint_setup(s):
+ """CPUID's page, and two words of the user's in the tag: PdfFit and a
+ page address (MOV's)."""
+ s.write('/pane/1/look', f'{PDF[0]}:317\n')
+ s.wait(lambda: page_of(s, 1) == 317, 'page 317')
+ s.write('/pane/1/tag', f' PdfFit {PDF[0].name}:762')
+ pdf_setup(s)
+
+
+def pdf_tint_fit(s):
+ """PdfTint through its three looks, PdfFit both ways, then a look at
+ a page address."""
+ s.pointer = s.cell_px(44, 12)
+ s.shot(1.2)
+ for _ in range(3):
+ before = s.read('/pane/1/ctl').split()[-1]
+ s.click(2, *pdf_tag(s, 'PdfTint'), done=lambda: s.read('/pane/1/ctl').split()[-1] != before,
+ what='the tint', after=1.0)
+ for fit in ('height', 'width'):
+ s.click(2, *pdf_tag(s, 'PdfFit'), done=lambda: f'fit:{fit}' in s.read('/pane/1/ctl'), what='the fit',
+ after=1.3)
+ s.click(3, *pdf_tag(s, f'{PDF[0].name}:762'), done=lambda: page_of(s, 1) == 762, what='page 762', after=2.0)
+ s.shots[-1]['poster'] = True
+
+
+THEMES = MEDIA / 'themes'
+THEME_WIDTH = 640
+THEME_MAX_BYTES = 120_000
+
+
+def theme_scene(s):
+ """One column: a C file with its syntax colours and a selection, a
+ shell that ran make (gcc's colours), and git diff paged into +Pager."""
+ env = dict(clean_env(), HOME=str(HOME), GIT_AUTHOR_NAME='demo', GIT_AUTHOR_EMAIL='[email protected]',
+ GIT_COMMITTER_NAME='demo', GIT_COMMITTER_EMAIL='[email protected]')
+ for args in (['init', '-q'], ['add', '.'], ['commit', '-qm', 'hello'], ['config', 'diff.context', '1']):
+ subprocess.run(['git', '-C', str(PROJECT), *args], check=True, env=env, capture_output=True)
+ main = PROJECT / 'src/main.c'
+ main.write_text(main.read_text().replace('i <= 4', 'i <= 5'))
+ s.write('/pane/1/exec', 'Tty\n')
+ s.wait(lambda: 2 in s.panes(), 'the terminal')
+ s.write('/pane/2/pty/data', f"cd {PROJECT}; PS1='$ '; clear; make; git diff\r")
+ s.wait(lambda: len(s.panes()) == 3, 'the pager')
+ s.wait(lambda: 'Error 1' in s.read('/pane/2/body'), 'make')
+ s.write('/pane/1/dot', '12\n')
+ # The pager shows its hunk, the end of the diff.
+ pager = next(n for n, kind in s.panes().items() if n not in (1, 2))
+ s.write(f'/pane/{pager}/dot', '$\n')
+
+
+def theme_order(s):
+ """The themes as the Themes builtin lists them, up to the imported
+ ones: pardes's own, the ports and the legacy pair (src/themes)."""
+ s.write('/ctl', 'Themes\n')
+ s.wait(lambda: any(s.read(f'/pane/{n}/name').strip().endswith('+Themes') for n in s.panes()), '+Themes')
+ pane = next(n for n in s.panes() if s.read(f'/pane/{n}/name').strip().endswith('+Themes'))
+ names = []
+ for line in s.read(f'/pane/{pane}/body').splitlines():
+ if line.startswith('# Imported'):
+ break
+ if line.startswith('Theme '):
+ names.append(line.split()[1])
+ s.write(f'/pane/{pane}/ctl', 'Del\n')
+ s.wait(lambda: pane not in s.panes(), '+Themes to close')
+ return names
+
+
+def save_theme_png(data, path):
+ """The capture at THEME_WIDTH, as small a PNG as reads: full colour if it
+ fits THEME_MAX_BYTES, else 256 colours. Answers light or dark, from the
+ colour most of the window is."""
+ import io
+ img = Image.open(io.BytesIO(data)).convert('RGB')
+ ground = max(img.getcolors(1 << 24), key=lambda c: c[0])[1]
+ lum = sum(w * (v / 255) ** 2.2 for w, v in zip((.2126, .7152, .0722), ground))
+ small = img.resize((THEME_WIDTH, round(img.height * THEME_WIDTH / img.width)), Image.LANCZOS)
+ small.save(path, optimize=True)
+ if path.stat().st_size > THEME_MAX_BYTES:
+ small.quantize(256, method=Image.Quantize.MEDIANCUT, dither=Image.Dither.NONE).save(path, optimize=True)
+ return 'light' if lum > .18 else 'dark'
+
+
+def record_themes(binary, work):
+ """docs/site/media/themes/<theme>.png for every theme of src/themes, in
+ the Themes builtin's order, and themes.toml listing them."""
+ make_project()
+ s = Session(binary, work / 'themes', 'rec-themes', [PROJECT / 'src/main.c'], rows=22)
+ try:
+ theme_scene(s)
+ names = theme_order(s)
+ THEMES.mkdir(parents=True, exist_ok=True)
+ rows = []
+ for name in names:
+ s.write('/ctl', f'Theme {name}\n')
+ # A pointer move puts away the word's flash that a command
+ # leaves up until the pointer moves.
+ s.mouse('motion', 0, *s.cell_px(COLS - 2, 1))
+ s.mouse('motion', 0, *s.cell_px(COLS - 3, 1))
+ kind = save_theme_png(s.settle(), THEMES / f'{name}.png')
+ rows.append((name, kind))
+ print(f'{name}.png {kind} {(THEMES / f"{name}.png").stat().st_size / 1e3:.0f} KB', flush=True)
+ finally:
+ s.close()
+ toml = ['# The Themes page gallery, in the order the Themes builtin walks them:',
+ '# media/themes/<file> for each, made by test/record_demos.py themes.',
+ 'ready = true', '']
+ for name, kind in rows:
+ toml += ['[[theme]]', f'name = "{name}"', f'file = "{name}.png"', f'kind = "{kind}"', '']
+ (THEMES / 'themes.toml').write_text('\n'.join(toml))
+
+
+NOTES = '''To buy: apples plums pears
+
+
+
+In the bowl: bananas
+'''
+
+
+def chords_setup(s):
+ s.mouse('motion', 0, *s.cell_px(COLS - 2, ROWS - 1))
+
+
+def body_text(s):
+ return s.read('/pane/1/body')
+
+
+def chords(s):
+ """acme's chords: B1 sweeps and stays down; B2 cuts, B3 pastes, B2 then
+ B3 copies."""
+ s.pointer = s.cell_px(40, 12)
+ s.shot(.8)
+ # Cut: sweep " plums", B2 with B1 still down.
+ col, row = s.find(' plums', 0)
+ s.chord_press(*s.cell_px(col, row), rest=.25, hold=.3)
+ s.glide(*s.cell_px(col + 7, row), seconds=.45)
+ s.shot(.3)
+ s.chord_click(2, lambda: 'plums' not in body_text(s), 'the cut', after=.75)
+ s.shots[-2]['poster'] = True
+ s.chord_release(after=.25)
+ # Paste after "bananas": B1 down there, B3.
+ col, row = s.find('bananas', 0)
+ s.chord_press(*s.cell_px(col + 7, row), rest=.25, hold=.3)
+ s.chord_click(3, lambda: 'bananas plums' in body_text(s), 'the paste', after=.8)
+ s.chord_release(after=.25)
+ # Copy: sweep "apples", B2 then B3 with B1 down: it is back, and kept.
+ col, row = s.find('apples', 0)
+ s.chord_press(*s.cell_px(col, row), rest=.25, hold=.3)
+ s.glide(*s.cell_px(col + 6, row), seconds=.45)
+ s.shot(.3)
+ s.chord_click(2, lambda: 'apples' not in body_text(s), 'the copy\'s cut', after=.45)
+ s.chord_click(3, lambda: 'apples' in body_text(s), 'the copy\'s paste', after=.8)
+ s.chord_release(after=1.0)
+
+
+def column(s, serial):
+ """Column `serial`'s (first cell, width) from /layout."""
+ for line in s.read('/layout').splitlines():
+ parts = line.split()
+ if parts and parts[0] == str(serial):
+ return int(parts[2]), int(parts[3])
+ raise LookupError(f'no column {serial}')
+
+
+def col_tag_px(s, serial, at, offset=.5):
+ """The pixel over character `at` of column `serial`'s tag (row 1 of the
+ window, wrapping at the column's width in the tagline font)."""
+ x0, width = column(s, serial)
+ w, h = s.size()
+ cw, ch = w / s.cols, h / s.rows
+ per_row = int((width * cw - 3 * cw) // TAG_W)
+ return int((x0 + 3) * cw + (at % per_row + offset) * TAG_W), int((1 + at // per_row + .55) * ch)
+
+
+def columns_setup(s):
+ s.write('/pane/1/look', f'{PROJECT}/src/main.c\n')
+ s.wait(lambda: len(s.panes()) == 2, 'main.c')
+ s.mouse('motion', 0, *s.cell_px(s.cols - 2, s.rows - 1))
+
+
+def columns(s):
+ """Newcol makes a column; a name typed in its tag and looked at opens
+ there; Alt-c gives a pane a column of its own."""
+ s.pointer = s.cell_px(30, 12)
+ s.shot(1.0)
+ s.click(2, *s.tag_px(3, 0, start=0), done=lambda: len(s.read('/layout').splitlines()) == 3, what='Newcol',
+ after=.8)
+ new = s.read('/layout').splitlines()[1].split()[0]
+ tag = s.read(f'/col/{new}/tag').rstrip('\n')
+ # B1 just past the tag's last word puts the typing there.
+ s.click(1, *col_tag_px(s, new, len(tag), offset=.4), after=.2)
+ s.type(' Makefile', lambda typed: s.read(f'/col/{new}/tag').rstrip('\n').endswith(typed), per_key=.06)
+ s.shot(.3)
+ at = s.read(f'/col/{new}/tag').index('Makefile') + 4
+ s.click(3, *col_tag_px(s, new, at), done=lambda: len(s.panes()) == 3, what='the Makefile', after=1.3)
+ # Alt-c on main.c: it leaves for a column of its own.
+ main = next(n for n in s.panes() if s.read(f'/pane/{n}/name').strip().endswith('main.c'))
+ col, row = s.find('int main', 0)
+ s.click(1, *s.cell_px(col + 4, row), done=lambda: s.read('/focus').strip() == str(main), what='focus',
+ after=.3)
+ s.badge = 'Alt-c'
+ s.keys('\x1bc')
+ s.wait(lambda: len(s.read('/layout').splitlines()) == 4, 'the new column')
+ s.shot(2.2, poster=True)
+ s.badge = None
+
+
+def search_setup(s):
+ (PROJECT / 'tests').mkdir()
+ (PROJECT / 'tests/check.sh').write_text('#!/bin/sh\n# 1 + 4 + 9 + 16: the sum of the squares is 30\n'
+ './hello | grep -q "sum: 30"\n')
+ s.write('/pane/1/look', f'{PROJECT}/src/main.c\n')
+ s.wait(lambda: len(s.panes()) == 2, 'main.c')
+ s.write('/focus', '2\n')
+ s.mouse('motion', 0, *s.cell_px(COLS - 2, ROWS - 1))
+
+
+def search(s):
+ """Grep (SPC f g) lists the hits in +Search; n and N walk them; B3 on
+ one opens its file there."""
+ s.pointer = s.cell_px(44, 8)
+ s.shot(1.0)
+ s.press([(' ', 'SPC'), ('f', 'SPC f'), ('g', 'SPC f g')], per_key=.35)
+ s.badge = 'SPC f g square'
+ s.type('square', lambda typed: True, per_key=.07)
+ s.badge = 'Enter'
+ s.keys('\r')
+ s.wait(lambda: any(s.read(f'/pane/{n}/name').strip().endswith('+Search') for n in s.panes()), '+Search')
+ s.shot(1.0)
+ s.press([('n', 'n'), ('n', 'n n'), ('N', 'n n N')], per_key=.7)
+ s.shots[-2]['poster'] = True # the listing whole, the second hit current
+ s.badge = None
+ col, row = s.find('check.sh:', 0)
+ s.click(3, *s.cell_px(col + 3, row), done=lambda: len(s.panes()) == 4, what='check.sh', after=2.2)
+
+
+def where_setup(s):
+ """main.c, with pwd in the column's tag and in main.c's."""
+ s.write('/col/1/tag', ' pwd')
+ s.write('/pane/1/tag', ' pwd')
+ s.mouse('motion', 0, *s.cell_px(COLS - 2, ROWS - 1))
+
+
+def where_commands_run(s):
+ """pwd from the column's tag prints the session's directory; from
+ main.c's tag, main.c's."""
+ s.pointer = s.cell_px(40, 12)
+ s.shot(1.2)
+ tag = s.read('/col/1/tag')
+ s.click(2, *col_tag_px(s, 1, tag.index('pwd') + 1),
+ done=lambda: any(kind == 'cmd' and 'exit' in s.tag(n) for n, kind in s.panes().items()), what='pwd',
+ after=1.6)
+ s.click(2, *s.tag_word(1, 'pwd'),
+ done=lambda: any(kind == 'cmd' and s.read(f'/pane/{n}/body').startswith('% pwd\n/tmp/hello/src')
+ and 'exit' in s.tag(n) for n, kind in s.panes().items()),
+ what='pwd in src', after=2.6)
+ s.shots[-1]['poster'] = True
+
+
+GIT_ID = dict(GIT_AUTHOR_NAME='demo', GIT_AUTHOR_EMAIL='[email protected]',
+ GIT_COMMITTER_NAME='demo', GIT_COMMITTER_EMAIL='[email protected]')
+
+
+def edit_setup(s):
+ """main.c over a shell that sees the session as files ($m, as in the
+ scripting chapter: 9ns mounts the pane's $PARDES_9P), and Undo in
+ main.c's tag."""
+ shell_setup(s)
+ mount = HOME / 'n'
+ mount.mkdir()
+ s.write('/pane/2/pty/data', f'exec 9ns --unix "$PARDES_9P" --mount {mount} -- /bin/sh\r')
+ time.sleep(1.5) # 9ns mounts and starts the shell that reads the next line
+ s.write('/pane/2/pty/data', f"m=$NINE_MOUNT; cd {PROJECT}; PS1='$ '; clear\r")
+ s.wait(lambda: [line.rstrip() for line in s.terminal_rows() if line.strip()] == [' $'], 'the mounted shell')
+ s.write('/pane/1/tag', ' Undo')
+ s.write('/pane/1/dot', '$\n')
+ s.mouse('motion', 0, *s.cell_px(COLS - 2, 1))
+
+
+def edit_via_ctl(s):
+ """An Edit written to the pane's ctl changes every sum; one Undo puts
+ them all back."""
+ s.pointer = s.cell_px(44, 7)
+ s.shot(1.0)
+ command = "echo 'Edit ,x/sum/c/total/' > $m/pane/1/ctl"
+ s.type(command, lambda typed: at_prompt(s, typed)(), per_key=.055)
+ s.keys('\r')
+ s.wait(lambda: 'sum' not in s.read('/pane/1/body'), 'the edit')
+ s.shot(1.6, poster=True)
+ s.click(2, *s.tag_word(1, 'Undo'), done=lambda: s.read('/pane/1/body').count('sum') == 4, what='Undo',
+ after=2.0)
+
+
+def wait_setup(s):
+ """A git repo with a change staged, and a lone shell whose EDITOR is
+ pardes --wait (a `pardes` on its PATH: this pardes-gui)."""
+ env = dict(clean_env(), HOME=str(HOME), **GIT_ID)
+ for args in (['init', '-q'], ['add', '.'], ['commit', '-qm', 'hello']):
+ subprocess.run(['git', '-C', str(PROJECT), *args], check=True, env=env, capture_output=True)
+ main = PROJECT / 'src/main.c'
+ main.write_text(main.read_text().replace('pritnf', 'printf'))
+ (HOME / 'bin').mkdir()
+ (HOME / 'bin/pardes').symlink_to(s.binary)
+ shell_setup(s)
+ ids = ' '.join(f'{k}={v}' for k, v in GIT_ID.items())
+ s.write('/pane/2/pty/data', f"export PATH=$HOME/bin:$PATH EDITOR='pardes --wait' {ids}; git add -A; clear\r")
+ s.write('/pane/1/exec', 'Del\n')
+ s.wait(lambda: list(s.panes()) == [2], 'the README to close')
+ s.wait(lambda: [line.rstrip() for line in s.terminal_rows() if line.strip()] == [' $'], 'the prompt')
+
+
+def wait_editor(s):
+ """git commit opens its message in a pane of this session; Save and
+ Del, and git commit returns."""
+ s.pointer = s.cell_px(44, 9)
+ s.shot(1.0)
+ s.type('git commit', lambda typed: at_prompt(s, typed)(), per_key=.07)
+ s.keys('\r')
+ s.wait(lambda: len(s.panes()) == 2, 'the message pane')
+ msg = next(n for n in s.panes() if n != 2)
+ s.shot(1.0)
+ s.press([('i', 'i')], per_key=.3)
+ s.badge = 'i'
+ s.type('Fix the printf typo', lambda typed: typed in s.read(f'/pane/{msg}/body'), per_key=.05)
+ # Esc as a CSI u sequence: a bare ESC byte waits in the stdin feed's
+ # parser for what follows, and the next mouse event would join it.
+ s.press([('\x1b[27u', 'Esc')], per_key=.4)
+ s.shots[-1]['poster'] = True # git waiting, its message typed in the pane
+ s.click(2, *s.tag_word(msg, 'Save'), done=lambda: s.read(f'/pane/{msg}/dirty').strip() == '0', what='Save',
+ after=.6)
+ s.click(2, *s.tag_word(msg, 'Del'), done=lambda: list(s.panes()) == [2], what='Del', after=.3)
+ s.wait(lambda: any('Fix the printf typo' in line for line in s.terminal_rows()), 'git commit')
+ s.wait(lambda: [line.rstrip() for line in s.terminal_rows() if line.strip()][-1] == ' $', 'the prompt')
+ s.shot(2.4)
+
+
+CLIPS = {
+ 'pdf-navigation': dict(
+ setup=pdf_setup, run=pdf_navigation, args=pdf_args,
+ caption='A 2,515-page PDF: page, jump to CPUID, search, step hits.'),
+ 'image-pane': dict(
+ setup=image_setup, run=image_pane, args=[PROJECT / 'README'],
+ caption="Right-click an image's name, even in a shell, to open it."),
+ 'pdf-tint-fit': dict(
+ setup=pdf_tint_setup, run=pdf_tint_fit, args=pdf_args,
+ caption='PdfTint tints the page, PdfFit fits it, a page address jumps.'),
+ 'text-is-the-interface': dict(
+ setup=hero_setup, run=text_is_the_interface, args=[PROJECT / 'README'],
+ caption='Middle-click make in the README; right-click the error.'),
+ 'terminals-are-panes': dict(
+ setup=shell_setup, run=terminals_are_panes, args=[PROJECT / 'src/main.c'],
+ caption='A terminal is a pane: Ctrl-b, then move over its output.'),
+ 'scripting-over-9p': dict(
+ setup=mounted_shell_setup, run=scripting_over_9p, args=[PROJECT / 'README'],
+ caption='A script drives the session through its virtual filesystem (9P).'),
+ 'diff-review': dict(
+ setup=diff_setup, run=diff_review, args=[PROJECT / 'README'],
+ caption='Right-click a diff line to open that line of the file.'),
+ 'chords': dict(
+ setup=chords_setup, run=chords, args=[PROJECT / 'notes.txt'],
+ caption='Hold left, click middle to cut; click right to paste.'),
+ 'columns': dict(
+ setup=columns_setup, run=columns, args=[PROJECT / 'README'], cols=80, rows=26,
+ caption='Newcol adds a column; a look opens there; Alt-c moves a pane.'),
+ 'search': dict(
+ setup=search_setup, run=search, args=[PROJECT / 'README'],
+ caption='Grep lists the hits; n and N walk them; right-click opens one.'),
+ 'where-commands-run': dict(
+ setup=where_setup, run=where_commands_run, args=[PROJECT / 'src/main.c'],
+ caption="A file's tag runs in its directory; the column tag, in the session's."),
+ 'edit-via-ctl': dict(
+ setup=edit_setup, run=edit_via_ctl, args=[PROJECT / 'src/main.c'],
+ caption='An Edit written to ctl changes every sum; one Undo restores.'),
+ 'wait-editor': dict(
+ setup=wait_setup, run=wait_editor, args=[PROJECT / 'README'],
+ caption="git commit's message opens in a pane; Del returns it to git."),
+}
+
+
+def record(binary, work, name):
+ clip = CLIPS[name]
+ make_project()
+ args = clip['args']() if callable(clip['args']) else clip['args']
+ s = Session(binary, work / name, 'rec-' + name, args, init=clip.get('init', ''),
+ cols=clip.get('cols', COLS), rows=clip.get('rows', ROWS))
+ try:
+ if 'setup' in clip:
+ clip['setup'](s)
+ clip['run'](s)
+ finally:
+ s.close()
+ seconds, poster = compose(s.shots, work / name / 'lossless.mkv')
+ files = encode(work / name / 'lossless.mkv', name, poster)
+ for f in files:
+ print(f'{f.name} {f.stat().st_size / 1e6:.2f} MB')
+ print(f'{name}: {seconds:.1f} s')
+ return seconds
+
+
+def main():
+ parser = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
+ parser.add_argument('binary', type=Path, help='a pardes-gui built with -Dplatform=gui')
+ parser.add_argument('clips', nargs='*',
+ help='which clips (default: all), or themes for the theme gallery: ' + ', '.join(CLIPS))
+ parser.add_argument('--work', type=Path, default=REPO.parent / '.scratch/rec/work',
+ help='frames and intermediates (large; default %(default)s)')
+ parser.add_argument('--theme', default=THEME[0], help='a theme name, or default (default %(default)s)')
+ parser.add_argument('--pdf', type=Path, default=PDF[0],
+ help='the PDF the pdf clips page through, opened read-only (default %(default)s)')
+ args = parser.parse_args()
+ THEME[0] = args.theme
+ PDF[0] = args.pdf.resolve()
+ names = args.clips or list(CLIPS)
+ for name in names:
+ if name not in CLIPS and name != 'themes':
+ parser.error(f'no clip {name!r}: ' + ', '.join(CLIPS))
+ try:
+ for name in names:
+ if name == 'themes':
+ record_themes(args.binary, args.work.resolve())
+ else:
+ record(args.binary, args.work.resolve(), name)
+ finally:
+ shutil.rmtree(PROJECT, ignore_errors=True)
+ shutil.rmtree(HOME, ignore_errors=True)
+ captions = MEDIA / 'captions.txt'
+ lines = dict(line.split(': ', 1) for line in captions.read_text().splitlines() if ': ' in line) \
+ if captions.exists() else {}
+ for name in names:
+ if name in CLIPS:
+ lines[name] = CLIPS[name]['caption']
+ captions.write_text(''.join(f'{name}: {lines[name]}\n' for name in CLIPS if name in lines))
+
+
+if __name__ == '__main__':
+ main()
diff --git a/test/selfmount.py b/test/selfmount.py
new file mode 100644
index 00000000..61d32523
--- /dev/null
+++ b/test/selfmount.py
@@ -0,0 +1,425 @@
+#!/usr/bin/env python3
+"""A session that opens, reads and saves its own 9P tree through a mount.
+
+The editor runs under `9ns --mntgen`, so /mnt/9p/pardes/<name> inside its
+namespace is its own tree, and is driven over its socket from outside. This
+used to hang the editor outright: the realpath, the stat and the read went
+out through the mount and came back as 9P requests only the editor's loop
+could answer, while that loop was blocked making them. Now the connection's
+task answers them while the editor waits (pardes.turn).
+
+Needs 9ns (cloud9) on PATH or in ~/.local/bin, and a runtime directory; it
+skips, loudly, without them.
+"""
+import fcntl
+import os
+from pathlib import Path
+import pty
+import shutil
+import signal
+import struct
+import sys
+import termios
+import threading
+import time
+
+sys.path.insert(0, str(Path(__file__).resolve().parent))
+from ninep import Client
+
+
+def unix_mount(ns, binary, served, env, name, fixture):
+ """A second editor under `9ns --unix <the first's socket>`, on the
+ fixture (a command runs from a file's pane, not a terminal's): what its
+ command pane sees in $PARDES_MOUNT."""
+ second = name + 'u'
+ sock = f'{os.environ["XDG_RUNTIME_DIR"]}/pardes-9p-{second}.sock'
+ out = Path(f'/tmp/{second}.mount')
+ env = dict(env, PARDES_DUMP=f'/tmp/{second}.dump.zon')
+ pid, master = pty.fork()
+ if pid == 0:
+ os.execve(ns, ['9ns', '--unix', served, '--', binary, '--tty', '--9p=' + second, str(fixture)], env)
+ fcntl.ioctl(master, termios.TIOCSWINSZ, struct.pack('HHHH', 30, 100, 0, 0))
+ os.set_blocking(master, False)
+ try:
+ deadline = time.monotonic() + 30
+ while time.monotonic() < deadline and not out.exists():
+ try:
+ os.read(master, 65536)
+ except OSError:
+ pass
+ if os.path.exists(sock) and not out.with_suffix('.sent').exists():
+ time.sleep(.3)
+ with Client(sock) as client:
+ client.write('/ctl', b'Shell sh\n')
+ client.write('/exec', f'echo "${{PARDES_MOUNT-unset}}" > {out}.tmp; mv {out}.tmp {out}\n'.encode())
+ out.with_suffix('.sent').touch()
+ time.sleep(.1)
+ return out.read_text().strip() if out.exists() else 'timeout'
+ finally:
+ os.kill(pid, signal.SIGTERM)
+ time.sleep(.2)
+ try:
+ os.kill(pid, signal.SIGKILL)
+ except ProcessLookupError:
+ pass
+ os.waitpid(pid, 0)
+ for path in (out, out.with_suffix('.sent'), Path(f'/tmp/{second}.dump.zon')):
+ path.unlink(missing_ok=True)
+
+
+def run(binary):
+ ns = shutil.which('9ns') or str(Path.home() / '.local/bin/9ns')
+ runtime = os.environ.get('XDG_RUNTIME_DIR')
+ if not os.path.exists(ns) or not runtime:
+ print('selfmount: skipped (needs 9ns and XDG_RUNTIME_DIR)')
+ return 0
+ name = 'selfmount%d' % os.getpid()
+ sock = f'{runtime}/pardes-9p-{name}.sock'
+ fixture = Path(f'/tmp/{name}.txt')
+ fixture.write_bytes(b'initial\n')
+ env = {k: v for k, v in os.environ.items() if not k.startswith('PARDES_')}
+ env.update(PARDES_NOTIME='1', TERM='xterm-256color', PARDES_DUMP=f'/tmp/{name}.dump.zon')
+ for language in ['RS', 'C', 'GO', 'TS', 'PY']:
+ env['PARDES_LSP_' + language] = ''
+ pid, master = pty.fork()
+ if pid == 0:
+ os.execve(ns, ['9ns', '--mntgen', '--', binary, '--tty', '--9p=' + name, str(fixture)], env)
+ fcntl.ioctl(master, termios.TIOCSWINSZ, struct.pack('HHHH', 30, 100, 0, 0))
+ os.set_blocking(master, False)
+ tail = bytearray()
+
+ def drain():
+ try:
+ while True:
+ chunk = os.read(master, 65536)
+ if not chunk:
+ return
+ tail.extend(chunk[-2000:])
+ except OSError:
+ pass
+
+ failures = []
+
+ def check(condition, what):
+ print(('ok ' if condition else 'FAIL ') + what)
+ if not condition:
+ failures.append(what)
+
+ try:
+ deadline = time.monotonic() + 15
+ while not os.path.exists(sock):
+ drain()
+ if time.monotonic() > deadline:
+ raise TimeoutError('socket never appeared: ' + tail.decode(errors='replace')[-400:])
+ time.sleep(.02)
+ time.sleep(.3)
+ mount = f'/mnt/9p/pardes/{name}'
+ with Client(sock) as client:
+ index = client.read('/index').decode()
+ rows = [row.rsplit(maxsplit=1)[0].split(maxsplit=3) for row in index.splitlines()]
+ first = rows[0][0]
+ # A Look at the tree's own index: realpath, stat and read all go
+ # out through 9ns and back in, and the write returns when the
+ # pane is open.
+ started = time.monotonic()
+ client.write('/look', (mount + '/index\n').encode())
+ took = time.monotonic() - started
+ check(took < 5, f'look at the mounted index returned ({took:.2f}s)')
+ rows = [row.rsplit(maxsplit=1)[0].split(maxsplit=3) for row in client.read('/index').decode().splitlines()]
+ opened = [row for row in rows if len(row) == 4 and row[3] == mount + '/index']
+ check(len(opened) == 1, 'a pane opened on the mounted index')
+ if opened:
+ body = client.read(f'/pane/{opened[0][0]}/body').decode()
+ check(body.startswith(index.splitlines()[0]), 'its body is the index as served')
+ # A Look at pane 1's body through the mount, an edit of the copy,
+ # and a Save: the save writes back through the mount into pane 1,
+ # and the exec returns once it has.
+ client.write('/look', f'{mount}/pane/{first}/body\n'.encode())
+ rows = [row.rsplit(maxsplit=1)[0].split(maxsplit=3) for row in client.read('/index').decode().splitlines()]
+ mirror = [row for row in rows if len(row) == 4 and row[3] == f'{mount}/pane/{first}/body']
+ check(len(mirror) == 1, 'a pane opened on the mounted body')
+ if mirror:
+ pane = mirror[0][0]
+ client.write(f'/pane/{pane}/addr', b'#0,#0')
+ client.write(f'/pane/{pane}/data', b'HELLO ')
+ client.write(f'/pane/{pane}/exec', b'Save\n')
+ check(client.read(f'/pane/{first}/body') == b'HELLO initial\n', f'Save wrote back through the mount into pane {first}')
+ text = ''.join(cell[0] for cell in client.screen()['cells'])
+ check('saved ' + mount in text, 'the editor reported the save')
+ # Through the kernel mount a write is cut at its msize: a
+ # 1000-line burst and a 50 KB Edit block each still run whole,
+ # line by line, and no piece of a line runs as a shell command.
+ # sh: bash's and fish's prompt files are not reachable in 9ns's
+ # namespace here, and a command pane needs no prompt marks.
+ client.write('/ctl', b'Shell sh\n')
+ # From the fixture's directory: a pane on the mount has one a
+ # shell cannot enter.
+ client.write('/focus', f'{first}\n'.encode())
+
+ def run(line):
+ """A command pane runs the line; answers its exit status."""
+ seen = client.read('/log').decode().count('\nexit ')
+ client.write('/exec', line)
+ deadline = time.monotonic() + 20
+ while time.monotonic() < deadline:
+ drain()
+ exits = [row for row in client.read('/log').decode().splitlines() if row.startswith('exit ')]
+ if len(exits) > seen:
+ return exits[-1].split()[2]
+ time.sleep(.1)
+ return 'timeout'
+ # A pane's command finds the session's own directory in
+ # $PARDES_MOUNT (9ns --mntgen says NINE_MNTGEN=1).
+ check(run(f'test "$PARDES_MOUNT" = {mount} && grep -q . "$PARDES_MOUNT/index"\n'.encode()) == '0',
+ '$PARDES_MOUNT is the session under the mntgen mount, and it answers')
+ # Under `9ns --unix` the mount is another server, never this
+ # session: a second editor started there leaves it unset.
+ seen_mount = unix_mount(ns, binary, sock, env, name, fixture)
+ check(seen_mount == 'unset', f'under 9ns --unix $PARDES_MOUNT is unset ({seen_mount!r})')
+ # Followed from before the burst: a fresh open of the log reads
+ # only what its 64 KiB ring still holds, which a burst this size
+ # outgrows, and a follower the ring outruns reads `lost N`, so
+ # every line is either heard once, in order, or a loss is said.
+ heard = []
+
+ def follow():
+ with Client(sock) as follower:
+ fid = follower.open('/log', 2)
+ start = len(follower.read_fid(fid))
+ follower.rpc(118, struct.pack('<IQI', fid, 0, len(b'follow new\n')) + b'follow new\n')
+ ready.set()
+ deadline = time.monotonic() + 60
+ while time.monotonic() < deadline:
+ record = follower.read_fid(fid, start).decode()
+ heard.append(record)
+ if 'mnt-0999' in record:
+ return
+ ready = threading.Event()
+ reader = threading.Thread(target=follow, daemon=True)
+ reader.start()
+ check(ready.wait(10), 'a follower of the log is waiting')
+ got = run(f"seq -f 'Msg mnt-%04g' 0 999 > {mount}/exec\n".encode())
+ check(got == '0', f'a 1000-line burst written through the mount ({got!r})')
+ reader.join(60)
+ for r in heard:
+ if r.startswith(('err ', 'exit ')):
+ print(' heard: ' + r.rstrip())
+ said = [r.rstrip('\n').split(' ', 2)[2] for r in heard if r.startswith('msg ') and 'mnt-' in r]
+ lost = [r for r in heard if r.startswith('lost ')]
+ numbers = [int(s[4:]) for s in said]
+ check(numbers == list(range(numbers[0] if numbers else 0, 1000)),
+ f'each line it heard ran once, whole, in order, through the last ({len(said)} heard)')
+ check(len(said) == 1000 or (lost and heard.index(lost[0]) < heard.index(next(r for r in heard if 'mnt-' in r))),
+ f'no line was lost unsaid ({len(said)} heard, {lost!r})')
+ check(not any('exit 127' in r for r in heard), 'no piece of a line ran as a command')
+ scratch = int(client.read('/pane/new'))
+ maker = "import sys; sys.stdout.write('Edit ,a\\n' + ''.join('line %05d of the block\\n' % i for i in range(2500)) + '.\\n')"
+ check(run(f'python3 -c "{maker}" > {mount}/pane/{scratch}/ctl\n'.encode()) == '0', 'a 50 KB Edit block written through the mount')
+ body = client.read(f'/pane/{scratch}/body').decode().splitlines()
+ check(body == ['line %05d of the block' % i for i in range(2500)], f'it ran once, whole ({len(body)} lines)')
+ # One 600 KiB line: 9ns sends it as 65512-byte Twrites, the last
+ # one short, and none is taken for a whole line by its size.
+ errs = client.read('/log').decode().count('\nerr ')
+ long_edit = "import sys; sys.stdout.write('Edit ,c/' + 'q' * 600000 + '/\\n')"
+ check(run(f'python3 -c "{long_edit}" > {mount}/pane/{scratch}/ctl\n'.encode()) == '0', 'a 600 KiB Edit line written through the mount')
+ check(client.read(f'/pane/{scratch}/body') == b'q' * 600000, 'it ran once, whole')
+ check(client.read('/log').decode().count('\nerr ') == errs, 'no piece of it was refused as a line of its own')
+ # Over 1 MiB: refused once, its tail dropped through its newline.
+ too_long = "import sys; sys.stdout.write('Msg ' + 'z' * 1150000 + '\\nMsg after-long\\n')"
+ run(f'python3 -c "{too_long}" > {mount}/exec\n'.encode())
+ log = client.read('/log').decode()
+ check(log.count('over 1 MiB') == 1 and 'unknown control message' not in log and 'after-long' in log,
+ 'a 1.1 MiB line is refused once, its tail never a line, the next line runs')
+ # `pardes -` by hand through the mount: the directory, then a
+ # program's output, escapes and all, on one open of /pager; the
+ # +Pager reads back the plain text.
+ got = run(f"{{ pwd; printf '\\033[31mred\\033[m\\n'; }} > {mount}/pager\n".encode())
+ rows = [row.rsplit(maxsplit=1)[0].split(maxsplit=3) for row in client.read('/index').decode().splitlines()]
+ paged = [row[0] for row in rows if len(row) == 4 and row[3].endswith('/+Pager')]
+ check(got == '0' and len(paged) == 1, f'a +Pager made through the mount ({got!r}, {paged!r})')
+ if paged:
+ # The text goes in at the open's close, and a mount's close
+ # (FUSE's release) comes after close(2) has returned.
+ deadline = time.monotonic() + 5
+ while (said := client.read(f'/pane/{paged[0]}/body')) != b'red\n' and time.monotonic() < deadline:
+ time.sleep(.05)
+ check(said == b'red\n', f'its body is the plain text ({said!r})')
+ # `>`'s truncate of exec changes nothing and waits on nothing,
+ # and a last line with no newline runs once its open closes, at
+ # the editor's next step, the close answered at once. Either
+ # waiting on the editor hung: 9ns answers nothing else on the
+ # mount while a setattr or a clunk is out, and the step may be
+ # out reading a pane's file through it (the mounted index above).
+ got = run(f"for i in $(seq 40); do printf 'Msg held-%d' $i > {mount}/exec || exit 9; done\n".encode())
+ deadline = time.monotonic() + 5
+ while 'held-40\n' not in (log := client.read('/log').decode()) and time.monotonic() < deadline:
+ time.sleep(.05)
+ check(got == '0' and all(f' held-{i}\n' in log for i in range(1, 41)),
+ f'40 closes holding a last line each through the mount, all answered, every line run ({got!r})')
+ # An Edit whose filter writes the very ctl the Edit came by: 9ns
+ # opens with FOPEN_PARALLEL_DIRECT_WRITES, so the filter's write
+ # is not queued behind the one waiting for it. (Its own open may
+ # not truncate, `1<>`, not `>`: Linux takes the file's lock
+ # outright for an O_TRUNC open, and the waiting write holds it
+ # shared; nothing a server answers can change that.)
+ started = time.monotonic()
+ got = run(f"printf 'Edit ,>echo Msg filter-hi 1<> {mount}/pane/{scratch}/ctl\\n' > {mount}/pane/{scratch}/ctl\n".encode())
+ took = time.monotonic() - started
+ check(got == '0' and took < 5 and 'filter-hi' in client.read('/log').decode(),
+ f'an Edit filter writing its own ctl through the mount answers promptly ({got!r}, {took:.1f}s)')
+ # Another session dies under a burst of reads of it through the
+ # registry mount: every read returns (an error is fine), none
+ # hangs. 9ns invalidates the dead entry from a thread of its own,
+ # never the one that must answer the reads holding its parent.
+ other = name + 'k'
+ other_sock = f'{runtime}/pardes-9p-{other}.sock'
+ other_env = dict(env, PARDES_DUMP=f'/tmp/{other}.dump.zon')
+ other_pid, other_master = pty.fork()
+ if other_pid == 0:
+ os.execve(binary, [binary, '--tty', '--9p=' + other], other_env)
+ os.set_blocking(other_master, False)
+ deadline = time.monotonic() + 15
+ while not os.path.exists(other_sock) and time.monotonic() < deadline:
+ try:
+ os.read(other_master, 65536)
+ except OSError:
+ pass
+ time.sleep(.05)
+ codes = Path(f'/tmp/{name}.codes')
+ codes.unlink(missing_ok=True)
+
+ def kill_other():
+ time.sleep(1.5)
+ os.kill(other_pid, signal.SIGKILL)
+ killer = threading.Thread(target=kill_other, daemon=True)
+ killer.start()
+ ran = run((f"for k in 1 2 3 4 5; do (end=$((SECONDS+4)); while [ $SECONDS -lt $end ]; do "
+ f"timeout 10 cat /mnt/9p/pardes/{other}/index > /dev/null 2>&1; echo $? >> {codes}; done) & done; wait\n").encode())
+ killer.join(5)
+ os.waitpid(other_pid, 0)
+ got_codes = codes.read_text().split() if codes.exists() else []
+ codes.unlink(missing_ok=True)
+ for path in (other_sock, f'/tmp/{other}.dump.zon'):
+ Path(path).unlink(missing_ok=True)
+ check(ran == '0' and got_codes and '124' not in got_codes,
+ f'reads of a session killed under them all return ({ran!r}, {len(got_codes)} reads, {got_codes.count("124")} hung)')
+ # Forty event reads held through the mount, a follower each, and
+ # the mount still answers the rest: 9ns keeps workers past what
+ # the editor holds (128), so `cat layout` is not queued behind
+ # them for ever.
+ held = run(f"for i in $(seq 40); do cat {mount}/pane/{first}/event > /dev/null & done; "
+ f"sleep 1; timeout 10 cat {mount}/layout > /dev/null; st=$?; kill $(jobs -p); exit $st\n".encode())
+ check(held == '0', f'cat layout answers beside 40 held event reads ({held!r})')
+ # fs.md's follow recipe, as written, with plain cat, its output
+ # a pipe (where coreutils cat splices): it hears a record made
+ # after it started.
+ recipe = Path(f'/tmp/{name}.follow')
+ ran = run(f"exec 3<>{mount}/log; echo follow >&3; "
+ f"(sleep 1; echo 'Msg recipe-heard' > {mount}/exec) & "
+ f"timeout 5 cat <&3 | cat > {recipe}; exit 0\n".encode())
+ followed = recipe.read_text() if recipe.exists() else ''
+ recipe.unlink(missing_ok=True)
+ check(ran == '0' and 'recipe-heard' in followed, f'the log follow recipe with cat hears a new record ({followed[-120:]!r})')
+ # A bash read loop on a pane's event: bash reads it a piece at a
+ # time, and each record still arrives whole, in pieces.
+ looped = Path(f'/tmp/{name}.events')
+ ran = run((f"bash -c 'exec 3<{mount}/pane/{first}/event; "
+ f"(sleep 1; echo Msg ev-loop > {mount}/pane/{first}/exec) & "
+ f"read -r line <&3; echo \"$line\" > {looped}'\n").encode())
+ got_line = looped.read_text() if looped.exists() else ''
+ looped.unlink(missing_ok=True)
+ check(ran == '0' and got_line.startswith('FX') and got_line.rstrip().endswith('Msg ev-loop'),
+ f'a bash read loop on event reads a whole record ({got_line!r})')
+ # Past the session's 64 open records (write opens of exec take
+ # them too) an open is refused EMFILE, "Too many open files".
+ many = Path(f'/tmp/{name}.many')
+ ran = run((f"timeout 10 bash -c 'for i in $(seq 80); do exec {{fd}}>>{mount}/exec || exit 9; done' 2> {many}; "
+ f"st=$?; echo rc=$st >> {many}; exit $st\n").encode())
+ said_many = many.read_text() if many.exists() else ''
+ many.unlink(missing_ok=True)
+ check(ran == '9' and 'Too many open files' in said_many, f'an open past the 64 records is EMFILE ({ran!r}, {said_many[-80:]!r})')
+ # An Edit whose command runs is held, not waited on: through the
+ # mount, a status read beside a slow one answers at once, and a
+ # command that reads this session's own tree runs.
+ edited = int(client.read('/pane/new'))
+ client.write(f'/pane/{edited}/body', b'pear\napple\n')
+ took = Path(f'/tmp/{name}.took')
+ ran = run((f"echo 'Edit , | sleep 3; sort' > {mount}/pane/{edited}/ctl & sleep .5; "
+ f"s=$(date +%s%N); timeout 5 cat {mount}/status > /dev/null; e=$(date +%s%N); "
+ f"echo $(( (e - s) / 1000000 )) > {took}; wait\n").encode())
+ ms = int(took.read_text()) if took.exists() else -1
+ took.unlink(missing_ok=True)
+ check(ran == '0' and 0 <= ms < 1000, f'a status read beside a slow Edit answers at once ({ms} ms)')
+ check(client.read(f'/pane/{edited}/body') == b'apple\npear\n', 'and the slow Edit applied')
+ ran = run(f"echo 'Edit $ < cat {mount}/pane/{edited}/body' > {mount}/pane/{edited}/ctl\n".encode())
+ check(ran == '0' and client.read(f'/pane/{edited}/body') == b'apple\npear\napple\npear\n',
+ f'an Edit whose command reads the session through its mount ({ran!r})')
+ # A filter gets what a pane's command gets: the session's mount,
+ # socket and pid.
+ env_pane = int(client.read('/pane/new'))
+ ran = run(f"echo 'Edit $ < printf \"%s|%s|%s\" \"$PARDES_MOUNT\" \"$PARDES_9P\" \"$PARDES_PID\"' > {mount}/pane/{env_pane}/ctl\n".encode())
+ got_env = client.read(f'/pane/{env_pane}/body').decode().split('|')
+ check(ran == '0' and len(got_env) == 3 and got_env[0] == mount and got_env[1] == sock and got_env[2].isdigit(),
+ f'an Edit filter has $PARDES_MOUNT, $PARDES_9P and $PARDES_PID ({got_env!r})')
+ # An interrupted Edit write is flushed: its command is stopped and
+ # nothing changes, and the next Edit runs.
+ flushed = Path(f'/tmp/{name}.flushed')
+ ran = run((f"timeout -s INT 1 sh -c \"echo 'Edit , | sleep 4; tr a-z A-Z' > {mount}/pane/{edited}/ctl\"; "
+ f"echo $? > {flushed}; sleep 1; echo 'Edit 1 | tr p P' > {mount}/pane/{edited}/ctl; echo $? >> {flushed}\n").encode())
+ codes = flushed.read_text().split() if flushed.exists() else []
+ flushed.unlink(missing_ok=True)
+ time.sleep(4.5)
+ check(codes == ['124', '0'] and client.read(f'/pane/{edited}/body') == b'aPPle\npear\napple\npear\n',
+ f'an interrupted Edit changes nothing, and the next runs ({codes!r}, {client.read(f"/pane/{edited}/body")!r})')
+ client.write('/exec', b'Msg still here\n')
+ # The terminal is read as it is waited on: a frame the editor
+ # cannot write out (its pty full) is a frame /screen does not have.
+ deadline = time.monotonic() + 8
+ while 'still here' not in (text := ''.join(cell[0] for cell in client.screen()['cells'])) and time.monotonic() < deadline:
+ drain()
+ time.sleep(.1)
+ check('still here' in text, 'the editor answers after all of that')
+ # A filter that writes its own pane's ctl through the mount. Both
+ # sides with `<>` run at once; a `>` or `>>` open on either side
+ # waits in the kernel for the other write, and the command is
+ # stopped at its 10 s limit: the Edit's write is answered then,
+ # never held by a command it cannot kill.
+ loop_pane = env_pane # the screen has no room for another
+ client.write(f'/pane/{loop_pane}/body', b'x\n', truncate=True)
+ inner = Path(f'/tmp/{name}.inner')
+ timed = Path(f'/tmp/{name}.timed')
+ for outer_open, inner_open, quick in [('3<>', '1<>', True), ('>', '>', False), ('>>', '>', False),
+ ('3<>', '>>', False), ('>', '>>', False)]:
+ # `clean`, which says nothing: a stopped filter's write still
+ # lands once the Edit's is answered.
+ inner.write_text(f'echo clean {inner_open} "$PARDES_MOUNT/pane/$winid/ctl"\n')
+ edit = f'Edit 1 > sh {inner}'
+ write = (f"exec 3<>{mount}/pane/{loop_pane}/ctl; echo '{edit}' >&3; rc=$?; exec 3>&-"
+ if outer_open == '3<>' else f"echo '{edit}' {outer_open} {mount}/pane/{loop_pane}/ctl; rc=$?")
+ ran = run((f"s=$(date +%s%N); {write}; e=$(date +%s%N); "
+ f"echo $rc $(( (e - s) / 1000000 )) > {timed}\n").encode())
+ rc_ms = timed.read_text().split() if timed.exists() else ['?', '-1']
+ timed.unlink(missing_ok=True)
+ ms = int(rc_ms[1])
+ ok = ms >= 0 and (ms < 2000 if quick else ms < 13000)
+ check(ran == '0' and ok, f'outer {outer_open}, filter {inner_open} on its own ctl: answered in {ms} ms (rc {rc_ms[0]})')
+ inner.unlink(missing_ok=True)
+ client.write('/exec', b'Msg after the stopped filters\n')
+ check('msg ' in client.read('/log').decode().split('after the stopped filters')[0][-40:],
+ 'and the editor answers after them')
+ finally:
+ os.kill(pid, signal.SIGTERM)
+ time.sleep(.2)
+ try:
+ os.kill(pid, signal.SIGKILL)
+ except ProcessLookupError:
+ pass
+ os.waitpid(pid, 0)
+ for path in (fixture, Path(f'/tmp/{name}.dump.zon')):
+ path.unlink(missing_ok=True)
+ print('selfmount: ' + ('ok' if not failures else f'{len(failures)} failed'))
+ return 0 if not failures else 1
+
+
+if __name__ == '__main__':
+ sys.exit(run(str(Path(sys.argv[1]).resolve())))
diff --git a/test/snapshot.zig b/test/snapshot.zig
index 7fa84a86..2d8a8664 100644
--- a/test/snapshot.zig
+++ b/test/snapshot.zig
@@ -157,8 +157,8 @@ pub fn main(init: std.process.Init) !void {
script_i += 1;
}
if (exe == null) fatal("usage: pardes-snap <exe> [scripts...] [--update] [--jobs=N]", .{});
- const exe_z = try arena.dupeZ(u8, exe.?);
- lspmock_bin = if (lspmock) |p| try arena.dupeZ(u8, p) else null;
+ const exe_z = try arena.dupeSentinel(u8, exe.?, 0);
+ lspmock_bin = if (lspmock) |p| try arena.dupeSentinel(u8, p, 0) else null;
if (scripts.len == 0) {
scripts = try listSnaps(arena, try absPath(arena, orig_cwd, "test/snapshots"));
@@ -264,6 +264,9 @@ pub fn main(init: std.process.Init) !void {
});
std.process.exit(1);
}
+ // Every retry passed: the captures of the failed attempts explain
+ // nothing any more, and /tmp is not where they should pile up.
+ if (retry_dir) |d| std.Io.Dir.cwd().deleteTree(init.io, d) catch {};
std.debug.print("all {d} snapshot scripts ok\n", .{scripts.len});
}
@@ -440,7 +443,7 @@ fn runBatch(
fn runOne(arena: std.mem.Allocator, exe_z: [:0]const u8, script_path: []const u8, update: bool) u8 {
if (careful) beCareful();
const stem = std.fs.path.stem(script_path);
- const report_z = arena.dupeZ(u8, reportPath(arena, script_path) catch return 1) catch return 1;
+ const report_z = arena.dupeSentinel(u8, reportPath(arena, script_path) catch return 1, 0) catch return 1;
const fd = libc.open(report_z, .{ .ACCMODE = .WRONLY, .CREAT = true, .TRUNC = true }, @as(libc.mode_t, 0o644));
if (fd >= 0) {
_ = libc.dup2(fd, 1);
@@ -454,7 +457,7 @@ fn runOne(arena: std.mem.Allocator, exe_z: [:0]const u8, script_path: []const u8
// dirty to every manual `cmp` audit. Unlink only this script's exact path
// before it starts; a new mismatch below writes it back.
const actual_path = std.fmt.allocPrint(arena, "{s}.actual", .{base_path}) catch return 1;
- const actual_path_z = arena.dupeZ(u8, actual_path) catch return 1;
+ const actual_path_z = arena.dupeSentinel(u8, actual_path, 0) catch return 1;
if (record_dir == null) _ = libc.unlink(actual_path_z);
const golden: ?[]u8 = if (record_dir == null) readFileAlloc(arena, golden_path) catch null else null;
const started = eh.nowMs();
@@ -470,7 +473,7 @@ fn runOne(arena: std.mem.Allocator, exe_z: [:0]const u8, script_path: []const u8
return 0;
}
if (update) {
- eh.writeFile(arena.dupeZ(u8, golden_path) catch return 1, out) catch return 1;
+ eh.writeFile(arena.dupeSentinel(u8, golden_path, 0) catch return 1, out) catch return 1;
std.debug.print("UPDATED {s} ({d} bytes)\n", .{ stem, out.len });
return 0;
}
@@ -482,7 +485,7 @@ fn runOne(arena: std.mem.Allocator, exe_z: [:0]const u8, script_path: []const u8
std.debug.print("PASS {s} ({d}ms)\n", .{ stem, took });
return 0;
}
- eh.writeFile(arena.dupeZ(u8, actual_path) catch return 1, out) catch |err| {
+ eh.writeFile(arena.dupeSentinel(u8, actual_path, 0) catch return 1, out) catch |err| {
std.debug.print("FAIL {s}: differs from golden; cannot write {s}: {s} ({d}ms)\n", .{ stem, actual_path, @errorName(err), took });
printFirstDiff(golden.?, out);
return 1;
@@ -554,13 +557,14 @@ fn runScript(arena: std.mem.Allocator, exe_z: [:0]const u8, script_path: []const
try mkdir(arena, work, false);
// deterministic shell: fixed prompt, no history, no user rc leakage
try eh.writeFile(try std.fmt.allocPrintSentinel(arena, "{s}/.bashrc", .{home}, 0), "PS1='$ '\nHISTFILE=\n");
- _ = setenv("HOME", try arena.dupeZ(u8, home), 1);
+ _ = setenv("HOME", try arena.dupeSentinel(u8, home, 0), 1);
// Keep startup configuration hermetic even when the developer exports an
// XDG directory that points outside this per-snapshot fake home.
const config_home = try std.fmt.allocPrintSentinel(arena, "{s}/.config", .{home}, 0);
_ = setenv("XDG_CONFIG_HOME", config_home, 1);
- // ...and it is not empty: the DEFAULT shell is fish, whose prompt carries
- // a hostname and whose greeting carries a version, so a golden taken
+ // ...and it is not empty: the DEFAULT shell is $SHELL, whatever this
+ // machine's user logs in with (fish's prompt carries a hostname and its
+ // greeting a version), so a golden taken
// against it would be a golden for this machine. Every script here runs
// bash — the .bashrc above pins its prompt to `$ ` — and the fish path is
// covered by host_io.Shell's unit tests instead. This is an ordinary
@@ -569,14 +573,19 @@ fn runScript(arena: std.mem.Allocator, exe_z: [:0]const u8, script_path: []const
try mkdir(arena, config_home, false);
const pardes_config = try std.fmt.allocPrint(arena, "{s}/pardes", .{config_home});
try mkdir(arena, pardes_config, false);
- try eh.writeFile(try std.fmt.allocPrintSentinel(arena, "{s}/init", .{pardes_config}, 0), "Shell bash\n");
+ // Messages leave the moment they are dismissed, as goldens have always
+ // recorded: a linger or a dissolve is time, and time cannot be a golden.
+ try eh.writeFile(try std.fmt.allocPrintSentinel(arena, "{s}/init", .{pardes_config}, 0), "Shell bash\nMessageAnimation off\nMessageLinger 0\n");
_ = setenv("TERM", "xterm-256color", 1);
_ = setenv("LC_ALL", "C", 1);
// a wall clock cannot live in a golden; everything that would print one
// prints fixed characters instead when this is set — the lsp introspection
- // views' durations (lsp_zls.zig hideTime) and the transient message row's
+ // views' durations and the transient message row's
// time of day (message.zig stamp)
_ = setenv("PARDES_NOTIME", "1", 1);
+ // A virtual core clock: animation moves a frame per timed-out wait,
+ // whatever the machine's load (host_io.testClock).
+ _ = setenv("PARDES_TEST_CLOCK", "1", 1);
// The protocol client must be HERMETIC under the harness: `.rs` files
// speak to the deterministic mock when the build handed one over, and
// every other spec is disabled outright — a script that opened a stray
@@ -593,8 +602,8 @@ fn runScript(arena: std.mem.Allocator, exe_z: [:0]const u8, script_path: []const
// take turns — which cost more wall clock than the other 51 scripts put
// together. Scripts name it `$DUMP`.
const dump_path = try std.fmt.allocPrint(arena, "{s}/dump.zon", .{base});
- _ = setenv("PARDES_DUMP", try arena.dupeZ(u8, dump_path), 1);
- if (chdirRc(try arena.dupeZ(u8, work)) < 0) return error.ChdirFailed;
+ _ = setenv("PARDES_DUMP", try arena.dupeSentinel(u8, dump_path, 0), 1);
+ if (chdirRc(try arena.dupeSentinel(u8, work, 0)) < 0) return error.ChdirFailed;
const chunks = try arena.alloc([]const u8, countCaptures(src));
var chunk_len: usize = 0;
@@ -619,9 +628,15 @@ fn runScript(arena: std.mem.Allocator, exe_z: [:0]const u8, script_path: []const
const cmd = tok.next().?;
errdefer std.debug.print(" at {s}:{d}: {s}\n", .{ script_path, lineno, line });
- if (std.mem.eql(u8, cmd, "file")) {
+ if (std.mem.eql(u8, cmd, "config")) {
+ // Appended to the startup config this script's fake home already
+ // has, so a script can pin a setting instead of spelling out the
+ // screen geometry a default implies. Must precede `start`.
+ const setting = try std.fmt.allocPrint(arena, "{s}\n", .{tok.rest()});
+ try eh.appendFile(try std.fmt.allocPrintSentinel(arena, "{s}/pardes/init", .{config_home}, 0), setting);
+ } else if (std.mem.eql(u8, cmd, "file")) {
const name = tok.next() orelse return error.BadScript;
- try eh.writeFile(try arena.dupeZ(u8, name), try unescape(arena, tok.rest()));
+ try eh.writeFile(try arena.dupeSentinel(u8, name, 0), try unescape(arena, tok.rest()));
} else if (std.mem.eql(u8, cmd, "lines")) {
const name = tok.next() orelse return error.BadScript;
const n = try std.fmt.parseInt(usize, tok.next() orelse return error.BadScript, 10);
@@ -631,7 +646,7 @@ fn runScript(arena: std.mem.Allocator, exe_z: [:0]const u8, script_path: []const
// scroll test needs and `file` can only give as one huge script line
const tail = tok.rest();
const buf = try numberedLines(arena, n, tail);
- try eh.writeFile(try arena.dupeZ(u8, name), buf);
+ try eh.writeFile(try arena.dupeSentinel(u8, name, 0), buf);
} else if (std.mem.eql(u8, cmd, "ppmdiag")) {
// The diagonal-split test PPM from the old e2e (white over blue),
// grown to 512x512 with the white half filled by a fixed LCG
@@ -643,7 +658,7 @@ fn runScript(arena: std.mem.Allocator, exe_z: [:0]const u8, script_path: []const
// down to flat color and a block always wins).
const name = tok.next() orelse return error.BadScript;
const ppm = try ppmDiag(arena);
- try eh.writeFile(try arena.dupeZ(u8, name), ppm);
+ try eh.writeFile(try arena.dupeSentinel(u8, name, 0), ppm);
} else if (std.mem.eql(u8, cmd, "dirmk")) {
try mkdir(arena, tok.next() orelse return error.BadScript, false);
} else if (std.mem.eql(u8, cmd, "run")) {
@@ -653,7 +668,7 @@ fn runScript(arena: std.mem.Allocator, exe_z: [:0]const u8, script_path: []const
// different inotify event. This runs in the script's cwd, as a
// child of the RUNNER, so nothing it does reaches the app's ptys:
// whatever the app then shows, it woke up for by itself.
- if (system(try arena.dupeZ(u8, tok.rest())) != 0) return error.RunFailed;
+ if (system(try arena.dupeSentinel(u8, tok.rest(), 0)) != 0) return error.RunFailed;
} else if (std.mem.eql(u8, cmd, "start")) {
const rows = try std.fmt.parseInt(u16, tok.next() orelse return error.BadScript, 10);
const cols = try std.fmt.parseInt(u16, tok.next() orelse return error.BadScript, 10);
@@ -661,7 +676,7 @@ fn runScript(arena: std.mem.Allocator, exe_z: [:0]const u8, script_path: []const
var nextra: usize = 0;
while (tok.next()) |a| : (nextra += 1) {
if (nextra >= extra.len) return error.BadScript;
- extra[nextra] = (try arena.dupeZ(u8, a)).ptr;
+ extra[nextra] = (try arena.dupeSentinel(u8, a, 0)).ptr;
}
if (h) |*hp| hp.deinit(); // scripts may restart (e.g. dump then -l)
// a new process is a new screen: capture it whole, or its first
@@ -948,13 +963,13 @@ fn treeAsleep(root: libc.pid_t) bool {
while (n > 0) {
n -= 1;
const pid = stack[n];
- const dir_path = std.fmt.bufPrintZ(&path_buf, "/proc/{d}/task", .{pid}) catch continue;
+ const dir_path = std.fmt.bufPrintSentinel(&path_buf, "/proc/{d}/task", .{pid}, 0) catch continue;
const dir = libc.opendir(dir_path) orelse continue; // exited between steps
defer _ = libc.closedir(dir);
while (libc.readdir(dir)) |d| {
const tid = std.mem.sliceTo(@as([*:0]const u8, @ptrCast(&d.name)), 0);
if (tid[0] == '.') continue;
- const stat = readProc(&buf, std.fmt.bufPrintZ(&path_buf, "/proc/{d}/task/{s}/stat", .{ pid, tid }) catch continue) orelse continue;
+ const stat = readProc(&buf, std.fmt.bufPrintSentinel(&path_buf, "/proc/{d}/task/{s}/stat", .{ pid, tid }, 0) catch continue) orelse continue;
// "pid (comm) S ..." — comm can hold spaces and parens, so the
// state is the char two past the LAST ')'
const close = std.mem.lastIndexOfScalar(u8, stat, ')') orelse continue;
@@ -968,7 +983,7 @@ fn treeAsleep(root: libc.pid_t) bool {
'R', 'D', 'Z' => return false,
else => {},
}
- const kids = readProc(&buf, std.fmt.bufPrintZ(&path_buf, "/proc/{d}/task/{s}/children", .{ pid, tid }) catch continue) orelse continue;
+ const kids = readProc(&buf, std.fmt.bufPrintSentinel(&path_buf, "/proc/{d}/task/{s}/children", .{ pid, tid }, 0) catch continue) orelse continue;
var it = std.mem.tokenizeAny(u8, kids, " \n");
while (it.next()) |k| {
if (n >= stack.len) return false; // deeper than we can walk: assume busy
@@ -1315,9 +1330,28 @@ fn styleRows(arena: std.mem.Allocator, h: *eh.Harness) ![]const []const u8 {
var run_key: [64]u8 = undefined;
var run_len: usize = 0;
var run_start: u16 = 0;
+ // A blank's ink shows nowhere, and the tty leaves whatever ink the
+ // terminal had there (tty.zig blankInk), so it depends on the frames
+ // before: a blank is written with the ink of the cell before it.
+ var ink_buf: [16]u8 = undefined;
+ var ink: []const u8 = "d";
var x: u16 = 0;
while (x <= h.cols) : (x += 1) {
- const key: []const u8 = if (x == h.cols) "\x00end" else cellKey(h, x, y, &key_buf);
+ var key: []const u8 = if (x == h.cols) "\x00end" else cellKey(h, x, y, &key_buf);
+ if (x < h.cols) {
+ const comma = std.mem.indexOfScalar(u8, key, ',') orelse key.len;
+ if (inklessBlank(h, x, y)) {
+ var joined: [64]u8 = undefined;
+ const rest = key[comma..];
+ @memcpy(joined[0..ink.len], ink);
+ @memcpy(joined[ink.len..][0..rest.len], rest);
+ @memcpy(key_buf[0 .. ink.len + rest.len], joined[0 .. ink.len + rest.len]);
+ key = key_buf[0 .. ink.len + rest.len];
+ } else {
+ @memcpy(ink_buf[0..comma], key[0..comma]);
+ ink = ink_buf[0..comma];
+ }
+ }
if (x == 0) {
@memcpy(run_key[0..key.len], key);
run_len = key.len;
@@ -1335,6 +1369,16 @@ fn styleRows(arena: std.mem.Allocator, h: *eh.Harness) ![]const []const u8 {
return out;
}
+/// A cell whose ink shows nowhere: no text but a space, and no underline,
+/// strike or reverse to draw with it.
+fn inklessBlank(h: *eh.Harness, x: u16, y: u16) bool {
+ const ci = h.term.screens.active.pages.getCell(.{ .viewport = .{ .x = x, .y = y } }) orelse return false;
+ if (ci.cell.wide == .spacer_tail) return false;
+ if (ci.cell.hasText() and ci.cell.codepoint() != ' ') return false;
+ const flags = ci.style().flags;
+ return !flags.inverse and !flags.strikethrough and flags.underline == .none;
+}
+
fn cellKey(h: *eh.Harness, x: u16, y: u16, buf: *[64]u8) []const u8 {
const ci = h.term.screens.active.pages.getCell(.{ .viewport = .{ .x = x, .y = y } }) orelse return "d,d,";
if (ci.cell.wide == .spacer_tail) return "d,d,";
@@ -1445,6 +1489,11 @@ fn buttonCode(name: []const u8) ?u16 {
const base = buttonCode(name["ctrl-".len..]) orelse return null;
return base + 16;
}
+ // Shift: over a program that tracks the mouse, pardes's own gesture.
+ if (std.mem.startsWith(u8, name, "shift-")) {
+ const base = buttonCode(name["shift-".len..]) orelse return null;
+ return base + 4;
+ }
if (std.mem.eql(u8, name, "left")) return 0;
if (std.mem.eql(u8, name, "middle")) return 1;
if (std.mem.eql(u8, name, "right")) return 2;
@@ -1505,7 +1554,7 @@ fn absPath(arena: std.mem.Allocator, cwd: []const u8, p: []const u8) ![]const u8
}
fn listSnaps(arena: std.mem.Allocator, dir_path: []const u8) ![][]const u8 {
- const dir_z = try arena.dupeZ(u8, dir_path);
+ const dir_z = try arena.dupeSentinel(u8, dir_path, 0);
const count = countSnapEntries(dir_z, dir_path);
const scripts = try arena.alloc([]const u8, count);
const dir = libc.opendir(dir_z) orelse fatal("no snapshots/ dir at {s}", .{dir_path});
@@ -1534,7 +1583,7 @@ fn countSnapEntries(dir_z: [:0]const u8, dir_path: []const u8) usize {
}
fn readFileAlloc(arena: std.mem.Allocator, path: []const u8) ![]u8 {
- const path_z = try arena.dupeZ(u8, path);
+ const path_z = try arena.dupeSentinel(u8, path, 0);
const fd = libc.open(path_z, .{ .ACCMODE = .RDONLY });
if (fd < 0) return error.OpenFailed;
defer _ = libc.close(fd);
@@ -1562,7 +1611,7 @@ fn readFileAlloc(arena: std.mem.Allocator, path: []const u8) ![]u8 {
}
fn mkdir(arena: std.mem.Allocator, path: []const u8, exist_ok: bool) !void {
- const path_z = try arena.dupeZ(u8, path);
+ const path_z = try arena.dupeSentinel(u8, path, 0);
const rc = libc.mkdir(path_z, 0o755);
if (rc != 0) {
if (exist_ok and libc.errno(rc) == .EXIST) return;
diff --git a/test/snapshots/argv.golden b/test/snapshots/argv.golden
index 4da2a12d..9dfa35b9 100644
--- a/test/snapshots/argv.golden
+++ b/test/snapshots/argv.golden
@@ -1,14 +1,31 @@
== snap noargs grid=100x31 cursor=4,5
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-|$ /tmp/pardes-snap/argv/cwd Save Tty Del Togglettymode Filter Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+|$ /tmp/pardes-snap/argv/cwd Tty+bash Save Mode Filter Collapse Del
| $ echo ARGV''TTY
| ARGVTTY
| $
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/argv/cwd/+New Save Tty Collapse Del
+| 1
== snap filearg grid=100x31 cursor=7,3
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/argv/cwd/notes.txt Save Tty Del Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/argv/cwd/notes.txt Save Tty Collapse Del
| 3 line 3
| 4 line 4
| 5 line 5
@@ -17,9 +34,9 @@
| 8 line 8
| 9
== snap filearg-n3 grid=100x31 cursor=7,3
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/argv/cwd/notes.txt Save Tty Del Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/argv/cwd/notes.txt Save Tty Collapse Del
| 1 line 1
| 2 line 2
| 3 line 3
@@ -30,8 +47,8 @@
| 8 line 8
| 9
== snap dirarg grid=100x31 cursor=4,5
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/argv/cwd/sub Save Tty Del Togglettymode Filter Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/argv/cwd/sub Tty+bash Save Mode Filter Collapse Del
| ls
| inside.txt
diff --git a/test/snapshots/badutf.golden b/test/snapshots/badutf.golden
index 270b3fe6..1cdd5163 100644
--- a/test/snapshots/badutf.golden
+++ b/test/snapshots/badutf.golden
@@ -1,16 +1,17 @@
== snap badbytes grid=100x31 cursor=7,3
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/badutf/cwd/bad.txt Save Tty Del Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/badutf/cwd/bad.txt Save Tty Collapse Del
| 1 hello �� world
| 2 latin-1 caf� tail
| 3 truncated �� here
| 4 end
| 5
-== snap hscroll-midglyph grid=50x31 cursor=46,3
-|Newcol Joincol Find Grep Help Changelog Tutor Dump
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/badutf/cwd/wide.txt Save Tty De
+== snap hscroll-midglyph grid=50x31 cursor=46,4
+| Newcol Joincol Find Grep Help Changelog Tutor Du
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/badutf/cwd/wide.txt Save Tty Co
+| llapse Del
| 1 日本語 日本語 日本語 日本語 日本語 tail
| 2
| 3
diff --git a/test/snapshots/badutf.snap b/test/snapshots/badutf.snap
index ddd1588b..7171df00 100644
--- a/test/snapshots/badutf.snap
+++ b/test/snapshots/badutf.snap
@@ -19,6 +19,6 @@ stable 700 20000
# first visible CJK glyph intact instead of starting inside its UTF-8 bytes.
key space t w
stable 400 5000
-key $
+key g l
stable 700 10000
snap hscroll-midglyph
diff --git a/test/snapshots/boot.golden b/test/snapshots/boot.golden
index f1e159d1..85b994d7 100644
--- a/test/snapshots/boot.golden
+++ b/test/snapshots/boot.golden
@@ -1,38 +1,38 @@
== snap boot grid=100x31 cursor=4,5
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/boot/cwd Save Tty Del Togglettymode Filter Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/boot/cwd Tty+bash Save Mode Filter Collapse Del
| ls
| hello.txt
== style boot grid=100x31
-|0: 0-70 #b2c3b8,#1d2824, 71-99 d,#1d2824,
-|1: 0-24 #becfc4,#26362d, 25-99 d,#26362d,
-|2: 0-1 #000000,#adcc91, 2-69 #becfc4,#26362d, 70-99 d,#26362d,
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|4: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|5: 0-0 d,#637f6a, 1-99 d,#0d1410,
-|6: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|7: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|8: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|9: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|10: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|11: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|12: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|13: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|14: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|15: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|16: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|17: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|18: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|19: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|20: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|21: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|22: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|23: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|24: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|25: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|26: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|27: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|28: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|29: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|30: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
+|0: 0-1 d,#1d2824, 2-99 #b2c3b8,#1d2824,
+|1: 0-1 d,#887455, 2-99 #becfc4,#314738,
+|2: 0-1 d,#add38a, 2-27 #becfc4,#314738, 28-36 #dfbce5,#314738, 37-99 #becfc4,#314738,
+|3: 0-0 d,#608269, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
+|4: 0-0 d,#608269, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
+|5: 0-0 d,#608269, 1-99 d,#0d1410,
+|6: 0-0 d,#608269, 1-99 d,#0d1410,
+|7: 0-0 d,#608269, 1-99 d,#0d1410,
+|8: 0-0 d,#608269, 1-99 d,#0d1410,
+|9: 0-0 d,#608269, 1-99 d,#0d1410,
+|10: 0-0 d,#608269, 1-99 d,#0d1410,
+|11: 0-0 d,#608269, 1-99 d,#0d1410,
+|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-0 d,#608269, 1-99 d,#0d1410,
+|17: 0-0 d,#608269, 1-99 d,#0d1410,
+|18: 0-0 d,#608269, 1-99 d,#0d1410,
+|19: 0-0 d,#608269, 1-99 d,#0d1410,
+|20: 0-0 d,#608269, 1-99 d,#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-0 d,#608269, 1-99 d,#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,
diff --git a/test/snapshots/builtins.golden b/test/snapshots/builtins.golden
index 17b4db5e..dee052a1 100644
--- a/test/snapshots/builtins.golden
+++ b/test/snapshots/builtins.golden
@@ -1,7 +1,7 @@
== snap boot grid=120x67 cursor=7,3
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/builtins/cwd/notes.txt Save Tty Del Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/builtins/cwd/notes.txt Save Tty Collapse Del
| 1 line 1
| 2 line 2
| 3 line 3
@@ -9,36 +9,73 @@
| 5 line 5
| 6 line 6
| 7
-== snap window-group grid=120x67 cursor=7,36
-|35: /tmp/pardes-snap/builtins/cwd/+Help Save Tty Del Collapse
-|36: 1 pardes builtins under SPC w
-|37: 2
-|38: 3 SPC w h Left C-w h, C-w left
-|39: 4 SPC w j Down C-w j, C-w down
-|40: 5 SPC w k Up C-w k, C-w up
-|41: 6 SPC w l Right C-w l, C-w right
-|42: 7
-== snap docs-group grid=120x67 cursor=7,36
-|36: 1 pardes builtins under SPC h
-|38: 3 SPC h c Changelog topbar
-|39: 4 SPC h m Messages
-|40: 5 SPC h t Tutor topbar
-|41: 6
-|42:
-== snap tutor-from-index grid=120x67 cursor=7,20
-|19: /Tutor Save Tty Del Collapse
-|20: 1
-|21: 2 PARDES TUTOR
-|22: 3 tmux + vi + acme, from scratch.
-|23: 4
-|24: 5 The model is acme's: EVERYTHING is text, editable and executable
-|25: 6 the same way. Modal editing (helix-style) lives on top of that.
-|26: 7 Press j until you reach the introduction.
-|27: 8
-|28: 9
-|29: 10 =================================================================
-|30: 11 = INTRODUCTION =
-|31: 12 =================================================================
-|32: 13
-|33: 14 A pane is just text on screen. There is no separate "buffer" type —
-|34: 15 what you see is what you edit. Some panes happen to be live terminals;
+== snap column-group grid=120x67 cursor=7,10
+|9: /tmp/pardes-snap/builtins/cwd/+Help Save Tty Collapse Del
+|10: 1 pardes builtins under SPC c
+|11: 2
+|12: 3 SPC c d Delcol
+|13: 4 SPC c j Joincol topbar
+|14: 5 SPC c n Newcol topbar
+|15: 6 SPC c p Placement
+|16: 7
+== snap docs-group grid=120x67 cursor=7,10
+|10: 1 pardes builtins under SPC h
+|12: 3 SPC h c Changelog topbar
+|13: 4 SPC h m Messages
+|14: 5 SPC h t Tutor topbar
+|15: 6
+|16:
+== snap tutor-from-index grid=120x67 cursor=7,16
+|10: 1 pardes builtins under SPC h Tutor
+|15: /tmp/pardes-snap/builtins/cwd/+Tutor Save Tty Collapse Del
+|16: 1
+|17: 2 PARDES TUTOR
+|18: 3
+|19: 4 This pane is +Tutor, a copy: edit it freely; there is no need to
+|20: 5 Save it (a bare Save asks for a path to write a copy to).
+|21: 6 `Del` in its tag closes it; once you have edited it, `Del` refuses
+|22: 7 once and the second `Del` discards. `Tutor` or SPC h t opens a
+|23: 8 fresh copy.
+|24: 9
+|25: 10 The guide (docs/typ/guide.typ) explains; this is the hands-on part.
+|26: 11 Each lesson is a few things to do, then names its guide section.
+|27: 12 Words in backticks, like `Save`, are builtins.
+|28: 13 `Exec` (B2) runs the builtin a word names, or else runs it as a
+|29: 14 shell line; `Look` (B3) opens what the text names, or else finds
+|30: 15 it. Type a builtin in any tag and `Exec` it. Lines starting with
+|31: 16 "| " are tags.
+|32: 17
+|33: 18 Press j until you reach part 1.
+|34: 19
+|35: 20
+|36: 21 =================================================================
+|37: 22 = PART 1 — MODES =
+|38: 23 =================================================================
+|39: 24
+|40: 25 1. The box left of this pane's tag is blank, so you are in
+|41: 26 NORMAL mode. Press i: it shows ^ (INSERT). Type a word, then
+|42: 27 Esc: blank again.
+|43: 28 2. Press Esc once more, in NORMAL: the keyboard goes back to the
+|44: 29 pane you were in before (not what helix does). Come back with
+|45: 30 Esc again.
+|46: 31 3. Press Alt-n: a terminal opens, in NORMAL mode, and pardes types
+|47: 32 ls at its first prompt. Press Ctrl-b: its box shows $ (RAW), and
+|48: 33 keys go to the shell. Esc brings you back here; the terminal stays
+|49: 34 $. Shift-Esc sends the shell an Esc.
+|50: 35
+|51: 36 -> Guide: Modes
+|52: 37
+|53: 38
+|54: 39 =================================================================
+|55: 40 = PART 2 — THE MOUSE =
+|56: 41 =================================================================
+|57: 42
+|58: 43 1. `Look` (B3) the word mouse in this sentence: the next mouse is
+|59: 44 selected.
+|60: 45 2. `Exec` (B2) the word `Help` here: the list of keys opens.
+|61: 46 Close it with `Del` in its tag.
+|62: 47 3. Select a word with B1, keep B1 down, click B2: it is cut. Still
+|63: 48 holding B1, click B3: it comes back. That pair is a copy.
+|64: 49 4. Put the cursor on `Help` and press Tab: `Exec`, as B2. Enter
+|65: 50 is `Look`, as B3.
+|66: 51
diff --git a/test/snapshots/builtins.snap b/test/snapshots/builtins.snap
index 06298d77..cf367c5a 100644
--- a/test/snapshots/builtins.snap
+++ b/test/snapshots/builtins.snap
@@ -9,30 +9,79 @@ key space ?
wait 10000 pardes builtins, and how to run each:
wait 10000 ClipPasteBefore
key g e
-# The new Collapse entry adds one index line: expose Look above the bottom
-# viewport while keeping the same pane geometry for the later group clicks.
+# Every builtin added since adds an index line, and one wheel tick is one row
+# (config.wheel_rows): scroll far enough to expose Look and Exec above the
+# bottom viewport while keeping the same pane geometry for the later clicks.
wheel up 110 50
-wait 10000 Look enter, right-click
-wait 10000 Exec tab, middle-click
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wheel up 110 50
+wait 10000 Look enter, right-click
+wait 10000 Exec tab, middle-click
wait 10000 Filter
wait 10000 Theme
stable 700 15000
# n moves through look-able text; it must not execute command names.
-key n n n
-wait 10000 Look enter, right-click
-wait 10000 Exec tab, middle-click
-key space w ?
-wait 10000 Right
+key space j n space j n space j n
+wait 10000 Look enter, right-click
+wait 10000 Exec tab, middle-click
+key space c ?
+wait 10000 under SPC c
+wait 10000 Joincol
stable 700 15000
-snap window-group
+snap column-group
key space h ?
wait 10000 Tutor
stable 700 15000
snap docs-group
-press middle @Tutor 41
-release middle @Tutor 41
+press middle @Tutor 15
+release middle @Tutor 15
wait 10000 PARDES TUTOR
stable 700 15000
snap tutor-from-index
diff --git a/test/snapshots/callstack-inline.golden b/test/snapshots/callstack-inline.golden
new file mode 100644
index 00000000..32213223
--- /dev/null
+++ b/test/snapshots/callstack-inline.golden
@@ -0,0 +1,65 @@
+== snap hierarchy grid=110x40 cursor=7,14
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/callstack-inline/cwd/setup.txt Save Tty Collapse Del
+| 1 CallstackLayout inline
+| 2 main.rs
+| /tmp/pardes-snap/callstack-inline/cwd/main.rs Save Tty Collapse 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/callstack-inline/cwd/+Callstack Save Tty Collapse Del
+| 1 ╰──┬ main.rs:3:4-7 fn main() {
+| 2 ├─ main.rs:4:13-15 let x = add(1, 2);
+| 3 ├─ main.rs:5:13-15 let y = add(3, 4);
+| 4 ╰──┬ main.rs:3:4-7 fn main() { ↻ recursion
+| 5 ├─ main.rs:4:13-15 let x = add(1, 2);
+| 6 ╰─ main.rs:5:13-15 let y = add(3, 4);
+| 7
+== 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-39 #b2c3b8,#1d2824, 40-49 #d3b0d9,#1d2824, 50-109 #b2c3b8,#1d2824,
+|3: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-109 #e5eee5,#0d1410,
+|4: 0-0 d,#152019, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-109 #e5eee5,#0d1410,
+|5: 0-1 d,#496656, 2-39 #b2c3b8,#1d2824, 40-47 #d3b0d9,#1d2824, 48-109 #b2c3b8,#1d2824,
+|6: 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,
+|7: 0-0 d,#608269, 1-4 d,#0d1410, 5-109 #59675c,#0d1410,
+|8: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-9 #c9a7ed,#0d1410, 10-109 #e5eee5,#0d1410,
+|9: 0-0 d,#608269, 1-4 d,#0d1410, 5-10 #59675c,#0d1410, 11-14 #c9a7ed,#0d1410, 15-109 #e5eee5,#0d1410,
+|10: 0-0 d,#608269, 1-4 d,#0d1410, 5-10 #59675c,#0d1410, 11-14 #c9a7ed,#0d1410, 15-109 #e5eee5,#0d1410,
+|11: 0-0 d,#608269, 1-4 d,#0d1410, 5-10 #59675c,#0d1410, 11-14 #c9a7ed,#0d1410, 15-109 #e5eee5,#0d1410,
+|12: 0-0 d,#152019, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-109 #e5eee5,#0d1410,
+|13: 0-1 d,#add38a, 2-39 #becfc4,#314738, 40-50 #dfbce5,#314738, 51-109 #becfc4,#314738,
+|14: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-11 #92d1de,#0d1410, 12-25 #59675c,#0d1410, 26-28 #c9a7ed,#0d1410, 29-109 #e5eee5,#0d1410,
+|15: 0-0 d,#608269, 1-4 d,#0d1410, 5-9 #59675c,#0d1410, 10-12 #92d1de,#0d1410, 13-32 #59675c,#0d1410, 33-36 #c9a7ed,#0d1410, 37-109 #e5eee5,#0d1410,
+|16: 0-0 d,#608269, 1-4 d,#0d1410, 5-9 #59675c,#0d1410, 10-12 #92d1de,#0d1410, 13-32 #59675c,#0d1410, 33-36 #c9a7ed,#0d1410, 37-109 #e5eee5,#0d1410,
+|17: 0-0 d,#608269, 1-4 d,#0d1410, 5-9 #59675c,#0d1410, 10-14 #92d1de,#0d1410, 15-28 #59675c,#0d1410, 29-31 #c9a7ed,#0d1410, 32-109 #e5eee5,#0d1410,
+|18: 0-0 d,#608269, 1-4 d,#0d1410, 5-12 #59675c,#0d1410, 13-15 #92d1de,#0d1410, 16-35 #59675c,#0d1410, 36-39 #c9a7ed,#0d1410, 40-43 #e5eee5,#0d1410, 44-46 #f7e4a5,#5e4923, 47-109 #e5eee5,#0d1410,
+|19: 0-0 d,#608269, 1-4 d,#0d1410, 5-12 #59675c,#0d1410, 13-15 #92d1de,#0d1410, 16-35 #59675c,#0d1410, 36-39 #c9a7ed,#0d1410, 40-43 #e5eee5,#0d1410, 44-46 #f7e4a5,#5e4923, 47-109 #e5eee5,#0d1410,
+|20: 0-0 d,#608269, 1-4 d,#0d1410, 5-109 #59675c,#0d1410,
+|21: 0-0 d,#608269, 1-109 d,#0d1410,
+|22: 0-0 d,#608269, 1-109 d,#0d1410,
+|23: 0-0 d,#608269, 1-109 d,#0d1410,
+|24: 0-0 d,#608269, 1-109 d,#0d1410,
+|25: 0-0 d,#608269, 1-109 d,#0d1410,
+|26: 0-0 d,#608269, 1-109 d,#0d1410,
+|27: 0-0 d,#608269, 1-109 d,#0d1410,
+|28: 0-0 d,#608269, 1-109 d,#0d1410,
+|29: 0-0 d,#608269, 1-109 d,#0d1410,
+|30: 0-0 d,#608269, 1-109 d,#0d1410,
+|31: 0-0 d,#608269, 1-109 d,#0d1410,
+|32: 0-0 d,#608269, 1-109 d,#0d1410,
+|33: 0-0 d,#608269, 1-109 d,#0d1410,
+|34: 0-0 d,#608269, 1-109 d,#0d1410,
+|35: 0-0 d,#608269, 1-109 d,#0d1410,
+|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,8
+|6: 1 mod lib;
diff --git a/test/snapshots/callstack-inline.snap b/test/snapshots/callstack-inline.snap
new file mode 100644
index 00000000..9acfa206
--- /dev/null
+++ b/test/snapshots/callstack-inline.snap
@@ -0,0 +1,30 @@
+# Inline remains an option; source colors, rounded guides and Look navigation are retained.
+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
+file lib.rs // mock fixture\npub fn add(a: i32, b: i32) -> i32 {\n a + b\n}\n
+file setup.txt CallstackLayout inline\nmain.rs\n
+start 40 110 setup.txt
+wait 8000 CallstackLayout inline
+key g g
+key x
+key tab
+stable 300 10000
+key esc
+settle 100
+key g g
+key j
+key home
+key enter
+wait 8000 add(1, 2)
+stable 700 20000
+key g c
+wait 10000 Callstack
+wait 10000 recursion
+stable 700 15000
+snap hierarchy
+snapstyle hierarchy
+# LookNext selects the caller signature; Enter opens it in the source pane.
+key space j n
+key enter
+wait 10000 fn main
+stable 700 15000
+snap caller
diff --git a/test/snapshots/callstack.golden b/test/snapshots/callstack.golden
new file mode 100644
index 00000000..2970593d
--- /dev/null
+++ b/test/snapshots/callstack.golden
@@ -0,0 +1,27 @@
+== snap hierarchy grid=110x40 cursor=7,11
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/callstack/cwd/main.rs Save Tty Collapse 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/callstack/cwd/+Callstack Save Tty Collapse Del
+| 1 ╰──┬ main.rs:3:4-7
+| 2 │ fn main() {
+| 3 ├─ main.rs:4:13-15
+| 4 │ let x = add(1, 2);
+| 5 ├─ main.rs:5:13-15
+| 6 │ let y = add(3, 4);
+| 7 ╰──┬ main.rs:3:4-7
+| 8 │ fn main() { ↻ recursion
+| 9 ├─ main.rs:4:13-15
+| 10 │ let x = add(1, 2);
+| 11 ╰─ main.rs:5:13-15
+| 12 let y = add(3, 4);
+| 13
+== snap caller grid=110x40 cursor=13,5
+|3: 1 mod lib;
diff --git a/test/snapshots/callstack.snap b/test/snapshots/callstack.snap
new file mode 100644
index 00000000..b32367af
--- /dev/null
+++ b/test/snapshots/callstack.snap
@@ -0,0 +1,19 @@
+# Static call hierarchy in a dedicated pane; sites and declarations are Look targets.
+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
+file lib.rs // mock fixture\npub fn add(a: i32, b: i32) -> i32 {\n a + b\n}\n
+start 40 110 main.rs
+wait 8000 add(1, 2)
+stable 700 20000
+press left 13 6
+release left 13 6
+key g c
+wait 10000 Callstack
+wait 10000 recursion
+stable 700 15000
+snap hierarchy
+# LookNext selects the caller signature; Enter opens it in the source pane.
+key space j n
+key enter
+wait 10000 fn main
+stable 700 15000
+snap caller
diff --git a/test/snapshots/chordcut.golden b/test/snapshots/chordcut.golden
index 33bc8356..280dd877 100644
--- a/test/snapshots/chordcut.golden
+++ b/test/snapshots/chordcut.golden
@@ -1,11 +1,12 @@
-== snap opened grid=120x31 cursor=7,7
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/chordcut/cwd Save Tty Del Togglettymode F /tmp/pardes-snap/chordcut/cwd Save Tty Del Togglettymode F
+== snap opened grid=120x31 cursor=7,8
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/chordcut/cwd Tty+bash Save Mode Filter Co /tmp/pardes-snap/chordcut/cwd Tty+bash Save Mode Filter Co
+| llapse Del llapse Del
| ls ls
| f.txt g.txt f.txt g.txt
|
-| /tmp/pardes-snap/chordcut/cwd/f.txt Save Tty Del Collapse
+| /tmp/pardes-snap/chordcut/cwd/f.txt Save Tty Collapse Del
| 1 line 1
| 2 line 2
| 3 line 3
@@ -15,71 +16,77 @@
|
|
|
-|
-| /tmp/pardes-snap/chordcut/cwd Save Tty Del Togglettymode F
+| /tmp/pardes-snap/chordcut/cwd Tty+bash Save Mode Filter Co
+| llapse Del
| ls
| f.txt g.txt
-== snap cut grid=120x31 cursor=7,8
-|6: /tmp/pardes-snap/chordcut/cwd/f.txt * Save Tty Del Collaps
-|8: 2 2
-== snap copied grid=120x31 cursor=10,9
-== snap pointpaste grid=120x31 cursor=16,10
-|10: 4 line 4line
-== snap replaced grid=120x31 cursor=11,11
-|11: 5 lline 5
-== snap cancelexec grid=120x31 cursor=25,8
-|8: 2 2echo B''OO g.txt
-== snap execafter grid=120x31 cursor=25,8
-|3: f.txt ls
-|4: BOO f.txt g.txt
-== snap cancellook grid=120x31 cursor=25,8
-== snap lookafter grid=120x31 cursor=7,13
-|12: /tmp/pardes-snap/chordcut/cwd/g.txt Save Tty Del Collapse
-|13: 1 line 1
-|14: 2 line 2
-|15: 3
+== snap cut grid=120x31 cursor=7,9
+|7: */tmp/pardes-snap/chordcut/cwd/f.txt Save Tty Collapse Del
+|9: 2 2
+== snap copied grid=120x31 cursor=10,10
+== snap pointpaste grid=120x31 cursor=16,11
+|11: 4 line 4line
+== snap replaced grid=120x31 cursor=11,12
+|12: 5 lline 5
+== snap cancelexec grid=120x31 cursor=25,9
+|9: 2 2echo B''OO g.txt
+== snap execafter grid=120x31 cursor=25,9
+|8: 1 line 1 Exec
+|17: /tmp/pardes-snap/chordcut/cwd Tty+bash Save Mode Filter Co /tmp/pardes-snap/chordcut/cwd (echo B''OO) exit 0 Kill Sav
+|18: llapse 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
+|8: 1 line 1
+== snap lookafter grid=120x31 cursor=7,23
+|22: /tmp/pardes-snap/chordcut/cwd/g.txt Save Tty Collapse Del
+|23: 1 line 1
+|24: 2 line 2
+|25: 3
== style chordsel grid=120x31
-|0: 0-70 #b2c3b8,#1d2824, 71-119 d,#1d2824,
-|1: 0-24 #becfc4,#26362d, 25-59 d,#26362d, 60-84 #b2c3b8,#1d2824, 85-119 d,#1d2824,
-|2: 0-1 #ffffff,#4c6356, 2-59 #b2c3b8,#1d2824, 60-61 #ffffff,#4c6356, 62-119 #b2c3b8,#1d2824,
-|3: 0-0 d,#152019, 1-1 d,#0d1410, 2-8 #e5eee5,#0d1410, 9-59 d,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|4: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|5: 0-0 d,#152019, 1-59 d,#0d1410, 60-60 d,#637f6a, 61-119 d,#0d1410,
-|6: 0-1 #ffffff,#4c6356, 2-59 #b2c3b8,#1d2824, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|7: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-59 d,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|8: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-24 #e5eee5,#0d1410, 25-59 d,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|9: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-59 d,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|10: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-16 #e5eee5,#0d1410, 17-59 d,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|11: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-13 #e5eee5,#0d1410, 14-59 d,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|12: 0-1 #000000,#adcc91, 2-59 #becfc4,#26362d, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|13: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #616f64,#0d1410,b 7-10 #f5f7ee,#405d4b, 11-12 #e5eee5,#0d1410, 13-59 d,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|14: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-59 d,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|15: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-59 d,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|16: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-59 d,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|17: 0-1 #ffffff,#4c6356, 2-59 #b2c3b8,#1d2824, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|18: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|19: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|20: 0-0 d,#637f6a, 1-59 d,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|21: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|22: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|23: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|24: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|25: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|26: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|27: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|28: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|29: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|30: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
+|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-40 #d3b0d9,#1d2824, 41-59 #b2c3b8,#1d2824, 60-61 #b2c3b8,#496656, 62-91 #b2c3b8,#1d2824, 92-100 #d3b0d9,#1d2824, 101-119 #b2c3b8,#1d2824,
+|3: 0-1 d,#1d2824, 2-119 #b2c3b8,#1d2824,
+|4: 0-0 d,#608269, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410,
+|5: 0-0 d,#608269, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410,
+|6: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|7: 0-0 d,#496656, 1-1 #000000,#f9cb70,b 2-31 #b2c3b8,#1d2824, 32-37 #d3b0d9,#1d2824, 38-59 #b2c3b8,#1d2824, 60-60 #b2c3b8,#608269, 61-119 #b2c3b8,#0d1410,
+|8: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410,
+|9: 0-0 d,#608269, 1-4 d,#0d1410, 5-7 #59675c,#0d1410, 8-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410,
+|10: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410,
+|11: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410,
+|12: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410,
+|13: 0-0 d,#608269, 1-4 d,#0d1410, 5-59 #59675c,#0d1410, 60-60 #59675c,#608269, 61-119 #59675c,#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-31 #b2c3b8,#1d2824, 32-40 #d3b0d9,#1d2824, 41-59 #b2c3b8,#1d2824, 60-61 #b2c3b8,#496656, 62-119 #b2c3b8,#1d2824,
+|18: 0-1 d,#1d2824, 2-119 #b2c3b8,#1d2824,
+|19: 0-0 d,#608269, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410,
+|20: 0-0 d,#608269, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410,
+|21: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
+|22: 0-1 d,#add38a, 2-31 #becfc4,#314738, 32-37 #dfbce5,#314738, 38-59 #becfc4,#314738, 60-60 #becfc4,#608269, 61-119 #becfc4,#0d1410,
+|23: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-10 #f5f7ee,#3c614a, 11-11 #f5f7ee,#0d1410, 12-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410,
+|24: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410,
+|25: 0-0 d,#608269, 1-4 d,#0d1410, 5-59 #59675c,#0d1410, 60-60 #59675c,#608269, 61-119 #59675c,#0d1410,
+|26: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|27: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|28: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|29: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|30: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
== style clickdismiss grid=120x31
-|13: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-59 d,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|14: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #616f64,#0d1410,b 7-12 #e5eee5,#0d1410, 13-59 d,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-== snap ttyprobe grid=120x31 cursor=42,22
-|12: /tmp/pardes-snap/chordcut/cwd/g.txt * Save Tty Del Collaps
-|17: $ /tmp/pardes-snap/chordcut/cwd Save Tty Del Togglettymode F
-|18: $ ls
-|20: $ stty -icanon -echo; printf '\x1b[?2004h\x1b[?1000h\x1b[?
-|21: 1006h'; cat -v
-|22: ^[[<0;38;6M^[[<0;38;6m^[[200~line^[[201~
-== snap ttyprompt grid=120x31 cursor=8,24
-|23: $
-|24: $ line
+|23: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#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=42,23
+|17: $ /tmp/pardes-snap/chordcut/cwd Tty+bash Save Mode Filter Co /tmp/pardes-snap/chordcut/cwd (echo B''OO) exit 0 Kill Sav
+|19: $ ls % echo B''OO
+|21: $ stty -icanon -echo; printf '\x1b[?2004h\x1b[?1000h\x1b[? exit 0
+|22: 1006h'; cat -v
+|23: ^[[<0;38;6M^[[<0;38;6m^[[200~line^[[201~
+|24:
+|25:
+== snap ttyprompt grid=120x31 cursor=8,25
+|24: $
+|25: $ line
diff --git a/test/snapshots/chordcut.snap b/test/snapshots/chordcut.snap
index 56170cce..b1f164a2 100644
--- a/test/snapshots/chordcut.snap
+++ b/test/snapshots/chordcut.snap
@@ -29,42 +29,42 @@ wait 10000 line 3
stable 700 15000
snap opened
# 1-2 Cut: left-drag over "line" on line 2, tap middle while holding
-press left 8 9
-drag left 11 9
-press middle 11 9
-release middle 11 9
-release left 11 9
-stable 400 5000
-snap cut
-# 1-2 then 1-3 in one hold = copy: line 3 keeps its text, register loaded
press left 8 10
drag left 11 10
press middle 11 10
release middle 11 10
-press right 11 10
-release right 11 10
release left 11 10
stable 400 5000
+snap cut
+# 1-2 then 1-3 in one hold = copy: line 3 keeps its text, register loaded
+press left 8 11
+drag left 11 11
+press middle 11 11
+release middle 11 11
+press right 11 11
+release right 11 11
+release left 11 11
+stable 400 5000
snap copied
# 1-3 at a bare click point: hold left past the end of line 4, tap right —
# the register splices in at the click
-press left 14 11
-press right 14 11
-release right 14 11
-release left 14 11
+press left 14 12
+press right 14 12
+release right 14 12
+release left 14 12
stable 400 5000
snap pointpaste
# 1-3 over a fresh selection replaces it with the register
-press left 9 12
-drag left 11 12
-press right 11 12
-release right 11 12
-release left 11 12
+press left 9 13
+drag left 11 13
+press right 11 13
+release right 11 13
+release left 11 13
stable 400 5000
snap replaced
# arm the cancel tests: append `echo B''OO g.txt` to line 2
-press left 10 9
-release left 10 9
+press left 10 10
+release left 10 10
stable 400 5000
key i
text echo B''OO g.txt
@@ -73,67 +73,73 @@ settle 100
stable 400 5000
# 2-3 cancel (acme textselect2): tap right during the middle execute-drag
# over `echo B''OO` — the command never runs (no BOO anywhere)
-press middle 10 9
-drag middle 19 9
-press right 19 9
-release right 19 9
-release middle 19 9
+press middle 10 10
+drag middle 19 10
+press right 19 10
+release right 19 10
+release middle 19 10
stable 700 8000
snap cancelexec
# the same drag released clean proves the word was live: BOO appears
-press middle 10 9
-drag middle 19 9
-release middle 19 9
+press middle 10 10
+drag middle 19 10
+release middle 19 10
wait 10000 BOO
stable 700 10000
snap execafter
# 3-1 cancel (acme textselect3): tap left during the right look-drag over
# g.txt — no pane opens
-press right 21 9
-drag right 25 9
-press left 25 9
-release left 25 9
-release right 25 9
+press right 21 10
+drag right 25 10
+press left 25 10
+release left 25 10
+release right 25 10
stable 700 8000
snap cancellook
# the same look released clean opens g.txt
-press right 21 9
-drag right 25 9
-release right 25 9
+press right 21 10
+drag right 25 10
+release right 25 10
wait 10000 line 2
stable 700 10000
snap lookafter
# a fresh left click dismisses the chord's leftover selection instead of
# dragging the anchored span to the click: copy `line` on g.txt line 1
# (styled snap shows the selection), then click the next row (it's gone)
-press left 8 14
-drag left 11 14
-press middle 11 14
-release middle 11 14
-press right 11 14
-release right 11 14
-release left 11 14
+press left 8 24
+drag left 11 24
+press middle 11 24
+release middle 11 24
+press right 11 24
+release right 11 24
+release left 11 24
stable 400 5000
snapstyle chordsel
-press left 8 15
-release left 8 15
+press left 8 25
+release left 8 25
stable 400 5000
snapstyle clickdismiss
-# tty paste chord: a mouse-listening app gets the click forwarded (SGR,
-# body-relative) then the register between bracketed-paste markers —
-# cat -v prints the received bytes visibly
-press left 35 22
-release left 35 22
+# g.txt opened under the lower shell's text and left it three rows: close it,
+# and the shell grows back into its rows, for what follows to run in
+press middle 59 23
+release middle 59 23
+stable 700 15000
+# tty paste chord: over a mouse-listening app B1 is the app's, so the
+# chord's B1 holds Shift (B3 is pardes's either way); the app gets a click
+# where the text goes (SGR, body-relative) then the register between
+# bracketed-paste markers — cat -v prints the received bytes visibly
+press left 35 23
+release left 35 23
stable 400 5000
key c-b
stable 600 8000
text stty -icanon -echo; printf '\x1b[?2004h\x1b[?1000h\x1b[?1006h'; cat -v
key enter
stable 700 8000
-press left 40 24
-press right 40 24
-release right 40 24
-release left 40 24
+press shift-left 40 25
+press right 40 25
+release right 40 25
+release shift-left 40 25
stable 700 8000
snap ttyprobe
# a plain prompt (mouse modes off) gets no click bytes — just the paste;
@@ -143,9 +149,9 @@ stable 600 8000
text stty sane; printf '\x1b[?1000l\x1b[?1006l'
key enter
stable 600 8000
-press left 40 24
-press right 40 24
-release right 40 24
-release left 40 24
+press left 40 25
+press right 40 25
+release right 40 25
+release left 40 25
stable 700 8000
snap ttyprompt
diff --git a/test/snapshots/cmdexit.golden b/test/snapshots/cmdexit.golden
new file mode 100644
index 00000000..f2f38217
--- /dev/null
+++ b/test/snapshots/cmdexit.golden
@@ -0,0 +1,15 @@
+== snap opened grid=120x31 cursor=7,3
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/cmdexit/cwd/cmds.txt Save Tty Collapse Del
+| 1 sleep 30 & echo BG''STARTED
+| 2 exec </dev/null >/dev/null 2>&1; sleep 1; false
+== 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
+== 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
diff --git a/test/snapshots/cmdexit.snap b/test/snapshots/cmdexit.snap
new file mode 100644
index 00000000..e9f39bfd
--- /dev/null
+++ b/test/snapshots/cmdexit.snap
@@ -0,0 +1,28 @@
+# A command pane's command is over when its process exits, not when its pty
+# closes. A job it leaves in the background holds the pty open, and the pane
+# still says `exit 0` as soon as the command itself is done; a command that
+# lets go of its terminal and runs on is not hung up at its pty's end, and
+# says how it ended when it does.
+file cmds.txt sleep 30 & echo BG''STARTED\nexec </dev/null >/dev/null 2>&1; sleep 1; false
+config Verbose off
+start 31 120 cmds.txt
+wait 8000 cmds.txt
+stable 700 20000
+snap opened
+# line 1: `sleep 30` keeps the pty, and the pane says exit 0 regardless
+press middle 7 4
+drag middle 34 4
+release middle 34 4
+wait 10000 exit 0
+stable 700 15000
+snap background
+# line 2, in a second pane: the first's command is done but its background
+# `sleep 30` lives on (job control gives it its own group) and still holds
+# that pane's pty; here the end of file comes at once, and the exit a second
+# later, from `false`
+press middle 7 5
+drag middle 54 5
+release middle 54 5
+wait 10000 exit 1
+stable 700 15000
+snap letgo
diff --git a/test/snapshots/cmdword.golden b/test/snapshots/cmdword.golden
index 0ba57092..3b2f5cc9 100644
--- a/test/snapshots/cmdword.golden
+++ b/test/snapshots/cmdword.golden
@@ -1,24 +1,28 @@
== snap opened grid=120x31 cursor=7,3
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/cmdword/cwd/cmds.txt Save Tty Del Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/cmdword/cwd/cmds.txt Save Tty Collapse Del
| 1 @`echo ZZ''E` @`echo ZZ''L` Look p.txt @`Look .`
== snap atexec grid=120x31 cursor=7,3
-|17: /tmp/pardes-snap/cmdword/cwd Save Tty Del Togglettymode Filter Collapse
-|18: echo ZZ''E
+|17: /tmp/pardes-snap/cmdword/cwd (echo ZZ''E) exit 0 Kill Save Collapse Del
+|18: % echo ZZ''E
|19: ZZE
-== snap atlook grid=120x31 cursor=4,22
-|20: echo ZZ''L
-|21: ZZL
-== snap lookword grid=120x31 cursor=7,11
-|10: /tmp/pardes-snap/cmdword/cwd/p.txt Save Tty Del Collapse
-|11: 1 just text
-== snap nested grid=120x31 cursor=4,24
-|22: ls
-|23: cmds.txt p.txt zzmark.txt
-== snap execword grid=120x31 cursor=77,17
-|17: /tmp/pardes-snap/cmdword/cwd Save Tty Del Togglettymode Filter Collapse Exec
-== snap tagcmd grid=120x31 cursor=91,17
-|17: /tmp/pardes-snap/cmdword/cwd Save Tty Del Togglettymode Filter Collapse Exec @`echo ZZ''T`
-|24: echo ZZ''T
-|25: ZZT
+|20: exit 0
+== snap atlook grid=120x31 cursor=2,24
+|17: /tmp/pardes-snap/cmdword/cwd (echo ZZ''L) exit 0 Kill Save Collapse Del
+|21: % echo ZZ''L
+|22: ZZL
+|23: exit 0
+== snap lookword grid=120x31 cursor=7,6
+|5: /tmp/pardes-snap/cmdword/cwd/p.txt Save Tty Collapse Del
+|6: 1 just text
+== snap nested grid=120x31 cursor=4,11
+|8: /tmp/pardes-snap/cmdword/cwd Tty+bash Save Mode Filter Collapse Del
+|9: ls
+|10: cmds.txt p.txt zzmark.txt
+== snap execword grid=120x31 cursor=4,11
+|8: /tmp/pardes-snap/cmdword/cwd Tty+bash Save Mode Filter Collapse Del Exec
+== snap tagcmd grid=120x31 cursor=4,11
+|8: /tmp/pardes-snap/cmdword/cwd Tty+bash Save Mode Filter Collapse Del Exec @`echo ZZ''T`
+|11: echo ZZ''T
+|12: ZZT
diff --git a/test/snapshots/cmdword.snap b/test/snapshots/cmdword.snap
index eb9d308d..42a91e18 100644
--- a/test/snapshots/cmdword.snap
+++ b/test/snapshots/cmdword.snap
@@ -7,9 +7,10 @@
# whole run instead, which is what makes a single CLICK the way you invoke one
# (acme does the same for its own `<`/`|`/`>` command words).
#
-# EXECUTE runs it and leaves you where you were; LOOK runs it and lands you in
-# the shell that answered — looking at a thing means being shown it, and a
-# directory's look has always been exactly that (a shell there, ls'd).
+# EXECUTE runs it, as a command pane, and leaves you where you were; LOOK runs
+# it and lands you in the pane that answered — looking at a thing means being
+# shown it, and a directory's look has always been exactly that (a shell
+# there, ls'd).
#
# And Look and Exec are ORDINARY BUILTINS now, so their names are executable
# words like Save or Grep: `Look p.txt` run off the page is the same look a
@@ -18,20 +19,28 @@
file cmds.txt @`echo ZZ''E` @`echo ZZ''L` Look p.txt @`Look .`
file p.txt just text
file zzmark.txt x
+# Builtins announce themselves by default, and an announcement is a band at
+# the top of the body -- which would move every row this script clicks. The
+# verbs are what is under test here, not the announcement.
+config Verbose off
+# a directory looked at opens a terminal there (DirLook terminal), as this
+# script was written for; DirLook pane, the default, is dirpane.snap's
+config DirLook terminal
start 31 120 cmds.txt
wait 8000 Newcol Joincol
wait 8000 cmds.txt
stable 700 20000
snap opened
# a single middle CLICK inside the run (col 11 is inside `echo`) expands to the
-# whole `@`echo ZZ''E`` and executes it in a shell; focus stays on the file
+# whole `@`echo ZZ''E`` and runs it as a command pane; focus stays on the file
press middle 11 4
release middle 11 4
wait 10000 ZZE
stable 700 15000
snap atexec
-# LOOK on the second one (col 24, inside its `echo`) runs it too AND focuses
-# the shell that answered — that is the whole difference between the two verbs
+# LOOK on the second one (col 24, inside its `echo`) runs it too, in the same
+# command pane now its first is done, below it, AND focuses it — that is the
+# whole difference between the two verbs
press right 24 4
release right 24 4
wait 10000 ZZL
@@ -45,33 +54,39 @@ wait 10000 just text
stable 700 15000
snap lookword
# nesting: `@`Look .`` — Exec unwraps it, `Look .` is parsed as the ordinary
-# Look builtin with an argument, and Look opens the directory (an existing
-# shell there, ls'd — zzmark.txt is only ever in that listing)
+# Look builtin with an argument, and Look opens the directory (a shell there,
+# ls'd — zzmark.txt is only ever in that listing; a command pane is no shell)
press middle 49 4
release middle 49 4
wait 10000 zzmark.txt
stable 700 15000
snap nested
# the same syntax typed into a TAG — the other place the expansion has to know
-# about backticks (tagChordText). The look above left the shell focused, so `:`
-# opens ITS tag; `i` then End walks to the end of the tail, and the chord runs
-# the word under the cursor exactly as the body's does.
+# about backticks. The look above left that shell focused, so `:` opens ITS
+# tag, and the word run from a shell's own tag is typed into it; `A` appends at the end of it, Esc and `h` put the normal-mode cursor on
+# the last character typed, and the execute key runs the word under it
+# exactly as the body's does.
key :
-key i
-key end
+key A
key space
text Exec
-key left
+key esc
+settle 100
+key h
key tab
stable 700 8000
# ...except that word is `Exec` ITSELF, with nothing to execute. This is the
# case that must not hang a re-entrant dispatcher: it runs out of argument
-# immediately and does nothing at all.
+# immediately and does nothing at all. Executing gave the keyboard back to the
+# body, and `:` finds the tag's cursor where it was left.
snap execword
-key end
+key :
+key A
key space
text @`echo ZZ''T`
-key left
+key esc
+settle 100
+key h
key tab
wait 10000 ZZT
stable 700 15000
diff --git a/test/snapshots/colgrip.golden b/test/snapshots/colgrip.golden
new file mode 100644
index 00000000..e7881957
--- /dev/null
+++ b/test/snapshots/colgrip.golden
@@ -0,0 +1,169 @@
+== 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-89 #dfbce5,#314738, 90-99 #becfc4,#314738,
+|3: 0-1 d,#1d2824, 2-49 #b2c3b8,#1d2824, 50-51 #b2c3b8,#314738, 52-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,
+|7: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
+|8: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
+|9: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
+|10: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
+|11: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
+|12: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
+|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-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
+|18: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
+|19: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#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,
+== 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 Debug Exit
+| New Tty Find Grep Joincol Delcol ╎ New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/colgrip/cwd/w.txt Sa╎e Tty Coll /tmp/pardes-snap/colgrip/cwd Tty+bash Save Mode
+| apse Del ╎ Filter Collapse Del
+| 1 x ╎ ls
+| ╎ w.txt
+| ╎
+| ╎
+| ╎
+| ╎
+| ╎
+| ╎
+| ╎
+| ╎
+| ╎
+| ╎
+| ╎
+| ╎
+| ╎
+| ╎
+| ╎
+| ╎
+| ╎
+| ╎
+== style resize-drag grid=100x24
+|1: 0-1 d,#887455, 2-38 #b2c3b8,#1d2824, 39-49 #f4c086,#1d2824, 50-51 #f4c086,#f4c086, 52-99 #becfc4,#314738,
+|2: 0-1 d,#496656, 2-30 #b2c3b8,#1d2824, 31-36 #d3b0d9,#1d2824, 37-38 #b2c3b8,#1d2824, 39-39 #f4c086,#1d2824, 40-49 #b2c3b8,#1d2824, 50-51 #b2c3b8,#add38a, 52-80 #becfc4,#314738, 81-89 #dfbce5,#314738, 90-99 #becfc4,#314738,
+|3: 0-1 d,#1d2824, 2-38 #b2c3b8,#1d2824, 39-49 #f4c086,#1d2824, 50-51 #f4c086,#314738, 52-99 #becfc4,#314738,
+|4: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-38 #e5eee5,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-51 #f4c086,#0d1410, 52-99 #e5eee5,#0d1410,
+|5: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-51 #f4c086,#0d1410, 52-99 #e5eee5,#0d1410,
+|6: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-99 #f4c086,#0d1410,
+|7: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-99 #f4c086,#0d1410,
+|8: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-99 #f4c086,#0d1410,
+|9: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-99 #f4c086,#0d1410,
+|10: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-99 #f4c086,#0d1410,
+|11: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-99 #f4c086,#0d1410,
+|12: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-99 #f4c086,#0d1410,
+|13: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-99 #f4c086,#0d1410,
+|14: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-99 #f4c086,#0d1410,
+|15: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-99 #f4c086,#0d1410,
+|16: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-99 #f4c086,#0d1410,
+|17: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-99 #f4c086,#0d1410,
+|18: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-99 #f4c086,#0d1410,
+|19: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-99 #f4c086,#0d1410,
+|20: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-99 #f4c086,#0d1410,
+|21: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-99 #f4c086,#0d1410,
+|22: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-99 #f4c086,#0d1410,
+|23: 0-0 d,#608269, 1-38 d,#0d1410, 39-49 #f4c086,#0d1410, 50-50 #f4c086,#608269, 51-99 #f4c086,#0d1410,
+== snap resize-done grid=100x24 cursor=44,6
+|1: New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+|2: /tmp/pardes-snap/colgrip/cwd/w.txt Sav /tmp/pardes-snap/colgrip/cwd Tty+bash Save Mode Filter Col
+|3: e Tty Collapse Del lapse Del
+|4: 1 x ls
+|5: w.txt
+|6:
+|7:
+|8:
+|9:
+|10:
+|11:
+|12:
+|13:
+|14:
+|15:
+|16:
+|17:
+|18:
+|19:
+|20:
+|21:
+|22:
+|23:
+== snap reorder-drag grid=100x24 cursor=44,6
+|4: ╎ 1 x ls
+|5: ╎ w.txt
+|6: ╎
+|7: ╎
+|8: ╎
+|9: ╎
+|10: ╎
+|11: ╎
+|12: ╎
+|13: ╎
+|14: ╎
+|15: ╎
+|16: ╎
+|17: ╎
+|18: ╎
+|19: ╎
+|20: ╎
+|21: ╎
+|22: ╎
+|23: ╎
+== 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-79 #dfbce5,#314738, 80-99 #becfc4,#314738,
+|3: 0-1 d,#1d2824, 2-39 #b2c3b8,#1d2824, 40-41 #b2c3b8,#314738, 42-99 #becfc4,#314738,
+|4: 0-0 d,#608269, 1-4 #f4c086,#0d1410, 5-6 #59675c,#0d1410, 7-39 #e5eee5,#0d1410, 40-40 #e5eee5,#608269, 41-99 #e5eee5,#0d1410,
+|5: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-41 #f4c086,#0d1410, 42-99 #e5eee5,#0d1410,
+|6: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-99 #f4c086,#0d1410,
+|7: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-99 #f4c086,#0d1410,
+|8: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-99 #f4c086,#0d1410,
+|9: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-99 #f4c086,#0d1410,
+|10: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-99 #f4c086,#0d1410,
+|11: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-99 #f4c086,#0d1410,
+|12: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-99 #f4c086,#0d1410,
+|13: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-99 #f4c086,#0d1410,
+|14: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-99 #f4c086,#0d1410,
+|15: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-99 #f4c086,#0d1410,
+|16: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-99 #f4c086,#0d1410,
+|17: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-99 #f4c086,#0d1410,
+|18: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-99 #f4c086,#0d1410,
+|19: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-99 #f4c086,#0d1410,
+|20: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-99 #f4c086,#0d1410,
+|21: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-99 #f4c086,#0d1410,
+|22: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-99 #f4c086,#0d1410,
+|23: 0-0 d,#608269, 1-39 #f4c086,#0d1410, 40-40 #f4c086,#608269, 41-99 #f4c086,#0d1410,
+== snap reorder-done grid=100x24 cursor=4,6
+|1: New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+|2: /tmp/pardes-snap/colgrip/cwd Tty+bash Save Mode Filter Col /tmp/pardes-snap/colgrip/cwd/w.txt Sav
+|3: lapse Del e Tty Collapse Del
+|4: ls 1 x
+|5: w.txt
+|6:
+|7:
+|8:
+|9:
+|10:
+|11:
+|12:
+|13:
+|14:
+|15:
+|16:
+|17:
+|18:
+|19:
+|20:
+|21:
+|22:
+|23:
diff --git a/test/snapshots/colgrip.snap b/test/snapshots/colgrip.snap
new file mode 100644
index 00000000..c2b403ed
--- /dev/null
+++ b/test/snapshots/colgrip.snap
@@ -0,0 +1,35 @@
+# Column grips: the two cells left of a column tag carry the column. A grabbed
+# grip lights, and a rail in its color stands where the column will land.
+# The right column is at x 50; its grip is cells 51-52 (1-based) on row 2.
+file w.txt x
+start 24 100 w.txt
+wait 8000 Newcol Joincol
+wait 8000 w.txt
+stable 700 20000
+key a-n
+key a-c
+stable 700 15000
+snapstyle rest
+# held on its own grip: lit, and no rail, since it lands where it is
+press left 51 2
+stable 400 5000
+snapstyle held
+# dropped short of the left column's middle, the left edge moves: the rail is
+# in the seam cell left of where the column's rule will be
+drag left 41 2
+stable 400 5000
+snap resize-drag
+snapstyle resize-drag
+release left 41 2
+stable 700 15000
+snap resize-done
+# carried over the left column's left half it goes first; the window edge
+# has no seam, so the rail runs in the gutter's last cell
+press left 41 2
+drag left 10 2
+stable 400 5000
+snap reorder-drag
+snapstyle reorder-drag
+release left 10 2
+stable 700 15000
+snap reorder-done
diff --git a/test/snapshots/collapse.golden b/test/snapshots/collapse.golden
index 8dcfd4d7..13e1b1f2 100644
--- a/test/snapshots/collapse.golden
+++ b/test/snapshots/collapse.golden
@@ -1,7 +1,7 @@
== snap before grid=160x25 cursor=7,3
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/collapse/cwd/kept.txt Save Tty Del Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/collapse/cwd/kept.txt Save Tty Collapse Del
| 1 KEEP-FIRST
| 2 KEEP-SECOND
| 3 KEEP-THIRD
@@ -10,67 +10,67 @@
|4:
|5:
== 9p middle-collapsed-cursor grid=160x25 cursor=none
-|0: Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-@0: 0-70 #b2c3b8,#1d2824,,tagline 71-159 d,#1d2824,,tagline
-|1: New Tty Find Grep Joincol
-@1: 0-24 #becfc4,#26362d,,tagline 25-159 d,#26362d,,tagline
-|2: /tmp/pardes-snap/collapse/cwd/kept.txt Save Tty Del Collapse
-@2: 0-1 #000000,#adcc91,,tagline 2-61 #becfc4,#26362d,,tagline 62-159 d,#26362d,,tagline
+|0: Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+@0: 0-76 #b2c3b8,#1d2824,,tagline 77-159 d,#1d2824,,tagline
+|1: New Tty Find Grep Joincol Delcol
+@1: 0-1 #ffffff,#887455,,tagline 2-33 #becfc4,#314738,,tagline 34-159 d,#314738,,tagline
+|2: /tmp/pardes-snap/collapse/cwd/kept.txt Save Tty Collapse Del
+@2: 0-1 #000000,#add38a,,tagline 2-31 #becfc4,#314738,,tagline 32-39 #dfbce5,#314738,,tagline 40-61 #becfc4,#314738,,tagline 62-159 d,#314738,,tagline
|3:
-@3: 0-159 d,#35483d,,body
+@3: 0-159 d,#486152,,body
|4:
-@4: 0-159 d,#35483d,,body
+@4: 0-159 d,#486152,,body
|5:
-@5: 0-159 d,#35483d,,body
+@5: 0-159 d,#486152,,body
|6:
-@6: 0-159 d,#35483d,,body
+@6: 0-159 d,#486152,,body
|7:
-@7: 0-159 d,#35483d,,body
+@7: 0-159 d,#486152,,body
|8:
-@8: 0-159 d,#35483d,,body
+@8: 0-159 d,#486152,,body
|9:
-@9: 0-159 d,#35483d,,body
+@9: 0-159 d,#486152,,body
|10:
-@10: 0-159 d,#35483d,,body
+@10: 0-159 d,#486152,,body
|11:
-@11: 0-159 d,#35483d,,body
+@11: 0-159 d,#486152,,body
|12:
-@12: 0-159 d,#35483d,,body
+@12: 0-159 d,#486152,,body
|13:
-@13: 0-159 d,#35483d,,body
+@13: 0-159 d,#486152,,body
|14:
-@14: 0-159 d,#35483d,,body
+@14: 0-159 d,#486152,,body
|15:
-@15: 0-159 d,#35483d,,body
+@15: 0-159 d,#486152,,body
|16:
-@16: 0-159 d,#35483d,,body
+@16: 0-159 d,#486152,,body
|17:
-@17: 0-159 d,#35483d,,body
+@17: 0-159 d,#486152,,body
|18:
-@18: 0-159 d,#35483d,,body
+@18: 0-159 d,#486152,,body
|19:
-@19: 0-159 d,#35483d,,body
+@19: 0-159 d,#486152,,body
|20:
-@20: 0-159 d,#35483d,,body
+@20: 0-159 d,#486152,,body
|21:
-@21: 0-159 d,#35483d,,body
+@21: 0-159 d,#486152,,body
|22:
-@22: 0-159 d,#35483d,,body
+@22: 0-159 d,#486152,,body
|23:
-@23: 0-159 d,#35483d,,body
+@23: 0-159 d,#486152,,body
|24:
-@24: 0-159 d,#35483d,,body
+@24: 0-159 d,#486152,,body
== snap middle-restored grid=160x25 cursor=7,3
-|3: 1 KEEP-FIRST
+|3: 1 KEEP-FIRST Collapse
|4: 2 KEEP-SECOND
|5: 3 KEEP-THIRD
-== snap tab-collapsed grid=160x25 cursor=54,2
+== snap tab-collapsed grid=160x25 cursor=50,2
|3:
|4:
|5:
-== 9p tab-collapsed-cursor grid=160x25 cursor=54,2,bar
-== snap tab-restored grid=160x25 cursor=54,2
-|3: 1 KEEP-FIRST
+== 9p tab-collapsed-cursor grid=160x25 cursor=none
+== snap tab-restored grid=160x25 cursor=7,3
+|3: 1 KEEP-FIRST Collapse
|4: 2 KEEP-SECOND
|5: 3 KEEP-THIRD
== file unchanged
diff --git a/test/snapshots/collapse.snap b/test/snapshots/collapse.snap
index 64f6bdb8..83872855 100644
--- a/test/snapshots/collapse.snap
+++ b/test/snapshots/collapse.snap
@@ -1,5 +1,6 @@
# A default pane-tag command collapses to one row and restores the body.
-# Exercise real middle clicks twice, then tag editing's Tab execution twice.
+# Exercise real middle clicks twice, then the tag's own execute key twice: a
+# click types into the tag, Esc is its normal mode, and Tab executes there.
file kept.txt KEEP-FIRST\nKEEP-SECOND\nKEEP-THIRD
start 25 160 kept.txt
wait 8000 KEEP-THIRD
@@ -19,12 +20,16 @@ stable 500 8000
snap middle-restored
press left @Collapse 3
release left @Collapse 3
+key esc
+settle 100
key tab
stable 500 8000
snap tab-collapsed
snap9p tab-collapsed-cursor
press left @Collapse 3
release left @Collapse 3
+key esc
+settle 100
key tab
wait 8000 KEEP-THIRD
stable 500 8000
diff --git a/test/snapshots/cornerdrag-left.golden b/test/snapshots/cornerdrag-left.golden
index df10fd3d..2c42d746 100644
--- a/test/snapshots/cornerdrag-left.golden
+++ b/test/snapshots/cornerdrag-left.golden
@@ -1,11 +1,13 @@
-== snap right-split grid=100x31 cursor=54,9
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/cornerdrag-left/cwd Save Tty De /tmp/pardes-snap/cornerdrag-left/cwd Save Tty De
+== snap right-split grid=100x31 cursor=54,11
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/cornerdrag-left/cwd Tty+bash Sa /tmp/pardes-snap/cornerdrag-left/cwd Tty+bash Sa
+| ve Mode Filter Collapse Del ve Mode Filter Collapse Del
| ls ls
| w.txt w.txt
|
-| /tmp/pardes-snap/cornerdrag-left/cwd Save Tty De
+| /tmp/pardes-snap/cornerdrag-left/cwd Tty+bash Sa
+| ve Mode Filter Collapse Del
| ls
| w.txt
|
@@ -14,64 +16,33 @@
|
|
|
-|
-|
-| /tmp/pardes-snap/cornerdrag-left/cwd Save Tty De
+| /tmp/pardes-snap/cornerdrag-left/cwd Tty+bash Sa
+| ve Mode Filter Collapse Del
| ls
| w.txt
-== snap hover-corner grid=100x31 cursor=54,9
-|1: New Tty Find Grep Joincol ╎New Tty Find Grep Joincol
-|2: /tmp/pardes-snap/cornerdrag-left/cwd Save Tty D╎ /tmp/pardes-snap/cornerdrag-left/cwd Save Tty De
-|3: ls ╎ ls
-|4: w.txt ╎ w.txt
-|5: ╎
-|6: ╎ /tmp/pardes-snap/cornerdrag-left/cwd Save Tty De
-|7: ╎ ls
-|8: ╎ w.txt
-|9: ╎
-|10: ╎
-|11: ╎
-|12: ╎
-|13: ╎
-|14: ╎
-|15: ╎
-|16: ╎
-|17: /tmp/pardes-snap/cornerdrag-left/cwd Save Tty D╎
-|18: ls ╎
-|19: w.txt ╎
-|20: ╎
-|21: ╎
-|22: ╎
-|23: ╎
-|24: ╎
-|25: ╎
-|26: ╎
-|27: ╎
-|28: ╎
-|29: ╎
-|30: ╎
-== snap hover-left-corner grid=100x31 cursor=54,9
-== snap corner-drag grid=100x31 cursor=54,9
-|1: New Tty Find Grep Joincol ╎ New Tty Find Grep Joincol
-|2: /tmp/pardes-snap/cornerdrag╎left/cwd Save Tty De /tmp/pardes-snap/cornerdrag-left/cwd Save Tty De
-|3: ls ╎ ls
-|4: w.txt ╎ w.txt
-|5: ╎
-|6: ╎ /tmp/pardes-snap/cornerdrag-left/cwd Save Tty De
-|7: ╎ ls
-|8: ╎ w.txt
-|9: ╎
-|10: ╎
+== snap hover-corner grid=100x31 cursor=54,11
+== snap hover-left-corner grid=100x31 cursor=54,11
+== snap corner-drag grid=100x31 cursor=54,11
+|1: New Tty Find Grep Joincol D╎lcol New Tty Find Grep Joincol Delcol
+|2: /tmp/pardes-snap/cornerdrag╎left/cwd Tty+bash Sa /tmp/pardes-snap/cornerdrag-left/cwd Tty+bash Sa
+|3: ve Mode Filter Collapse Del╎ ve Mode Filter Collapse Del
+|4: ls ╎ ls
+|5: w.txt ╎ w.txt
+|6: ╎
+|7: ╎ /tmp/pardes-snap/cornerdrag-left/cwd Tty+bash Sa
+|8: ╎ ve Mode Filter Collapse Del
+|9: ╎ ls
+|10: ╎ w.txt
|11: ╎
-|12: ╎╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
+|12: ╎
|13: ╎
|14: ╎
|15: ╎
|16: ╎
-|17: /tmp/pardes-snap/cornerdrag╎left/cwd Save Tty De
-|18: ls ╎
-|19: w.txt ╎
-|20: ╎
+|17: /tmp/pardes-snap/cornerdrag╎left/cwd Tty+bash Sa
+|18: ve Mode Filter Collapse Del╎
+|19: ls ╎
+|20: w.txt ╎
|21: ╎
|22: ╎
|23: ╎
@@ -82,28 +53,28 @@
|28: ╎
|29: ╎
|30: ╎
-== snap corner-done grid=100x31 cursor=34,16
-|1: New Tty Find Grep Joincol New Tty Find Grep Joincol
-|2: /tmp/pardes-snap/cornerdrag- /tmp/pardes-snap/cornerdrag-left/cwd Save Tty Del Togglettymode Filt
-|3: ls ls
-|4: w.txt w.txt
-|5:
-|6:
-|7:
-|8:
-|9:
-|10:
+== snap corner-done grid=100x31 cursor=34,11
+|1: New Tty Find Grep Joincol De New Tty Find Grep Joincol Delcol
+|2: /tmp/pardes-snap/cornerdrag- /tmp/pardes-snap/cornerdrag-left/cwd Tty+bash Save Mode Filter Colla
+|3: left/cwd Tty+bash Save Mode pse Del
+|4: Filter Collapse Del ls
+|5: ls w.txt
+|6: w.txt
+|7: /tmp/pardes-snap/cornerdrag-left/cwd Tty+bash Save Mode Filter Colla
+|8: pse Del
+|9: ls
+|10: w.txt
|11:
|12:
-|13: /tmp/pardes-snap/cornerdrag-left/cwd Save Tty Del Togglettymode Filt
-|14: ls
-|15: w.txt
+|13:
+|14:
+|15:
|16:
|17: /tmp/pardes-snap/cornerdrag-
-|18: ls
-|19: w.txt
-|20:
-|21:
+|18: left/cwd Tty+bash Save Mode
+|19: Filter Collapse Del
+|20: ls
+|21: w.txt
|22:
|23:
|24:
diff --git a/test/snapshots/cornerdrag-left.snap b/test/snapshots/cornerdrag-left.snap
index e76bfb89..124f6351 100644
--- a/test/snapshots/cornerdrag-left.snap
+++ b/test/snapshots/cornerdrag-left.snap
@@ -12,19 +12,17 @@ start 31 100 -n 3
wait 8000 w.txt
stable 700 20000
# a second pane in the RIGHT column
-key c-w l
+key c-w l enter
stable 400 5000
key a-n
stable 700 15000
snap right-split
-# hover col 1's corner: the v hint runs full height AND col 1's h hint lights,
-# from col 51 rightward. Before this that row was dark on the handle — only the
-# hovered column's seam lit, and the hovered cell belongs to col 0
+# hover col 1's corner: hovering draws no hints any more, so the frame is
+# empty; the drags below still show their previews
motion 50 5
stable 400 5000
snap hover-corner
-# CONTROL: col 0's own seam is still a left-column corner, its h hint drawn
-# through the handle from col 1 to the handle itself, unchanged
+# CONTROL: col 0's own seam, hovered: no hint either
motion 50 16
stable 400 5000
snap hover-left-corner
diff --git a/test/snapshots/cornerdrag.golden b/test/snapshots/cornerdrag.golden
index 003bf0d8..40695375 100644
--- a/test/snapshots/cornerdrag.golden
+++ b/test/snapshots/cornerdrag.golden
@@ -1,41 +1,31 @@
-== snap hover-corner grid=100x31 cursor=4,5
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol ╎New Tty Find Grep Joincol
-| /tmp/pardes-snap/cornerdrag/cwd Save Tty Del To╎ /tmp/pardes-snap/cornerdrag/cwd Save Tty Del Tog
-| ls ╎ ls
-| w.txt ╎ w.txt
-| ╎
-| ╎
-| ╎
-| ╎
-| ╎
-| ╎
-| ╎
-| ╎
-| ╎
-| ╎
-| ╎
-| ╎
-| /tmp/pardes-snap/cornerdrag/cwd Save Tty Del To╎
-| ls ╎
-| w.txt ╎
-| ╎
-| ╎
-| ╎
-| ╎
-| ╎
-| ╎
-| ╎
-| ╎
-| ╎
-| ╎
-| ╎
-== snap edge-drag grid=100x31 cursor=4,5
-|1: New Tty Find Grep Joincol ╎ New Tty Find Grep Joincol
-|2: /tmp/pardes-snap/cornerdrag╎cwd Save Tty Del Tog /tmp/pardes-snap/cornerdrag/cwd Save Tty Del Tog
-|3: ls ╎ ls
-|4: w.txt ╎ w.txt
-|5: ╎
+== snap hover-corner grid=100x31 cursor=4,6
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/cornerdrag/cwd Tty+bash Save Mo /tmp/pardes-snap/cornerdrag/cwd Tty+bash Save Mo
+| de Filter Collapse Del de Filter Collapse Del
+| ls ls
+| w.txt w.txt
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/cornerdrag/cwd Tty+bash Save Mo
+| de Filter Collapse Del
+| ls
+| w.txt
+== snap edge-drag grid=100x31 cursor=4,6
+|1: New Tty Find Grep Joincol D╎lcol New Tty Find Grep Joincol Delcol
+|2: /tmp/pardes-snap/cornerdrag╎cwd Tty+bash Save Mo /tmp/pardes-snap/cornerdrag/cwd Tty+bash Save Mo
+|3: de Filter Collapse Del ╎ de Filter Collapse Del
+|4: ls ╎ ls
+|5: w.txt ╎ w.txt
|6: ╎
|7: ╎
|8: ╎
@@ -47,10 +37,10 @@
|14: ╎
|15: ╎
|16: ╎
-|17: /tmp/pardes-snap/cornerdrag╎cwd Save Tty Del Tog
-|18: ls ╎
-|19: w.txt ╎
-|20: ╎
+|17: /tmp/pardes-snap/cornerdrag╎cwd Tty+bash Save Mo
+|18: de Filter Collapse Del ╎
+|19: ls ╎
+|20: w.txt ╎
|21: ╎
|22: ╎
|23: ╎
@@ -61,13 +51,13 @@
|28: ╎
|29: ╎
|30: ╎
-== snap edge-done grid=100x31 cursor=4,5
-|1: New Tty Find Grep Joincol New Tty Find Grep Joincol
-|2: /tmp/pardes-snap/cornerdrag/ /tmp/pardes-snap/cornerdrag/cwd Save Tty Del Togglettymode Filter Co
-|3: ls ls
-|4: w.txt w.txt
-|5:
-|6:
+== snap edge-done grid=100x31 cursor=4,7
+|1: New Tty Find Grep Joincol De New Tty Find Grep Joincol Delcol
+|2: /tmp/pardes-snap/cornerdrag/ /tmp/pardes-snap/cornerdrag/cwd Tty+bash Save Mode Filter Collapse D
+|3: cwd Tty+bash Save Mode Filte el
+|4: r Collapse Del ls
+|5: ls w.txt
+|6: w.txt
|7:
|8:
|9:
@@ -79,10 +69,10 @@
|15:
|16:
|17: /tmp/pardes-snap/cornerdrag/
-|18: ls
-|19: w.txt
-|20:
-|21:
+|18: cwd Tty+bash Save Mode Filte
+|19: r Collapse Del
+|20: ls
+|21: w.txt
|22:
|23:
|24:
@@ -92,13 +82,13 @@
|28:
|29:
|30:
-== snap corner-drag grid=100x31 cursor=4,5
-|1: New Tty Find Grep Joincol New Tty Find Grep Joincol ╎
-|2: /tmp/pardes-snap/cornerdrag/ /tmp/pardes-snap/cornerdrag╎cwd Save Tty Del Togglettymode Filter Co
-|3: ls ls ╎
-|4: w.txt w.txt ╎
-|5: ╎
-|6: ╎
+== snap corner-drag grid=100x31 cursor=4,7
+|1: New Tty Find Grep Joincol De New Tty Find Grep Joincol D╎lcol
+|2: /tmp/pardes-snap/cornerdrag/ /tmp/pardes-snap/cornerdrag╎cwd Tty+bash Save Mode Filter Collapse D
+|3: cwd Tty+bash Save Mode Filte el ╎
+|4: r Collapse Del ls ╎
+|5: ls w.txt ╎
+|6: w.txt ╎
|7: ╎
|8: ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
|9: ╎
@@ -110,10 +100,10 @@
|15: ╎
|16: ╎
|17: /tmp/pardes-snap/cornerdrag/ ╎
-|18: ls ╎
-|19: w.txt ╎
-|20: ╎
-|21: ╎
+|18: cwd Tty+bash Save Mode Filte ╎
+|19: r Collapse Del ╎
+|20: ls ╎
+|21: w.txt ╎
|22: ╎
|23: ╎
|24: ╎
@@ -123,19 +113,19 @@
|28: ╎
|29: ╎
|30: ╎
-== snap corner-done grid=100x31 cursor=4,5
-|1: New Tty Find Grep Joincol New Tty Find Grep Joincol
-|2: /tmp/pardes-snap/cornerdrag/cwd Save Tty Del Togglettymode /tmp/pardes-snap/cornerdrag/cwd Save T
-|3: ls ls
-|4: w.txt w.txt
-|5:
+== snap corner-done grid=100x31 cursor=4,6
+|1: New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+|2: /tmp/pardes-snap/cornerdrag/cwd Tty+bash Save Mode Filter /tmp/pardes-snap/cornerdrag/cwd Tty+ba
+|3: Collapse Del sh Save Mode Filter Collapse Del
+|4: ls ls
+|5: w.txt w.txt
|6:
|7:
|8:
-|9: /tmp/pardes-snap/cornerdrag/cwd Save Tty Del Togglettymode
-|10: ls
-|11: w.txt
-|12:
+|9: /tmp/pardes-snap/cornerdrag/cwd Tty+bash Save Mode Filter
+|10: Collapse Del
+|11: ls
+|12: w.txt
|13:
|14:
|15:
@@ -154,19 +144,19 @@
|28:
|29:
|30:
-== snap clamp-x grid=100x31 cursor=4,5
-|1: New Tty Find Grep Joincol New Tty Find Grep Joincol ╎
-|2: /tmp/pardes-snap/cornerdrag/cwd Save Tty Del Togglettymode /tmp/pardes-snap/cornerdrag/╎wd Save T
-|3: ls ls ╎
-|4: w.txt w.txt ╎
-|5: ╎
+== snap clamp-x grid=100x31 cursor=4,6
+|1: New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol De╎col
+|2: /tmp/pardes-snap/cornerdrag/cwd Tty+bash Save Mode Filter /tmp/pardes-snap/cornerdrag/╎wd Tty+ba
+|3: Collapse Del sh Save Mode Filter Collapse╎Del
+|4: ls ls ╎
+|5: w.txt w.txt ╎
|6: ╎
|7: ╎
|8: ╎
-|9: /tmp/pardes-snap/cornerdrag/cwd Save Tty Del Togglettymode ╎
-|10: ls ╎
-|11: w.txt ╎
-|12: ╎
+|9: /tmp/pardes-snap/cornerdrag/cwd Tty+bash Save Mode Filter ╎
+|10: Collapse Del ╎
+|11: ls ╎
+|12: w.txt ╎
|13: ╎
|14: ╎
|15: ╎
@@ -185,19 +175,19 @@
|28: ╎
|29: ╎
|30: ╎
-== snap clamp-y grid=100x31 cursor=4,5
-|1: New Tty Find Grep Joincol ╎New Tty Find Grep Joincol
-|2: /tmp/pardes-snap/cornerdrag/cwd Save Tty Del Togglettymod╎ /tmp/pardes-snap/cornerdrag/cwd Save T
-|3: ls ╎ ls
-|4: w.txt ╎ w.txt
-|5: ╎
+== snap clamp-y grid=100x31 cursor=4,6
+|1: New Tty Find Grep Joincol Delcol ╎ New Tty Find Grep Joincol Delcol
+|2: /tmp/pardes-snap/cornerdrag/cwd Tty+bash Save Mode Filter╎ /tmp/pardes-snap/cornerdrag/cwd Tty+ba
+|3: Collapse Del ╎ sh Save Mode Filter Collapse Del
+|4: ls ╎ ls
+|5: w.txt ╎ w.txt
|6: ╎
|7: ╎
|8: ╎
-|9: /tmp/pardes-snap/cornerdrag/cwd Save Tty Del Togglettymod╎
-|10: ls ╎
-|11: w.txt ╎
-|12: ╎
+|9: /tmp/pardes-snap/cornerdrag/cwd Tty+bash Save Mode Filter╎
+|10: Collapse Del ╎
+|11: ls ╎
+|12: w.txt ╎
|13: ╎
|14: ╎
|15: ╎
@@ -216,12 +206,12 @@
|28: ╎
|29: ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
|30: ╎
-== snap clamp-done grid=100x31 cursor=4,5
-|1: New Tty Find Grep Joincol New Tty Find Grep Joincol
-|2: /tmp/pardes-snap/cornerdrag/cwd Save Tty Del Togglettymode /tmp/pardes-snap/cornerdrag/cwd Save T
-|3: ls ls
-|4: w.txt w.txt
-|5:
+== snap clamp-done grid=100x31 cursor=4,6
+|1: New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+|2: /tmp/pardes-snap/cornerdrag/cwd Tty+bash Save Mode Filter /tmp/pardes-snap/cornerdrag/cwd Tty+ba
+|3: Collapse Del sh Save Mode Filter Collapse Del
+|4: ls ls
+|5: w.txt w.txt
|6:
|7:
|8:
@@ -243,7 +233,7 @@
|24:
|25:
|26:
-|27:
-|28:
-|29:
-|30: /tmp/pardes-snap/cornerdrag/cwd Save Tty Del Togglettymode
+|27: /tmp/pardes-snap/cornerdrag/cwd Tty+bash Save Mode Filter
+|28: Collapse Del
+|29: w.txt
+|30:
diff --git a/test/snapshots/cornerdrag.snap b/test/snapshots/cornerdrag.snap
index 0fbfe8a4..69140c17 100644
--- a/test/snapshots/cornerdrag.snap
+++ b/test/snapshots/cornerdrag.snap
@@ -8,7 +8,8 @@ file w.txt x
start 31 100 -n 3
wait 8000 w.txt
stable 700 20000
-# hover the corner: BOTH hints light, before anything is grabbed
+# hover the corner: no hints (columns resize by their grips); the frame
+# stays empty
motion 50 16
stable 400 5000
snap hover-corner
diff --git a/test/snapshots/cursorline.golden b/test/snapshots/cursorline.golden
index 161655c8..277565b3 100644
--- a/test/snapshots/cursorline.golden
+++ b/test/snapshots/cursorline.golden
@@ -1,11 +1,11 @@
== snap top grid=150x31 cursor=7,7
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/cursorline/cwd Save Tty Del Togglettymode Filter Collaps /tmp/pardes-snap/cursorline/cwd Save Tty Del Togglettymode Filter Collaps
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/cursorline/cwd Tty+bash Save Mode Filter Collapse Del /tmp/pardes-snap/cursorline/cwd Tty+bash Save Mode Filter Collapse Del
| ls ls
| cur.txt cur.txt
|
-| /tmp/pardes-snap/cursorline/cwd/cur.txt Save Tty Del Collapse
+| /tmp/pardes-snap/cursorline/cwd/cur.txt Save Tty Collapse Del
| 1 line 1
| 2 line 2
| 3 line 3
@@ -16,42 +16,42 @@
| 8 line 8
| 9 line 9
| 10 line 10
-| /tmp/pardes-snap/cursorline/cwd Save Tty Del Togglettymode Filter Collaps
+| /tmp/pardes-snap/cursorline/cwd Tty+bash Save Mode Filter Collapse Del
| ls
| cur.txt
== style top grid=150x31
-|0: 0-70 #b2c3b8,#1d2824, 71-149 d,#1d2824,
-|1: 0-24 #becfc4,#26362d, 25-74 d,#26362d, 75-99 #b2c3b8,#1d2824, 100-149 d,#1d2824,
-|2: 0-1 #ffffff,#4c6356, 2-74 #b2c3b8,#1d2824, 75-76 #ffffff,#4c6356, 77-149 #b2c3b8,#1d2824,
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|4: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|5: 0-0 d,#637f6a, 1-74 d,#0d1410, 75-75 d,#637f6a, 76-149 d,#0d1410,
-|6: 0-1 #000000,#adcc91, 2-62 #becfc4,#26362d, 63-74 d,#26362d, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|7: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #616f64,#0d1410,b 7-12 #e5eee5,#0d1410, 13-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|8: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|9: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|10: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|11: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|12: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|13: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|14: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|15: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|16: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-13 #e5eee5,#0d1410, 14-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|17: 0-1 #ffffff,#4c6356, 2-74 #b2c3b8,#1d2824, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|18: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|19: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|20: 0-0 d,#637f6a, 1-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|21: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|22: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|23: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|24: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|25: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|26: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|27: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|28: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|29: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|30: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
+|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-33 #b2c3b8,#1d2824, 34-42 #d3b0d9,#1d2824, 43-74 #b2c3b8,#1d2824, 75-76 #b2c3b8,#496656, 77-108 #b2c3b8,#1d2824, 109-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-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-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,
== snap down3 grid=150x31 cursor=7,10
== style down3 grid=150x31
-|7: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|10: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #616f64,#0d1410,b 7-12 #e5eee5,#0d1410, 13-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
+|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,
diff --git a/test/snapshots/delask.golden b/test/snapshots/delask.golden
new file mode 100644
index 00000000..bded23bf
--- /dev/null
+++ b/test/snapshots/delask.golden
@@ -0,0 +1,55 @@
+== snap three grid=100x36 cursor=18,20
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/delask/cwd/top.txt Save Tty Collapse Del
+| 1 top-marker
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| */tmp/pardes-snap/delask/cwd/+New Save Tty Collapse Del
+| 1 middle-pane
+|
+|
+|
+|
+|
+|
+|
+| */tmp/pardes-snap/delask/cwd/+New Save Tty Collapse Del
+| 1 bottom-pane
+== snap asked grid=100x36 cursor=18,20
+|20: 1 middle-pane Del: give space to k above j below
+== snap kept grid=100x36 cursor=18,20
+|20: 1 middle-pane
+== snap below-took grid=100x36 cursor=18,20
+|20: 1 bottom-pane
+|28:
+|29:
+== snap typed grid=100x36 cursor=27,20
+|20: 1 bottom-pane DelBelow
+|28: */tmp/pardes-snap/delask/cwd/+New Save Tty Collapse Del
+|29: 1 third-pane
+== snap below-took-click grid=100x36 cursor=17,20
+|20: 1 third-pane
+|28:
+|29:
+== snap four grid=100x36 cursor=7,29
+|3: 1 top-marker New
+|28: /tmp/pardes-snap/delask/cwd/+New Save Tty Collapse Del
+|29: 1
+== snap mouse-del grid=100x36 cursor=7,29
+|3: 1 top-marker
+|19:
+|20:
diff --git a/test/snapshots/delask.snap b/test/snapshots/delask.snap
new file mode 100644
index 00000000..1e1ff72f
--- /dev/null
+++ b/test/snapshots/delask.snap
@@ -0,0 +1,75 @@
+# Del from the keyboard on a pane with open panes above AND below asks, on the
+# pane's notice band, which one takes its rows: k above, j below, anything else
+# keeps the pane. A click, and DelAbove/DelBelow (Del k / Del j), never ask.
+file top.txt top-marker
+start 36 100 top.txt
+wait 8000 top-marker
+stable 700 20000
+# two scratch panes below the file, each saying which it is, then focus the
+# middle one
+key space f n
+stable 400 5000
+key i
+text middle-pane
+key esc
+settle 100
+key space f n
+stable 400 5000
+key i
+text bottom-pane
+key esc
+settle 100
+key c-w k enter
+stable 400 5000
+snap three
+# asked, and nothing closes yet; the question goes up on the band only after
+# config.del_question_delay_ns (400 ms) with no answer, a hint
+key space d
+settle 700
+stable 400 5000
+snap asked
+# Esc takes the question back: the pane stays
+key esc
+settle 100
+stable 400 5000
+snap kept
+# j: the pane below grows over the middle one's rows, the file keeps its own
+key space d
+stable 400 5000
+key j
+stable 700 10000
+snap below-took
+# a pane under it, and DelBelow (Del j) appended to the middle one's text and
+# executed with a click: no question, the pane below takes the rows
+key space f n
+stable 400 5000
+key i
+text third-pane
+key esc
+settle 100
+key c-w k enter
+stable 400 5000
+key A
+send \x20DelBelow
+key esc
+settle 100
+stable 400 5000
+snap typed
+press middle @DelBelow 21
+release middle @DelBelow 21
+stable 700 10000
+snap below-took-click
+# a fresh pane at the foot of the column (acme's New takes the bottom half of
+# the last pane), and the third one, now between the file and it, closed by a
+# middle click on its tag's Del: no question, and the rows go up as they
+# always have
+press left 10 5
+release left 10 5
+stable 400 5000
+key space f n
+stable 400 5000
+snap four
+press middle @Del 20
+release middle @Del 20
+stable 700 10000
+snap mouse-del
diff --git a/test/snapshots/diffview.golden b/test/snapshots/diffview.golden
new file mode 100644
index 00000000..b4ce7759
--- /dev/null
+++ b/test/snapshots/diffview.golden
@@ -0,0 +1,148 @@
+== snap diff-pane grid=100x31 cursor=7,3
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/diffview/cwd/change.diff Save Tty Diff Collapse Del
+| 1 diff --git a/src/shape.zig b/src/shape.zig
+| 2 index 1111111..2222222 100644
+| 3 --- a/src/shape.zig
+| 4 +++ b/src/shape.zig
+| 5 @@ -1,10 +1,12 @@
+| 6 const std = @import("std");
+| 7
+| 8 pub const Shape = union(enum) {
+| 9 circle: f32,
+| 10 - square: u8 = 7,
+| 11 + square: f32,
+| 12 + triangle: struct { base: f32, height: f32 },
+| 13
+| 14 const note =
+| 15 - \\areas
+| 16 + \\areas, defer
+| 17 + \\summed
+| 18 ;
+| 19 };
+| 20
+== 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,
+|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,
+|6: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-99 #b9f480,#0d1410,
+|7: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-99 #c9a7ed,#0d1410,
+|8: 0-0 d,#608269, 1-4 d,#0d1410, 5-7 #59675c,#0d1410, 8-19 #e5eee5,#0d1410, 20-26 #c9a7ed,#0d1410, 27-27 #e5eee5,#0d1410, 28-32 #b8d88a,#0d1410, 33-99 #e5eee5,#0d1410,
+|9: 0-0 d,#608269, 1-4 d,#0d1410, 5-99 #59675c,#0d1410,
+|10: 0-0 d,#608269, 1-4 d,#0d1410, 5-7 #59675c,#0d1410, 8-25 #e5eee5,#0d1410, 26-30 #c9a7ed,#0d1410, 31-31 #e5eee5,#0d1410, 32-35 #c9a7ed,#0d1410, 36-99 #e5eee5,#0d1410,
+|11: 0-0 d,#608269, 1-4 d,#0d1410, 5-11 #59675c,#0d1410, 12-99 #e5eee5,#0d1410,
+|12: 0-0 d,#608269, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-7 #f1a39b,#302b25,b 8-11 #f1a39b,#302b25, 12-24 #e5eee5,#302b25, 25-25 #f8c082,#302b25, 26-99 #e5eee5,#302b25,
+|13: 0-0 d,#608269, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-7 #b6ce94,#263025,b 8-11 #b6ce94,#263025, 12-99 #e5eee5,#263025,
+|14: 0-0 d,#608269, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-7 #b6ce94,#263025,b 8-11 #b6ce94,#263025, 12-21 #e5eee5,#263025, 22-28 #c9a7ed,#263025, 29-99 #e5eee5,#263025,
+|15: 0-0 d,#608269, 1-3 d,#0d1410, 4-99 #59675c,#0d1410,
+|16: 0-0 d,#608269, 1-3 d,#0d1410, 4-11 #59675c,#0d1410, 12-99 #e5eee5,#0d1410,
+|17: 0-0 d,#608269, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-7 #f1a39b,#302b25,b 8-15 #f1a39b,#302b25, 16-99 #b8d88a,#302b25,
+|18: 0-0 d,#608269, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-7 #b6ce94,#263025,b 8-15 #b6ce94,#263025, 16-99 #b8d88a,#263025,
+|19: 0-0 d,#608269, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-7 #b6ce94,#263025,b 8-15 #b6ce94,#263025, 16-99 #b8d88a,#263025,
+|20: 0-0 d,#608269, 1-3 d,#0d1410, 4-11 #59675c,#0d1410, 12-99 #e5eee5,#0d1410,
+|21: 0-0 d,#608269, 1-3 d,#0d1410, 4-7 #59675c,#0d1410, 8-99 #e5eee5,#0d1410,
+|22: 0-0 d,#608269, 1-3 d,#0d1410, 4-99 #59675c,#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-0 d,#608269, 1-99 d,#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,
+== snap look-added-line grid=100x31 cursor=55,22
+|16: /tmp/pardes-snap/diffview/cwd/src/shape.zig Save Tty Collapse 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: 13
+== snap command-pane grid=100x31 cursor=7,3
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/diffview/cwd/cmds.txt Save Tty Collapse Del
+| 1 cat change.diff Exec
+| 2
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/diffview/cwd (cat change.diff) exit 0 Kill Save Collapse Del
+| circle: f32,
+| - square: u8 = 7,
+| + square: f32,
+| + triangle: struct { base: f32, height: f32 },
+|
+| const note =
+| - \\areas
+| + \\areas, defer
+| + \\summed
+| ;
+| };
+| exit 0
+== 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,
+|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,
+|7: 0-0 d,#608269, 1-99 d,#0d1410,
+|8: 0-0 d,#608269, 1-99 d,#0d1410,
+|9: 0-0 d,#608269, 1-99 d,#0d1410,
+|10: 0-0 d,#608269, 1-99 d,#0d1410,
+|11: 0-0 d,#608269, 1-99 d,#0d1410,
+|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-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,
+|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 Tty Collapse 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 ;
diff --git a/test/snapshots/diffview.snap b/test/snapshots/diffview.snap
new file mode 100644
index 00000000..23d060b7
--- /dev/null
+++ b/test/snapshots/diffview.snap
@@ -0,0 +1,37 @@
+# A diff pane, for reviewing a change: each hunk's code coloured as Zig (a
+# multi-line string over three lines, `defer` inside it no keyword), added and
+# removed rows tinted to the pane's edge with their prefix in the tint's hue,
+# headers muted. Then a right click on an added line's `+` opens the new file
+# at that line: the path is the repository's (a `.git` above the diff), b/
+# dropped.
+dirmk .git
+dirmk src
+file src/shape.zig const std = @import("std");\n\npub const Shape = union(enum) {\n circle: f32,\n square: f32,\n triangle: struct { base: f32, height: f32 },\n\n const note =\n \\\\areas, defer\n \\\\summed\n ;\n};\n
+file change.diff diff --git a/src/shape.zig b/src/shape.zig\nindex 1111111..2222222 100644\n--- a/src/shape.zig\n+++ b/src/shape.zig\n@@ -1,10 +1,12 @@\n const std = @import("std");\n \n pub const Shape = union(enum) {\n circle: f32,\n- square: u8 = 7,\n+ square: f32,\n+ triangle: struct { base: f32, height: f32 },\n \n const note =\n- \\\\areas\n+ \\\\areas, defer\n+ \\\\summed\n ;\n };\n
+start 31 100 change.diff
+wait 8000 Newcol Joincol
+stable 700 20000
+snap diff-pane
+snapstyle diff-colours
+press right 8 15
+release right 8 15
+stable 700 15000
+snap look-added-line
+# The same diff printed by a command (`git diff`, here `cat`) into a command
+# pane: its output is told for a diff and coloured the same, over the colours
+# the program printed, and a right click on a `+` there opens the file too.
+file cmds.txt cat change.diff\n
+start 31 100 cmds.txt
+wait 8000 cmds.txt
+stable 700 20000
+press middle 7 4
+drag middle 22 4
+release middle 22 4
+wait 10000 exit 0
+stable 700 15000
+snap command-pane
+snapstyle command-colours
+press right 3 21
+release right 3 21
+stable 700 15000
+snap command-look
diff --git a/test/snapshots/dirpane.golden b/test/snapshots/dirpane.golden
new file mode 100644
index 00000000..960c8913
--- /dev/null
+++ b/test/snapshots/dirpane.golden
@@ -0,0 +1,13 @@
+== snap dir-open grid=80x24 cursor=7,6
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/dirpane/cwd/top.txt Save Tty Collapse Del
+| 1 sub
+|
+| /tmp/pardes-snap/dirpane/cwd/sub/ Get Tty Collapse Del
+| 1 .hidden beta-gamma.txt inner.txt
+| 2 alpha.txt deeper/ zeta
+| 3
+== snap entry-open grid=80x24 cursor=7,9
+|8: /tmp/pardes-snap/dirpane/cwd/sub/inner.txt Save Tty Collapse Del
+|9: 1 inner-marker
diff --git a/test/snapshots/dirpane.snap b/test/snapshots/dirpane.snap
new file mode 100644
index 00000000..a884b12e
--- /dev/null
+++ b/test/snapshots/dirpane.snap
@@ -0,0 +1,27 @@
+# a look at a directory opens a pane named for it with a trailing /, its
+# entries in columns as acme's directory window lays them out: down each
+# column first, a directory's marked /, dotfiles shown. A look at an entry
+# opens it from that directory. No shell anywhere: nothing here races a prompt.
+dirmk sub
+dirmk sub/deeper
+file sub/inner.txt inner-marker
+file sub/.hidden x
+file sub/alpha.txt x
+file sub/beta-gamma.txt x
+file sub/zeta x
+file top.txt sub
+config Verbose off
+start 24 80 top.txt
+wait 8000 top.txt
+stable 700 20000
+press right @sub 4
+release right @sub 4
+wait 8000 inner.txt
+stable 700 20000
+snap dir-open
+# an entry, by its name alone: sub's inner.txt
+press right @inner.txt 7
+release right @inner.txt 7
+wait 8000 inner-marker
+stable 700 20000
+snap entry-open
diff --git a/test/snapshots/doccol.golden b/test/snapshots/doccol.golden
index 318ac564..0d71dffa 100644
--- a/test/snapshots/doccol.golden
+++ b/test/snapshots/doccol.golden
@@ -1,21 +1,25 @@
-== snap boot grid=100x31 cursor=7,3
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/doccol/cwd/a.txt Save Tty Del C /tmp/pardes-snap/doccol/cwd Save Tty Del Togglet
+== snap boot grid=100x31 cursor=7,4
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/doccol/cwd/a.txt Save Tty Colla /tmp/pardes-snap/doccol/cwd Tty+bash Save Mode F
+| pse Del ilter Collapse Del
| 1 AAA ls
| a.txt b.txt c.txt
-== snap two-docs grid=100x31 cursor=7,18
-|17: /tmp/pardes-snap/doccol/cwd/b.txt Save Tty Del C
-|18: 1 BBB
-|19: 2 B-TWO
-== snap moved grid=100x31 cursor=57,21
+== snap two-docs grid=100x31 cursor=7,19
+|17: /tmp/pardes-snap/doccol/cwd/b.txt Save Tty Colla
+|18: pse Del
+|19: 1 BBB
+|20: 2 B-TWO
+== snap moved grid=100x31 cursor=57,22
|17:
|18:
|19:
-|20: /tmp/pardes-snap/doccol/cwd/b.txt Save Tty Del C
-|21: 1 BBB
-|22: 2 B-TWO
-== snap worked grid=100x31 cursor=59,22
-== snap third grid=100x31 cursor=57,27
-|26: /tmp/pardes-snap/doccol/cwd/c.txt Save Tty Del C
-|27: 1 CCC
+|20: /tmp/pardes-snap/doccol/cwd/b.txt Save Tty Colla
+|21: pse Del
+|22: 1 BBB
+|23: 2 B-TWO
+== snap worked grid=100x31 cursor=59,23
+== snap third grid=100x31 cursor=57,28
+|26: /tmp/pardes-snap/doccol/cwd/c.txt Save Tty Colla
+|27: pse Del
+|28: 1 CCC
diff --git a/test/snapshots/doccol.snap b/test/snapshots/doccol.snap
index 677d5dff..bdc5db67 100644
--- a/test/snapshots/doccol.snap
+++ b/test/snapshots/doccol.snap
@@ -10,9 +10,15 @@ file c.txt CCC
# a FILE boots alone (and always outranked -n), so the shell whose ls output
# the looks below are clicked in is opened here: Alt-n stacks it below a.txt
# and Alt-c moves it into a column of its own on the right — the layout the
-# boot used to hand over — and SPC w h comes back to a.txt, which is where the
+# boot used to hand over — and SPC w h Enter comes back to a.txt, which is where the
# boot left focus. (`New`/`Newcol` open an empty +New scratch now, not a
# shell, so the shell has to be asked for by name.)
+# Builtins announce themselves by default, and an announcement is a band at
+# the top of the body -- which moves every row this script clicks. What the
+# verbs do is what is under test, not the announcement.
+config Verbose off
+# pins the pardes placement rule (Placement pardes), which it covers
+config Placement pardes
start 31 100 a.txt
wait 8000 AAA
stable 700 20000
@@ -20,13 +26,13 @@ key a-n
key a-c
wait 8000 c.txt
stable 700 20000
-key space w h
+key space w h enter
stable 400 5000
snap boot
# look b.txt in the shell's ls output: the second doc splits the first, so
# both docs are in the left column and a.txt is the lower-numbered pane
-press right 60 5
-release right 60 5
+press right 60 6
+release right 60 6
wait 10000 BBB
stable 700 20000
snap two-docs
@@ -39,17 +45,17 @@ stable 700 15000
snap moved
# use a.txt, then b.txt: what counts is the doc last USED, so a.txt being the
# most recent for a moment must not survive the click into b.txt
-press left 5 4
-release left 5 4
+press left 5 5
+release left 5 5
stable 400 5000
-press left 60 22
-release left 60 22
+press left 60 23
+release left 60 23
key j
stable 400 5000
snap worked
# look c.txt from the shell: below b.txt, in the right column
-press right 67 5
-release right 67 5
+press right 67 6
+release right 67 6
wait 10000 CCC
stable 700 20000
snap third
diff --git a/test/snapshots/dump.golden b/test/snapshots/dump.golden
index 18c30327..2704918d 100644
--- a/test/snapshots/dump.golden
+++ b/test/snapshots/dump.golden
@@ -4,14 +4,23 @@
.version = 1,
.screen = .{ .cols = 100, .rows = 31 },
.active = 0,
- .topbar = "Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill",
+ .topbar = "Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit",
.topbar_custom = null,
.theme = "orchard",
+ .locations_config = .{
+ .context = 0,
+ .tscontext = false,
+ .tslocations = true,
+ .layout = .stacked,
+ },
+ .tree_context_tag_style = true,
.columns = .{ .{
+ .serial = 1,
.tag = null,
.weight = 1,
.panes = .{ 0, 1 },
}, .{
+ .serial = 2,
.tag = null,
.weight = 1,
.panes = .{2},
@@ -19,62 +28,90 @@
.panes = .{
.{
.kind = .terminal,
- .tag = "/tmp/pardes-snap/dump/cwd Save Tty Del Togglettymode Filter Collapse",
- .body = "ls\nd.txt\n\n\n\n typed-marker\n\n\n\n\n\n\n\n",
+ .tag = "/tmp/pardes-snap/dump/cwd Tty+bash Save Mode Filter Collapse Del",
+ .body = "ls\nd.txt\n\n\n\n typed-marker\n\n\n\n\n\n\n",
.scroll = 0,
.cols = 48,
- .rows = 14,
+ .rows = 13,
.vweight = 1,
.collapsed = false,
+ .serial = 1,
.tag_tail = null,
+ .attached_to = null,
.terminal = .{
.cwd = "/tmp/pardes-snap/dump/cwd",
+ .shell = "",
+ .command = "",
+ .status = null,
.stream = "ls\nd.txt\n",
.stream_b64 = <elided>
+ .stream_is_screen = true,
.cursor = .{ .col = 2, .row = 2 },
+ .petscii = false,
},
.file = null,
.image = null,
},
.{
.kind = .terminal,
- .tag = "/tmp/pardes-snap/dump/cwd Save Tty Del Togglettymode Filter Collapse",
- .body = "ls\nd.txt\n\n\n\n\n\n\n\n\n\n\n",
+ .tag = "/tmp/pardes-snap/dump/cwd Tty+bash Save Mode Filter Collapse Del",
+ .body = "ls\nd.txt\n\n\n\n\n\n\n\n\n\n",
.scroll = 0,
.cols = 48,
- .rows = 13,
+ .rows = 12,
.vweight = 1,
.collapsed = false,
+ .serial = 2,
.tag_tail = null,
+ .attached_to = null,
.terminal = .{
.cwd = "/tmp/pardes-snap/dump/cwd",
+ .shell = "",
+ .command = "",
+ .status = null,
.stream = "ls\nd.txt\n",
.stream_b64 = <elided>
+ .stream_is_screen = true,
.cursor = .{ .col = 2, .row = 2 },
+ .petscii = false,
},
.file = null,
.image = null,
},
.{
.kind = .terminal,
- .tag = "/tmp/pardes-snap/dump/cwd Save Tty Del Togglettymode Filter Collapse",
- .body = "ls\nd.txt\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
+ .tag = "/tmp/pardes-snap/dump/cwd Tty+bash Save Mode Filter Collapse Del",
+ .body = "ls\nd.txt\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
.scroll = 0,
.cols = 48,
- .rows = 28,
+ .rows = 27,
.vweight = 1,
.collapsed = false,
+ .serial = 3,
.tag_tail = null,
+ .attached_to = null,
.terminal = .{
.cwd = "/tmp/pardes-snap/dump/cwd",
+ .shell = "",
+ .command = "",
+ .status = null,
.stream = "ls\nd.txt\n",
.stream_b64 = <elided>
+ .stream_is_screen = true,
.cursor = .{ .col = 2, .row = 2 },
+ .petscii = false,
},
.file = null,
.image = null,
},
},
.mounts = .{},
+ .settings = .{
+ "MessageAnimation off",
+ "MessageLinger 0",
+ "Shell bash",
+ },
+ .incl = .{ "/usr/include", "/usr/local/include" },
+ .carried = null,
}
== end file
diff --git a/test/snapshots/dump.snap b/test/snapshots/dump.snap
index 485c4932..29e7b09e 100644
--- a/test/snapshots/dump.snap
+++ b/test/snapshots/dump.snap
@@ -3,8 +3,8 @@ file d.txt x
start 31 100 -n 3
wait 8000 d.txt
stable 700 20000
-press left 5 9
-release left 5 9
+press left 5 10
+release left 5 10
stable 400 5000
key i
text typed-marker
diff --git a/test/snapshots/edit.golden b/test/snapshots/edit.golden
index 17c86be0..2ac4dfcf 100644
--- a/test/snapshots/edit.golden
+++ b/test/snapshots/edit.golden
@@ -1,14 +1,14 @@
== snap inserted grid=100x31 cursor=16,10
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/edit/cwd Save Tty Del Toggletty /tmp/pardes-snap/edit/cwd Save Tty Del Toggletty
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/edit/cwd Tty+bash Save Mode Fil /tmp/pardes-snap/edit/cwd Tty+bash Save Mode Fil
+| ter Collapse Del ter Collapse Del
| ls ls
| e.txt e.txt
|
|
|
|
-|
| hello-insert
|
|
@@ -16,38 +16,39 @@
|
|
|
-| /tmp/pardes-snap/edit/cwd Save Tty Del Toggletty
+| /tmp/pardes-snap/edit/cwd Tty+bash Save Mode Fil
+| ter Collapse Del
| ls
| e.txt
== style inserted grid=100x31
-|0: 0-70 #b2c3b8,#1d2824, 71-99 d,#1d2824,
-|1: 0-24 #becfc4,#26362d, 25-49 d,#26362d, 50-74 #b2c3b8,#1d2824, 75-99 d,#1d2824,
-|2: 0-1 #000000,#adcc91, 2-49 #becfc4,#26362d, 50-51 #ffffff,#4c6356, 52-99 #b2c3b8,#1d2824,
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|4: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|5: 0-0 d,#637f6a, 1-49 d,#0d1410, 50-50 d,#637f6a, 51-99 d,#0d1410,
-|6: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|7: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|8: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|9: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|10: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-15 #e5eee5,#0d1410, 16-49 d,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|11: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|12: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|13: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|14: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|15: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|16: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|17: 0-1 #ffffff,#4c6356, 2-49 #b2c3b8,#1d2824, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|18: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|19: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|20: 0-0 d,#637f6a, 1-49 d,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|21: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|22: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|23: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|24: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|25: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|26: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|27: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|28: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|29: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|30: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
+|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,
+|2: 0-1 d,#add38a, 2-27 #becfc4,#314738, 28-36 #dfbce5,#314738, 37-49 #becfc4,#314738, 50-51 #becfc4,#496656, 52-77 #b2c3b8,#1d2824, 78-86 #d3b0d9,#1d2824, 87-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,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
+|5: 0-0 d,#608269, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
+|6: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
+|7: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
+|8: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
+|9: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
+|10: 0-0 d,#608269, 1-3 d,#0d1410, 4-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
+|11: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
+|12: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
+|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-36 #d3b0d9,#1d2824, 37-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,
+|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-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,
+|26: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
+|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,
diff --git a/test/snapshots/emptycol.golden b/test/snapshots/emptycol.golden
new file mode 100644
index 00000000..bd00a2cd
--- /dev/null
+++ b/test/snapshots/emptycol.golden
@@ -0,0 +1,17 @@
+== snap newcol grid=100x24 cursor=52,1
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/emptycol/cwd/notes.txt Save Tty
+| Collapse Del
+| 1 one
+| 2 two
+== snap filled grid=100x24 cursor=54,6
+|2: /tmp/pardes-snap/emptycol/cwd/notes.txt Save Tty /tmp/pardes-snap/emptycol/cwd Tty+bash Save Mode
+|3: Collapse Del Filter Collapse Del
+|4: 1 one ls
+|5: 2 two notes.txt
+== snap emptied grid=100x24 cursor=52,1
+|2: /tmp/pardes-snap/emptycol/cwd/notes.txt Save Tty
+|3: Collapse Del
+|4: 1 one
+|5: 2 two
diff --git a/test/snapshots/emptycol.snap b/test/snapshots/emptycol.snap
new file mode 100644
index 00000000..edf61eed
--- /dev/null
+++ b/test/snapshots/emptycol.snap
@@ -0,0 +1,22 @@
+# A column can hold no pane, as acme's can (cols.c:186). Newcol makes one
+# empty, its tag over blank space and holding the keyboard; the next pane
+# made while it is the active column fills it whole (makenewwindow,
+# util.c:468-469); and a shell that exits there leaves it empty again, the
+# keyboard back on its tag.
+file notes.txt one\ntwo
+config Verbose off
+start 24 100 notes.txt
+wait 8000 notes.txt
+stable 700 20000
+key space c n
+stable 400 5000
+snap newcol
+key a-n
+stable 700 15000
+snap filled
+key c-b
+stable 400 5000
+text exit
+key enter
+stable 700 10000
+snap emptied
diff --git a/test/snapshots/exec-bigdrag.golden b/test/snapshots/exec-bigdrag.golden
index 6b86db0d..f3cd71b1 100644
--- a/test/snapshots/exec-bigdrag.golden
+++ b/test/snapshots/exec-bigdrag.golden
@@ -1,61 +1,61 @@
== snap alive grid=200x61 cursor=119,38
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/exec-bigdrag/cwd Save Tty Del Togglettymode Filter Collapse /tmp/pardes-snap/exec-bigdrag/cwd Save Tty Del Togglettymode Filter Collapse
-| ls bash: line: command not found
-| big.txt 4line 2705line 2706line 2707line 2708line 2709line 2710line 2711line 2712line 2713line 2714lin
-| bash: 4line: command not found
-| 15line 2716line 2717line 2718line 2719line 2720line 2721line 2722line 2723line 2724line 2725li
-| bash: 15line: command not found
-| 726line 2727line 2728line 2729line 2730line 2731line 2732line 2733line 2734line 2735line 2736l
-| bash: 726line: command not found
-| 2737line 2738line 2739line 2740line 2741line 2742line 2743line 2744line 2745line 2746line 2747
-| bash: 2737line: command not found
-| 2748line 2749line 2750line 2751line 2752line 2753line 2754line 2755line 2756line 2757line 275
-| bash: 2748line: command not found
-| e 2759line 2760line 2761line 2762line 2763line 2764line 2765line 2766line 2767line 2768line 27
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/exec-bigdrag/cwd Tty+bash Save Mode Filter Collapse Del /tmp/pardes-snap/exec-bigdrag/cwd Tty+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
+| ne
+| bash: 2813line: command not found
+| 2824line 2825line 2826line 2827line 2828line 2829line 2830line 2831line 2832line 2833line 2834l
+| in
+| bash: 2824line: command not found
+| e 2835line 2836line 2837line 2838line 2839line 2840line 2841line 2842line 2843line 2844line 2845
+| li
| bash: e: command not found
-| ne 2770line 2771line 2772line 2773line 2774line 2775line 2776line 2777line 2778line 2779line 2
+| ne 2846line 2847line 2848line 2849line 2850line 2851line 2852line 2853line 2854line 2855line 285
+| 6l
| bash: ne: command not found
-| ine 2781line 2782line 2783line 2784line 2785line 2786line 2787line 2788line 2789line 2790line
+| ine 2857line 2858line 2859line 2860line 2861line 2862line 2863line 2864line 2865line 2866line 28
+| 67
| bash: ine: command not found
-| line 2792line 2793line 2794line 2795line 2796line 2797line 2798line 2799line 2800line 2801line
+| line 2868line 2869line 2870line 2871line 2872line 2873line 2874line 2875line 2876line 2877line 2
+| 87
| bash: line: command not found
-| 2line 2803line 2804line 2805line 2806line 2807line 2808line 2809line 2810line 2811line 2812lin
-| bash: 2line: command not found
-| 13line 2814line 2815line 2816line 2817line 2818line 2819line 2820line 2821line 2822line 2823li
-| bash: 13line: command not found
-| 824line 2825line 2826line 2827line 2828line 2829line 2830line 2831line 2832line 2833line 2834l
-| bash: 824line: command not found
-| 2835line 2836line 2837line 2838line 2839line 2840line 2841line 2842line 2843line 2844line 2845
-| bash: 2835line: command not found
-| 2846line 2847line 2848line 2849line 2850line 2851line 2852line 2853line 2854line 2855line 285
-| bash: 2846line: command not found
-| /tmp/pardes-snap/exec-bigdrag/cwd Save Tty Del Togglettymode Filter Collapse e 2857line 2858line 2859line 2860line 2861line 2862line 2863line 2864line 2865line 2866line 28
-| ls bash: e: command not found
-| big.txt ne 2868line 2869line 2870line 2871line 2872line 2873line 2874line 2875line 2876line 2877line 2
-| bash: ne: command not found
-| ine 2879line 2880line 2881line 2882line 2883line 2884line 2885line 2886line 2887line 2888line
-| bash: ine: command not found
-| liecho alive-o''kne 2890line 2891line 2892line 2893line 2894line 2895line 2896line 2897line 2898li
-| bash: line: command not found
-| 0line 2901line 2902line 2903line 2904line 2905line 2906line 2907line 2908line 2909line 2910lin
-| bash: 0line: command not found
-| 11line 2912line 2913line 2914line 2915line 2916line 2917line 2918line 2919line 2920line 2921li
-| bash: 11line: command not found
-| 922line 2923line 2924line 2925line 2926line 2927line 2928line 2929line 2930line 2931line 2932l
-| bash: 922line: command not found
-| 2933line 2934line 2935line 2936line 2937line 2938line 2939line 2940line 2941line 2942line 2943
-| bash: 2933line: command not found
-| 2944line 2945line 2946line 2947line 2948line 2949line 2950line 2951line 2952line 2953line 295
-| bash: 2944line: command not found
-| e 2955line 2956line 2957line 2958line 2959line 2960line 2961line 2962line 2963line 2964line 29
+| 8line 2879line 2880line 2881line 2882line 2883line 2884line 2885line 2886line 2887line 2888line
+| 28
+| bash: 8line: command not found
+| 89line 2890line 2891line 2892line 2893line 2894line 2895line 2896line 2897line 2898line 2899line
+| 2
+| bash: 89line: command not found
+| /tmp/pardes-snap/exec-bigdrag/cwd Tty+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
+| in
+| bash: 2922line: command not found
+| e 2933line 2934line 2935line 2936line 2937line 2938line 2939line 2940line 2941line 2942line 2943
+| li
| bash: e: command not found
-| ne 2966line 2967line 2968line 2969line 2970line 2971line 2972line 2973line 2974line 2975line 2
+| ne 2944line 2945line 2946line 2947line 2948line 2949line 2950line 2951line 2952line 2953line 295
+| 4l
| bash: ne: command not found
-| ine 2977line 2978line 2979line 2980line 2981line 2982line 2983line 2984line 2985line 2986line
+| ine 2955line 2956line 2957line 2958line 2959line 2960line 2961line 2962line 2963line 2964line 29
+| 65
| bash: ine: command not found
-| line 2988line 2989line 2990line 2991line 2992line 2993line 2994line 2995line 2996line 2997line
+| line 2966line 2967line 2968line 2969line 2970line 2971line 2972line 2973line 2974line 2975line 2
+| 97
| bash: line: command not found
+| 6line 2977line 2978line 2979line 2980line 2981line 2982line 2983line 2984line 2985line 2986line
+| 29
+| bash: 6line: command not found
+| 87line 2988line 2989line 2990line 2991line 2992line 2993line 2994line 2995line 2996line 2997line
+| bash: 87line: command not found
| echo alive-o''k
| alive-ok
diff --git a/test/snapshots/exec-bigdrag.snap b/test/snapshots/exec-bigdrag.snap
index ce7aef25..35881190 100644
--- a/test/snapshots/exec-bigdrag.snap
+++ b/test/snapshots/exec-bigdrag.snap
@@ -3,6 +3,10 @@
# 64-slot effect ring and panic the core (assert in emit). Needs a big grid:
# the selection must exceed 64*64 bytes, more than any 30x100 pane can hold.
lines big.txt 3000
+# Builtins announce themselves by default, and an announcement is a band at
+# the top of the body -- which moves every row this script clicks. What the
+# verbs do is what is under test, not the announcement.
+config Verbose off
start 61 200 -n 3
wait 8000 big.txt
stable 500 20000
diff --git a/test/snapshots/exec.golden b/test/snapshots/exec.golden
index 849c8e0e..30473c9e 100644
--- a/test/snapshots/exec.golden
+++ b/test/snapshots/exec.golden
@@ -1,9 +1,9 @@
-== snap exec grid=100x31 cursor=16,8
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/exec/cwd Save Tty Del Toggletty /tmp/pardes-snap/exec/cwd Save Tty Del Toggletty
-| ls ls
-| e.txt e.txt
+== snap exec grid=140x31 cursor=16,8
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/exec/cwd Tty+bash Save Mode Filter Collapse Del /tmp/pardes-snap/exec/cwd Tty+bash Save Mode Filter Collapse Del
+| ls Exec ls
+| e.txt e.txt
|
|
|
@@ -16,20 +16,23 @@
|
|
|
-| /tmp/pardes-snap/exec/cwd Save Tty Del Toggletty
+| /tmp/pardes-snap/exec/cwd Tty+bash Save Mode Filter Collapse Del
| ls
| e.txt
-== snap kept grid=100x31 cursor=6,3
-|3: ZZARG ls
-|4: ./c.sh e.txt
-|9:
-== snap chord grid=100x31 cursor=6,3
-|9: CHORDARG:ZZARG
-== snap deleted grid=100x31 cursor=4,5
-|3: ls ls
-|4: e.txt e.txt
+== 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
+== snap deleted grid=140x31 cursor=4,5
+|3: ls ls
+|4: e.txt e.txt
+|5:
+|6:
|17:
|18:
|19:
diff --git a/test/snapshots/exec.snap b/test/snapshots/exec.snap
index 38f74e35..a0820c19 100644
--- a/test/snapshots/exec.snap
+++ b/test/snapshots/exec.snap
@@ -2,7 +2,7 @@
# the middle drag captures the kept left selection as a trailing argument;
# middle-click Del on the pane tag closes the pane
file e.txt x
-start 31 100 -n 3
+start 31 140 -n 3
wait 8000 e.txt
stable 700 20000
press left 5 9
diff --git a/test/snapshots/fileedit.golden b/test/snapshots/fileedit.golden
index bf0eccdb..b484177b 100644
--- a/test/snapshots/fileedit.golden
+++ b/test/snapshots/fileedit.golden
@@ -1,11 +1,11 @@
== snap edited grid=150x31 cursor=17,7
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/fileedit/cwd Save Tty Del Togglettymode Filter Collapse /tmp/pardes-snap/fileedit/cwd Save Tty Del Togglettymode Filter Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/fileedit/cwd Tty+bash Save Mode Filter Collapse Del /tmp/pardes-snap/fileedit/cwd Tty+bash Save Mode Filter Collapse Del
| ls ls
| f.txt f.txt
|
-| /tmp/pardes-snap/fileedit/cwd/f.txt * Save Tty Del Collapse
+| */tmp/pardes-snap/fileedit/cwd/f.txt Save Tty Collapse Del
| 1 liEDIT''MEne 1
| 2 line 2
| 3 line 3
@@ -16,7 +16,7 @@
| 8 line 8
| 9 line 9
| 10 line 10
-| /tmp/pardes-snap/fileedit/cwd Save Tty Del Togglettymode Filter Collapse
+| /tmp/pardes-snap/fileedit/cwd Tty+bash Save Mode Filter Collapse Del
| ls
| f.txt
== snap deleted grid=150x31 cursor=7,8
diff --git a/test/snapshots/filewatch.golden b/test/snapshots/filewatch.golden
index 6eca9bca..ebd68fee 100644
--- a/test/snapshots/filewatch.golden
+++ b/test/snapshots/filewatch.golden
@@ -1,22 +1,24 @@
-== snap edited grid=210x31 cursor=15,3
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/filewatch/cwd/w.txt * Save Tty Del Collapse /tmp/pardes-snap/filewatch/cwd Save Tty Del Togglettymode Filter Collapse
-| 1 liMYEDITne 1 ls
-| 2 line 2 sub w.txt
+== snap edited grid=210x31 cursor=15,7
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/filewatch/cwd Tty+bash Save Mode Filter Collapse Del
+| ls
+| sub w.txt
+|
+| */tmp/pardes-snap/filewatch/cwd/w.txt Save Tty Collapse Del
+| 1 liMYEDITne 1
+| 2 line 2
| 3 /tmp/pardes-snap/filewatch/cwd/sub/s.txt
| 4 line 4
| 5 line 5
-| 6 line 6 w.txt
+| 6 line 6
| 7 line 7
| 8 line 8
| 9 line 9
| 10 line 10
| 11 line 11
| 12 line 12
-| 13
-|
-| /tmp/pardes-snap/filewatch/cwd/sub/s.txt Save Tty Del Collapse
+| /tmp/pardes-snap/filewatch/cwd/sub/s.txt Save Tty Collapse Del
| 1 line 1
| 2 line 2
| 3 line 3
@@ -26,47 +28,15 @@
| 7 line 7
| 8 line 8
| 9
-== snap reloaded grid=210x31 cursor=15,3
-|2: /tmp/pardes-snap/filewatch/cwd/w.txt Save Tty Del Collapse /tmp/pardes-snap/filewatch/cwd Save Tty Del Togglettymode Filter Collapse
-|3: 1 EXTERNAL ls
-|4: 2 sub w.txt
-|5:
-|6:
-|7:
-|8: w.txt
-|9:
-|10:
-|11:
-|12:
-|13:
-|14:
-|15:
-|16: --:--:-- reloaded /tmp/pardes-snap/filewatch/cwd/w.txt
-== snap reloaded_sub grid=210x31 cursor=15,3
-|18: 1 RENAMED
-|19: 2
-|20:
-|21:
+== 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)
+== snap reloaded_sub grid=210x31 cursor=15,7
+|20: 1 RENAMED --:--:-- reloaded /tmp/pardes-snap/filewatch/cwd/sub/s.txt
+|21: 2
|22:
|23:
|24:
|25:
|26:
-|30: --:--:-- reloaded /tmp/pardes-snap/filewatch/cwd/sub/s.txt
-== snap undone grid=210x31 cursor=15,3
-|2: /tmp/pardes-snap/filewatch/cwd/w.txt * Save Tty Del Collapse /tmp/pardes-snap/filewatch/cwd Save Tty Del Togglettymode Filter Collapse
-|3: 1 liMYEDITne 1 ls
-|4: 2 line 2 sub w.txt
-|5: 3 /tmp/pardes-snap/filewatch/cwd/sub/s.txt
-|6: 4 line 4
-|7: 5 line 5
-|8: 6 line 6 w.txt
-|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
-|16:
-|30:
+|27:
+|28:
diff --git a/test/snapshots/filewatch.snap b/test/snapshots/filewatch.snap
index a27740f0..6664519f 100644
--- a/test/snapshots/filewatch.snap
+++ b/test/snapshots/filewatch.snap
@@ -1,6 +1,6 @@
-# external file updates: a write from outside pardes lands in the open pane,
-# and Undo brings the unsaved edit back. That is the whole contract — the
-# update is committed like any other edit, so nothing has to be merged.
+# external file updates: a write from outside pardes lands in an open pane
+# that has no unsaved edits, committed like any other edit; a pane WITH
+# unsaved edits keeps them and says the file changed on disk (File.changed).
#
# The writer must be a STRANGER to the editor. This script used to have a
# pardes PANE run the write, which proved much less than it looked: that
@@ -18,6 +18,10 @@
dirmk sub
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
lines sub/s.txt 8
+# Builtins announce themselves by default, and an announcement is a band at
+# the top of the body -- which moves every row this script clicks. What the
+# verbs do is what is under test, not the announcement.
+config Verbose off
start 31 210 -n 1
wait 8000 w.txt
stable 700 20000
@@ -35,13 +39,13 @@ wait 10000 line 4
stable 700 15000
# ...and open sub/s.txt from the path sitting on line 3 of that pane, so the
# second watched pane is in a DIFFERENT directory from the first
-press right 20 6
-release right 20 6
+press right 20 10
+release right 20 10
wait 10000 line 8
stable 700 15000
# an UNSAVED edit on line 1 of w.txt
-press left 10 4
-release left 10 4
+press left 10 8
+release left 10 8
stable 400 5000
key i
text MYEDIT
@@ -50,18 +54,13 @@ settle 100
stable 400 5000
snap edited
# ---- from here to `snap reloaded_sub`, pardes is sent NOTHING ----
+# w.txt has the unsaved edit: it is kept, and the change is said
run printf 'EXTERNAL\n' > w.txt
-wait 10000 EXTERNAL
+wait 10000 changed on disk
stable 700 10000
-snap reloaded
+snap kept
+# sub/s.txt has none: it takes the new text
run printf 'RENAMED\n' > sub/t && mv sub/t sub/s.txt
wait 10000 RENAMED
stable 700 10000
snap reloaded_sub
-# back in the file pane: one undo and the unsaved edit is there again
-press left 10 4
-release left 10 4
-stable 400 5000
-key u
-stable 400 5000
-snap undone
diff --git a/test/snapshots/find.golden b/test/snapshots/find.golden
index a8d072f3..e5c11193 100644
--- a/test/snapshots/find.golden
+++ b/test/snapshots/find.golden
@@ -1,123 +1,62 @@
== snap group grid=120x41 cursor=7,3
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/find/cwd/here.txt Save Tty Del Collapse
-| 1 Find
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-| SPC f
-== snap armed grid=120x41 cursor=9,40
-|40: Find /
-== snap typing grid=120x41 cursor=12,40
-|40: Find /zqm
-== snap results grid=120x41 cursor=7,3
-|37: /tmp/pardes-snap/find/cwd/+Search Save Tty Del Collapse
-|38: 1 sub/ZQMARK-beta.txt
-|39: 2 sub/nest/zqmark-gamma.txt
-|40: 3 zqmark-alpha.txt
-== snap first grid=120x41 cursor=7,21
-|20: /tmp/pardes-snap/find/cwd/sub/ZQMARK-beta.txt Save Tty Del Collapse
-|21: 1 beta body
-== style first grid=120x41
-|0: 0-70 #b2c3b8,#1d2824, 71-119 d,#1d2824,
-|1: 0-24 #becfc4,#26362d, 25-119 d,#26362d,
-|2: 0-1 #ffffff,#4c6356, 2-57 #b2c3b8,#1d2824, 58-119 d,#1d2824,
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-119 d,#0d1410,
-|4: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-119 d,#0d1410,
-|5: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-119 d,#0d1410,
-|6: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-119 d,#0d1410,
-|7: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-119 d,#0d1410,
-|8: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-119 d,#0d1410,
-|9: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-119 d,#0d1410,
-|10: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-119 d,#0d1410,
-|11: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-119 d,#0d1410,
-|12: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-119 d,#0d1410,
-|13: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-119 d,#0d1410,
-|14: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-119 d,#0d1410,
-|15: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-119 d,#0d1410,
-|16: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-119 d,#0d1410,
-|17: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-119 d,#0d1410,
-|18: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-119 d,#0d1410,
-|19: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-119 d,#0d1410,
-|20: 0-1 #000000,#adcc91, 2-68 #becfc4,#26362d, 69-119 d,#26362d,
-|21: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #616f64,#0d1410,b 7-15 #e5eee5,#0d1410, 16-119 d,#0d1410,
-|22: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-119 d,#0d1410,
-|23: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-119 d,#0d1410,
-|24: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-119 d,#0d1410,
-|25: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-119 d,#0d1410,
-|26: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-119 d,#0d1410,
-|27: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-119 d,#0d1410,
-|28: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-119 d,#0d1410,
-|29: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-119 d,#0d1410,
-|30: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-119 d,#0d1410,
-|31: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-119 d,#0d1410,
-|32: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-119 d,#0d1410,
-|33: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-119 d,#0d1410,
-|34: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-119 d,#0d1410,
-|35: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-119 d,#0d1410,
-|36: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-119 d,#0d1410,
-|37: 0-1 #ffffff,#4c6356, 2-56 #b2c3b8,#1d2824, 57-119 d,#1d2824,
-|38: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-25 #e5eee5,#0d1410, 26-119 d,#0d1410,
-|39: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-31 #e5eee5,#0d1410, 32-119 d,#0d1410,
-|40: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-22 #e5eee5,#0d1410, 23-119 d,#0d1410,
-== snap second grid=120x41 cursor=7,30
-|29: /tmp/pardes-snap/find/cwd/sub/nest/zqmark-gamma.txt Save Tty Del Collapse
-|30: 1 gamma body
-== snap third grid=120x41 cursor=7,34
-|33: /tmp/pardes-snap/find/cwd/zqmark-alpha.txt Save Tty Del Collapse
-|34: 1 alpha body
-|38: 2 sub/nest/zqmark-gamma.txt
-|39: 3 zqmark-alpha.txt
-|40: 4
-== snap back grid=120x41 cursor=7,30
-|38: 1 sub/ZQMARK-beta.txt
-|39: 2 sub/nest/zqmark-gamma.txt
-|40: 3 zqmark-alpha.txt
-== snap word grid=120x41 cursor=7,30
-|19: Find /
-== snap cancel grid=120x41 cursor=7,39
-== snap nomatch grid=120x41 cursor=7,39
-|2: /tmp/pardes-snap/find/cwd/here.txt Save Tty Del Collapse Find /
-|18: /tmp/pardes-snap/find/cwd/+Search Save Tty Del Collapse
-|19: 1
-|38: 2 sub/nest/zqmark-gamma.txt
-|39: 3 zqmark-alpha.txt
-|40: 4
-== snap refit grid=120x41 cursor=7,3
-== snap topbar grid=120x41 cursor=12,34
-|35: /tmp/pardes-snap/find/cwd/+Search Save Tty Del Collapse
-|36: 1 zqmark-alpha.txt
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/find/cwd/here.txt Save Tty Collapse 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 Unattach Del
+|32: /tmp/pardes-snap/find/cwd/sub/ZQMARK-beta.txt Save Tty Collapse 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:
+== snap cancel grid=120x41 cursor=7,3
+|13:
+|14:
+|22: +Search 2/3 Save Unattach 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:
diff --git a/test/snapshots/find.snap b/test/snapshots/find.snap
index fbd585f7..17470040 100644
--- a/test/snapshots/find.snap
+++ b/test/snapshots/find.snap
@@ -1,17 +1,18 @@
-# The Find builtin (SPC f f) = `fd`, in-core: it arms the SAME tag input `/`
-# does, but Enter walks the pane's DIRECTORY instead of its text and writes one
-# matching path per row into a "+Search" OUTPUT BUFFER. Every row is therefore
-# an ordinary look target, which is the whole point: n/N SELECT the next/prev
-# one with no code of their own, and the look chord — Enter, the same one that
-# opens a path anywhere else — is what OPENS it. Focus then follows the file
-# that opened, but the look was made FROM the results buffer, so the next n
-# resumes stepping that same list. The walk skips .git, matches the NAME
-# case-insensitively, and sorts (readdir order is not stable). `SPC f s` is
-# Save, which moved out of `w` to make this group.
+# SPC f f: a query pane under the pane (Query.zig), line 1 `Find `, typed
+# into. The files below the pane's directory are listed once, on the disk
+# engine's worker (rg --files when it is on PATH, else the sorted walk: both
+# pass over .git), and each key scores them fuzzily (pick's scorer), the best
+# first, the matched letters tinted. The current one is shown in the
+# +Preview under the query pane, born with it so nothing moves later;
+# Ctrl-n / Ctrl-p step it, never the pointer. Enter makes the preview the
+# file's pane where it stands. Esc while typing closes the query pane and
+# gives its rows back. A query that matches nothing is a count of 0, not an
+# exit. B2 on `Find` with a selection asks with that word, the keyboard
+# staying in the text.
dirmk sub
dirmk sub/nest
dirmk .git
-file here.txt Find
+file here.txt Find zqm
file zqmark-alpha.txt alpha body
file sub/ZQMARK-beta.txt beta body
file sub/nest/zqmark-gamma.txt gamma body
@@ -20,111 +21,51 @@ file .git/zqmark-hidden.txt hidden body
start 41 120 here.txt
wait 8000 here.txt
stable 700 20000
-# SPC f is a GROUP now (Find + New + Save): the indicator stays on the tag
+# SPC f is a group (Find, New, Save, Recent, Grep): the indicator waits
key space
key f
stable 400 5000
snap group
-# ... and the second f arms the input, marker visible in the tag
+# the second f opens the query pane: every file listed, line 1 `Find `
key f
-stable 400 5000
+wait 10000 zqmark-alpha.txt
+stable 700 15000
snap armed
text zqm
-stable 400 5000
-snap typing
-# Enter walks: three hits, sorted, .git's copy skipped, other.txt not matched
-key enter
-wait 10000 zqmark-alpha.txt
stable 700 15000
-snap results
-# n SELECTS row 1 and Enter looks it — a path, so the file OPENS. The look
-# comes FROM the results buffer, but that is an output pane and not a
-# document, so the file joins the docs above it (below here.txt) instead of
-# stacking under the list: the +Search stays at the foot of the column.
-key n
-key enter
+snap typing
+# the next one current, its text in the preview
+key c-n
wait 10000 beta body
stable 700 15000
-snap first
-snapstyle first
-key n
-key enter
-wait 10000 gamma body
-stable 700 15000
-snap second
-key n
-key enter
-wait 10000 alpha body
-stable 700 15000
-snap third
-# N walks back up one row; Enter looks it, and the file is already open, so
-# the look just focuses it
-key N
+snap next
+# Enter: the preview is that file's pane now, where it stood
key enter
stable 700 15000
-snap back
-# executing the WORD Find (middle-click in a body) arms the same input — the
-# enum IS the dispatch — and Esc abandons it, restoring the tag tail
-press middle 8 4
-release middle 8 4
-stable 700 10000
-snap word
-key esc
-settle 100
-stable 400 5000
-snap cancel
-# every search is asked from a PANE, and both a look and now a step leave you
-# somewhere else — so click back into here.txt first. That is not bookkeeping:
-# a search never refills the buffer it was asked FROM (fillResults skips it),
-# so `owned by here.txt` is the whole premise of the two steps below.
+snap promoted
+# a second Find from here.txt reuses its query pane; nothing found is 0
press left 8 4
release left 8 4
stable 400 5000
-# a no-match walk opens an empty list of its own. It is exactly as tall as its
-# results — one blank row plus its tag — and it stacks above the earlier one,
-# whose height is untouched.
key space
key f
key f
text zzqq
-key enter
-stable 700 10000
-# n does not stop on the empty list, because the walk is a RING across panes
-# rather than one buffer's rows: with nothing look-able here it carries on
-# into the list that DOES have some — the zqm one — and resumes it one row
-# past where the N above left it. Nothing opens; only the selection moved.
-key n
-stable 400 5000
+stable 700 15000
snap nomatch
-# ... and asking for `zqm` AGAIN re-arms the list it ALREADY filled instead of
-# stacking an identical twin under the empty one — even though the step above
-# left the cursor sitting in the zqm list, so the reuse is by what a buffer
-# HOLDS (this search, this pattern, this directory), not by which one anything
-# happens to point at. Asked from here.txt again (the click, as above), and
-# the LIST it rewrites is therefore the `nomatch` frame unchanged, down to the
-# byte — only the cursor comes back with it.
-press left 8 4
-release left 8 4
-stable 400 5000
-key space
-key f
-key f
-text zqm
-key enter
-wait 10000 zqmark-alpha.txt
+# Esc: the kept rows of the last query are back
+key esc
+settle 100
stable 700 15000
-snap refit
-# Find is a TOPBAR word too: the same
-# builtin the leader path runs, reached with the mouse. Chorded — a selection
-# held when it runs IS the argument — so dragging over `alpha` and clicking
-# Find walks for that name with nothing typed and no input armed. Row 34 is
-# `alpha body`: the three found files stack in the order the looks above
-# OPENED them, which is beta, gamma, alpha down the column.
-press left 8 35
-drag left 13 35
-release left 13 35
+snap cancel
+# B2 on Find with `zqm` selected in here.txt: the query pane under it, the
+# keyboard still in here.txt
+press left 13 4
+drag left 15 4
+release left 15 4
stable 400 5000
press middle @Find 1
release middle @Find 1
+wait 10000 Find zqm
stable 700 15000
snap topbar
diff --git a/test/snapshots/fsearch.golden b/test/snapshots/fsearch.golden
index 6fdbb42f..b195e7a5 100644
--- a/test/snapshots/fsearch.golden
+++ b/test/snapshots/fsearch.golden
@@ -1,11 +1,11 @@
== snap opened grid=180x31 cursor=7,7
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/fsearch/cwd Save Tty Del Togglettymode Filter Collapse /tmp/pardes-snap/fsearch/cwd Save Tty Del Togglettymode Filter Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/fsearch/cwd Tty+bash Save Mode Filter Collapse Del /tmp/pardes-snap/fsearch/cwd Tty+bash Save Mode Filter Collapse Del
| ls ls
| g.txt g.txt
|
-| /tmp/pardes-snap/fsearch/cwd/g.txt Save Tty Del Collapse
+| /tmp/pardes-snap/fsearch/cwd/g.txt Save Tty Collapse Del
| 1 l1
| 2 MARK a
| 3 l3
@@ -16,79 +16,72 @@
| 8 l8
| 9 l9
| 10 MARK c
-| /tmp/pardes-snap/fsearch/cwd Save Tty Del Togglettymode Filter Collapse
+| /tmp/pardes-snap/fsearch/cwd Tty+bash Save Mode Filter Collapse Del
| ls
| g.txt
-== snap typing grid=180x31 cursor=8,16
-|16: /MARK
-== snap results grid=180x31 cursor=10,8
-|13: /tmp/pardes-snap/fsearch/cwd/+Search Save Tty Del Collapse
-|14: 1 g.txt:2:1-4 MARK a
-|15: 2 g.txt:6:1-4 MARK b
-|16: 3 g.txt:10:1-4 MARK c
-== style results grid=180x31
-|0: 0-70 #b2c3b8,#1d2824, 71-179 d,#1d2824,
-|1: 0-24 #becfc4,#26362d, 25-89 d,#26362d, 90-114 #b2c3b8,#1d2824, 115-179 d,#1d2824,
-|2: 0-1 #ffffff,#4c6356, 2-72 #b2c3b8,#1d2824, 73-89 d,#1d2824, 90-91 #ffffff,#4c6356, 92-162 #b2c3b8,#1d2824, 163-179 d,#1d2824,
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-89 #e5eee5,#0d1410, 90-90 d,#637f6a, 91-91 d,#0d1410, 92-179 #e5eee5,#0d1410,
-|4: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-89 #e5eee5,#0d1410, 90-90 d,#637f6a, 91-91 d,#0d1410, 92-179 #e5eee5,#0d1410,
-|5: 0-0 d,#637f6a, 1-89 d,#0d1410, 90-90 d,#637f6a, 91-179 d,#0d1410,
-|6: 0-1 #000000,#adcc91, 2-57 #becfc4,#26362d, 58-89 d,#26362d, 90-90 d,#637f6a, 91-91 d,#0d1410, 92-179 #e5eee5,#0d1410,
-|7: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-8 #e5eee5,#0d1410, 9-89 d,#0d1410, 90-90 d,#637f6a, 91-91 d,#0d1410, 92-179 #e5eee5,#0d1410,
-|8: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #616f64,#0d1410,b 7-10 #f5f7ee,#405d4b, 11-12 #e5eee5,#0d1410, 13-89 d,#0d1410, 90-90 d,#637f6a, 91-91 d,#0d1410, 92-179 #e5eee5,#0d1410,
-|9: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-8 #e5eee5,#0d1410, 9-89 d,#0d1410, 90-90 d,#637f6a, 91-91 d,#0d1410, 92-179 #e5eee5,#0d1410,
-|10: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-8 #e5eee5,#0d1410, 9-89 d,#0d1410, 90-90 d,#637f6a, 91-91 d,#0d1410, 92-179 #e5eee5,#0d1410,
-|11: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-8 #e5eee5,#0d1410, 9-89 d,#0d1410, 90-90 d,#637f6a, 91-91 d,#0d1410, 92-179 #e5eee5,#0d1410,
-|12: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-89 d,#0d1410, 90-90 d,#637f6a, 91-91 d,#0d1410, 92-179 #e5eee5,#0d1410,
-|13: 0-1 #ffffff,#4c6356, 2-59 #b2c3b8,#1d2824, 60-89 d,#1d2824, 90-90 d,#637f6a, 91-91 d,#0d1410, 92-179 #e5eee5,#0d1410,
-|14: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-17 #59675c,#0d1410, 18-18 #e5eee5,#0d1410, 19-22 #f7e4a5,#57472a, 23-24 #e5eee5,#0d1410, 25-89 d,#0d1410, 90-90 d,#637f6a, 91-91 d,#0d1410, 92-179 #e5eee5,#0d1410,
-|15: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-17 #59675c,#0d1410, 18-18 #e5eee5,#0d1410, 19-22 #f7e4a5,#57472a, 23-24 #e5eee5,#0d1410, 25-89 d,#0d1410, 90-90 d,#637f6a, 91-91 d,#0d1410, 92-179 #e5eee5,#0d1410,
-|16: 0-0 d,#152019, 1-1 d,#0d1410, 2-18 #59675c,#0d1410, 19-19 #e5eee5,#0d1410, 20-23 #f7e4a5,#57472a, 24-25 #e5eee5,#0d1410, 26-89 d,#0d1410, 90-90 d,#637f6a, 91-91 d,#0d1410, 92-179 #e5eee5,#0d1410,
-|17: 0-1 #ffffff,#4c6356, 2-72 #b2c3b8,#1d2824, 73-89 d,#1d2824, 90-90 d,#637f6a, 91-91 d,#0d1410, 92-179 #e5eee5,#0d1410,
-|18: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-89 #e5eee5,#0d1410, 90-90 d,#637f6a, 91-91 d,#0d1410, 92-179 #e5eee5,#0d1410,
-|19: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-89 #e5eee5,#0d1410, 90-90 d,#637f6a, 91-91 d,#0d1410, 92-179 #e5eee5,#0d1410,
-|20: 0-0 d,#637f6a, 1-89 d,#0d1410, 90-90 d,#637f6a, 91-91 d,#0d1410, 92-179 #e5eee5,#0d1410,
-|21: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-89 #e5eee5,#0d1410, 90-90 d,#637f6a, 91-91 d,#0d1410, 92-179 #e5eee5,#0d1410,
-|22: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-89 #e5eee5,#0d1410, 90-90 d,#637f6a, 91-91 d,#0d1410, 92-179 #e5eee5,#0d1410,
-|23: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-89 #e5eee5,#0d1410, 90-90 d,#637f6a, 91-91 d,#0d1410, 92-179 #e5eee5,#0d1410,
-|24: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-89 #e5eee5,#0d1410, 90-90 d,#637f6a, 91-91 d,#0d1410, 92-179 #e5eee5,#0d1410,
-|25: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-89 #e5eee5,#0d1410, 90-90 d,#637f6a, 91-91 d,#0d1410, 92-179 #e5eee5,#0d1410,
-|26: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-89 #e5eee5,#0d1410, 90-90 d,#637f6a, 91-91 d,#0d1410, 92-179 #e5eee5,#0d1410,
-|27: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-89 #e5eee5,#0d1410, 90-90 d,#637f6a, 91-91 d,#0d1410, 92-179 #e5eee5,#0d1410,
-|28: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-89 #e5eee5,#0d1410, 90-90 d,#637f6a, 91-91 d,#0d1410, 92-179 #e5eee5,#0d1410,
-|29: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-89 #e5eee5,#0d1410, 90-90 d,#637f6a, 91-91 d,#0d1410, 92-179 #e5eee5,#0d1410,
-|30: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-89 #e5eee5,#0d1410, 90-90 d,#637f6a, 91-91 d,#0d1410, 92-179 #e5eee5,#0d1410,
-== snap second grid=180x31 cursor=10,10
-|7: 3 l3
-|8: 4 l4
-|9: 5 l5
-|10: 6 MARK b
-|11: 7 l7
-|12: 8 l8
-== snap third grid=180x31 cursor=10,10
-|7: 7 l7
-|8: 8 l8
-|9: 9 l9
-|10: 10 MARK c
-|11: 11 l11
-|12: 12 l12
-|14: 2 g.txt:6:1-4 MARK b
-|15: 3 g.txt:10:1-4 MARK c
-|16: 4
-== snap back grid=180x31 cursor=10,10
-|7: 3 l3
-|8: 4 l4
-|9: 5 l5
-|10: 6 MARK b
-|11: 7 l7
-|12: 8 l8
-|14: 1 g.txt:2:1-4 MARK a
-|15: 2 g.txt:6:1-4 MARK b
-|16: 3 g.txt:10:1-4 MARK c
-== snap cancel grid=180x31 cursor=10,10
-== snap nomatch grid=180x31 cursor=7,15
-|11: /tmp/pardes-snap/fsearch/cwd/+Search Save Tty Del Collapse
-|12: 1
-|14: 2 g.txt:6:1-4 MARK b
-|15: 3 g.txt:10:1-4 MARK c
-|16: 4
+== 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
+== 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-39 #d3b0d9,#1d2824, 40-89 #b2c3b8,#1d2824, 90-91 #b2c3b8,#496656, 92-120 #b2c3b8,#1d2824, 121-129 #d3b0d9,#1d2824, 130-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-39 #d3b0d9,#1d2824, 40-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 Unattach 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:
diff --git a/test/snapshots/fsearch.snap b/test/snapshots/fsearch.snap
index 4e4ef864..fbb9baeb 100644
--- a/test/snapshots/fsearch.snap
+++ b/test/snapshots/fsearch.snap
@@ -1,14 +1,18 @@
-# `/` file search: the pattern types into the tag (persistent, no popup);
-# Enter searches the buffer in-core and writes `path:LINE:COL-ENDCOL text` into
-# a +Search OUTPUT BUFFER (a file pane with no file behind it — no Save in its
-# tag) — AND GOES TO THE FIRST HIT, which is the step `n` is and the look Enter
-# is, run for you in that buffer. From there n/N SELECT the next/prev row and
-# open nothing, and Enter — the look chord — is what scrolls the file pane to
-# the hit AND SELECTS IT: the row names the match's whole span, not just where
-# it starts. Esc abandons the input; a no-match search opens an EMPTY buffer
-# (every search gets its own, stacked under the pane) with nothing in it for n
-# to stop on, and goes nowhere.
+# `/` in a file: its query pane under it (Query.zig), line 1 `/` and the
+# pattern, typed into; nothing on the notice band. Each key searches the
+# file again (a regex, any case unless it has a capital): every match is
+# tinted and ticked on the scroll rail, the first at or after the cursor
+# selected and in view, and the rows under line 1 are the lines holding a
+# match, a line number in the gutter. Ctrl-n steps while typing; Enter puts
+# the keyboard on the match, the pattern in `/`, and keeps the rows as text;
+# n / N then step the matches in the file, round the end without a word. A
+# later `/` reuses the pane; Esc while typing brings the kept rows back. A
+# pattern that matches nothing is a count of 0, not an exit.
file g.txt l1\nMARK a\nl3\nl4\nl5\nMARK b\nl7\nl8\nl9\nMARK c\nl11\nl12
+# Builtins announce themselves by default, and an announcement is a band at
+# the top of the body -- which moves every row this script clicks. What the
+# verbs do is what is under test, not the announcement.
+config Verbose off
start 31 180 -n 3
wait 8000 g.txt
stable 700 20000
@@ -26,48 +30,32 @@ release right 6 9
wait 10000 MARK a
stable 700 15000
snap opened
-# / starts the search input in the tag; the pattern is visible while typing
key /
stable 400 5000
+snap slash
text MARK
stable 400 5000
snap typing
+snapstyle typing
+key c-n
+stable 400 5000
+snap ctrln
key enter
-wait 10000 g.txt:2:1-4 MARK
stable 700 10000
-# ...and the submit already looked result 1: the file scrolled to line 2 and
-# the four cells the pattern matched there came up selected — the styles below
-# are what prove the second half of that. No `n` was pressed to get here.
-snap results
-snapstyle results
-# n/N walk on from there, one row of the list per press, Enter looking what
-# the step selected
-key n
-key enter
-stable 700 15000
-snap second
-key n
-key enter
-stable 700 15000
-snap third
-# N walks back up to result 2 (line 6), Enter looks it
-key N
-key enter
-stable 700 15000
-snap back
-# Esc abandons the input: the tag tail is restored
+snap landed
+text n
+stable 400 5000
+snap n
+text N
+stable 400 5000
+snap N
key /
text zz
key esc
settle 100
stable 400 5000
snap cancel
-# a no-match search: nothing in the empty list for n to stop on, so the ring
-# carries it back into the list that has rows and it resumes there
key /
text zzqq
-key enter
stable 700 10000
-key n
-stable 400 5000
snap nomatch
diff --git a/test/snapshots/ghostty-mid.golden b/test/snapshots/ghostty-mid.golden
index 106bc063..6f61736e 100644
--- a/test/snapshots/ghostty-mid.golden
+++ b/test/snapshots/ghostty-mid.golden
@@ -1,7 +1,8 @@
-== snap ghostty-mid grid=100x31 cursor=4,7
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/ghostty-mid/cwd Save Tty Del To /tmp/pardes-snap/ghostty-mid/cwd Save Tty Del To
+== snap ghostty-mid grid=100x31 cursor=4,8
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/ghostty-mid/cwd Tty+bash Save M /tmp/pardes-snap/ghostty-mid/cwd Tty+bash Save M
+| ode Filter Collapse Del ode Filter Collapse Del
| ZZPAD ls
| ./g.sh g.txt
| ./g.sh
@@ -15,7 +16,7 @@
|
|
|
-|
-| /tmp/pardes-snap/ghostty-mid/cwd Save Tty Del To
+| /tmp/pardes-snap/ghostty-mid/cwd Tty+bash Save M
+| ode Filter Collapse Del
| ls
| g.txt
diff --git a/test/snapshots/ghostty-mid.snap b/test/snapshots/ghostty-mid.snap
index cb3088b4..c20db2f7 100644
--- a/test/snapshots/ghostty-mid.snap
+++ b/test/snapshots/ghostty-mid.snap
@@ -23,10 +23,10 @@ stable 700 10000
key c-b
stable 600 8000
send \x1b[I
-send \x1b[<35;10;9M\x1b[<35;7;7M\x1b[<35;4;5M
-send \x1b[<1;4;5M
-send \x1b[<1;4;5m
-send \x1b[<35;6;5M
+send \x1b[<35;10;10M\x1b[<35;7;8M\x1b[<35;4;6M
+send \x1b[<1;4;6M
+send \x1b[<1;4;6m
+send \x1b[<35;6;6M
wait 10000 GHOSTOK
stable 700 10000
snap ghostty-mid
diff --git a/test/snapshots/grep.golden b/test/snapshots/grep.golden
index 795ceddf..165839f7 100644
--- a/test/snapshots/grep.golden
+++ b/test/snapshots/grep.golden
@@ -1,11 +1,11 @@
== snap opened grid=180x31 cursor=7,7
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/grep/cwd Save Tty Del Togglettymode Filter Collapse /tmp/pardes-snap/grep/cwd Save Tty Del Togglettymode Filter Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/grep/cwd Tty+bash Save Mode Filter Collapse Del /tmp/pardes-snap/grep/cwd Tty+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 Tty Del Collapse
+| /tmp/pardes-snap/grep/cwd/a.txt Save Tty Collapse Del
| 1 hello TARGET one
| 2 nothing here
| 3 last TARGET line
@@ -16,26 +16,31 @@
|
|
|
-| /tmp/pardes-snap/grep/cwd Save Tty Del Togglettymode Filter Collapse
+| /tmp/pardes-snap/grep/cwd Tty+bash Save Mode Filter Collapse Del
| ls
| a.txt noise.txt sub
-== snap typing grid=180x31 cursor=15,16
-|16: Grep /TARGET
-== snap results grid=180x31 cursor=7,7
-|13: /tmp/pardes-snap/grep/cwd/+Search Save Tty Del Collapse
-|14: 1 a.txt:1:7-12 hello TARGET one
-|15: 2 a.txt:3:6-11 last TARGET line
-|16: 3 sub/b.txt:2:1-6 TARGET inside sub
-== snap first grid=180x31 cursor=18,7
-== snap opened-hit grid=180x31 cursor=12,11
-|9: /tmp/pardes-snap/grep/cwd/sub/b.txt Save Tty Del Collapse
-|10: 1 deep
-|11: 2 TARGET inside sub
-|14: 2 a.txt:3:6-11 last TARGET line
-|15: 3 sub/b.txt:2:1-6 TARGET inside sub
-|16: 4
-== snap nomatch grid=180x31 cursor=2,4
-|11: /tmp/pardes-snap/grep/cwd/sub/+Search Save Tty Del Collapse
-|12: 1
-== snap chordsel grid=180x31 cursor=19,7
-== snap chord grid=180x31 cursor=19,7
+== 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 Unattach Del
+|13: /tmp/pardes-snap/grep/cwd/sub/b.txt Save Tty Collapse 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
diff --git a/test/snapshots/grep.snap b/test/snapshots/grep.snap
index 84b8f415..16e61d20 100644
--- a/test/snapshots/grep.snap
+++ b/test/snapshots/grep.snap
@@ -1,24 +1,20 @@
-# The Grep builtin (topbar word, `SPC f g`): `grep -R`, in-core. It arms the
-# SAME tag input `/` and Find use, but the walk reads file CONTENTS under every
-# pane's directory at once — minus any directory another pane's already
-# contains, so a tree two panes sit in is searched ONCE and every hit appears
-# once. A row is `path:LINE:COL-ENDCOL text` — the match's whole span, so
-# looking it SELECTS the hit — with the path RELATIVE to the directory
-# of the pane that asked — the same directory its results buffer is named in,
-# so the short name resolves; only a hit from outside that tree stays absolute.
-# n/N SELECT the next/prev row like any other result list and open nothing —
-# one press per row, the location at its head, never the matched text after it;
-# Enter looks what they leave selected, and a row pointing into a file nothing
-# has open yet opens it.
+# The Grep builtin (topbar word, `SPC f g`): the query pane under the pane
+# that asked, line 1 `Grep ` and the text, the lines of the files below its
+# directory holding it (literally, any case unless it has a capital), on the
+# disk engine's worker once the typing pauses: rg --json when it is on PATH,
+# else the sorted walk. The rows sit under their file's name, a line number
+# in the gutter. A hit in a file an open pane shows is shown there; one in a
+# file nothing shows, in the +Preview under the query pane, which Enter makes
+# the file's pane. A query that matches nothing is a count of 0, and Esc
+# while typing brings the kept rows back.
dirmk sub
file a.txt hello TARGET one\nnothing here\nlast TARGET line
file sub/b.txt deep\nTARGET inside sub
file noise.txt nothing to see
+config Verbose off
start 31 180 -n 3
wait 8000 a.txt
stable 700 20000
-# open a.txt: a SECOND pane, whose directory the shell's cwd already covers —
-# its root is dropped, which is what keeps the hits below un-duplicated
press left 5 9
release left 5 9
stable 400 5000
@@ -32,70 +28,34 @@ release right 6 9
wait 10000 hello TARGET
stable 700 15000
snap opened
-# middle-click Grep on the topbar: the input
-# arms on the ACTIVE pane's tag, exactly where `/` would have typed
+# middle-click Grep on the topbar: the query pane under a.txt, typed into
press middle @Grep 1
release middle @Grep 1
stable 400 5000
text TARGET
-stable 400 5000
-snap typing
-# Enter walks: two hits in a.txt, one in sub/b.txt, sorted by path — and the
-# file that holds none of them contributes no row
-key enter
-wait 10000 sub/b.txt:2:1
+# three lines (the pane is short: its count says how many)
+wait 10000 +Search 1/3
stable 700 15000
-snap results
-# n selects the first row and Enter looks it: absolute path, line 1, columns
-# 7..12 (`TARGET`), and those six cells come up selected
-key n
-key enter
+snap typing
+# a.txt's hits are shown in a.txt; sub/b.txt's in the preview
+key c-n
stable 700 15000
-snap first
-# ...and stepping on into sub/b.txt, then looking it, opens the file nothing
-# had open
-key n
-key enter
+snap second
+key c-n
+wait 10000 deep
stable 700 15000
-key n
+snap preview
key enter
-wait 10000 TARGET inside sub
stable 700 15000
snap opened-hit
-# a pattern nothing holds: an empty list of its own, with nothing in it for n
-# to stop on — so the ring carries that step out of it and on round. It lands
-# in the SHELL, whose `ls` row is free text and steps word by word: the TARGET
-# list is standing on its last row, and a row-grained walk has nothing left in
-# it to offer. The look above is why these read the way they do: it left the
-# cursor in sub/b.txt, so the empty list is named in sub/ rather than cwd/, and
-# it left the hit SELECTED there (a ranged result row is one a look selects).
-# Armed from the LEADER, not the topbar word, because of that selection: a
-# topbar execute chords whatever is selected into its argument, so a
-# middle-click here would run `Grep TARGET` and never ask for a pattern at
-# all. The leader path runs the builtin with no argument, which is what this
-# step is about; the chord itself is the last two snaps below.
key space
key f
key g
stable 400 5000
text zzqq
-key enter
stable 700 10000
-key n
-stable 400 5000
snap nomatch
-# the acme chord: a builtin executed with a SELECTION held takes it as the
-# argument, so dragging over `TARGET` in a.txt and then clicking Grep runs the
-# walk on that word at once — no tag input, nothing typed. TARGET already has
-# a list open from above, so this refills THAT one; only the zzqq list below is
-# a second buffer, because only it is a different search.
-press left @TARGET 8
-drag left @TARGET+6 8
-release left @TARGET+6 8
+key esc
+settle 100
stable 400 5000
-snap chordsel
-press middle @Grep 1
-release middle @Grep 1
-wait 10000 sub/b.txt:2:1
-stable 700 15000
-snap chord
+snap esc
diff --git a/test/snapshots/headersweep-restored.golden b/test/snapshots/headersweep-restored.golden
new file mode 100644
index 00000000..522945bd
--- /dev/null
+++ b/test/snapshots/headersweep-restored.golden
@@ -0,0 +1,54 @@
+== style col-sweeping grid=120x21
+|0: 0-1 d,#1d2824, 2-119 #b2c3b8,#1d2824,
+|1: 0-1 d,#887455, 2-34 #becfc4,#314738, 35-42 #f5f7ee,#5b7e5a, 43-59 #becfc4,#314738, 60-61 #becfc4,#887455, 62-119 #b2c3b8,#1d2824,
+|2: 0-1 d,#add38a, 2-43 #becfc4,#314738, 44-52 #dfbce5,#314738, 53-59 #becfc4,#314738, 60-61 #becfc4,#496656, 62-103 #b2c3b8,#1d2824, 104-112 #d3b0d9,#1d2824, 113-119 #b2c3b8,#1d2824,
+|3: 0-1 d,#314738, 2-59 #becfc4,#314738, 60-61 #becfc4,#1d2824, 62-119 #b2c3b8,#1d2824,
+|4: 0-0 d,#608269, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410,
+|5: 0-0 d,#608269, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410,
+|6: 0-0 d,#608269, 1-1 d,#0d1410, 2-23 #e5eee5,#0d1410,f 24-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-61 #e5eee5,#0d1410, 62-83 #e5eee5,#0d1410,f 84-119 #e5eee5,#0d1410,
+|7: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|8: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|9: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|10: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|11: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|12: 0-1 d,#496656, 2-43 #b2c3b8,#1d2824, 44-52 #d3b0d9,#1d2824, 53-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-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#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,
+|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,
+== snap col-swept grid=120x21 cursor=4,7
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit Restore /tmp/pardes-snap/headersweep-resto
+| New Tty Find Grep Joincol Delcol echo RE''STORED-COL New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/headersweep-restored/cwd Tty+bash Save Mo /tmp/pardes-snap/headersweep-restored/cwd Tty+bash Save Mo
+| de Filter Collapse Del de Filter Collapse Del
+| $ ls $ ls
+| $ $
+| ── restored history ── ── restored history ──
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/headersweep-restored/cwd Tty+bash Save Mo
+| de Filter Collapse Del
+| $
+| ── restored history ──
+|
+| /tmp/pardes-snap/headersweep-restored/cwd (echo RE''STORED
+| -COL) exit 0 Kill Save Collapse Del
+| exit 0
+== 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,
+|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,
+== snap ws-swept grid=120x21 cursor=4,7
+|0: Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit Restore /tmp/pardes-snap/headersweep-re ec
+|18: -WS) exit 0 Kill Save Collapse Del
diff --git a/test/snapshots/headersweep-restored.snap b/test/snapshots/headersweep-restored.snap
new file mode 100644
index 00000000..c2918e1a
--- /dev/null
+++ b/test/snapshots/headersweep-restored.snap
@@ -0,0 +1,42 @@
+# headersweep.snap in a session restored from a dump: its column and
+# workspace tags are rebuilt, and a middle sweep over each runs what it
+# swept, as it does in a fresh session.
+start 21 120 -n 3
+wait 8000 Newcol
+stable 700 20000
+press middle @Dump 1
+release middle @Dump 1
+stable 700 10000
+press middle @Restore 1
+release middle @Restore 1
+stable 900 15000
+press left 50 2
+release left 50 2
+key space
+text echo RE''STORED-COL
+key esc
+settle 100
+press middle @echo 2
+drag middle @echo+8 2
+stable 300 5000
+snapstyle col-sweeping
+drag middle @echo+19 2
+release middle @echo+19 2
+wait 8000 RESTORED-COL
+stable 700 15000
+snap col-swept
+press left 118 1
+release left 118 1
+key space
+text echo RE''STORED-WS
+key esc
+settle 100
+press middle @echo 1
+drag middle @echo+8 1
+stable 300 5000
+snapstyle ws-sweeping
+drag middle @echo+18 1
+release middle @echo+18 1
+wait 8000 RESTORED-WS
+stable 700 15000
+snap ws-swept
diff --git a/test/snapshots/headersweep.golden b/test/snapshots/headersweep.golden
new file mode 100644
index 00000000..a178306f
--- /dev/null
+++ b/test/snapshots/headersweep.golden
@@ -0,0 +1,63 @@
+== style col-sweeping grid=120x21
+|0: 0-1 d,#1d2824, 2-119 #b2c3b8,#1d2824,
+|1: 0-1 d,#887455, 2-34 #becfc4,#314738, 35-42 #f5f7ee,#5b7e5a, 43-59 #becfc4,#314738, 60-61 #becfc4,#887455, 62-119 #b2c3b8,#1d2824,
+|2: 0-1 d,#add38a, 2-34 #becfc4,#314738, 35-43 #dfbce5,#314738, 44-59 #becfc4,#314738, 60-61 #becfc4,#496656, 62-94 #b2c3b8,#1d2824, 95-103 #d3b0d9,#1d2824, 104-119 #b2c3b8,#1d2824,
+|3: 0-2 d,#314738, 3-59 #becfc4,#314738, 60-62 #becfc4,#1d2824, 63-119 #b2c3b8,#1d2824,
+|4: 0-0 d,#608269, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410,
+|5: 0-0 d,#608269, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410,
+|6: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|7: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|8: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|9: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|10: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|11: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|12: 0-1 d,#496656, 2-34 #b2c3b8,#1d2824, 35-43 #d3b0d9,#1d2824, 44-59 #b2c3b8,#1d2824, 60-60 #b2c3b8,#608269, 61-119 #b2c3b8,#0d1410,
+|13: 0-2 d,#1d2824, 3-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-1 d,#0d1410, 2-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,
+== snap col-swept grid=120x21 cursor=4,6
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol echo SW''EPT-COL New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/headersweep/cwd Tty+bash Save Mode Filter /tmp/pardes-snap/headersweep/cwd Tty+bash Save Mode Filter
+| Collapse Del Collapse Del
+| ls ls
+| hay.txt hay.txt
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/headersweep/cwd Tty+bash Save Mode Filter
+| Collapse Del
+| ls
+| hay.txt
+|
+| /tmp/pardes-snap/headersweep/cwd (echo SW''EPT-COL) exit 0
+| Kill Save Collapse Del
+| exit 0
+== snap ws-swept grid=120x21 cursor=4,6
+|0: Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config 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
+|0: Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit echo SW''EPT-WS xxhay.txtxx
+|7: /tmp/pardes-snap/headersweep/cwd/hay.txt Save Tty Collapse
+|8: Del
+|9: 1 ZQNEEDLE
+== snap cancelled grid=120x21 cursor=7,9
+== style selected grid=120x21
+|1: 0-1 d,#887455, 2-59 #b2c3b8,#1d2824, 60-61 #b2c3b8,#887455, 62-69 #becfc4,#314738, 70-78 #f5f7ee,#3c614a, 79-79 #f5f7ee,#314738, 80-119 #becfc4,#314738,
+|2: 0-1 d,#496656, 2-34 #b2c3b8,#1d2824, 35-43 #d3b0d9,#1d2824, 44-59 #b2c3b8,#1d2824, 60-61 #b2c3b8,#add38a, 62-94 #becfc4,#314738, 95-103 #dfbce5,#314738, 104-119 #becfc4,#314738,
+|3: 0-2 d,#1d2824, 3-59 #b2c3b8,#1d2824, 60-62 #b2c3b8,#314738, 63-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-2 d,#1d2824, 3-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,
diff --git a/test/snapshots/headersweep.snap b/test/snapshots/headersweep.snap
new file mode 100644
index 00000000..be070357
--- /dev/null
+++ b/test/snapshots/headersweep.snap
@@ -0,0 +1,67 @@
+# A middle sweep over a column's tag or the workspace's runs what it swept,
+# as it does over a pane's tag: highlighted while the button is held, run
+# when it comes up. Both headers used to run the word under the PRESS, on
+# the press, so a sweep of `echo SWEPT-COL` ran a bare `echo`. A right sweep
+# looks for what it swept the same way, and the other button cancels.
+file hay.txt ZQNEEDLE
+start 21 120 -n 3
+wait 8000 Newcol
+stable 700 20000
+# the column tag: type a command onto it, then sweep the whole command
+press left 50 2
+release left 50 2
+key space
+text echo SW''EPT-COL
+key esc
+settle 100
+press middle @echo 2
+drag middle @echo+8 2
+stable 300 5000
+snapstyle col-sweeping
+drag middle @echo+16 2
+release middle @echo+16 2
+wait 8000 SWEPT-COL
+stable 700 15000
+snap col-swept
+# the workspace tag, the same
+press left 110 1
+release left 110 1
+key space
+text echo SW''EPT-WS
+key esc
+settle 100
+press middle @echo 1
+drag middle @echo+15 1
+release middle @echo+15 1
+wait 8000 SWEPT-WS
+stable 700 15000
+snap ws-swept
+# a right sweep over part of a word looks for the part: `hay.txt` opens,
+# where a click would look for all of `xxhay.txtxx`
+press left 118 1
+release left 118 1
+key space
+text xxhay.txtxx
+key esc
+settle 100
+press right @xxhay.txtxx+2 1
+drag right @xxhay.txtxx+9 1
+release right @xxhay.txtxx+9 1
+wait 8000 ZQNEEDLE
+stable 700 15000
+snap ws-looked
+# the look button tapped during a middle sweep cancels it: nothing runs
+press middle @echo 2
+drag middle @echo+16 2
+press right @echo+16 2
+release right @echo+16 2
+release middle @echo+16 2
+stable 700 15000
+snap cancelled
+# for comparison, a select sweep over the second column's tag selects, in
+# the tag's selection colours, and runs nothing
+press left @Find#2 2
+drag left @Grep#2+4 2
+release left @Grep#2+4 2
+stable 700 15000
+snapstyle selected
diff --git a/test/snapshots/hscroll.golden b/test/snapshots/hscroll.golden
index 61e04e49..23bb6279 100644
--- a/test/snapshots/hscroll.golden
+++ b/test/snapshots/hscroll.golden
@@ -1,11 +1,13 @@
-== snap opened grid=90x31 cursor=7,7
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/hscroll/cwd Save Tty Del T /tmp/pardes-snap/hscroll/cwd Save Tty Del T
+== snap opened grid=90x31 cursor=7,9
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/hscroll/cwd Tty+bash Save /tmp/pardes-snap/hscroll/cwd Tty+bash Save
+| Mode Filter Collapse Del Mode Filter Collapse Del
| ls ls
| wide.txt wide.txt
|
| /tmp/pardes-snap/hscroll/cwd/wide.txt Save
+| Tty Collapse Del
| 1 short1 END_A_MARKER_WAY_OUT_RIGHT_padp
|
|
@@ -14,16 +16,15 @@
|
|
|
-|
-|
-| /tmp/pardes-snap/hscroll/cwd Save Tty Del T
+| /tmp/pardes-snap/hscroll/cwd Tty+bash Save
+| Mode Filter Collapse Del
| ls
| wide.txt
-== snap wheeled grid=90x31 cursor=7,7
-|7: 1 ND_A_MARKER_WAY_OUT_RIGHT_padpadpadpad
-== snap clamped grid=90x31 cursor=7,7
-|7: 1 short1 END_A_MARKER_WAY_OUT_RIGHT_padp
-== snap dollar grid=90x31 cursor=41,7
-|7: 1 padpadpadpadpadpadpadpadpadpad_TAIL
-== snap zero grid=90x31 cursor=7,7
-|7: 1 short1 END_A_MARKER_WAY_OUT_RIGHT_padp
+== snap wheeled grid=90x31 cursor=7,9
+|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
diff --git a/test/snapshots/hscroll.snap b/test/snapshots/hscroll.snap
index 6f73154f..05366323 100644
--- a/test/snapshots/hscroll.snap
+++ b/test/snapshots/hscroll.snap
@@ -36,10 +36,10 @@ send \x1b[<67;10;8M
send \x1b[<67;10;8M
stable 400 5000
snap clamped
-# $ walks the cursor to the line end: the view follows with the margin
+# gl walks the cursor to the line end: the view follows with the margin
key g g
stable 400 5000
-key $
+key g l
stable 400 5000
snap dollar
# 0 back to column zero: the view snaps home
diff --git a/test/snapshots/images.golden b/test/snapshots/images.golden
index 558b4d84..51cb4922 100644
--- a/test/snapshots/images.golden
+++ b/test/snapshots/images.golden
@@ -1,87 +1,87 @@
== snap img-open grid=150x31 cursor=11,8
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/images/cwd Save Tty Del Togglettymode Filter Collapse /tmp/pardes-snap/images/cwd Save Tty Del Togglettymode Filter Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/images/cwd Tty+bash Save Mode Filter Collapse Del /tmp/pardes-snap/images/cwd Tty+bash Save Mode Filter Collapse Del
| ls ls
| pic.ppm pic.ppm
|
-| img petscii:off palette:commodore ascii:on /tmp/pardes-snap/images/cwd/pi
-| 92@7%5Gm$D4▘🬵%🬨3'🬥🬆🬻
-| 🬥3▖╱{=CY,▌*)^M<▀🬎🬻
-| X▄jN.&🬺j*w3┼"🬥🬆🬻
-| ╱╳PxGXPV*q"(🬆~
-| HF[🬗█▀&t0^🬆🬻
-| 🬴X7─27/*🬆🬻
-| .g🬬🬎ks▛🬻
-| ▚i,V🬆🬹
-| mu🬆🬻
-| 🬆🬻
-| /tmp/pardes-snap/images/cwd Save Tty Del Togglettymode Filter Collapse
+| img petscii:on palette:commodore ascii:on /tmp/pardes-snap/images/cwd/pic
+| .ppm Tty Collapse Del
+| x🬱\╲🬌\~▄🬥4▟g*🬺🬶_🬆🬻
+| >A8🬌Cq&.\H&🬹🬜C▛🬻
+| ><e'🬷y🬙▄Fso🬴🬆🬹
+| k[🬻🬟🬜7f🬜$>🬎🬻
+| 4▜>gi▟9🬙🬆🬻
+| ╱i🬹─B▜🬆🬻
+| @🬥🬺v🬆🬻
+| g🬷🬆🬻
+| 🬆🬻
+| /tmp/pardes-snap/images/cwd Tty+bash Save Mode Filter Collapse Del
| ls
| pic.ppm
== style img-open grid=150x31
-|0: 0-70 #b2c3b8,#1d2824, 71-149 d,#1d2824,
-|1: 0-24 #becfc4,#26362d, 25-74 d,#26362d, 75-99 #b2c3b8,#1d2824, 100-149 d,#1d2824,
-|2: 0-1 #ffffff,#4c6356, 2-71 #b2c3b8,#1d2824, 72-74 d,#1d2824, 75-76 #ffffff,#4c6356, 77-146 #b2c3b8,#1d2824, 147-149 d,#1d2824,
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|4: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|5: 0-0 d,#637f6a, 1-74 d,#0d1410, 75-75 d,#637f6a, 76-149 d,#0d1410,
-|6: 0-1 #000000,#adcc91, 2-74 #becfc4,#26362d, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|7: 0-0 d,#152019, 1-27 d,#0d1410, 28-29 #959595,#6c6c6c, 30-30 #6c6c6c,#959595, 31-34 #959595,#6c6c6c, 35-35 #6c6c6c,#959595, 36-37 #959595,#6c6c6c, 38-38 #6c6c6c,#959595, 39-39 #959595,#6c6c6c, 40-40 #6c6c6c,#959595, 41-41 #959595,#6c6c6c, 42-42 #6c6c6c,#959595, 43-44 #959595,#6c6c6c, 45-45 #6c6c6c,#959595, 46-46 #959595,#6c5eb5, 47-47 #352879,#6c6c6c, 48-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|8: 0-0 d,#152019, 1-27 d,#0d1410, 28-28 #6c6c6c,#959595, 29-29 #959595,#6c6c6c, 30-30 #6c6c6c,#959595, 31-34 #959595,#6c6c6c, 35-38 #6c6c6c,#959595, 39-42 #959595,#6c6c6c, 43-43 #6c6c6c,#959595, 44-44 #6c6c6c,#352879, 45-45 #352879,#959595, 46-47 #352879,#352879, 48-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|9: 0-0 d,#152019, 1-27 d,#0d1410, 28-28 #959595,#6c6c6c, 29-29 #6c6c6c,#959595, 30-33 #959595,#6c6c6c, 34-34 #6c6c6c,#959595, 35-38 #959595,#6c6c6c, 39-39 #6c6c6c,#959595, 40-40 #959595,#6c6c6c, 41-41 #6c6c6c,#959595, 42-42 #959595,#6c5eb5, 43-43 #352879,#6c6c6c, 44-47 #352879,#352879, 48-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|10: 0-0 d,#152019, 1-27 d,#0d1410, 28-29 #959595,#6c6c6c, 30-30 #6c6c6c,#959595, 31-33 #959595,#6c6c6c, 34-34 #6c6c6c,#959595, 35-39 #959595,#6c6c6c, 40-40 #959595,#6c5eb5, 41-41 #6c6c6c,#352879, 42-47 #352879,#352879, 48-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|11: 0-0 d,#152019, 1-27 d,#0d1410, 28-28 #6c6c6c,#959595, 29-29 #959595,#6c6c6c, 30-34 #6c6c6c,#959595, 35-36 #959595,#6c6c6c, 37-37 #6c6c6c,#959595, 38-38 #6c6c6c,#6c5eb5, 39-39 #352879,#6c6c6c, 40-47 #352879,#352879, 48-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|12: 0-0 d,#152019, 1-27 d,#0d1410, 28-29 #6c6c6c,#959595, 30-31 #959595,#6c6c6c, 32-32 #6c6c6c,#959595, 33-34 #959595,#6c6c6c, 35-35 #6c6c6c,#959595, 36-36 #6c6c6c,#6c5eb5, 37-37 #352879,#6c6c6c, 38-47 #352879,#352879, 48-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|13: 0-0 d,#152019, 1-27 d,#0d1410, 28-29 #959595,#6c6c6c, 30-32 #6c6c6c,#959595, 33-33 #959595,#6c6c6c, 34-34 #6c6c6c,#352879, 35-35 #352879,#6c6c6c, 36-47 #352879,#352879, 48-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|14: 0-0 d,#152019, 1-27 d,#0d1410, 28-31 #959595,#6c6c6c, 32-32 #959595,#6c5eb5, 33-33 #352879,#6c5eb5, 34-47 #352879,#352879, 48-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|15: 0-0 d,#152019, 1-27 d,#0d1410, 28-28 #6c6c6c,#959595, 29-29 #959595,#6c6c6c, 30-30 #6c6c6c,#6c5eb5, 31-31 #352879,#6c6c6c, 32-47 #352879,#352879, 48-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|16: 0-0 d,#152019, 1-27 d,#0d1410, 28-28 #6c6c6c,#6c5eb5, 29-29 #352879,#6c6c6c, 30-47 #352879,#352879, 48-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|17: 0-1 #ffffff,#4c6356, 2-71 #b2c3b8,#1d2824, 72-74 d,#1d2824, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|18: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|19: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|20: 0-0 d,#637f6a, 1-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|21: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|22: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|23: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|24: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|25: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|26: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|27: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|28: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|29: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|30: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
+|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-38 #d3b0d9,#1d2824, 39-74 #b2c3b8,#1d2824, 75-76 #b2c3b8,#496656, 77-104 #b2c3b8,#1d2824, 105-113 #d3b0d9,#1d2824, 114-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-71 #becfc4,#314738, 72-74 #dfbce5,#314738, 75-75 #dfbce5,#608269, 76-149 #dfbce5,#0d1410,
+|7: 0-1 d,#314738, 2-6 #dfbce5,#314738, 7-74 #becfc4,#314738, 75-75 #becfc4,#608269, 76-149 #becfc4,#0d1410,
+|8: 0-0 d,#152019, 1-28 d,#0d1410, 29-30 #959595,#6c6c6c, 31-31 #6c6c6c,#959595, 32-32 #959595,#6c6c6c, 33-33 #6c6c6c,#959595, 34-35 #959595,#6c6c6c, 36-36 #6c6c6c,#959595, 37-37 #959595,#6c6c6c, 38-40 #6c6c6c,#959595, 41-41 #959595,#6c6c6c, 42-43 #6c6c6c,#959595, 44-44 #959595,#6c6c6c, 45-45 #6c6c6c,#6c5eb5, 46-46 #352879,#959595, 47-74 #352879,#0d1410, 75-75 #352879,#608269, 76-149 #352879,#0d1410,
+|9: 0-0 d,#152019, 1-28 d,#0d1410, 29-29 #959595,#6c6c6c, 30-31 #6c6c6c,#959595, 32-35 #959595,#6c6c6c, 36-36 #6c6c6c,#959595, 37-38 #959595,#6c6c6c, 39-42 #6c6c6c,#959595, 43-43 #6c6c6c,#352879, 44-44 #352879,#6c6c6c, 45-46 #352879,#352879, 47-74 #352879,#0d1410, 75-75 #352879,#608269, 76-149 #352879,#0d1410,
+|10: 0-0 d,#152019, 1-28 d,#0d1410, 29-30 #959595,#6c6c6c, 31-31 #6c6c6c,#959595, 32-32 #959595,#6c6c6c, 33-33 #6c6c6c,#959595, 34-34 #959595,#6c6c6c, 35-36 #6c6c6c,#959595, 37-39 #959595,#6c6c6c, 40-40 #6c6c6c,#959595, 41-41 #6c6c6c,#6c5eb5, 42-42 #352879,#6c5eb5, 43-46 #352879,#352879, 47-74 #352879,#0d1410, 75-75 #352879,#608269, 76-149 #352879,#0d1410,
+|11: 0-0 d,#152019, 1-28 d,#0d1410, 29-33 #6c6c6c,#959595, 34-35 #959595,#6c6c6c, 36-36 #6c6c6c,#959595, 37-38 #959595,#6c6c6c, 39-39 #6c6c6c,#352879, 40-40 #352879,#959595, 41-46 #352879,#352879, 47-74 #352879,#0d1410, 75-75 #352879,#608269, 76-149 #352879,#0d1410,
+|12: 0-0 d,#152019, 1-28 d,#0d1410, 29-30 #6c6c6c,#959595, 31-33 #959595,#6c6c6c, 34-34 #6c6c6c,#959595, 35-35 #959595,#6c6c6c, 36-36 #6c6c6c,#959595, 37-37 #959595,#6c5eb5, 38-38 #352879,#6c6c6c, 39-46 #352879,#352879, 47-74 #352879,#0d1410, 75-75 #352879,#608269, 76-149 #352879,#0d1410,
+|13: 0-0 d,#152019, 1-28 d,#0d1410, 29-30 #959595,#6c6c6c, 31-31 #6c6c6c,#959595, 32-33 #959595,#6c6c6c, 34-34 #6c6c6c,#959595, 35-35 #6c6c6c,#6c5eb5, 36-36 #352879,#6c6c6c, 37-46 #352879,#352879, 47-74 #352879,#0d1410, 75-75 #352879,#608269, 76-149 #352879,#0d1410,
+|14: 0-0 d,#152019, 1-28 d,#0d1410, 29-29 #959595,#6c6c6c, 30-32 #6c6c6c,#959595, 33-33 #959595,#6c5eb5, 34-34 #352879,#6c6c6c, 35-46 #352879,#352879, 47-74 #352879,#0d1410, 75-75 #352879,#608269, 76-149 #352879,#0d1410,
+|15: 0-0 d,#152019, 1-28 d,#0d1410, 29-30 #6c6c6c,#959595, 31-31 #6c6c6c,#6c5eb5, 32-32 #352879,#6c6c6c, 33-46 #352879,#352879, 47-74 #352879,#0d1410, 75-75 #352879,#608269, 76-149 #352879,#0d1410,
+|16: 0-0 d,#152019, 1-28 d,#0d1410, 29-29 #6c6c6c,#6c5eb5, 30-30 #352879,#6c6c6c, 31-46 #352879,#352879, 47-74 #352879,#0d1410, 75-75 #352879,#608269, 76-149 #352879,#0d1410,
+|17: 0-1 d,#496656, 2-29 #b2c3b8,#1d2824, 30-38 #d3b0d9,#1d2824, 39-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,
== style term-palette grid=150x31
-|7: 0-0 d,#152019, 1-27 d,#0d1410, 28-28 p8,p5, 29-30 p8,p4, 31-31 p4,p8, 32-35 p8,p4, 36-37 p4,p8, 38-39 p8,p4, 40-40 p4,p8, 41-42 p8,p4, 43-43 p4,p8, 44-46 p8,p4, 47-47 p12,p8, 48-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|8: 0-0 d,#152019, 1-27 d,#0d1410, 28-30 p8,p4, 31-33 p4,p8, 34-34 p8,p4, 35-36 p4,p8, 37-37 p8,p4, 38-41 p4,p8, 42-42 p8,p4, 43-43 p4,p8, 44-44 p8,p12, 45-46 p12,p8, 47-47 p12,p12, 48-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|9: 0-0 d,#152019, 1-27 d,#0d1410, 28-28 p8,p4, 29-29 p4,p8, 30-30 p8,p4, 31-31 p4,p8, 32-32 p8,p4, 33-33 p4,p8, 34-35 p8,p4, 36-37 p4,p8, 38-38 p8,p5, 39-41 p8,p4, 42-42 p4,p8, 43-44 p12,p8, 45-47 p12,p12, 48-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|10: 0-0 d,#152019, 1-27 d,#0d1410, 28-29 p8,p4, 30-34 p4,p8, 35-36 p8,p4, 37-38 p4,p8, 39-39 p8,p4, 40-40 p4,p8, 41-41 p12,p8, 42-47 p12,p12, 48-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|11: 0-0 d,#152019, 1-27 d,#0d1410, 28-28 p4,p8, 29-29 p8,p4, 30-31 p4,p8, 32-32 p8,p4, 33-33 p4,p8, 34-34 p8,p4, 35-36 p4,p8, 37-37 p8,p4, 38-38 p8,p12, 39-39 p12,p8, 40-47 p12,p12, 48-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|12: 0-0 d,#152019, 1-27 d,#0d1410, 28-28 p8,p4, 29-31 p4,p8, 32-35 p8,p4, 36-36 p4,p8, 37-37 p12,p8, 38-47 p12,p12, 48-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|13: 0-0 d,#152019, 1-27 d,#0d1410, 28-32 p8,p4, 33-33 p4,p8, 34-34 p8,p12, 35-36 p12,p8, 37-47 p12,p12, 48-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|14: 0-0 d,#152019, 1-27 d,#0d1410, 28-28 p8,p4, 29-29 p4,p8, 30-30 p8,p4, 31-32 p4,p8, 33-33 p12,p8, 34-34 p8,p12, 35-47 p12,p12, 48-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|15: 0-0 d,#152019, 1-27 d,#0d1410, 28-29 p4,p8, 30-30 p8,p12, 31-32 p12,p8, 33-47 p12,p12, 48-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|16: 0-0 d,#152019, 1-27 d,#0d1410, 28-28 p8,p12, 29-29 p12,p8, 30-47 p12,p12, 48-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
+|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=11,8
-|6: img petscii:off palette:terminal ascii:off /tmp/pardes-snap/images/cwd/pi
-|7: ███╱█🬻██🬺██🬻███╱██🬴▄
-|8: 🬬██╱███╱🬻🬝🬻🬬████🬝🬵█
-|9: █╲█🬴████╲╱█🬝██▟▄█
-|10: ██╲╱╲█🬝█████╱🬵
-|11: ╱█████████🬝▄
-|12: █│█████🬝🬝🬹
-|13: ██████🬝▄█
-|14: 🬜🬬██🬸▄╲
-|15: 🬺█🬝🬵█
-|16: 🬝▄
-== snap tag-edit grid=400x31 cursor=86,6
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/images/cwd Save Tty Del Togglettymode Filter Collapse /tmp/pardes-snap/images/cwd Save Tty Del Togglettymode Filter Collapse
+|6: img petscii:on palette:terminal ascii:off /tmp/pardes-snap/images/cwd/pic
+|8: Ascii
+|9: ██████████████🬝🬹
+|10: ██████🬛█████🬝▄
+|11: ██████████🬝▄
+|12: ██╱█████🬝▄
+|13: █🬸╲███🬝🬹
+|14: ████🬝▄
+|15: │█🬝▄
+|16: 🬝🬹
+== snap tag-edit grid=400x31 cursor=85,6
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/images/cwd Tty+bash Save Mode Filter Collapse Del /tmp/pardes-snap/images/cwd Tty+bash Save Mode Filter Collapse Del
| ls ls
| pic.ppm pic.ppm
|
-| img petscii:off palette:terminal ascii:off /tmp/pardes-snap/images/cwd/pic.ppm Zork Tty Del Collapse
+| img petscii:on palette:terminal ascii:off /tmp/pardes-snap/images/cwd/pic.ppm Zork Tty Collapse Del
| ███╱█🬻██🬺██🬻███╱██🬴▄
| 🬬██╱███╱🬻🬝🬻🬬████🬝🬵█
| █╲█🬴████╲╱█🬝██▟▄█
@@ -92,6 +92,6 @@
| 🬜🬬██🬸▄╲
| 🬺█🬝🬵█
| 🬝▄
-| /tmp/pardes-snap/images/cwd Save Tty Del Togglettymode Filter Collapse
+| /tmp/pardes-snap/images/cwd Tty+bash Save Mode Filter Collapse Del
| ls
| pic.ppm
diff --git a/test/snapshots/jumps.golden b/test/snapshots/jumps.golden
index 3005135c..4aa18d54 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 NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/jumps/cwd/big.txt Save Tty Del Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/jumps/cwd/big.txt Save Tty Collapse Del
| 1 line 1
| 2 line 2
| 3 line 3
@@ -31,8 +31,8 @@
| 27 line 27
| 28 line 28
== snap to-shell grid=150x31 cursor=79,5
-|1: New Tty Find Grep Joincol New Tty Find Grep Joincol
-|2: /tmp/pardes-snap/jumps/cwd/big.txt Save Tty Del Collapse /tmp/pardes-snap/jumps/cwd Save Tty Del Togglettymode Filter Collapse
+|1: New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+|2: /tmp/pardes-snap/jumps/cwd/big.txt Save Tty Collapse Del /tmp/pardes-snap/jumps/cwd Tty+bash Save Mode Filter Collapse Del
|3: 1 line 1 ls
|4: 2 line 2 big.txt
== snap to-file grid=150x31 cursor=7,3
@@ -66,7 +66,7 @@
|29: 102 line 102
|30: 103 line 103
== snap back-in-file grid=150x31 cursor=7,3
-|3: 1 line 1 ls
+|3: 1 line 1 Back ls
|4: 2 line 2 big.txt
|5: 3 line 3
|6: 4 line 4
@@ -96,8 +96,9 @@
|30: 28 line 28
== snap back-to-shell grid=150x31 cursor=79,5
== 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 ls
+|3: 86 line 86 Forward ls
|4: 87 line 87 big.txt
|5: 88 line 88
|6: 89 line 89
@@ -126,46 +127,60 @@
|29: 112 line 112
|30: 113 line 113
== 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=7,17
-|26: /tmp/pardes-snap/jumps/cwd/+Jumps Save Tty Del Collapse
-|27: 1 @p1:3:3 /tmp/pardes-snap/jumps/cwd
-|28: 2 /tmp/pardes-snap/jumps/cwd/big.txt:1:1 line 1
-|29: 3 @p1:3:3 /tmp/pardes-snap/jumps/cwd
-|30: 4 /tmp/pardes-snap/jumps/cwd/big.txt:100:1 line 100
+|3: 86 line 86 Jumplist ls
+|16: /tmp/pardes-snap/jumps/cwd/+Jumps Save Tty Collapse LocationsConfig Del
+|17: 1 @p2:3:3 /tmp/pardes-snap/jumps/cwd
+|18: 2 /tmp/pardes-snap/jumps/cwd/big.txt:1:1 line 1
+|19: 3 @p2:3:3 /tmp/pardes-snap/jumps/cwd
+|20: 4 /tmp/pardes-snap/jumps/cwd/big.txt:100:1 line 100
+|21: 5
+|22:
+|23:
+|24:
+|25:
+|26:
+|27:
+|28:
+|29:
+|30:
== snap step1-shell grid=150x31 cursor=79,5
+|3: 86 line 86 ls
== style step1-shell grid=150x31
-|0: 0-70 #b2c3b8,#1d2824, 71-149 d,#1d2824,
-|1: 0-24 #b2c3b8,#1d2824, 25-74 d,#1d2824, 75-99 #becfc4,#26362d, 100-149 d,#26362d,
-|2: 0-1 #ffffff,#4c6356, 2-57 #b2c3b8,#1d2824, 58-74 d,#1d2824, 75-76 #000000,#adcc91, 77-145 #becfc4,#26362d, 146-149 d,#26362d,
-|3: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-13 #e5eee5,#0d1410, 14-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|4: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-13 #e5eee5,#0d1410, 14-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|5: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-13 #e5eee5,#0d1410, 14-74 d,#0d1410, 75-75 d,#637f6a, 76-149 d,#0d1410,
-|6: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-13 #e5eee5,#0d1410, 14-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|7: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-13 #e5eee5,#0d1410, 14-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|8: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-13 #e5eee5,#0d1410, 14-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|9: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-13 #e5eee5,#0d1410, 14-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|10: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-13 #e5eee5,#0d1410, 14-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|11: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-13 #e5eee5,#0d1410, 14-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|12: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-13 #e5eee5,#0d1410, 14-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|13: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-13 #e5eee5,#0d1410, 14-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|14: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-13 #e5eee5,#0d1410, 14-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|15: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-13 #e5eee5,#0d1410, 14-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|16: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-13 #e5eee5,#0d1410, 14-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|17: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-14 #e5eee5,#0d1410, 15-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|18: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-14 #e5eee5,#0d1410, 15-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|19: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-14 #e5eee5,#0d1410, 15-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|20: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-14 #e5eee5,#0d1410, 15-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|21: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-14 #e5eee5,#0d1410, 15-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|22: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-14 #e5eee5,#0d1410, 15-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|23: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-14 #e5eee5,#0d1410, 15-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|24: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-14 #e5eee5,#0d1410, 15-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|25: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-14 #e5eee5,#0d1410, 15-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|26: 0-1 #ffffff,#4c6356, 2-56 #b2c3b8,#1d2824, 57-74 d,#1d2824, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|27: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-13 #59675c,#0d1410, 14-40 #e5eee5,#0d1410, 41-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|28: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-44 #59675c,#0d1410, 45-51 #e5eee5,#0d1410, 52-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|29: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-13 #59675c,#0d1410, 14-40 #e5eee5,#0d1410, 41-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|30: 0-0 d,#152019, 1-1 d,#0d1410, 2-46 #59675c,#0d1410, 47-55 #e5eee5,#0d1410, 56-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
+|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-112 #dfbce5,#314738, 113-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,
+|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-0 d,#608269, 1-4 d,#0d1410, 5-14 #59675c,#0d1410, 15-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
+|18: 0-0 d,#608269, 1-4 d,#0d1410, 5-45 #59675c,#0d1410, 46-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
+|19: 0-0 d,#608269, 1-4 d,#0d1410, 5-14 #59675c,#0d1410, 15-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
+|20: 0-0 d,#608269, 1-4 d,#0d1410, 5-47 #59675c,#0d1410, 48-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
+|21: 0-0 d,#608269, 1-4 d,#0d1410, 5-74 #59675c,#0d1410, 75-75 #59675c,#608269, 76-149 #59675c,#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 step2-file grid=150x31 cursor=7,3
|3: 1 line 1 ls
|4: 2 line 2 big.txt
@@ -180,43 +195,19 @@
|13: 11 line 11
|14: 12 line 12
|15: 13 line 13
-|16: 14 line 14
-|17: 15 line 15
-|18: 16 line 16
-|19: 17 line 17
-|20: 18 line 18
-|21: 19 line 19
-|22: 20 line 20
-|23: 21 line 21
-|24: 22 line 22
-|25: 23 line 23
-== snap step4-line100 grid=150x31 cursor=7,14
-|3: 89 line 89 ls
-|4: 90 line 90 big.txt
-|5: 91 line 91
-|6: 92 line 92
-|7: 93 line 93
-|8: 94 line 94
-|9: 95 line 95
-|10: 96 line 96
-|11: 97 line 97
-|12: 98 line 98
-|13: 99 line 99
-|14: 100 line 100
-|15: 101 line 101
-|16: 102 line 102
-|17: 103 line 103
-|18: 104 line 104
-|19: 105 line 105
-|20: 106 line 106
-|21: 107 line 107
-|22: 108 line 108
-|23: 109 line 109
-|24: 110 line 110
-|25: 111 line 111
-|27: 2 /tmp/pardes-snap/jumps/cwd/big.txt:1:1 line 1
-|28: 3 @p1:3:3 /tmp/pardes-snap/jumps/cwd
-|29: 4 /tmp/pardes-snap/jumps/cwd/big.txt:100:1 line 100
-|30: 5
+== 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,14
+== snap look-row grid=150x31 cursor=7,9
diff --git a/test/snapshots/jumps.snap b/test/snapshots/jumps.snap
index e4816f88..7e66aa91 100644
--- a/test/snapshots/jumps.snap
+++ b/test/snapshots/jumps.snap
@@ -29,7 +29,7 @@ key a-n
key a-c
stable 700 15000
snap to-shell
-key space w h
+key space w h enter
stable 400 5000
snap to-file
# a FAR motion inside one pane: 100G is a jump, so the line we left is
@@ -85,35 +85,34 @@ snap jumplist
# An `@pN` row moves focus like any other, which it did not use to: the STEP
# only selects now, and the look Enter runs goes to the pane by the same route
# a path takes.
-key n
+key space j n
key enter
stable 700 15000
snap step1-shell
snapstyle step1-shell
# on to row 2 — one press, the directory on row 1 is no longer a stop of its own
-key n
+key space j n
key enter
stable 700 15000
snap step2-file
# row 3 is the shell again, then row 4
-key n
+key space j n
stable 400 5000
-key n
+key space j n
key enter
stable 700 15000
snap step4-line100
# N is the exact inverse: one press back onto row 3's location, and Enter
# follows it to the shell
-key N
+key space j p
key enter
stable 700 15000
snap step-back
# and an ordinary LOOK on a row goes there too — the leading word IS a
# location, so the right-click look resolves it like any other path. Row 4
-# again, this time by clicking it: the walk above scrolled the list by one, so
-# the last four screen rows are its rows 2 through 5 and row 4 is the second
-# from the bottom.
-press right 16 30
-release right 16 30
+# again, this time by clicking it: the list shows every row, and its row 4 is
+# screen row 21.
+press right 16 21
+release right 16 21
stable 700 15000
snap look-row
diff --git a/test/snapshots/layout-close.golden b/test/snapshots/layout-close.golden
index 9e573802..a37366e0 100644
--- a/test/snapshots/layout-close.golden
+++ b/test/snapshots/layout-close.golden
@@ -1,51 +1,70 @@
-== snap built grid=140x41 cursor=4,17
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/layout-close/cwd Save Tty Del Togglettymode Filter /tmp/pardes-snap/layout-close/cwd Save Tty Del Togglettymode Filter
+== snap built grid=140x41 cursor=4,16
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/layout-close/cwd Tty+bash Save Mode Filter Collapse /tmp/pardes-snap/layout-close/cwd Tty+bash Save Mode Filter Collapse
+| Del Del
| ls ls
| marker.txt marker.txt
|
-| /tmp/pardes-snap/layout-close/cwd Save Tty Del Togglettymode Filter
+| /tmp/pardes-snap/layout-close/cwd Tty+bash Save Mode Filter Collapse
+| Del
| ls
| marker.txt
|
-| /tmp/pardes-snap/layout-close/cwd Save Tty Del Togglettymode Filter
+| /tmp/pardes-snap/layout-close/cwd Tty+bash Save Mode Filter Collapse
+| Del
| ls
| marker.txt
|
-| /tmp/pardes-snap/layout-close/cwd Save Tty Del Togglettymode Filter
-| ls
-| marker.txt
|
|
|
|
|
-| /tmp/pardes-snap/layout-close/cwd Save Tty Del Togglettymode Filter
+| /tmp/pardes-snap/layout-close/cwd Tty+bash Save Mode Filter Collapse
+| Del
| ls
| marker.txt
-== snap altc grid=140x41 cursor=39,5
-|1: New Tty Find Grep Joincol New Tty Find Grep Joincol New Tty Find Grep Joincol
-|2: /tmp/pardes-snap/layout-close/cwd /tmp/pardes-snap/layout-close/cwd /tmp/pardes-snap/layout-close/cwd Save Tty Del Togglettymode Filter
-|3: ls ls ls
-|4: marker.txt marker.txt marker.txt
-|6: /tmp/pardes-snap/layout-close/cwd
-|10: /tmp/pardes-snap/layout-close/cwd
+|
+| /tmp/pardes-snap/layout-close/cwd Tty+bash Save Mode Filter Collapse
+| Del
+| ls
+| marker.txt
+== snap altc grid=140x41 cursor=39,7
+|1: New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+|2: /tmp/pardes-snap/layout-close/cwd /tmp/pardes-snap/layout-close/cwd /tmp/pardes-snap/layout-close/cwd Tty+bash Save Mode Filter Collapse
+|3: Tty+bash Save Mode Filter Collap Tty+bash Save Mode Filter Collap Del
+|4: se Del se Del ls
+|5: marker.txt ls marker.txt
+|6: marker.txt
+|7: /tmp/pardes-snap/layout-close/cwd
+|8: Tty+bash Save Mode Filter Collap
+|9: se Del
+|10: ls
+|11: marker.txt
+|12:
+|13:
|14:
|15:
-|16:
|22: /tmp/pardes-snap/layout-close/cwd
-== snap del grid=140x41 cursor=39,5
+|23: Tty+bash Save Mode Filter Collap
+|24: se Del
+|27: /tmp/pardes-snap/layout-close/cwd
+|28: Tty+bash Save Mode Filter Collap
+|29: se Del
+|30: ls
+|31: marker.txt
+== snap del grid=140x41 cursor=7,8
+|8: T dkty+bash Save Mode Filter Col
+|9: lapse Del
+== snap exit grid=140x41 cursor=4,12
+|22:
+|23:
+|24:
+|25:
+== snap colclose grid=140x41 cursor=37,1
+|2: /tmp/pardes-snap/layout-close/cwd /tmp/pardes-snap/layout-close/cwd Tty+bash Save Mode Filter Collapse
+|3: Tty+bash Save Mode Filter Collap Del
+|4: se Del ls
+|5: marker.txt marker.txt
|6:
-|7:
-|8:
-== snap exit grid=140x41 cursor=39,5
-|10:
-|11:
-|12:
-== snap colclose grid=140x41 cursor=4,8
-|1: New Tty Find Grep Joincol New Tty Find Grep Joincol
-|2: /tmp/pardes-snap/layout-close/cwd Save Tty Del Togglettymode Filter /tmp/pardes-snap/layout-close/cwd Save Tty Del Togglettymode Filter
-|3: ls ls
-|4: marker.txt marker.txt
-|22: /tmp/pardes-snap/layout-close/cwd Save Tty Del Togglettymode Filter
diff --git a/test/snapshots/layout-close.snap b/test/snapshots/layout-close.snap
index 3d28e1d5..3218cfdb 100644
--- a/test/snapshots/layout-close.snap
+++ b/test/snapshots/layout-close.snap
@@ -1,6 +1,6 @@
# every pane close hands its space to ONE sibling, the rest of the column
# keeps its sizes: Alt-c move-out, tag Del, and shell exit (pty EOF); an
-# emptied column hands its width to one neighbor
+# emptied column stays, as acme's does, its tag over blank space
file marker.txt x
start 41 140 -n 3
wait 8000 marker.txt
@@ -24,18 +24,24 @@ stable 700 15000
snap altc
# Del the 2nd pane: source-local column insertion makes this column too narrow
# to expose its tag words, so focus its body and invoke the same pane-scoped
-# builtin by chord. The pane above absorbs; the other panes keep their rows.
+# builtin by chord. With panes above and below, the chord asks which one
+# takes the rows: k, the pane above, which also takes the focus. The other
+# panes keep their rows.
press left 5 9
release left 5 9
stable 400 5000
key space d
+key k
stable 700 10000
snap del
# exit the (now) 2nd shell through its real tty: pty EOF, again only the pane
-# above absorbs — and focus falls back to the
-# pane that had it before this one (the moved-out column), not to slot 0
-press left 5 15
-release left 5 15
+# above absorbs — and takes the focus too, not the pane that had it before
+# this one (the moved-out column)
+press left 40 9
+release left 40 9
+stable 400 5000
+press left 5 24
+release left 5 24
stable 400 5000
key c-b
stable 400 5000
@@ -43,8 +49,8 @@ text exit
key enter
stable 700 10000
snap exit
-# exit the moved-out pane's shell: its column empties and returns its width to
-# the source column it was carved from; the untouched right column stays put
+# exit the moved-out pane's shell: its column stays where it was, empty, the
+# keyboard on its tag; the other columns keep their widths
press left 40 9
release left 40 9
stable 400 5000
diff --git a/test/snapshots/layout-open.golden b/test/snapshots/layout-open.golden
index 569f98b2..f6caaef7 100644
--- a/test/snapshots/layout-open.golden
+++ b/test/snapshots/layout-open.golden
@@ -1,12 +1,12 @@
-== snap before grid=100x31 cursor=2,9
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/layout-open/cwd Save Tty Del To /tmp/pardes-snap/layout-open/cwd Save Tty Del To
+== snap before grid=100x31 cursor=4,9
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/layout-open/cwd Tty+bash Save M /tmp/pardes-snap/layout-open/cwd Tty+bash Save M
+| ode Filter Collapse Del ode Filter Collapse Del
| ls ls
| sub sub
|
|
-|
| echo one; echo two
|
|
@@ -16,21 +16,27 @@
|
|
|
-| /tmp/pardes-snap/layout-open/cwd Save Tty Del To
+| /tmp/pardes-snap/layout-open/cwd Tty+bash Save M
+| ode Filter Collapse Del
| ls
| sub
-== snap altn-left grid=100x31 cursor=4,9
-|6: /tmp/pardes-snap/layout-open/cwd Save Tty Del To
-|7: ls
-|8: sub
-== snap altn-right grid=100x31 cursor=54,9
-|6: /tmp/pardes-snap/layout-open/cwd Save Tty Del To /tmp/pardes-snap/layout-open/cwd Save Tty Del To
-|7: ls ls
-|8: sub sub
-== snap file-open grid=100x31 cursor=7,22
-|21: /tmp/pardes-snap/layout-open/cwd/sub/f.txt Save
-|22: 1 echo 'TTY'OK
-== snap ttydir grid=100x31 cursor=7,22
-|10: /tmp/pardes-snap/layout-open/cwd/sub Save Tty De
-|11: echo 'TTY'OK
-|12: TTYOK
+== snap altn-left grid=100x31 cursor=4,11
+|7: /tmp/pardes-snap/layout-open/cwd Tty+bash Save M
+|8: ode Filter Collapse Del
+|9: ls
+|10: sub
+== snap altn-right grid=100x31 cursor=54,11
+|7: /tmp/pardes-snap/layout-open/cwd Tty+bash Save M /tmp/pardes-snap/layout-open/cwd Tty+bash Save M
+|8: ode Filter Collapse Del ode Filter Collapse Del
+|9: ls ls
+|10: sub sub
+== snap file-open grid=100x31 cursor=7,24
+|22: /tmp/pardes-snap/layout-open/cwd/sub/f.txt Save
+|23: Tty Collapse Del
+|24: 1 echo 'TTY'OK
+== snap ttydir grid=100x31 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: Tty Collapse Del TTYOK
+|24: 1 echo 'TTY'OK exit 0
diff --git a/test/snapshots/layout-open.snap b/test/snapshots/layout-open.snap
index d7d7e19e..43cf56dd 100644
--- a/test/snapshots/layout-open.snap
+++ b/test/snapshots/layout-open.snap
@@ -1,5 +1,5 @@
# every pane open splits ONE existing pane, the rest of the column keeps its
-# sizes: Alt-n splits the active pane, an execute-spawned shell for a file's
+# sizes: Alt-n splits the active pane, an execute-spawned command pane for a file's
# dir splits only the bottom pane of the rightmost column. At this narrow
# width the first looked-up file also splits below its source, leaving every
# unrelated pane (including the ones above the source) at its exact rectangle.
@@ -44,13 +44,13 @@ press right 7 28
release right 7 28
stable 700 15000
snap file-open
-# execute the file's command (middle drag over line 1): no shell has cwd sub/,
-# so one is forked at the bottom of the rightmost column, splitting only the
-# pane above it
-press middle 8 23
-drag middle 19 23
-release middle 19 23
+# execute the file's command (middle drag over line 1): it runs as a command
+# pane for sub/, forked at the bottom of the rightmost column, splitting only
+# the pane above it
+press middle 8 25
+drag middle 19 25
+release middle 19 25
wait 10000 TTYOK
-motion 40 25
+motion 40 27
stable 700 10000
snap ttydir
diff --git a/test/snapshots/leader.golden b/test/snapshots/leader.golden
index d084250c..a584f201 100644
--- a/test/snapshots/leader.golden
+++ b/test/snapshots/leader.golden
@@ -1,70 +1,61 @@
== snap spc grid=100x41 cursor=7,3
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/leader/cwd/cmds.txt Save Tty Del Collapse
-| 1 Help
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-| SPC
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/leader/cwd/cmds.txt Save Tty Collapse Del
+| 1 Help SPC
== snap spc-h grid=100x41 cursor=7,3
-|40: SPC h
+|3: 1 Help SPC h
== snap abandoned grid=100x41 cursor=7,3
-|40:
+|3: 1 Help
== snap unmapped grid=100x41 cursor=7,3
-== snap help-group grid=100x41 cursor=7,23
-|22: /tmp/pardes-snap/leader/cwd/+Help Save Tty Del Collapse
-|23: 1 pardes builtins under SPC h
-|24: 2
-|25: 3 SPC h c Changelog topbar
-|26: 4 SPC h m Messages
-|27: 5 SPC h t Tutor topbar
-|28: 6
-== snap tutor grid=100x41 cursor=7,13
-|12: /Tutor Save Tty Del Collapse
-|13: 1
-|14: 2 PARDES TUTOR
-|15: 3 tmux + vi + acme, from scratch.
-|16: 4
-|17: 5 The model is acme's: EVERYTHING is text, editable and executable
-|18: 6 the same way. Modal editing (helix-style) lives on top of that.
-|19: 7 Press j until you reach the introduction.
-|20: 8
-|21: 9
-== snap deleted grid=100x41 cursor=7,23
+== snap help-group grid=100x41 cursor=7,6
+|5: /tmp/pardes-snap/leader/cwd/+Help Save Tty Collapse Del
+|6: 1 pardes builtins under SPC h
+|7: 2
+|8: 3 SPC h c Changelog topbar
+|9: 4 SPC h m Messages
+|10: 5 SPC h t Tutor topbar
+|11: 6
+== snap tutor grid=100x41 cursor=7,12
+|6: 1 pardes builtins under SPC h Tutor
+|11: /tmp/pardes-snap/leader/cwd/+Tutor Save Tty Collapse Del
+|12: 1
+|13: 2 PARDES TUTOR
+|14: 3
+|15: 4 This pane is +Tutor, a copy: edit it freely; there is no need to
+|16: 5 Save it (a bare Save asks for a path to write a copy to).
+|17: 6 `Del` in its tag closes it; once you have edited it, `Del` refuses
+|18: 7 once and the second `Del` discards. `Tutor` or SPC h t opens a
+|19: 8 fresh copy.
+|20: 9
+|21: 10 The guide (docs/typ/guide.typ) explains; this is the hands-on part.
+|22: 11 Each lesson is a few things to do, then names its guide section.
+|23: 12 Words in backticks, like `Save`, are builtins.
+|24: 13 `Exec` (B2) runs the builtin a word names, or else runs it as a
+|25: 14 shell line; `Look` (B3) opens what the text names, or else finds
+|26: 15 it. Type a builtin in any tag and `Exec` it. Lines starting with
+|27: 16 "| " are tags.
+|28: 17
+|29: 18 Press j until you reach part 1.
+|30: 19
+|31: 20
+|32: 21 =================================================================
+|33: 22 = PART 1 — MODES =
+|34: 23 =================================================================
+|35: 24
+|36: 25 1. The box left of this pane's tag is blank, so you are in
+|37: 26 NORMAL mode. Press i: it shows ^ (INSERT). Type a word, then
+|38: 27 Esc: blank again.
+|39: 28 2. Press Esc once more, in NORMAL: the keyboard goes back to the
+|40: 29 pane you were in before (not what helix does). Come back with
+== snap deleted grid=100x41 cursor=7,3
+|5:
+|6:
+|7:
+|8:
+|9:
+|10:
+|11:
|12:
|13:
|14:
@@ -75,31 +66,6 @@
|19:
|20:
|21:
-== snap help-window grid=100x41 cursor=7,23
-|23: 1 pardes builtins under SPC w
-|25: 3 SPC w h Left C-w h, C-w left
-|26: 4 SPC w j Down C-w j, C-w down
-|27: 5 SPC w k Up C-w k, C-w up
-|28: 6 SPC w l Right C-w l, C-w right
-|29: 7
-== snap help-language grid=100x41 cursor=7,23
-|23: 1 pardes builtins under SPC l
-|25: 3 SPC l C Callees
-|26: 4 SPC l D WsDiagnostics
-|27: 5 SPC l S WsSymbols
-|28: 6 SPC l T Subtypes
-|29: 7 SPC l a CodeAction
-|30: 8 SPC l c Callers
-|31: 9 SPC l d Diagnostics
-|32: 10 SPC l h SelectRefs
-|33: 11 SPC l i Lspinfo
-|34: 12 SPC l k Hover
-|35: 13 SPC l r Rename
-|36: 14 SPC l s Symbols
-|37: 15 SPC l t Supertypes
-|38: 16 SPC l w Lspwhy
-|39: 17
-== snap del-output grid=100x41 cursor=7,3
|22:
|23:
|24:
@@ -113,8 +79,70 @@
|32:
|33:
|34:
+|35: /tmp/pardes-snap/leader/cwd/+Help Save Tty Collapse Del
+|36: 1 pardes builtins under SPC h
+|37: 2
+|38: 3 SPC h c Changelog topbar
+|39: 4 SPC h m Messages
+|40: 5 SPC h t Tutor topbar
+== snap help-column grid=100x41 cursor=7,6
+|5: /tmp/pardes-snap/leader/cwd/+Help Save Tty Collapse Del
+|6: 1 pardes builtins under SPC c
+|7: 2
+|8: 3 SPC c d Delcol
+|9: 4 SPC c j Joincol topbar
+|10: 5 SPC c n Newcol topbar
+|11: 6 SPC c p Placement
+|12: 7
|35:
|36:
|37:
|38:
|39:
+|40:
+== snap help-language grid=100x41 cursor=7,6
+|6: 1 pardes builtins under SPC l
+|8: 3 SPC l C Callees
+|9: 4 SPC l D WsDiagnostics
+|10: 5 SPC l S WsSymbols
+|11: 6 SPC l T Subtypes
+|12: 7 SPC l a CodeAction
+|13: 8 SPC l b Callstack
+|14: 9 SPC l c Callers
+|15: 10 SPC l d Diagnostics
+|16: 11 SPC l h SelectRefs
+|17: 12 SPC l i Lspinfo
+|18: 13 SPC l k Hover
+|19: 14 SPC l r Rename
+|20: 15 SPC l s Symbols
+|21: 16 SPC l t Supertypes
+|22: 17 SPC l w Lspwhy
+|23: 18
+|24: 19 Callstack: static caller chains,
+|25: 20 with signatures and clickable call sites.
+|26: 21 Callers / Callees: one direction at a time.
+|27: 22
+== snap del-output grid=100x41 cursor=7,3
+|5:
+|6:
+|7:
+|8:
+|9:
+|10:
+|11:
+|12:
+|13:
+|14:
+|15:
+|16:
+|17:
+|18:
+|19:
+|20:
+|21:
+|22:
+|23:
+|24:
+|25:
+|26:
+|27:
diff --git a/test/snapshots/leader.snap b/test/snapshots/leader.snap
index f018a88c..f6068cba 100644
--- a/test/snapshots/leader.snap
+++ b/test/snapshots/leader.snap
@@ -14,7 +14,7 @@ key esc
settle 100
stable 400 5000
snap abandoned
-key space q
+key space x
stable 400 5000
snap unmapped
@@ -32,9 +32,16 @@ key space h t
wait 10000 PARDES TUTOR
stable 700 15000
snap tutor
+# the tutor is at the foot of its column (acme's placement put it under the
+# +Help's text), so SPC d has nothing to ask and closes it at once
key space d
stable 700 15000
snap deleted
+# ...and the +Help it squeezed goes too, so the full index below opens with
+# room to show it
+key c-w j enter
+key space d
+stable 700 15000
key space ?
wait 10000 pardes builtins, and how to run each:
@@ -47,10 +54,12 @@ wait 10000 Ascii
wait 10000 Palette
wait 10000 Petscii
wait 10000 Wrap
-key space w ?
-wait 10000 Right
+# SPC w is Window itself now, not a group; the column group stands in
+key space c ?
+wait 10000 under SPC c
+wait 10000 Joincol
stable 700 15000
-snap help-window
+snap help-column
key space l ?
wait 10000 WsDiagnostics
stable 700 15000
diff --git a/test/snapshots/load.golden b/test/snapshots/load.golden
index ebfe6a39..18de9a8f 100644
--- a/test/snapshots/load.golden
+++ b/test/snapshots/load.golden
@@ -1,11 +1,12 @@
== snap loaded grid=100x31 cursor=4,16
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/load/cwd Save Tty Del Toggletty /tmp/pardes-snap/load/cwd Save Tty Del Toggletty
-| echo LOAD''MARK; seq 1 40; echo E''ND ls
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/load/cwd Tty+bash Save Mode Fil /tmp/pardes-snap/load/cwd Tty+bash Save Mode Fil
+| ter Collapse Del ter Collapse Del
+| $ echo LOAD''MARK; seq 1 40; echo E''ND $ ls
| LOADMARK d.txt
-| 1
-| 2
+| 1 $
+| 2 ── restored history ──
| 3
| 4
| 5
@@ -15,39 +16,41 @@
| 9
| 10
| 11
-| 12
-| /tmp/pardes-snap/load/cwd Save Tty Del Toggletty
-| ls
+| /tmp/pardes-snap/load/cwd Tty+bash Save Mode Fil
+| ter Collapse Del
+| $ ls
| d.txt
+| $
+| ── restored history ──
== style loaded grid=100x31
-|0: 0-70 #b2c3b8,#1d2824, 71-99 d,#1d2824,
-|1: 0-24 #becfc4,#26362d, 25-49 d,#26362d, 50-74 #b2c3b8,#1d2824, 75-99 d,#1d2824,
-|2: 0-1 #000000,#adcc91, 2-49 #becfc4,#26362d, 50-51 #ffffff,#4c6356, 52-99 #b2c3b8,#1d2824,
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|4: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|5: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|6: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|7: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|8: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|9: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|10: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|11: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|12: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|13: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|14: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|15: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|16: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|17: 0-1 #ffffff,#4c6356, 2-49 #b2c3b8,#1d2824, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|18: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|19: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|20: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|21: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|22: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|23: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|24: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|25: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|26: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|27: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|28: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|29: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|30: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
+|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,
+|2: 0-1 d,#add38a, 2-27 #becfc4,#314738, 28-36 #dfbce5,#314738, 37-49 #becfc4,#314738, 50-51 #becfc4,#496656, 52-77 #b2c3b8,#1d2824, 78-86 #d3b0d9,#1d2824, 87-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,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
+|5: 0-0 d,#608269, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
+|6: 0-0 d,#608269, 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,
+|8: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
+|9: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
+|10: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
+|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,#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-36 #d3b0d9,#1d2824, 37-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,
+|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-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#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,
+|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,
+|26: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
+|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,
diff --git a/test/snapshots/logquiet.golden b/test/snapshots/logquiet.golden
index d5c4703b..896e17d2 100644
--- a/test/snapshots/logquiet.golden
+++ b/test/snapshots/logquiet.golden
@@ -1,7 +1,7 @@
== snap quiet grid=100x31 cursor=62,5
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-|$ /tmp/pardes-snap/logquiet/cwd Save Tty Del Togglettymode Filter Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+|$ /tmp/pardes-snap/logquiet/cwd Tty+bash Save Mode Filter Collapse Del
| $ 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
diff --git a/test/snapshots/look-center.golden b/test/snapshots/look-center.golden
index 7509da8f..fcc65ceb 100644
--- a/test/snapshots/look-center.golden
+++ b/test/snapshots/look-center.golden
@@ -1,11 +1,11 @@
-== snap center-open grid=150x31 cursor=7,12
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/look-center/cwd Save Tty Del Togglettymode Filter Collap /tmp/pardes-snap/look-center/cwd Save Tty Del Togglettymode Filter Collap
+== snap center-open grid=150x31 cursor=15,12
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/look-center/cwd Tty+bash Save Mode Filter Collapse Del /tmp/pardes-snap/look-center/cwd Tty+bash Save Mode Filter Collapse Del
| ls ls
| big.txt big.txt
|
-| /tmp/pardes-snap/look-center/cwd/big.txt Save Tty Del Collapse
+| /tmp/pardes-snap/look-center/cwd/big.txt Save Tty Collapse Del
| 95 line 95
| 96 line 96
| 97 line 97
@@ -16,10 +16,10 @@
| 102 line 102
| 103 line 103
| 104 line 104
-| /tmp/pardes-snap/look-center/cwd Save Tty Del Togglettymode Filter Collap
+| /tmp/pardes-snap/look-center/cwd Tty+bash Save Mode Filter Collapse Del
| ls
| big.txt
-== snap center-dedup grid=150x31 cursor=7,12
+== 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
@@ -30,7 +30,7 @@
|14: 152 line 152
|15: 153 line 153
|16: 154 line 154
-== snap center-clamp grid=150x31 cursor=7,8
+== 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
diff --git a/test/snapshots/look-dir.golden b/test/snapshots/look-dir.golden
index e859a3f4..4acc0d79 100644
--- a/test/snapshots/look-dir.golden
+++ b/test/snapshots/look-dir.golden
@@ -1,11 +1,13 @@
-== snap dir-open grid=100x31 cursor=4,9
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/look-dir/cwd Save Tty Del Toggl /tmp/pardes-snap/look-dir/cwd Save Tty Del Toggl
+== snap dir-open grid=100x31 cursor=4,11
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/look-dir/cwd Tty+bash Save Mode /tmp/pardes-snap/look-dir/cwd Tty+bash Save Mode
+| Filter Collapse Del Filter Collapse Del
| ls ls
| sub top.txt sub top.txt
|
-| /tmp/pardes-snap/look-dir/cwd/sub Save Tty Del T
+| /tmp/pardes-snap/look-dir/cwd/sub Tty+bash Save
+| Mode Filter Collapse Del
| ls
| inner.txt
|
@@ -14,8 +16,7 @@
|
|
|
-|
-|
-| /tmp/pardes-snap/look-dir/cwd Save Tty Del Toggl
+| /tmp/pardes-snap/look-dir/cwd Tty+bash Save Mode
+| Filter Collapse Del
| ls
| sub top.txt
diff --git a/test/snapshots/look-dir.snap b/test/snapshots/look-dir.snap
index caf29da8..2032d0c0 100644
--- a/test/snapshots/look-dir.snap
+++ b/test/snapshots/look-dir.snap
@@ -2,6 +2,9 @@
dirmk sub
file sub/inner.txt inner-marker
file top.txt x
+# a directory looked at opens a terminal there (DirLook terminal), as this
+# script was written for; DirLook pane, the default, is dirpane.snap's
+config DirLook terminal
start 31 100 -n 3
wait 8000 top.txt
stable 700 20000
diff --git a/test/snapshots/look-fd-deep.golden b/test/snapshots/look-fd-deep.golden
new file mode 100644
index 00000000..c0e0c304
--- /dev/null
+++ b/test/snapshots/look-fd-deep.golden
@@ -0,0 +1,30 @@
+== snap listed grid=100x31 cursor=4,9
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+|$ /tmp/pardes-snap/look-fd-deep/cwd/a Tty+bash Save Mode Filter Collapse Del
+| $ exec timeout --foreground 600 bash -i
+| $ cd a && ls && fd
+| b top.txt
+| b/
+| b/c.txt
+| top.txt
+| $
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/look-fd-deep/cwd/+New Save Tty Collapse Del
+| 1
+== snap fd-path-looked grid=100x31 cursor=7,11
+|10: /tmp/pardes-snap/look-fd-deep/cwd/a/b/c.txt Save Tty Collapse 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 Tty Collapse Del
+|14: 1 top-marker
diff --git a/test/snapshots/look-fd-deep.snap b/test/snapshots/look-fd-deep.snap
new file mode 100644
index 00000000..8df0aaaf
--- /dev/null
+++ b/test/snapshots/look-fd-deep.snap
@@ -0,0 +1,34 @@
+# A shell run under a wrapper exec'd over the one pardes started, that
+# stays where it started (fish's own `exec 9ns --mntgen -- fish`; timeout
+# here): after a cd the pane is where the foreground shell is, not where
+# the wrapper is. So a path fd prints two
+# directories down (b/c.txt) and a name ls prints (top.txt) look from there.
+# The fd path goes first: the file it opens sits in a/b, a directory that
+# could not rescue the ls name after it.
+dirmk a
+dirmk a/b
+file a/top.txt top-marker
+file a/b/c.txt deep-marker
+start 31 100
+wait 8000 $
+stable 700 20000
+text exec timeout --foreground 600 bash -i
+key enter
+stable 700 20000
+text cd a && ls && fd
+key enter
+wait 8000 c.txt
+wait 8000 cwd/a Tty
+stable 700 20000
+snap listed
+press right 6 8
+release right 6 8
+wait 10000 deep-marker
+stable 700 15000
+snap fd-path-looked
+# the ls name, from the shell's directory
+press right 8 6
+release right 8 6
+wait 10000 top-marker
+stable 700 15000
+snap ls-name-looked
diff --git a/test/snapshots/look-file-1col.golden b/test/snapshots/look-file-1col.golden
index 553e1942..53fc4237 100644
--- a/test/snapshots/look-file-1col.golden
+++ b/test/snapshots/look-file-1col.golden
@@ -1,11 +1,11 @@
-== snap file-open-1col grid=100x31 cursor=7,19
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/look-file-1col/cwd Save Tty Del Togglettymode Filter Collapse
+== snap file-open-1col grid=100x31 cursor=14,19
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/look-file-1col/cwd Tty+bash Save Mode Filter Collapse Del
| ls
| big.txt
|
-| /tmp/pardes-snap/look-file-1col/cwd/big.txt Save Tty Del Collapse
+| /tmp/pardes-snap/look-file-1col/cwd/big.txt Save Tty Collapse Del
| 28 line 28
| 29 line 29
| 30 line 30
diff --git a/test/snapshots/look-file.golden b/test/snapshots/look-file.golden
index dccbb07c..bf46f854 100644
--- a/test/snapshots/look-file.golden
+++ b/test/snapshots/look-file.golden
@@ -1,11 +1,11 @@
-== snap file-open grid=150x31 cursor=7,12
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/look-file/cwd Save Tty Del Togglettymode Filter Collapse /tmp/pardes-snap/look-file/cwd Save Tty Del Togglettymode Filter Collapse
+== snap file-open grid=150x31 cursor=14,12
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/look-file/cwd Tty+bash Save Mode Filter Collapse Del /tmp/pardes-snap/look-file/cwd Tty+bash Save Mode Filter Collapse Del
| ls ls
| big.txt big.txt
|
-| /tmp/pardes-snap/look-file/cwd/big.txt Save Tty Del Collapse
+| /tmp/pardes-snap/look-file/cwd/big.txt Save Tty Collapse Del
| 35 line 35
| 36 line 36
| 37 line 37
@@ -16,38 +16,38 @@
| 42 line 42
| 43 line 43
| 44 line 44
-| /tmp/pardes-snap/look-file/cwd Save Tty Del Togglettymode Filter Collapse
+| /tmp/pardes-snap/look-file/cwd Tty+bash Save Mode Filter Collapse Del
| ls
| big.txt
== style file-open grid=150x31
-|0: 0-70 #b2c3b8,#1d2824, 71-149 d,#1d2824,
-|1: 0-24 #becfc4,#26362d, 25-74 d,#26362d, 75-99 #b2c3b8,#1d2824, 100-149 d,#1d2824,
-|2: 0-1 #ffffff,#4c6356, 2-74 #b2c3b8,#1d2824, 75-76 #ffffff,#4c6356, 77-149 #b2c3b8,#1d2824,
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|4: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|5: 0-0 d,#637f6a, 1-74 d,#0d1410, 75-75 d,#637f6a, 76-149 d,#0d1410,
-|6: 0-1 #000000,#adcc91, 2-61 #becfc4,#26362d, 62-74 d,#26362d, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|7: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-13 #e5eee5,#0d1410, 14-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|8: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-13 #e5eee5,#0d1410, 14-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|9: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-13 #e5eee5,#0d1410, 14-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|10: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-13 #e5eee5,#0d1410, 14-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|11: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-13 #e5eee5,#0d1410, 14-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|12: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #616f64,#0d1410,b 7-13 #e5eee5,#0d1410, 14-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|13: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-13 #e5eee5,#0d1410, 14-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|14: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-13 #e5eee5,#0d1410, 14-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|15: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-13 #e5eee5,#0d1410, 14-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|16: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-13 #e5eee5,#0d1410, 14-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|17: 0-1 #ffffff,#4c6356, 2-74 #b2c3b8,#1d2824, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|18: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|19: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|20: 0-0 d,#637f6a, 1-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|21: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|22: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|23: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|24: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|25: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|26: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|27: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|28: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|29: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|30: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
+|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-32 #b2c3b8,#1d2824, 33-41 #d3b0d9,#1d2824, 42-74 #b2c3b8,#1d2824, 75-76 #b2c3b8,#496656, 77-107 #b2c3b8,#1d2824, 108-116 #d3b0d9,#1d2824, 117-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-41 #d3b0d9,#1d2824, 42-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,
diff --git a/test/snapshots/lookloaded.golden b/test/snapshots/lookloaded.golden
index 1ff8c44f..62028dc6 100644
--- a/test/snapshots/lookloaded.golden
+++ b/test/snapshots/lookloaded.golden
@@ -1,12 +1,13 @@
-== snap file-open grid=100x31 cursor=7,12
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/lookloaded/cwd Save Tty Del Tog /tmp/pardes-snap/lookloaded/cwd Save Tty Del Tog
+== snap file-open grid=100x31 cursor=14,13
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/lookloaded/cwd Tty+bash Save Mo /tmp/pardes-snap/lookloaded/cwd Tty+bash Save Mo
+| de Filter Collapse Del de Filter Collapse Del
| ls ls
| big.txt big.txt
|
| /tmp/pardes-snap/lookloaded/cwd/big.txt Save Tty
-| 35 line 35
+| Collapse Del
| 36 line 36
| 37 line 37
| 38 line 38
@@ -15,21 +16,20 @@
| 41 line 41
| 42 line 42
| 43 line 43
-| 44 line 44
-| /tmp/pardes-snap/lookloaded/cwd Save Tty Del Tog
+| /tmp/pardes-snap/lookloaded/cwd Tty+bash Save Mo
+| de Filter Collapse Del
| ls
| big.txt
-== snap removed grid=100x31 cursor=54,7
-|5: rm big.txt; echo GO''NE
-|6: /tmp/pardes-snap/lookloaded/cwd/big.txt Save Tty GONE
-== snap look-noFS grid=100x31 cursor=7,12
-|7: 5 line 5
-|8: 6 line 6 big.txt:10
-|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
-|16: 14 line 14
+== snap removed grid=100x31 cursor=54,8
+|6: rm big.txt; echo GO''NE
+|7: */tmp/pardes-snap/lookloaded/cwd/big.txt Save Tty GONE
+== snap look-noFS grid=100x31 cursor=14,13
+|8: Collapse 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
diff --git a/test/snapshots/lookpanes.golden b/test/snapshots/lookpanes.golden
index 73aab814..6689c710 100644
--- a/test/snapshots/lookpanes.golden
+++ b/test/snapshots/lookpanes.golden
@@ -1,74 +1,80 @@
== snap shells grid=130x51 cursor=122,4
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/lookpanes/cwd/beta/bmark.txt Save Tty Del Coll /tmp/pardes-snap/lookpanes/cwd Save Tty Del Togglettymode Filte
-| 1 both.txt ls
-| 2 b-marker alpha beta zzboot.txt zqonly.txt pick.txt twin.txt
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/lookpanes/cwd/beta/bmark.txt Save Tty Collapse /tmp/pardes-snap/lookpanes/cwd Tty+bash Save Mode Filter Collap
+| Del se Del
+| 1 both.txt ls zqonly.txt pick.txt twin.txt
+| 2 b-marker alpha beta zzboot.txt
|
-| /tmp/pardes-snap/lookpanes/cwd/alpha Save Tty Del Togglettymode
+| /tmp/pardes-snap/lookpanes/cwd/alpha Tty+bash Save Mode Filter
+| Collapse Del
| ls
| amark.txt both.txt pick.txt twin.txt zqonly.txt
-== snap other-dir grid=130x51 cursor=7,28
-|27: /tmp/pardes-snap/lookpanes/cwd/alpha/zqonly.txt Save Tty Del Co
-|28: 1 ONLY-IN-ALPHA
-== snap clicked-wins grid=130x51 cursor=7,16
-|15: /tmp/pardes-snap/lookpanes/cwd/beta/both.txt Save Tty Del Colla
-|16: 1 BOTH-FROM-BETA
-== snap mru-alpha grid=130x51 cursor=7,22
-|21: /tmp/pardes-snap/lookpanes/cwd/alpha/pick.txt Save Tty Del Coll
-|22: 1 PICK-FROM-ALPHA
-== snap mru-beta grid=130x51 cursor=7,10
-|9: /tmp/pardes-snap/lookpanes/cwd/beta/twin.txt Save Tty Del Colla
-|10: 1 TWIN-FROM-BETA
+== snap other-dir grid=130x51 cursor=7,8
+|6: /tmp/pardes-snap/lookpanes/cwd/alpha/zqonly.txt Save Tty Collap
+|7: se Del /tmp/pardes-snap/lookpanes/cwd/alpha Tty+bash Save Mode Filter
+|8: 1 ONLY-IN-ALPHA Collapse Del
+== snap clicked-wins grid=130x51 cursor=7,12
+|10: /tmp/pardes-snap/lookpanes/cwd/beta/both.txt Save Tty Collapse amark.txt both.txt pick.txt twin.txt zqonly.txt
+|11: Del
+|12: 1 BOTH-FROM-BETA
+== snap mru-alpha grid=130x51 cursor=72,14
+|12: 1 BOTH-FROM-BETA /tmp/pardes-snap/lookpanes/cwd/alpha/pick.txt Save Tty Collapse
+|13: Del
+|14: 1 PICK-FROM-ALPHA
+== snap mru-beta grid=130x51 cursor=7,16
+|14: /tmp/pardes-snap/lookpanes/cwd/beta/twin.txt Save Tty Collapse 1 PICK-FROM-ALPHA
+|15: Del
+|16: 1 TWIN-FROM-BETA
== style mru-beta grid=130x51
-|0: 0-70 #b2c3b8,#1d2824, 71-129 d,#1d2824,
-|1: 0-24 #becfc4,#26362d, 25-64 d,#26362d, 65-89 #b2c3b8,#1d2824, 90-129 d,#1d2824,
-|2: 0-1 #ffffff,#4c6356, 2-64 #b2c3b8,#1d2824, 65-66 #ffffff,#4c6356, 67-129 #b2c3b8,#1d2824,
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-14 #e5eee5,#0d1410, 15-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|4: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-14 #e5eee5,#0d1410, 15-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-121 #e5eee5,#0d1410, 122-129 d,#0d1410,
-|5: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-65 d,#637f6a, 66-129 d,#0d1410,
-|6: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-66 #ffffff,#4c6356, 67-129 #b2c3b8,#1d2824,
-|7: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|8: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|9: 0-1 #000000,#adcc91, 2-64 #becfc4,#26362d, 65-65 d,#637f6a, 66-129 d,#0d1410,
-|10: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #616f64,#0d1410,b 7-20 #e5eee5,#0d1410, 21-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|11: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|12: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|13: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|14: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|15: 0-1 #ffffff,#4c6356, 2-64 #b2c3b8,#1d2824, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|16: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-20 #e5eee5,#0d1410, 21-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|17: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|18: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|19: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|20: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|21: 0-1 #ffffff,#4c6356, 2-64 #b2c3b8,#1d2824, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|22: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-21 #e5eee5,#0d1410, 22-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|23: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|24: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|25: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|26: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|27: 0-1 #ffffff,#4c6356, 2-64 #b2c3b8,#1d2824, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|28: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-19 #e5eee5,#0d1410, 20-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|29: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|30: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|31: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|32: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|33: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|34: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|35: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|36: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|37: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|38: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|39: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|40: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|41: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|42: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|43: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|44: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|45: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|46: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|47: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|48: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|49: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
-|50: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-64 d,#0d1410, 65-65 d,#637f6a, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
+|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-106 #d3b0d9,#1d2824, 107-129 #b2c3b8,#1d2824,
+|3: 0-2 d,#1d2824, 3-129 #b2c3b8,#1d2824,
+|4: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-64 #e5eee5,#0d1410, 65-65 #e5eee5,#608269, 66-129 #e5eee5,#0d1410,
+|5: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-64 #e5eee5,#0d1410, 65-65 #e5eee5,#608269, 66-129 #e5eee5,#0d1410,
+|6: 0-1 d,#496656, 2-38 #b2c3b8,#1d2824, 39-49 #d3b0d9,#1d2824, 50-64 #b2c3b8,#1d2824, 65-65 #b2c3b8,#608269, 66-129 #b2c3b8,#0d1410,
+|7: 0-1 d,#1d2824, 2-64 #b2c3b8,#1d2824, 65-66 #b2c3b8,#496656, 67-103 #b2c3b8,#1d2824, 104-112 #d3b0d9,#1d2824, 113-129 #b2c3b8,#1d2824,
+|8: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-64 #e5eee5,#0d1410, 65-66 #e5eee5,#1d2824, 67-129 #b2c3b8,#1d2824,
+|9: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410,
+|10: 0-1 d,#496656, 2-37 #b2c3b8,#1d2824, 38-46 #d3b0d9,#1d2824, 47-64 #b2c3b8,#1d2824, 65-65 #b2c3b8,#608269, 66-66 #b2c3b8,#0d1410, 67-129 #e5eee5,#0d1410,
+|11: 0-1 d,#1d2824, 2-64 #b2c3b8,#1d2824, 65-65 #b2c3b8,#608269, 66-129 #b2c3b8,#0d1410,
+|12: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-64 #e5eee5,#0d1410, 65-66 #e5eee5,#496656, 67-103 #b2c3b8,#1d2824, 104-112 #d3b0d9,#1d2824, 113-129 #b2c3b8,#1d2824,
+|13: 0-0 d,#608269, 1-64 d,#0d1410, 65-67 d,#1d2824, 68-129 #b2c3b8,#1d2824,
+|14: 0-1 d,#add38a, 2-37 #becfc4,#314738, 38-46 #dfbce5,#314738, 47-64 #becfc4,#314738, 65-65 #becfc4,#608269, 66-69 #becfc4,#0d1410, 70-71 #59675c,#0d1410, 72-129 #e5eee5,#0d1410,
+|15: 0-1 d,#314738, 2-64 #becfc4,#314738, 65-65 #becfc4,#608269, 66-129 #becfc4,#0d1410,
+|16: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-64 #e5eee5,#0d1410, 65-65 #e5eee5,#608269, 66-129 #e5eee5,#0d1410,
+|17: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
+|18: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
+|19: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
+|20: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
+|21: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
+|22: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
+|23: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
+|24: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
+|25: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
+|26: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
+|27: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
+|28: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
+|29: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
+|30: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
+|31: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
+|32: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
+|33: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
+|34: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
+|35: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
+|36: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
+|37: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
+|38: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
+|39: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
+|40: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
+|41: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
+|42: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
+|43: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
+|44: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
+|45: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
+|46: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
+|47: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
+|48: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
+|49: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
+|50: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410,
diff --git a/test/snapshots/lookpanes.snap b/test/snapshots/lookpanes.snap
index 3bc8055c..2834a4a9 100644
--- a/test/snapshots/lookpanes.snap
+++ b/test/snapshots/lookpanes.snap
@@ -20,6 +20,13 @@ file beta/both.txt BOTH-FROM-BETA
# directory at that) and Alt-c puts it in a column of its own on the right;
# its first line is a word to look FROM that pane
file beta/bmark.txt both.txt\nb-marker
+# Builtins announce themselves by default, and an announcement is a band at
+# the top of the body -- which moves every row this script clicks. What the
+# verbs do is what is under test, not the announcement.
+config Verbose off
+# a directory looked at opens a terminal there (DirLook terminal), as this
+# script was written for; DirLook pane, the default, is dirpane.snap's
+config DirLook terminal
start 51 130 beta/bmark.txt
wait 8000 b-marker
stable 700 20000
@@ -31,8 +38,8 @@ key space w h
stable 400 5000
# an ordinary dir look on the shell's own ls output: a shell in ./alpha,
# split below it
-press right 70 5
-release right 70 5
+press right 70 6
+release right 70 6
wait 10000 amark.txt
stable 700 20000
# type the words to look into what is left of the workdir shell (past its own
@@ -47,8 +54,8 @@ settle 100
stable 400 5000
snap shells
# make the beta pane the most recently focused, so the walk has to pass it
-press left 10 4
-release left 10 4
+press left 10 5
+release left 10 5
stable 700 10000
# zqonly.txt is only under alpha: the clicked shell's cwd fails, beta fails,
# the alpha shell answers. Before, this word became a search.
@@ -60,15 +67,15 @@ snap other-dir
# both.txt is in BOTH dirs and alpha is now the most recent (its file pane
# just opened), but the CLICK still wins: looked inside the beta pane it
# opens beta's copy
-press right 10 4
-release right 10 4
+press right 10 5
+release right 10 5
wait 10000 BOTH-FROM-BETA
stable 700 20000
snap clicked-wins
# from a pane whose own dir holds neither copy the access order decides:
# focus the alpha shell, look pick.txt (in both dirs) -> alpha's
-press left 70 13
-release left 70 13
+press left 70 14
+release left 70 14
stable 700 10000
press right 109 5
release right 109 5
@@ -77,8 +84,8 @@ stable 700 20000
snap mru-alpha
# focus the beta pane instead and the same look flips: twin.txt is in both
# dirs, beta is most recent, beta's copy opens
-press left 10 4
-release left 10 4
+press left 10 5
+release left 10 5
stable 700 10000
press right 118 5
release right 118 5
diff --git a/test/snapshots/lookrange.golden b/test/snapshots/lookrange.golden
index 4e916932..8f5908bb 100644
--- a/test/snapshots/lookrange.golden
+++ b/test/snapshots/lookrange.golden
@@ -1,142 +1,100 @@
== snap opened grid=150x31 cursor=7,3
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/lookrange/cwd/look.txt Save Tty Del Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/lookrange/cwd/look.txt Save Tty Collapse 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,22
-|17: /tmp/pardes-snap/lookrange/cwd/r.txt Save Tty Del Collapse
-|18: 1 aaaa
-|19: 2 bbbb
-|20: 3 cccc dccc
-|21: 4 dddd
-|22: 5 eeee
-|23: 6 ffff
-|24: 7 gg NEEDLE gg
-|25: 8 hhhh NEEDLE
-|26: 9 iiii
+== snap wholelines grid=150x31 cursor=11,12
+|7: /tmp/pardes-snap/lookrange/cwd/r.txt Save Tty Collapse 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
== style wholelines grid=150x31
-|0: 0-70 #b2c3b8,#1d2824, 71-149 d,#1d2824,
-|1: 0-24 #becfc4,#26362d, 25-149 d,#26362d,
-|2: 0-1 #ffffff,#4c6356, 2-62 #b2c3b8,#1d2824, 63-149 d,#1d2824,
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-15 #e5eee5,#0d1410, 16-149 d,#0d1410,
-|4: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-17 #e5eee5,#0d1410, 18-149 d,#0d1410,
-|5: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-19 #e5eee5,#0d1410, 20-149 d,#0d1410,
-|6: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-20 #e5eee5,#0d1410, 21-149 d,#0d1410,
-|7: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-|8: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-|9: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-|10: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-|11: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-|12: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-|13: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-|14: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-|15: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-|16: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-|17: 0-1 #000000,#adcc91, 2-59 #becfc4,#26362d, 60-149 d,#26362d,
-|18: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-149 d,#0d1410,
-|19: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-149 d,#0d1410,
-|20: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 #f5f7ee,#405d4b,
-|21: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 #f5f7ee,#405d4b,
-|22: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #616f64,#0d1410,b 7-11 #f5f7ee,#405d4b, 12-149 d,#0d1410,
-|23: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-149 d,#0d1410,
-|24: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-18 #e5eee5,#0d1410, 19-149 d,#0d1410,
-|25: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-17 #e5eee5,#0d1410, 18-149 d,#0d1410,
-|26: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-149 d,#0d1410,
-|27: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-|28: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-|29: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-|30: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-== snap onelinespan grid=150x31 cursor=15,24
+|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,
+|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,
+|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,
+|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-0 d,#608269, 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 onelinespan grid=150x31 cursor=15,14
== style onelinespan grid=150x31
-|20: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-15 #e5eee5,#0d1410, 16-149 d,#0d1410,
-|21: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-149 d,#0d1410,
-|22: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-149 d,#0d1410,
-|24: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #616f64,#0d1410,b 7-9 #e5eee5,#0d1410, 10-15 #f5f7ee,#405d4b, 16-18 #e5eee5,#0d1410, 19-149 d,#0d1410,
-== snap fullspan grid=150x31 cursor=9,22
+|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
== style fullspan grid=150x31
-|20: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-7 #e5eee5,#0d1410, 8-149 #f5f7ee,#405d4b,
-|21: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 #f5f7ee,#405d4b,
-|22: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #616f64,#0d1410,b 7-9 #f5f7ee,#405d4b, 10-10 #e5eee5,#0d1410, 11-149 d,#0d1410,
-|24: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-18 #e5eee5,#0d1410, 19-149 d,#0d1410,
-== snap stale grid=150x31 cursor=10,25
-|18: 2 bbbb
-|19: 3 cccc dccc
-|20: 4 dddd
-|21: 5 eeee
-|22: 6 ffff
-|23: 7 gg NEEDLE gg
-|24: 8 hhhh NEEDLE
-|25: 9 iiii
-|26:
+|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
== style stale grid=150x31
-|18: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-149 d,#0d1410,
-|19: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-15 #e5eee5,#0d1410, 16-149 d,#0d1410,
-|20: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-149 d,#0d1410,
-|21: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-149 d,#0d1410,
-|22: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-149 d,#0d1410,
-|23: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-18 #e5eee5,#0d1410, 19-149 d,#0d1410,
-|24: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-11 #e5eee5,#0d1410, 12-149 #f5f7ee,#405d4b,
-|25: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #616f64,#0d1410,b 7-10 #f5f7ee,#405d4b, 11-149 d,#0d1410,
-|26: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-== snap hit1 grid=150x31 cursor=15,24
-|18: 1 aaaa
-|19: 2 bbbb
-|20: 3 cccc dccc
-|21: 4 dddd
-|22: 5 eeee
-|23: 6 ffff
-|24: 7 gg NEEDLE gg
-|25: 8 hhhh NEEDLE
-|26: 9 iiii
-|28: /tmp/pardes-snap/lookrange/cwd/+Search Save Tty Del Collapse
-|29: 1 r.txt:7:4-9 gg NEEDLE gg
-|30: 2 r.txt:8:6-11 hhhh NEEDLE
+|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 Unattach Del
+|22: /NEEDLE
+|23: r.txt:7:4 gg NEEDLE gg
+|24: r.txt:8:6 hhhh NEEDLE
== style hit1 grid=150x31
-|18: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-149 d,#0d1410,
-|19: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-149 d,#0d1410,
-|20: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-15 #e5eee5,#0d1410, 16-149 d,#0d1410,
-|23: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-149 d,#0d1410,
-|24: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #616f64,#0d1410,b 7-9 #e5eee5,#0d1410, 10-15 #f5f7ee,#405d4b, 16-18 #e5eee5,#0d1410, 19-149 d,#0d1410,
-|25: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-17 #e5eee5,#0d1410, 18-149 d,#0d1410,
-|26: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-149 d,#0d1410,
-|28: 0-1 #ffffff,#4c6356, 2-61 #b2c3b8,#1d2824, 62-149 d,#1d2824,
-|29: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-17 #59675c,#0d1410, 18-21 #e5eee5,#0d1410, 22-27 #f7e4a5,#57472a, 28-30 #e5eee5,#0d1410, 31-149 d,#0d1410,
-|30: 0-0 d,#152019, 1-1 d,#0d1410, 2-18 #59675c,#0d1410, 19-24 #e5eee5,#0d1410, 25-30 #f7e4a5,#57472a, 31-149 d,#0d1410,
-== snap hit2 grid=150x31 cursor=17,23
-|18: 3 cccc dccc
-|19: 4 dddd
-|20: 5 eeee
-|21: 6 ffff
-|22: 7 gg NEEDLE gg
-|23: 8 hhhh NEEDLE
-|24: 9 iiii
-|25:
-|26:
+|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
== style hit2 grid=150x31
-|18: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-15 #e5eee5,#0d1410, 16-149 d,#0d1410,
-|19: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-149 d,#0d1410,
-|20: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-149 d,#0d1410,
-|22: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-18 #e5eee5,#0d1410, 19-149 d,#0d1410,
-|23: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #616f64,#0d1410,b 7-11 #e5eee5,#0d1410, 12-17 #f5f7ee,#405d4b, 18-149 d,#0d1410,
-|24: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-149 d,#0d1410,
-|25: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-|26: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-== snap back grid=150x31 cursor=15,23
-|18: 2 bbbb
-|19: 3 cccc dccc
-|20: 4 dddd
-|21: 5 eeee
-|22: 6 ffff
-|23: 7 gg NEEDLE gg
-|24: 8 hhhh NEEDLE
-|25: 9 iiii
+|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
== style back grid=150x31
-|18: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-149 d,#0d1410,
-|19: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-15 #e5eee5,#0d1410, 16-149 d,#0d1410,
-|22: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-149 d,#0d1410,
-|23: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #616f64,#0d1410,b 7-9 #e5eee5,#0d1410, 10-15 #f5f7ee,#405d4b, 16-18 #e5eee5,#0d1410, 19-149 d,#0d1410,
-|24: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-17 #e5eee5,#0d1410, 18-149 d,#0d1410,
-|25: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-149 d,#0d1410,
+|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,
diff --git a/test/snapshots/lookrange.snap b/test/snapshots/lookrange.snap
index c1fde9c6..5133e911 100644
--- a/test/snapshots/lookrange.snap
+++ b/test/snapshots/lookrange.snap
@@ -14,6 +14,10 @@
# in the styles.
file r.txt aaaa\nbbbb\ncccc dccc\ndddd\neeee\nffff\ngg NEEDLE gg\nhhhh NEEDLE\niiii
file look.txt r.txt:3-5\nr.txt:7:4-9\nr.txt:3:2-5:3\nr.txt:8:6-99:9
+# Builtins announce themselves by default, and an announcement is a band at
+# the top of the body -- which moves every row this script clicks. What the
+# verbs do is what is under test, not the announcement.
+config Verbose off
start 31 150 look.txt
wait 8000 r.txt:3-5
stable 700 20000
@@ -47,26 +51,24 @@ release right 12 7
stable 700 15000
snap stale
snapstyle stale
-# --- and now the first consumer. The look above left r.txt focused, so `/`
-# arms on it: the rows it writes carry the match's span, and the submit goes
-# straight to the first of them — with the word itself selected, which is the
-# whole reason the row spells a range and not a position.
+# --- and `/`: its query pane under r.txt, line 1 the pattern, the lines
+# holding it as rows (a line number in the gutter, the match tinted); Enter
+# puts the keyboard on the match after the cursor, the word itself selected.
key /
text NEEDLE
+wait 10000 gg NEEDLE gg
+stable 700 15000
key enter
-wait 10000 r.txt:7:4-9 gg NEEDLE
stable 700 15000
snap hit1
snapstyle hit1
-# n selects the next row, and the Enter after it goes to that hit
-key n
-key enter
+# n: the next match in the text, selected
+text n
stable 700 15000
snap hit2
snapstyle hit2
-# N walks back onto the first hit; Enter looks it, still selected
-key N
-key enter
+# N walks back onto the first, still selected
+text N
stable 700 15000
snap back
snapstyle back
diff --git a/test/snapshots/lsp-client-edit.golden b/test/snapshots/lsp-client-edit.golden
index 02cc9a37..b4a16b22 100644
--- a/test/snapshots/lsp-client-edit.golden
+++ b/test/snapshots/lsp-client-edit.golden
@@ -1,8 +1,8 @@
== snap formatted grid=100x25 cursor=7,4
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/lsp-client-edit/cwd/main.rs * Save Tty Del Collapse
-| 1 // formatted by mock
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| */tmp/pardes-snap/lsp-client-edit/cwd/main.rs Save Tty Collapse TreeContext Def Refs Del
+| 1 // formatted by mock formatted 1 range(s)
| 2 mod lib;
| 3
| 4 fn main() {
@@ -11,20 +11,8 @@
| 7 let _ = x + y;
| 8 }
| 9
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-| formatted 1 range(s)
== snap unformatted grid=100x25 cursor=7,3
+|2: /tmp/pardes-snap/lsp-client-edit/cwd/main.rs Save Tty Collapse TreeContext Def Refs Del
|3: 1 mod lib;
|4: 2
|5: 3 fn main() {
@@ -34,12 +22,13 @@
|9: 7 }
|10: 8
|11:
-|24:
== snap renamed grid=100x25 cursor=12,5
+|2: */tmp/pardes-snap/lsp-client-edit/cwd/main.rs Save Tty Collapse 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);
-|24: renamed 2 range(s)
== snap unrenamed grid=100x25 cursor=12,5
+|2: /tmp/pardes-snap/lsp-client-edit/cwd/main.rs Save Tty Collapse TreeContext Def Refs Del
+|3: 1 mod lib;
|6: 4 let x = add(1, 2);
|7: 5 let y = add(3, 4);
-|24:
diff --git a/test/snapshots/lsp-client.golden b/test/snapshots/lsp-client.golden
index 6e122e95..670d6a86 100644
--- a/test/snapshots/lsp-client.golden
+++ b/test/snapshots/lsp-client.golden
@@ -1,35 +1,30 @@
-== snap gd-jumped grid=100x25 cursor=16,16
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/lsp-client/cwd/main.rs Save Tty Del Collapse
-| 1 mod lib;
+== snap gd-jumped grid=100x25 cursor=16,12
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/lsp-client/cwd/main.rs Save Tty Collapse 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 }
-| 8
-|
-|
-| --:--:-- lsp rust-analyzer: ready
-| /tmp/pardes-snap/lsp-client/cwd/lib.rs Save Tty Del Collapse
+| /tmp/pardes-snap/lsp-client/cwd/lib.rs Save Tty Collapse TreeContext Def Refs Del
| 1 // mock fixture
| 2 pub fn add(a: i32, b: i32) -> i32 {
| 3 a + b
| 4 }
| 5
-== snap gr-list grid=100x25 cursor=21,6
-|13:
-|21: /tmp/pardes-snap/lsp-client/cwd/+Search Save Tty Del Collapse
-|22: 1 lib.rs:2:8-10 pub fn add(a: i32, b: i32) -> i32 {
-|23: 2 main.rs:4:13-15 let x = add(1, 2);
-|24: 3 main.rs:5:13-15 let y = add(3, 4);
-== snap gr-opened grid=100x25 cursor=21,7
-|22: 2 main.rs:4:13-15 let x = add(1, 2);
-|23: 3 main.rs:5:13-15 let y = add(3, 4);
-|24: 4
-== snap gr-back grid=100x25 cursor=21,6
-|22: 1 lib.rs:2:8-10 pub fn add(a: i32, b: i32) -> i32 {
-|23: 2 main.rs:4:13-15 let x = add(1, 2);
-|24: 3 main.rs:5:13-15 let y = add(3, 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 Unattach Del
+== snap gr-back grid=100x25 cursor=21,7
diff --git a/test/snapshots/lsp-client.snap b/test/snapshots/lsp-client.snap
index 541e7c7f..159bf80e 100644
--- a/test/snapshots/lsp-client.snap
+++ b/test/snapshots/lsp-client.snap
@@ -6,7 +6,9 @@
# gd on a cross-file Location -> a look: lib.rs opens with `add` selected,
# and the message row still carries the server's settled state
# ("lsp lspmock: ready") because nothing has cleared it yet.
-# gr -> sorted rows, selecting the next occurrence; n/N continue there.
+# gr -> the text's query pane, line 1 `Refs`, rows under their files,
+# the next occurrence current, the keyboard on it in normal mode
+# (a list answered, not a query typed); n/N step the places.
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
file lib.rs // mock fixture\npub fn add(a: i32, b: i32) -> i32 {\n a + b\n}\n
start 25 100 main.rs
@@ -26,12 +28,13 @@ key r
wait 10000 add(3, 4)
stable 700 15000
snap gr-list
-# step from the selected middle row to the last hit, then return
+# the list opens in normal mode, the caret on the current row: n steps to
+# the next hit, Enter lands there; N in the text goes back to the one
+# before, round the places in main.rs
key n
key enter
stable 700 15000
snap gr-opened
-key N
-key enter
+text N
stable 700 15000
snap gr-back
diff --git a/test/snapshots/lsp-rename-files.golden b/test/snapshots/lsp-rename-files.golden
new file mode 100644
index 00000000..1d239d34
--- /dev/null
+++ b/test/snapshots/lsp-rename-files.golden
@@ -0,0 +1,27 @@
+== snap opened grid=100x25 cursor=7,8
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/lsp-rename-files/cwd/lib.rs Save Tty Collapse TreeContext Def Refs Del
+| 1 // main.rs
+| 2 pub fn add(a: i32, b: i32) -> i32 {
+| 3 a + b
+| 4 }
+| /tmp/pardes-snap/lsp-rename-files/cwd/main.rs Save Tty Collapse TreeContext Def Refs Del
+| 1 mod lib;
+| 2
+| 3 fn main() {
+| 4 let x = add(1, 2);
+| 5 let y = add(3, 4);
+| 6 let _ = x + y;
+| 7 }
+| 8
+== 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 Tty Collapse LocationsConfig Del
+|16: 1 lib.rs:2:8-10
+|17: 2 sum
+|18: 3 main.rs:4:13-15
+|19: 4 sum
+|20: 5 main.rs:5:13-15
+|21: 6 sum
+|22: 7
diff --git a/test/snapshots/lsp-rename-files.snap b/test/snapshots/lsp-rename-files.snap
new file mode 100644
index 00000000..0114c795
--- /dev/null
+++ b/test/snapshots/lsp-rename-files.snap
@@ -0,0 +1,29 @@
+# A Rename reaches the other files open in the editor. A server renames in
+# the documents it has seen (zls's store), so before a query whose answer can
+# reach other files the client tells it of every open file of its language.
+# Here main.rs is opened by a look, asking the server nothing, and the rename
+# is asked from lib.rs: the mock answers in each document it was told of, so
+# the preview lists main.rs's two calls and lib.rs's definition.
+file lib.rs // main.rs\npub fn add(a: i32, b: i32) -> i32 {\n a + b\n}\n
+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
+start 25 100 lib.rs
+wait 8000 pub fn add
+stable 700 20000
+press right @main.rs 4
+release right @main.rs 4
+wait 8000 let x = add
+stable 700 15000
+snap opened
+# into lib.rs's `add`, and rename it from there
+press left @add 5
+release left @add 5
+stable 400 5000
+key space
+key l
+key r
+stable 400 5000
+text sum
+key enter
+wait 10000 sum
+stable 700 15000
+snap previewed
diff --git a/test/snapshots/lsp-rename.golden b/test/snapshots/lsp-rename.golden
index 74ab41e2..f5dc718d 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 NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/lsp-rename/cwd/rename.zig * Save Tty Del Collapse
-| 1 const std = @import("std");
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| */tmp/pardes-snap/lsp-rename/cwd/rename.zig Save Tty Collapse TreeContext Def Refs Del
+| 1 const std = @import("std"); renamed 2 range(s)
| 2
| 3 fn renamed_helper(x: u32) u32 {
| 4 return x + 1;
@@ -17,17 +17,12 @@
| 13 _ = helper;
| 14 }
| 15
-|
-|
-|
-|
-|
-|
-| renamed 2 range(s)
== snap undone grid=110x25 cursor=17,10
+|2: /tmp/pardes-snap/lsp-rename/cwd/rename.zig Save Tty Collapse TreeContext Def Refs Del
+|3: 1 const std = @import("std");
|5: 3 fn helper(x: u32) u32 {
|10: 8 _ = helper(41);
-|24:
== snap redone grid=110x25 cursor=17,10
+|2: */tmp/pardes-snap/lsp-rename/cwd/rename.zig Save Tty Collapse 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 f6d0739a..de52523c 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 NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/lsp/cwd/a.zig Save Tty Del Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/lsp/cwd/a.zig Save Tty Collapse TreeContext Def Refs Del
| 1 const std = @import("std");
| 2
| 3 fn helper(x: u32) u32 {
@@ -14,14 +14,24 @@
| 10
== snap cursor grid=120x41 cursor=17,10
== snap definition grid=120x41 cursor=15,5
+|3: 1 const std = @import("std"); --:--:-- lsp zls ready — /tmp/pardes-snap/lsp/cwd
== snap hover grid=120x41 cursor=15,5
-|38: /tmp/pardes-snap/lsp/cwd/+Hover Save Tty Del Collapse
-|39: 1 fn helper(x: u32) u32
-|40: 2 (fn (u32) u32)
+|3: 1 const std = @import("std"); Hover
+|12: /tmp/pardes-snap/lsp/cwd/+Hover Save Tty Collapse Del
+|13: 1 fn helper(x: u32) u32
+|14: 2 (fn (u32) u32)
+|15: 3
== snap symbols grid=120x41 cursor=15,5
-|34: /tmp/pardes-snap/lsp/cwd/+Search Save Tty Del Collapse
-|35: 1 a.zig:1:7-9 std
-|36: 2 a.zig:3:4-9 helper fn helper(x: u32) u32
-|37: 3 a.zig:7:8-11 main fn main() void
+|3: 1 const std = @import("std"); Symbols
+|15: /tmp/pardes-snap/lsp/cwd/+Search Save Tty Collapse 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: 7
== 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
diff --git a/test/snapshots/lsp.snap b/test/snapshots/lsp.snap
index b40484ee..123fad93 100644
--- a/test/snapshots/lsp.snap
+++ b/test/snapshots/lsp.snap
@@ -1,11 +1,11 @@
# Language intelligence end to end: the helix keymap, the async round trip and
# the two dispositions of an answer.
#
-# The backend behind the seam here is ZLS linked in as a LIBRARY
-# (src/lsp_zls.zig) — no server process, no JSON-RPC — so `gd` is a function
-# call on a worker thread whose result comes back as an ordinary event, the
-# same shape a pty read already had. Nothing in this script knows that: it
-# presses keys and reads the grid, which is the point of the seam.
+# The backend behind the seam here is zls, run as a child process by the
+# protocol client (it must be on PATH): `gd` is a request on a worker thread
+# whose result comes back as an ordinary event, the same shape a pty read
+# already had. Nothing in this script knows that: it presses keys and reads
+# the grid, which is the point of the seam.
#
# a.zig is deliberately self-contained — a definition, a call site, and not one
# symbol from std — so these goldens do not encode this machine's stdlib
@@ -43,7 +43,7 @@ key l
key s
stable 700 15000
snap symbols
-key n
+key space j n
key enter
stable 700 15000
snap step
diff --git a/test/snapshots/lspcomplete.golden b/test/snapshots/lspcomplete.golden
index 3c4316c3..dd1e5c7e 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 NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/lspcomplete/cwd/a.zig Save Tty Del Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/lspcomplete/cwd/a.zig Save Tty Collapse TreeContext Def Refs Del
| 1 const Shade = enum {
| 2 verdigris,
| 3 cinnabar,
@@ -16,30 +16,33 @@
| 12 // note. see below
| 13
== snap indent grid=120x41 cursor=11,12
-|2: ^ /tmp/pardes-snap/lspcomplete/cwd/a.zig * Save Tty Del Collapse
+|2: ^*/tmp/pardes-snap/lspcomplete/cwd/a.zig Save Tty Collapse TreeContext Def Refs Del
|12: 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
== snap athedot grid=120x41 cursor=16,10
+|3: 1 const Shade = enum {
|10: 8 .
== snap completion grid=120x41 cursor=16,10
-|38: /tmp/pardes-snap/lspcomplete/cwd/+Search Save Tty Del Collapse
-|39: 1 a.zig:2:5-13 verdigris verdigris,
-|40: 2 a.zig:3:5-12 cinnabar cinnabar,
+|15: /tmp/pardes-snap/lspcomplete/cwd/+Search Save Tty Collapse Del
+|16: 1 a.zig:8:10 verdigris
+|17: 2 a.zig:8:10 cinnabar
+|18: 3
== snap refill grid=120x41 cursor=16,10
-== snap step grid=120x41 cursor=19,4
-|2: /tmp/pardes-snap/lspcomplete/cwd/a.zig * Save Tty Del Collapse
+== snap step grid=120x41 cursor=16,10
+|2: */tmp/pardes-snap/lspcomplete/cwd/a.zig Save Tty Collapse TreeContext Def Refs Del
== snap txtindent grid=120x41 cursor=15,3
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-|^ /tmp/pardes-snap/lspcomplete/cwd/notes.txt * Save Tty Del Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+|^*/tmp/pardes-snap/lspcomplete/cwd/notes.txt Save Tty Collapse Del
| 1 abc. def ghi
| 2
== snap nosemi grid=100x19 cursor=29,9
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-|^ /tmp/pardes-snap/lspcomplete/cwd/c.zig * Save Tty Del Collapse
-| 1 const Shade = enum {
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+|^*/tmp/pardes-snap/lspcomplete/cwd/c.zig Save Tty Collapse TreeContext Def Refs Del
+| 1 const Shade = enum { --:--:-- lsp zls ready — /tmp/pardes-snap/lspcomplete/cwd
| 2 verdigris,
| 3 cinnabar,
| 4 };
@@ -47,31 +50,22 @@
| 6 pub fn nosemi() void {
| 7 const z: Shade = .
| 8 }
-| 9
-|
-|
-|
-|
-| /tmp/pardes-snap/lspcomplete/cwd/+Search Save Tty Del Collapse
-| 1 c.zig:2:5-13 verdigris verdigris,
-| 2 c.zig:3:5-12 cinnabar cinnabar,
+| /tmp/pardes-snap/lspcomplete/cwd/+Search Save Tty Collapse Del
+| 1 c.zig:7:23 verdigris Shade
+| 2 c.zig:7:23 cinnabar Shade
+| 3
== snap nobrace grid=100x19 cursor=16,10
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-|^ /tmp/pardes-snap/lspcomplete/cwd/d.zig * Save Tty Del Collapse
-| 1 const Shade = enum {
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+|^*/tmp/pardes-snap/lspcomplete/cwd/d.zig Save Tty Collapse TreeContext Def Refs Del
+| 1 const Shade = enum { --:--:-- lsp zls ready — /tmp/pardes-snap/lspcomplete/cwd
| 2 verdigris,
| 3 cinnabar,
| 4 };
| 5
| 6 pub fn nobrace(s: Shade) void {
| 7 switch (s) {
-| 8 .
-| 9 }
-| 10
-|
-|
-|
-| /tmp/pardes-snap/lspcomplete/cwd/+Search Save Tty Del Collapse
-| 1 d.zig:2:5-13 verdigris verdigris,
-| 2 d.zig:3:5-12 cinnabar cinnabar,
+| /tmp/pardes-snap/lspcomplete/cwd/+Search Save Tty Collapse Del
+| 1 d.zig:8:10 verdigris
+| 2 d.zig:8:10 cinnabar
+| 3
diff --git a/test/snapshots/lspcomplete.snap b/test/snapshots/lspcomplete.snap
index 53ce7ef9..5c76aac8 100644
--- a/test/snapshots/lspcomplete.snap
+++ b/test/snapshots/lspcomplete.snap
@@ -1,6 +1,11 @@
-# Tab after a dot in insert mode: "what could go here, and where is each of
-# those defined". The answer is a `+Search` buffer of DEFINITION rows, the same
-# rows `gr` fills it with — nothing is inserted and nothing pops up.
+# Tab after a dot in insert mode: "what could go here".
+#
+# Each wait for zls's answer allows a minute: it returns as soon as the answer
+# is drawn (2 s alone), and a zls slowed by a loaded machine (the parallel
+# snap run) took over 15 s, which failed the old wait. The answer is a
+# `+Search` buffer of zls's candidates, one row each at the cursor (a
+# completion item names no declaration) — nothing is inserted and nothing pops
+# up.
#
# a.zig is std-free for the reason lsp.snap's is: these goldens must not encode
# this machine's stdlib version or its install path. Its enum members are
@@ -58,13 +63,11 @@ text .
stable 400 5000
snap athedot
key tab
-# The row that proves it: `a.zig:2:` is `verdigris`'s own declaration line.
-# The cursor is on line 8; nothing about line 2 is reachable from the text
-# under it, so this row can only have come from resolving the switch's
-# condition to `Shade` and asking `Shade` what it declares. Line 8 still reads
-# `.` and nothing else — a completion INSERTS NOTHING.
-wait 15000 a.zig:2:
-stable 700 15000
+# The rows that prove it: `verdigris` and `cinnabar` can only have come from
+# resolving the switch's condition to `Shade` and asking what it declares.
+# Line 8 still reads `.` and nothing else — a completion INSERTS NOTHING.
+wait 60000 +Search
+stable 700 30000
snap completion
# Two more Tabs. Every one of them answers, and every answer REFILLS the one
# `+Search` rather than opening its twin. The SECOND press is already the whole
@@ -72,14 +75,14 @@ snap completion
# this golden diverges. What TWENTY do is only worse in degree — fifteen
# stacked panes, the file crushed to one visible line, and from the sixteenth
# on freeSlot returns null and the keystroke is eaten for the rest of the
-# session — and that story lives in docs/lsp.md rather than in three seconds of
+# session — and that story is told here rather than replayed in three seconds of
# every suite run. One file pane, one results pane, same as after the first.
key tab
settle 150
key tab
settle 150
key tab
-stable 700 20000
+stable 700 30000
snap refill
# The pane is still in insert mode, which is right — the query answered beside
# the cursor and typing goes on — so walking the answer means leaving it first,
@@ -90,7 +93,7 @@ settle 100
# jump the way a goto with one row does. The first step selects row 1, and the
# Enter after it looks that row and lands SELECTING `verdigris` on line 2 of
# a.zig.
-key n
+key space j n
key enter
stable 700 15000
snap step
@@ -128,8 +131,8 @@ key end
text .
stable 400 5000
key tab
-wait 15000 c.zig:2:
-stable 700 15000
+wait 60000 +Search
+stable 700 30000
snap nosemi
# ...and a construct still hanging OPEN. The switch has no closing brace at
# all — the one `}` in the file closes it and leaves the function unclosed —
@@ -149,6 +152,6 @@ key end
text .
stable 400 5000
key tab
-wait 15000 d.zig:2:
-stable 700 15000
+wait 60000 +Search
+stable 700 30000
snap nobrace
diff --git a/test/snapshots/lspcompletemoved.golden b/test/snapshots/lspcompletemoved.golden
index 6232a1f3..7b3ed250 100644
--- a/test/snapshots/lspcompletemoved.golden
+++ b/test/snapshots/lspcompletemoved.golden
@@ -1,8 +1,8 @@
== snap typedthrough grid=120x21 cursor=16,14
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-|^ /tmp/pardes-snap/lspcompletemoved/cwd/a.zig * Save Tty Del Collapse
-| 1 const Shade = enum {
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+|^*/tmp/pardes-snap/lspcompletemoved/cwd/a.zig Save Tty Collapse TreeContext Def Refs Del
+| 1 const Shade = enum { --:--:-- lsp zls ready — /tmp/pardes-snap/lspcompletemoved/cwd
| 2 verdigris,
| 3 cinnabar,
| 4 };
diff --git a/test/snapshots/lspdebug.golden b/test/snapshots/lspdebug.golden
index e1b57c5e..5c415033 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 NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/lspdebug/cwd/z.zig Save Tty Del Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/lspdebug/cwd/z.zig Save Tty Collapse TreeContext Def Refs Del
| 1 const std = @import("std");
| 2
| 3 fn helper() u32 {
@@ -14,6 +14,8 @@
| 10 }
| 11
== snap ctrlclick grid=120x45 cursor=15,5
+|3: 1 const std = @import("std"); --:--:-- lsp zls ready — /tmp/pardes-snap/lspdebug/cwd
== snap plainclick grid=120x45 cursor=21,10
+|3: 1 const std = @import("std");
== snap why-closed grid=120x45 cursor=7,5
== snap report-closed grid=120x45 cursor=7,5
diff --git a/test/snapshots/lspdebug.snap b/test/snapshots/lspdebug.snap
index 4021bc17..22fa097b 100644
--- a/test/snapshots/lspdebug.snap
+++ b/test/snapshots/lspdebug.snap
@@ -1,4 +1,8 @@
file z.zig const std = @import("std");\n\nfn helper() u32 {\n return 3;\n}\n\npub fn main() void {\n const v = helper();\n _ = v;\n}\n
+# Builtins announce themselves by default, and an announcement is a band at
+# the top of the body -- which moves every row this script clicks. What the
+# verbs do is what is under test, not the announcement.
+config Verbose off
start 45 120 z.zig
wait 8000 fn helper
stable 700 20000
@@ -17,30 +21,26 @@ snap plainclick
text 3gg1g|
stable 400 10000
key space l w
-wait 10000 parsed 122 bytes, 0 syntax error(s)
-wait 10000 position context: .empty
-wait 10000 STOP: nothing to resolve
-wait 10000 0 row(s)
-key space w j
+wait 10000 lsp explain — the definition query
+wait 10000 row(s)
+key space w j enter
key space d
stable 700 15000
snap why-closed
# Check the report's answers, not installed compiler paths or dependency counts.
key space l i
-wait 10000 backend: zls-inproc+lsp-client
-wait 10000 compiled in
-wait 10000 [OK]
-wait 10000 offsets: utf-8
-key space w j
+wait 10000 backend: lsp-client
+wait 10000 protocol servers (lsp-client):
+wait 10000 zls
+key space w j enter
key /
-text last queries
+text client queries
key enter
-wait 10000 last queries
-wait 10000 definition z.zig
-wait 10000 explain z.zig
-key space d
-key space w j
+wait 10000 client queries
+wait 10000 definition
+# Enter left the keyboard in the report, on the match; its query pane is
+# attached to it, so one Del closes both, their rows back to the source
key space d
stable 700 15000
snap report-closed
diff --git a/test/snapshots/lsprelpath.golden b/test/snapshots/lsprelpath.golden
index 65fd08cd..3af53a5c 100644
--- a/test/snapshots/lsprelpath.golden
+++ b/test/snapshots/lsprelpath.golden
@@ -1,12 +1,12 @@
-== snap absrow grid=100x35 cursor=16,7
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-|^ /tmp/pardes-snap/lsprelpath/cwd/sub/parent.zig * Save Tty Del Collapse
-| 1 const shade = @import("../shade.zig");
+== snap absrow grid=100x35 cursor=2,21
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/lsprelpath/cwd/sub/parent.zig Save Tty Collapse TreeContext Def Refs Del
+| 1 const shade = @import("../shad --:--:-- lsp zls ready — /tmp/pardes-snap/lsprelpath/cwd/sub
| 2
| 3 pub fn pick(s: shade.Shade) u8 {
| 4 return switch (s) {
-| 5 .
+| 5
| 6 };
| 7 }
| 8
@@ -15,78 +15,72 @@
|
|
|
+| +Search 2/2 Del
+| Refs
+| ../shade.zig
+| ../shade.zig:1:11 pub const Shade = enum {
+| parent.zig
+| parent.zig:3:22 pub fn pick(s: shade.Shade) u8 {
|
|
|
|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-| /tmp/pardes-snap/lsprelpath/cwd/sub/+Search Save Tty Del Collapse
-| 1 /tmp/pardes-snap/lsprelpath/cwd/shade.zig:2:5-13 verdigris verdigris,
-| 2 /tmp/pardes-snap/lsprelpath/cwd/shade.zig:3:5-12 cinnabar cinnabar,
-== snap abslook grid=100x35 cursor=19,19
-|2: /tmp/pardes-snap/lsprelpath/cwd/sub/parent.zig * Save Tty Del Collapse
-|17: /tmp/pardes-snap/lsprelpath/cwd/shade.zig Save Tty Del Collapse
-|18: 1 pub const Shade = enum {
-|19: 2 verdigris,
-|20: 3 cinnabar,
-|21: 4 };
-|22: 5
+| /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 Unattach Del
+|26: /tmp/pardes-snap/lsprelpath/cwd/shade.zig Save Tty Collapse TreeContext Def Refs Del
+|27: 1 pub const Shade = enum {
+|28: 2 verdigris,
+|29: 3 cinnabar,
+|30: 4 };
+|31: 5
== style abslook grid=100x35
-|0: 0-70 #b2c3b8,#1d2824, 71-99 d,#1d2824,
-|1: 0-24 #becfc4,#26362d, 25-99 d,#26362d,
-|2: 0-1 #ffffff,#4c6356, 2-71 #b2c3b8,#1d2824, 72-99 d,#1d2824,
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-20 #e5eee5,#0d1410, 21-27 #c9b0e4,#0d1410, 28-28 #e5eee5,#0d1410, 29-42 #b6ce94,#0d1410, 43-44 #e5eee5,#0d1410, 45-99 d,#0d1410,
-|4: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|5: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-12 #c9b0e4,#0d1410, 13-38 #e5eee5,#0d1410, 39-99 d,#0d1410,
-|6: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-16 #c9b0e4,#0d1410, 17-17 #e5eee5,#0d1410, 18-23 #c9b0e4,#0d1410, 24-29 #e5eee5,#0d1410, 30-99 d,#0d1410,
-|7: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-15 #e5eee5,#0d1410, 16-99 d,#0d1410,
-|8: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-99 d,#0d1410,
-|9: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-7 #e5eee5,#0d1410, 8-99 d,#0d1410,
-|10: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|11: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|12: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|13: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|14: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|15: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|16: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|17: 0-1 #000000,#adcc91, 2-64 #becfc4,#26362d, 65-99 d,#26362d,
-|18: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-24 #e5eee5,#0d1410, 25-28 #c9b0e4,#0d1410, 29-30 #e5eee5,#0d1410, 31-99 d,#0d1410,
-|19: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #616f64,#0d1410,b 7-10 #e5eee5,#0d1410, 11-19 #f5f7ee,#405d4b, 20-20 #e5eee5,#0d1410, 21-99 d,#0d1410,
-|20: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-19 #e5eee5,#0d1410, 20-99 d,#0d1410,
-|21: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-8 #e5eee5,#0d1410, 9-99 d,#0d1410,
-|22: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|23: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|24: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|25: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|26: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|27: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|28: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|29: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|30: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|31: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|32: 0-1 #ffffff,#4c6356, 2-66 #b2c3b8,#1d2824, 67-99 d,#1d2824,
-|33: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-54 #59675c,#0d1410, 55-76 #e5eee5,#0d1410, 77-99 d,#0d1410,
-|34: 0-0 d,#152019, 1-1 d,#0d1410, 2-54 #59675c,#0d1410, 55-74 #e5eee5,#0d1410, 75-99 d,#0d1410,
-== snap subrow grid=100x35 cursor=16,7
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-|^ /tmp/pardes-snap/lsprelpath/cwd/sub/subdir.zig * Save Tty Del Collapse
-| 1 const tint = @import("inner/tint.zig");
+|0: 0-1 d,#1d2824, 2-99 #b2c3b8,#1d2824,
+|1: 0-1 d,#887455, 2-99 #becfc4,#314738,
+|2: 0-1 d,#496656, 2-37 #b2c3b8,#1d2824, 38-48 #d3b0d9,#1d2824, 49-99 #b2c3b8,#1d2824,
+|3: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-20 #e5eee5,#0d1410, 21-27 #c9a7ed,#0d1410, 28-28 #e5eee5,#0d1410, 29-42 #b8d88a,#0d1410, 43-99 #e5eee5,#0d1410,
+|4: 0-0 d,#608269, 1-4 d,#0d1410, 5-99 #59675c,#0d1410,
+|5: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-13 #c9a7ed,#0d1410, 14-27 #e5eee5,#0d1410, 28-32 #f5f7ee,#3c614a, 33-99 #e5eee5,#0d1410,
+|6: 0-0 d,#e5eee5, 1-4 d,#0d1410, 5-10 #59675c,#0d1410, 11-24 #c9a7ed,#0d1410, 25-99 #e5eee5,#0d1410,
+|7: 0-0 d,#608269, 1-4 d,#0d1410, 5-99 #59675c,#0d1410,
+|8: 0-0 d,#608269, 1-4 d,#0d1410, 5-10 #59675c,#0d1410, 11-99 #e5eee5,#0d1410,
+|9: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-99 #e5eee5,#0d1410,
+|10: 0-0 d,#608269, 1-4 d,#0d1410, 5-99 #59675c,#0d1410,
+|11: 0-0 d,#608269, 1-99 d,#0d1410,
+|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,
+|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,
+|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,
+|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,
+|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
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/lsprelpath/cwd/sub/subdir.zig Save Tty Collapse TreeContext Def Refs Del
+| 1 const tint = @import("inner/ti --:--:-- lsp zls ready — /tmp/pardes-snap/lsprelpath/cwd/sub
| 2
| 3 pub fn hue(t: tint.Tint) u8 {
| 4 return switch (t) {
-| 5 .
+| 5
| 6 };
| 7 }
| 8
@@ -95,67 +89,61 @@
|
|
|
+| +Search 2/2 Del
+| Refs
+| inner/tint.zig
+| inner/tint.zig:1:11 pub const Tint = enum {
+| subdir.zig
+| subdir.zig:3:20 pub fn hue(t: tint.Tint) u8 {
|
|
|
|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-| /tmp/pardes-snap/lsprelpath/cwd/sub/+Search Save Tty Del Collapse
-| 1 inner/tint.zig:2:5-9 ochre ochre,
-| 2 inner/tint.zig:3:5-10 indigo indigo,
-== snap sublook grid=100x35 cursor=15,19
-|2: /tmp/pardes-snap/lsprelpath/cwd/sub/subdir.zig * Save Tty Del Collapse
-|17: /tmp/pardes-snap/lsprelpath/cwd/sub/inner/tint.zig Save Tty Del Collapse
-|18: 1 pub const Tint = enum {
-|19: 2 ochre,
-|20: 3 indigo,
-|21: 4 };
-|22: 5
+| /tmp/pardes-snap/lsprelpath/cwd/sub/+Preview Del
+| 1
+== snap sublook grid=100x35 cursor=20,27
+|3: 1 const tint = @import("inner/tint.zig");
+|16: +Search 1/2 Save Unattach Del
+|26: /tmp/pardes-snap/lsprelpath/cwd/sub/inner/tint.zig Save Tty Collapse TreeContext Def Refs Del
+|27: 1 pub const Tint = enum {
+|28: 2 ochre,
+|29: 3 indigo,
+|30: 4 };
+|31: 5
== style sublook grid=100x35
-|0: 0-70 #b2c3b8,#1d2824, 71-99 d,#1d2824,
-|1: 0-24 #becfc4,#26362d, 25-99 d,#26362d,
-|2: 0-1 #ffffff,#4c6356, 2-71 #b2c3b8,#1d2824, 72-99 d,#1d2824,
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-19 #e5eee5,#0d1410, 20-26 #c9b0e4,#0d1410, 27-27 #e5eee5,#0d1410, 28-43 #b6ce94,#0d1410, 44-45 #e5eee5,#0d1410, 46-99 d,#0d1410,
-|4: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|5: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-12 #c9b0e4,#0d1410, 13-35 #e5eee5,#0d1410, 36-99 d,#0d1410,
-|6: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-16 #c9b0e4,#0d1410, 17-17 #e5eee5,#0d1410, 18-23 #c9b0e4,#0d1410, 24-29 #e5eee5,#0d1410, 30-99 d,#0d1410,
-|7: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-15 #e5eee5,#0d1410, 16-99 d,#0d1410,
-|8: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-99 d,#0d1410,
-|9: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-7 #e5eee5,#0d1410, 8-99 d,#0d1410,
-|10: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|11: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|12: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|13: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|14: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|15: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|16: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|17: 0-1 #000000,#adcc91, 2-73 #becfc4,#26362d, 74-99 d,#26362d,
-|18: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-23 #e5eee5,#0d1410, 24-27 #c9b0e4,#0d1410, 28-29 #e5eee5,#0d1410, 30-99 d,#0d1410,
-|19: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #616f64,#0d1410,b 7-10 #e5eee5,#0d1410, 11-15 #f5f7ee,#405d4b, 16-16 #e5eee5,#0d1410, 17-99 d,#0d1410,
-|20: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-17 #e5eee5,#0d1410, 18-99 d,#0d1410,
-|21: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-8 #e5eee5,#0d1410, 9-99 d,#0d1410,
-|22: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|23: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|24: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|25: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|26: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|27: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|28: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|29: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|30: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|31: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|32: 0-1 #ffffff,#4c6356, 2-66 #b2c3b8,#1d2824, 67-99 d,#1d2824,
-|33: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-26 #59675c,#0d1410, 27-40 #e5eee5,#0d1410, 41-99 d,#0d1410,
-|34: 0-0 d,#152019, 1-1 d,#0d1410, 2-27 #59675c,#0d1410, 28-43 #e5eee5,#0d1410, 44-99 d,#0d1410,
-== snap clicked grid=100x35 cursor=16,20
+|0: 0-1 d,#1d2824, 2-99 #b2c3b8,#1d2824,
+|1: 0-1 d,#887455, 2-99 #becfc4,#314738,
+|2: 0-1 d,#496656, 2-37 #b2c3b8,#1d2824, 38-48 #d3b0d9,#1d2824, 49-99 #b2c3b8,#1d2824,
+|3: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-19 #e5eee5,#0d1410, 20-26 #c9a7ed,#0d1410, 27-27 #e5eee5,#0d1410, 28-43 #b8d88a,#0d1410, 44-99 #e5eee5,#0d1410,
+|4: 0-0 d,#608269, 1-4 d,#0d1410, 5-99 #59675c,#0d1410,
+|5: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-13 #c9a7ed,#0d1410, 14-25 #e5eee5,#0d1410, 26-29 #f5f7ee,#3c614a, 30-99 #e5eee5,#0d1410,
+|6: 0-0 d,#e5eee5, 1-4 d,#0d1410, 5-10 #59675c,#0d1410, 11-24 #c9a7ed,#0d1410, 25-99 #e5eee5,#0d1410,
+|7: 0-0 d,#608269, 1-4 d,#0d1410, 5-99 #59675c,#0d1410,
+|8: 0-0 d,#608269, 1-4 d,#0d1410, 5-10 #59675c,#0d1410, 11-99 #e5eee5,#0d1410,
+|9: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-99 #e5eee5,#0d1410,
+|10: 0-0 d,#608269, 1-4 d,#0d1410, 5-99 #59675c,#0d1410,
+|11: 0-0 d,#608269, 1-99 d,#0d1410,
+|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,
+|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,
+|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-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-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,
+== snap clicked grid=100x35 cursor=29,5
diff --git a/test/snapshots/lsprelpath.snap b/test/snapshots/lsprelpath.snap
index 247390fe..152a13a3 100644
--- a/test/snapshots/lsprelpath.snap
+++ b/test/snapshots/lsprelpath.snap
@@ -1,19 +1,18 @@
# What a language row SPELLS its path as, and that both spellings still LOOK.
#
-# A row is written relative to the directory of the file the query was asked
-# about (lsp.rel, fed from Req.root) when the answer lives UNDER that directory,
-# and keeps its full absolute path when it does not — a `gr` list was otherwise
+# A row spells its path the shortest way a Look from the query pane resolves
+# (Query.lookPath): relative to the pane's directory, `../` included, when that
+# is shorter than the absolute path, else absolute — a `gr` list was otherwise
# the same forty-character prefix repeated down the pane with the part you came
-# to read pushed off the right edge, and a path outside the tree has nothing
-# short to be called.
+# to read pushed off the right edge.
#
-# lspcomplete.snap already covers the easy middle case, a candidate in the SAME
-# directory, which shortens to a bare basename. The two that a prefix strip can
-# actually get wrong are here, one app each:
+# A row in the SAME directory shortens to a bare basename; the two that a
+# careless shortening can get wrong are here, one app each, as `gr` rows
+# (the file headers of the asking text's query pane, line 1 `Refs`):
#
-# PARENT the enum is one level UP from the asking file, so nothing is
-# stripped and the row carries `/tmp/.../cwd/shade.zig`. This is
-# the case that must NOT become `../shade.zig`.
+# PARENT the enum is one level UP from the asking file, so the row
+# climbs: `../shade.zig`, shorter than `/tmp/.../cwd/shade.zig`,
+# and a Look from the pane still lands on it.
# SUBDIRECTORY the enum is one level DOWN, so the strip leaves a path with a
# separator still in it — `inner/tint.zig`, not `tint.zig`. A
# strip that took the basename instead would produce a row that
@@ -29,61 +28,49 @@ file shade.zig pub const Shade = enum {\n verdigris,\n cinnabar,\n};\n
file sub/inner/tint.zig pub const Tint = enum {\n ochre,\n indigo,\n};\n
file sub/parent.zig const shade = @import("../shade.zig");\n\npub fn pick(s: shade.Shade) u8 {\n return switch (s) {\n \n };\n}\n
file sub/subdir.zig const tint = @import("inner/tint.zig");\n\npub fn hue(t: tint.Tint) u8 {\n return switch (t) {\n \n };\n}\n
-# ---- PARENT: outside the asking file's tree, so the row stays absolute ----
+# ---- PARENT: outside the asking file's tree, so the row climbs ----
start 35 100 sub/parent.zig
wait 8000 fn pick
stable 700 20000
-# file line 5 (grid row 6, 1-based click row 7) is the switch's empty body
-press left 8 8
-release left 8 8
+press left 31 6
+release left 31 6
stable 400 5000
-key i
-key end
-text .
-stable 400 5000
-key tab
-wait 15000 cwd/shade.zig:2:
+key g
+key r
+# the query pane under parent.zig, line 1 `Refs`, the rows under each file:
+# shade.zig's spelled from above, `../shade.zig`
+wait 15000 ../shade.zig:1
stable 700 15000
snap absrow
-key esc
-settle 100
-# An absolute row has to keep resolving — it is the spelling every row had
-# before this, and the one every hit outside the tree still has.
-key n
+# the current row is parent.zig's own; the one before it is shade.zig's,
+# shown in the +Preview (N, the list in normal mode), which Enter makes
+# shade.zig's pane
+key N
+wait 10000 verdigris
+stable 700 15000
key enter
stable 700 15000
snap abslook
snapstyle abslook
-# ---- SUBDIRECTORY: under it, so the strip leaves `inner/tint.zig` ----
start 35 100 sub/subdir.zig
wait 8000 fn hue
stable 700 20000
-press left 8 8
-release left 8 8
+press left 29 6
+release left 29 6
stable 400 5000
-key i
-key end
-text .
-stable 400 5000
-key tab
-wait 15000 inner/tint.zig:2:
+key g
+key r
+wait 15000 inner/tint.zig
stable 700 15000
snap subrow
-key esc
-settle 100
-key n
+key N
+wait 10000 ochre
+stable 700 15000
key enter
stable 700 15000
snap sublook
snapstyle sublook
-# The mouse spelling, on the OTHER row (grid row 33, 1-based click row 34). A
-# right click expands to the file-ish word under the cursor
-# (config.wordBounds), which has to take `inner/tint.zig:3:5-10` WHOLE — the
-# separator inside a stripped path is a file char, so the scan runs back over
-# `inner/` and stops on the space of the line-number prefix. A look focuses
-# what it opens, so the header's cursor is the assertion: the end of `indigo`
-# on line 3 of tint.zig.
-press right 12 35
-release right 12 35
+press right 12 13
+release right 12 13
stable 700 15000
snap clicked
diff --git a/test/snapshots/markup.golden b/test/snapshots/markup.golden
index 7caaf5b1..0d086770 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 NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/markup/cwd/paper.typ Save Tty Del Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/markup/cwd/paper.typ Save Tty Collapse TreeContext Del
| 1 = Typst heading
| 2
| 3 Prose with *bold* and _italic_ words, a `raw` span,
@@ -12,35 +12,35 @@
| 8 ```
| 9
== style typst grid=92x25
-|0: 0-70 #b2c3b8,#1d2824, 71-91 d,#1d2824,
-|1: 0-24 #becfc4,#26362d, 25-91 d,#26362d,
-|2: 0-1 #000000,#adcc91, 2-60 #becfc4,#26362d, 61-91 d,#26362d,
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #616f64,#0d1410,b 7-21 #c9b0e4,#0d1410, 22-91 d,#0d1410,
-|4: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-91 d,#0d1410,
-|5: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-17 #e5eee5,#0d1410, 18-23 #b9e58f,#0d1410, 24-28 #e5eee5,#0d1410, 29-36 #e9bf91,#0d1410, 37-46 #e5eee5,#0d1410, 47-51 #b6ce94,#0d1410, 52-57 #e5eee5,#0d1410, 58-91 d,#0d1410,
-|6: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-15 #c9b0e4,#0d1410, 16-27 #e5eee5,#0d1410, 28-31 #c9b0e4,#0d1410, 32-36 #e5eee5,#0d1410, 37-38 #e9bf91,#0d1410, 39-91 d,#0d1410,
-|7: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-91 d,#0d1410,
-|8: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-12 #b6ce94,#0d1410, 13-91 d,#0d1410,
-|9: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-8 #c9b0e4,#0d1410, 9-23 #e5eee5,#0d1410, 24-29 #c9b0e4,#0d1410, 30-30 #e5eee5,#0d1410, 31-32 #e9bf91,#0d1410, 33-35 #e5eee5,#0d1410, 36-91 d,#0d1410,
-|10: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-9 #b6ce94,#0d1410, 10-91 d,#0d1410,
-|11: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-91 d,#0d1410,
-|12: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-91 d,#0d1410,
-|13: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-91 d,#0d1410,
-|14: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-91 d,#0d1410,
-|15: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-91 d,#0d1410,
-|16: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-91 d,#0d1410,
-|17: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-91 d,#0d1410,
-|18: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-91 d,#0d1410,
-|19: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-91 d,#0d1410,
-|20: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-91 d,#0d1410,
-|21: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-91 d,#0d1410,
-|22: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-91 d,#0d1410,
-|23: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-91 d,#0d1410,
-|24: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-91 d,#0d1410,
+|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,
+|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,
+|6: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-15 #c9a7ed,#0d1410, 16-27 #e5eee5,#0d1410, 28-32 #c9a7ed,#0d1410, 33-36 #e5eee5,#0d1410, 37-91 #f8c082,#0d1410,
+|7: 0-0 d,#608269, 1-4 d,#0d1410, 5-91 #59675c,#0d1410,
+|8: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-91 #b8d88a,#0d1410,
+|9: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-9 #c9a7ed,#0d1410, 10-23 #e5eee5,#0d1410, 24-30 #c9a7ed,#0d1410, 31-32 #f8c082,#0d1410, 33-91 #e5eee5,#0d1410,
+|10: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-91 #b8d88a,#0d1410,
+|11: 0-0 d,#608269, 1-4 d,#0d1410, 5-91 #59675c,#0d1410,
+|12: 0-0 d,#608269, 1-91 d,#0d1410,
+|13: 0-0 d,#608269, 1-91 d,#0d1410,
+|14: 0-0 d,#608269, 1-91 d,#0d1410,
+|15: 0-0 d,#608269, 1-91 d,#0d1410,
+|16: 0-0 d,#608269, 1-91 d,#0d1410,
+|17: 0-0 d,#608269, 1-91 d,#0d1410,
+|18: 0-0 d,#608269, 1-91 d,#0d1410,
+|19: 0-0 d,#608269, 1-91 d,#0d1410,
+|20: 0-0 d,#608269, 1-91 d,#0d1410,
+|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,
== snap markdown grid=92x25 cursor=7,3
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/markup/cwd/notes.md Save Tty Del Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/markup/cwd/notes.md Save Tty Collapse TreeContext Del
| 1 # Markdown heading with *italic*
| 2
| 3 Prose with **bold**, *italic* and an `inline` span.
@@ -50,28 +50,28 @@
| 7 ```
| 8
== style markdown grid=92x25
-|0: 0-70 #b2c3b8,#1d2824, 71-91 d,#1d2824,
-|1: 0-24 #becfc4,#26362d, 25-91 d,#26362d,
-|2: 0-1 #000000,#adcc91, 2-59 #becfc4,#26362d, 60-91 d,#26362d,
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #616f64,#0d1410,b 7-8 #e5eee5,#0d1410, 9-30 #c9b0e4,#0d1410, 31-38 #e9bf91,#0d1410, 39-91 d,#0d1410,
-|4: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-91 d,#0d1410,
-|5: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-17 #e5eee5,#0d1410, 18-25 #b9e58f,#0d1410, 26-27 #e5eee5,#0d1410, 28-35 #e9bf91,#0d1410, 36-43 #e5eee5,#0d1410, 44-51 #b6ce94,#0d1410, 52-57 #e5eee5,#0d1410, 58-91 d,#0d1410,
-|6: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-91 d,#0d1410,
-|7: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-12 #b6ce94,#0d1410, 13-91 d,#0d1410,
-|8: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-8 #c9b0e4,#0d1410, 9-23 #e5eee5,#0d1410, 24-29 #c9b0e4,#0d1410, 30-30 #e5eee5,#0d1410, 31-32 #e9bf91,#0d1410, 33-35 #e5eee5,#0d1410, 36-91 d,#0d1410,
-|9: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-9 #b6ce94,#0d1410, 10-91 d,#0d1410,
-|10: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-91 d,#0d1410,
-|11: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-91 d,#0d1410,
-|12: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-91 d,#0d1410,
-|13: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-91 d,#0d1410,
-|14: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-91 d,#0d1410,
-|15: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-91 d,#0d1410,
-|16: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-91 d,#0d1410,
-|17: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-91 d,#0d1410,
-|18: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-91 d,#0d1410,
-|19: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-91 d,#0d1410,
-|20: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-91 d,#0d1410,
-|21: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-91 d,#0d1410,
-|22: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-91 d,#0d1410,
-|23: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-91 d,#0d1410,
-|24: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-91 d,#0d1410,
+|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,
+|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,
+|6: 0-0 d,#608269, 1-4 d,#0d1410, 5-91 #59675c,#0d1410,
+|7: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-91 #b8d88a,#0d1410,
+|8: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-9 #c9a7ed,#0d1410, 10-23 #e5eee5,#0d1410, 24-30 #c9a7ed,#0d1410, 31-32 #f8c082,#0d1410, 33-91 #e5eee5,#0d1410,
+|9: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-91 #b8d88a,#0d1410,
+|10: 0-0 d,#608269, 1-4 d,#0d1410, 5-91 #59675c,#0d1410,
+|11: 0-0 d,#608269, 1-91 d,#0d1410,
+|12: 0-0 d,#608269, 1-91 d,#0d1410,
+|13: 0-0 d,#608269, 1-91 d,#0d1410,
+|14: 0-0 d,#608269, 1-91 d,#0d1410,
+|15: 0-0 d,#608269, 1-91 d,#0d1410,
+|16: 0-0 d,#608269, 1-91 d,#0d1410,
+|17: 0-0 d,#608269, 1-91 d,#0d1410,
+|18: 0-0 d,#608269, 1-91 d,#0d1410,
+|19: 0-0 d,#608269, 1-91 d,#0d1410,
+|20: 0-0 d,#608269, 1-91 d,#0d1410,
+|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,
diff --git a/test/snapshots/mini.golden b/test/snapshots/mini.golden
index aac5dee6..cba3c6d0 100644
--- a/test/snapshots/mini.golden
+++ b/test/snapshots/mini.golden
@@ -1,190 +1,176 @@
-== snap opened grid=90x23 cursor=7,14
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/mini/cwd/commands.txt Save Tty Del Collapse
-| 1 @`Mini demo.zig`
-|
-|
-|
-|
-|
-|
+== snap opened grid=90x23 cursor=7,6
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/mini/cwd/commands.txt Save Tty Collapse Del
+| 1 @`Mini demo.zig` Mini
|
-|
-|
-| /tmp/pardes-snap/mini/cwd/Mini demo.zig Save Tty Del Collapse
+| /tmp/pardes-snap/mini/cwd/Mini demo.zig Save Tty Collapse Del
| 1 ⠭⠍⣥⢩⣭⡭⣭⣬⣌⢭⣭⠌⠬⠅⠍⠁
| 2 ⣂⢀⣉⣉⢉⣈⢁⣀⣀⢀⣀⣀⣀⢀⣀⣀⣀⣀⣀
| 3 ⠉⠉⠁⠉⠉⠉⠈⠈⠉⠉⠉⠉⠉⠉
| 4
== style opened grid=90x23
-|0: 0-70 #b2c3b8,#1d2824, 71-89 d,#1d2824,
-|1: 0-24 #becfc4,#26362d, 25-89 d,#26362d,
-|2: 0-1 #ffffff,#4c6356, 2-61 #b2c3b8,#1d2824, 62-89 d,#1d2824,
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-22 #e5eee5,#0d1410, 23-89 d,#0d1410,
-|4: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-89 d,#0d1410,
-|5: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-89 d,#0d1410,
-|6: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-89 d,#0d1410,
-|7: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-89 d,#0d1410,
-|8: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-89 d,#0d1410,
-|9: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-89 d,#0d1410,
-|10: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-89 d,#0d1410,
-|11: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-89 d,#0d1410,
-|12: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-89 d,#0d1410,
-|13: 0-1 #000000,#adcc91, 2-62 #becfc4,#26362d, 63-89 d,#26362d,
-|14: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #616f64,#0d1410,b 7-8 #e5eee5,#0d1410, 9-9 #c9b0e4,#0d1410, 10-12 #e5eee5,#0d1410, 13-15 #c9b0e4,#0d1410, 16-21 #b6ce94,#0d1410, 22-22 #e5eee5,#0d1410, 23-89 d,#0d1410,
-|15: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-8 #b9e58f,#0d1410, 9-11 #c9b0e4,#0d1410, 12-25 #b9e58f,#0d1410, 26-89 d,#0d1410,
-|16: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-17 #e5eee5,#0d1410, 18-19 #e9bf91,#0d1410, 20-20 #e5eee5,#0d1410, 21-89 d,#0d1410,
-|17: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-89 d,#0d1410,
-|18: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-89 d,#0d1410,
-|19: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-89 d,#0d1410,
-|20: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-89 d,#0d1410,
-|21: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-89 d,#0d1410,
-|22: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-89 d,#0d1410,
-== 9p opened grid=90x23 cursor=7,14,block
-|0: Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-@0: 0-70 #b2c3b8,#1d2824,,tagline 71-89 d,#1d2824,,tagline
-|1: New Tty Find Grep Joincol
-@1: 0-24 #becfc4,#26362d,,tagline 25-89 d,#26362d,,tagline
-|2: /tmp/pardes-snap/mini/cwd/commands.txt Save Tty Del Collapse
-@2: 0-1 #ffffff,#4c6356,,tagline 2-61 #b2c3b8,#1d2824,,tagline 62-89 d,#1d2824,,tagline
-|3: 1 @`Mini demo.zig`
-@3: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-22 #e5eee5,#0d1410,,body 23-89 d,#0d1410,,body
+|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,
+|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,
+|7: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-8 #b9f480,#0d1410, 9-11 #c9a7ed,#0d1410, 12-89 #b9f480,#0d1410,
+|8: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-17 #e5eee5,#0d1410, 18-19 #f8c082,#0d1410, 20-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,
+|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,
+|15: 0-0 d,#608269, 1-89 d,#0d1410,
+|16: 0-0 d,#608269, 1-89 d,#0d1410,
+|17: 0-0 d,#608269, 1-89 d,#0d1410,
+|18: 0-0 d,#608269, 1-89 d,#0d1410,
+|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,
+== 9p opened grid=90x23 cursor=7,6,block
+|0: Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+@0: 0-76 #b2c3b8,#1d2824,,tagline 77-89 d,#1d2824,,tagline
+|1: New Tty Find Grep Joincol Delcol
+@1: 0-1 #ffffff,#887455,,tagline 2-33 #becfc4,#314738,,tagline 34-89 d,#314738,,tagline
+|2: /tmp/pardes-snap/mini/cwd/commands.txt Save Tty Collapse Del
+@2: 0-1 #ffffff,#496656,,tagline 2-27 #b2c3b8,#1d2824,,tagline 28-39 #d3b0d9,#1d2824,,tagline 40-61 #b2c3b8,#1d2824,,tagline 62-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
|4:
-@4: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
-|5:
-@5: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
-|6:
-@6: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
-|7:
-@7: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
-|8:
-@8: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
-|9:
-@9: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
+@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 Tty Collapse Del
+@5: 0-1 #000000,#add38a,,tagline 2-27 #becfc4,#314738,,tagline 28-40 #dfbce5,#314738,,tagline 41-62 #becfc4,#314738,,tagline 63-89 d,#314738,,tagline
+|6: 1 ⠭⠍⣥⢩⣭⡭⣭⣬⣌⢭⣭⠌⠬⠅⠍⠁
++6: 7="⠭" 8="⠍" 9="⣥" 10="⢩" 11="⣭" 12="⡭" 13="⣭" 14="⣬" 15="⣌" 16="⢭" 17="⣭" 18="⠌" 19="⠬" 20="⠅" 21="⠍" 22="⠁"
+@6: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #616f64,#0d1410,b,body 7-8 #e5eee5,#0d1410,,body 9-9 #c9a7ed,#0d1410,,body 10-12 #e5eee5,#0d1410,,body 13-15 #c9a7ed,#0d1410,,body 16-21 #b8d88a,#0d1410,,body 22-22 #e5eee5,#0d1410,,body 23-89 d,#0d1410,,body
+|7: 2 ⣂⢀⣉⣉⢉⣈⢁⣀⣀⢀⣀⣀⣀⢀⣀⣀⣀⣀⣀
++7: 7="⣂" 8="⢀" 9="⣉" 10="⣉" 11="⢉" 12="⣈" 13="⢁" 14="⣀" 15="⣀" 16="⢀" 17="⣀" 18="⣀" 19="⣀" 20="⢀" 21="⣀" 22="⣀" 23="⣀" 24="⣀" 25="⣀"
+@7: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-8 #b9f480,#0d1410,,body 9-11 #c9a7ed,#0d1410,,body 12-25 #b9f480,#0d1410,,body 26-89 d,#0d1410,,body
+|8: 3 ⠉⠉⠁⠉⠉⠉⠈⠈⠉⠉⠉⠉⠉⠉
++8: 7="⠉" 8="⠉" 9="⠁" 10="⠉" 11="⠉" 12="⠉" 13="⠈" 14="⠈" 15="⠉" 16="⠉" 17="⠉" 18="⠉" 19="⠉" 20="⠉"
+@8: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-17 #e5eee5,#0d1410,,body 18-19 #f8c082,#0d1410,,body 20-20 #e5eee5,#0d1410,,body 21-89 d,#0d1410,,body
+|9: 4
+@9: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
|10:
-@10: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
+@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,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
+@11: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
|12:
-@12: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
-|13: /tmp/pardes-snap/mini/cwd/Mini demo.zig Save Tty Del Collapse
-@13: 0-1 #000000,#adcc91,,tagline 2-62 #becfc4,#26362d,,tagline 63-89 d,#26362d,,tagline
-|14: 1 ⠭⠍⣥⢩⣭⡭⣭⣬⣌⢭⣭⠌⠬⠅⠍⠁
-+14: 7="⠭" 8="⠍" 9="⣥" 10="⢩" 11="⣭" 12="⡭" 13="⣭" 14="⣬" 15="⣌" 16="⢭" 17="⣭" 18="⠌" 19="⠬" 20="⠅" 21="⠍" 22="⠁"
-@14: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #616f64,#0d1410,b,body 7-8 #e5eee5,#0d1410,,body 9-9 #c9b0e4,#0d1410,,body 10-12 #e5eee5,#0d1410,,body 13-15 #c9b0e4,#0d1410,,body 16-21 #b6ce94,#0d1410,,body 22-22 #e5eee5,#0d1410,,body 23-89 d,#0d1410,,body
-|15: 2 ⣂⢀⣉⣉⢉⣈⢁⣀⣀⢀⣀⣀⣀⢀⣀⣀⣀⣀⣀
-+15: 7="⣂" 8="⢀" 9="⣉" 10="⣉" 11="⢉" 12="⣈" 13="⢁" 14="⣀" 15="⣀" 16="⢀" 17="⣀" 18="⣀" 19="⣀" 20="⢀" 21="⣀" 22="⣀" 23="⣀" 24="⣀" 25="⣀"
-@15: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-8 #b9e58f,#0d1410,,body 9-11 #c9b0e4,#0d1410,,body 12-25 #b9e58f,#0d1410,,body 26-89 d,#0d1410,,body
-|16: 3 ⠉⠉⠁⠉⠉⠉⠈⠈⠉⠉⠉⠉⠉⠉
-+16: 7="⠉" 8="⠉" 9="⠁" 10="⠉" 11="⠉" 12="⠉" 13="⠈" 14="⠈" 15="⠉" 16="⠉" 17="⠉" 18="⠉" 19="⠉" 20="⠉"
-@16: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-17 #e5eee5,#0d1410,,body 18-19 #e9bf91,#0d1410,,body 20-20 #e5eee5,#0d1410,,body 21-89 d,#0d1410,,body
-|17: 4
-@17: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
+@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
+|15:
+@15: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
+|16:
+@16: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
+|17:
+@17: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
|18:
-@18: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
+@18: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
|19:
-@19: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
+@19: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
|20:
-@20: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
+@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,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
+@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,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
+@22: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
== style colors-off grid=90x23
-|14: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #616f64,#0d1410,b 7-22 #e5eee5,#0d1410, 23-89 d,#0d1410,
-|15: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-25 #e5eee5,#0d1410, 26-89 d,#0d1410,
-|16: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-20 #e5eee5,#0d1410, 21-89 d,#0d1410,
-== 9p colors-off grid=90x23 cursor=7,14,block
-|14: 1 ⠭⠍⣥⢩⣭⡭⣭⣬⣌⢭⣭⠌⠬⠅⠍⠁
-+14: 7="⠭" 8="⠍" 9="⣥" 10="⢩" 11="⣭" 12="⡭" 13="⣭" 14="⣬" 15="⣌" 16="⢭" 17="⣭" 18="⠌" 19="⠬" 20="⠅" 21="⠍" 22="⠁"
-@14: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #616f64,#0d1410,b,body 7-22 #e5eee5,#0d1410,,body 23-89 d,#0d1410,,body
-|15: 2 ⣂⢀⣉⣉⢉⣈⢁⣀⣀⢀⣀⣀⣀⢀⣀⣀⣀⣀⣀
-+15: 7="⣂" 8="⢀" 9="⣉" 10="⣉" 11="⢉" 12="⣈" 13="⢁" 14="⣀" 15="⣀" 16="⢀" 17="⣀" 18="⣀" 19="⣀" 20="⢀" 21="⣀" 22="⣀" 23="⣀" 24="⣀" 25="⣀"
-@15: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-25 #e5eee5,#0d1410,,body 26-89 d,#0d1410,,body
-|16: 3 ⠉⠉⠁⠉⠉⠉⠈⠈⠉⠉⠉⠉⠉⠉
-+16: 7="⠉" 8="⠉" 9="⠁" 10="⠉" 11="⠉" 12="⠉" 13="⠈" 14="⠈" 15="⠉" 16="⠉" 17="⠉" 18="⠉" 19="⠉" 20="⠉"
-@16: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-20 #e5eee5,#0d1410,,body 21-89 d,#0d1410,,body
+|3: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-89 #e5eee5,#0d1410,
+|6: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-81 #e5eee5,#0d1410, 82-82 #e5eee5,#1d2824, 83-89 #b2c3b8,#1d2824,
+|7: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-89 #e5eee5,#0d1410,
+|8: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-89 #e5eee5,#0d1410,
+== 9p colors-off grid=90x23 cursor=7,6,block
+|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
+|6: 1 ⠭⠍⣥⢩⣭⡭⣭⣬⣌⢭⣭⠌⠬⠅⠍⠁ Colors
++6: 7="⠭" 8="⠍" 9="⣥" 10="⢩" 11="⣭" 12="⡭" 13="⣭" 14="⣬" 15="⣌" 16="⢭" 17="⣭" 18="⠌" 19="⠬" 20="⠅" 21="⠍" 22="⠁"
+@6: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #616f64,#0d1410,b,body 7-22 #e5eee5,#0d1410,,body 23-81 d,#0d1410,,body 82-82 d,#1d2824,,tagline 83-88 #b2c3b8,#1d2824,,tagline 89-89 d,#1d2824,,tagline
+|7: 2 ⣂⢀⣉⣉⢉⣈⢁⣀⣀⢀⣀⣀⣀⢀⣀⣀⣀⣀⣀
++7: 7="⣂" 8="⢀" 9="⣉" 10="⣉" 11="⢉" 12="⣈" 13="⢁" 14="⣀" 15="⣀" 16="⢀" 17="⣀" 18="⣀" 19="⣀" 20="⢀" 21="⣀" 22="⣀" 23="⣀" 24="⣀" 25="⣀"
+@7: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-25 #e5eee5,#0d1410,,body 26-89 d,#0d1410,,body
+|8: 3 ⠉⠉⠁⠉⠉⠉⠈⠈⠉⠉⠉⠉⠉⠉
++8: 7="⠉" 8="⠉" 9="⠁" 10="⠉" 11="⠉" 12="⠉" 13="⠈" 14="⠈" 15="⠉" 16="⠉" 17="⠉" 18="⠉" 19="⠉" 20="⠉"
+@8: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-20 #e5eee5,#0d1410,,body 21-89 d,#0d1410,,body
== style colors-on grid=90x23
-|14: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #616f64,#0d1410,b 7-8 #e5eee5,#0d1410, 9-9 #c9b0e4,#0d1410, 10-12 #e5eee5,#0d1410, 13-15 #c9b0e4,#0d1410, 16-21 #b6ce94,#0d1410, 22-22 #e5eee5,#0d1410, 23-89 d,#0d1410,
-|15: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-8 #b9e58f,#0d1410, 9-11 #c9b0e4,#0d1410, 12-25 #b9e58f,#0d1410, 26-89 d,#0d1410,
-|16: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-17 #e5eee5,#0d1410, 18-19 #e9bf91,#0d1410, 20-20 #e5eee5,#0d1410, 21-89 d,#0d1410,
-== snap resized grid=105x27 cursor=7,16
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/mini/cwd/commands.txt Save Tty Del Collapse
+|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-81 #e5eee5,#0d1410, 82-82 #e5eee5,#1d2824, 83-89 #b2c3b8,#1d2824,
+|7: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-8 #b9f480,#0d1410, 9-11 #c9a7ed,#0d1410, 12-89 #b9f480,#0d1410,
+|8: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-17 #e5eee5,#0d1410, 18-19 #f8c082,#0d1410, 20-89 #e5eee5,#0d1410,
+== snap resized grid=105x27 cursor=7,7
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/mini/cwd/commands.txt Save Tty Collapse Del
| 1 @`Mini demo.zig`
|
|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-| /tmp/pardes-snap/mini/cwd/Mini demo.zig Save Tty Del Collapse
-| 1 ⠭⠍⣥⢩⣭⡭⣭⣬⣌⢭⣭⠌⠬⠅⠍⠁
+| /tmp/pardes-snap/mini/cwd/Mini demo.zig Save Tty Collapse Del
+| 1 ⠭⠍⣥⢩⣭⡭⣭⣬⣌⢭⣭⠌⠬⠅⠍⠁ Colors
| 2 ⣂⢀⣉⣉⢉⣈⢁⣀⣀⢀⣀⣀⣀⢀⣀⣀⣀⣀⣀
| 3 ⠉⠉⠁⠉⠉⠉⠈⠈⠉⠉⠉⠉⠉⠉
| 4
-== 9p resized grid=105x27 cursor=7,16,block
-|0: Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-@0: 0-70 #b2c3b8,#1d2824,,tagline 71-104 d,#1d2824,,tagline
-|1: New Tty Find Grep Joincol
-@1: 0-24 #becfc4,#26362d,,tagline 25-104 d,#26362d,,tagline
-|2: /tmp/pardes-snap/mini/cwd/commands.txt Save Tty Del Collapse
-@2: 0-1 #ffffff,#4c6356,,tagline 2-61 #b2c3b8,#1d2824,,tagline 62-104 d,#1d2824,,tagline
+== 9p resized grid=105x27 cursor=7,7,block
+|0: Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+@0: 0-76 #b2c3b8,#1d2824,,tagline 77-104 d,#1d2824,,tagline
+|1: New Tty Find Grep Joincol Delcol
+@1: 0-1 #ffffff,#887455,,tagline 2-33 #becfc4,#314738,,tagline 34-104 d,#314738,,tagline
+|2: /tmp/pardes-snap/mini/cwd/commands.txt Save Tty Collapse Del
+@2: 0-1 #ffffff,#496656,,tagline 2-27 #b2c3b8,#1d2824,,tagline 28-39 #d3b0d9,#1d2824,,tagline 40-61 #b2c3b8,#1d2824,,tagline 62-104 d,#1d2824,,tagline
|3: 1 @`Mini demo.zig`
-@3: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-22 #e5eee5,#0d1410,,body 23-104 d,#0d1410,,body
+@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,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
+@4: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
|5:
-@5: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
-|6:
-@6: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
-|7:
-@7: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
-|8:
-@8: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
-|9:
-@9: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
-|10:
-@10: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
+@5: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
+|6: /tmp/pardes-snap/mini/cwd/Mini demo.zig Save Tty Collapse Del
+@6: 0-1 #000000,#add38a,,tagline 2-27 #becfc4,#314738,,tagline 28-40 #dfbce5,#314738,,tagline 41-62 #becfc4,#314738,,tagline 63-104 d,#314738,,tagline
+|7: 1 ⠭⠍⣥⢩⣭⡭⣭⣬⣌⢭⣭⠌⠬⠅⠍⠁ Colors
++7: 7="⠭" 8="⠍" 9="⣥" 10="⢩" 11="⣭" 12="⡭" 13="⣭" 14="⣬" 15="⣌" 16="⢭" 17="⣭" 18="⠌" 19="⠬" 20="⠅" 21="⠍" 22="⠁"
+@7: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #616f64,#0d1410,b,body 7-8 #e5eee5,#0d1410,,body 9-9 #c9a7ed,#0d1410,,body 10-12 #e5eee5,#0d1410,,body 13-15 #c9a7ed,#0d1410,,body 16-21 #b8d88a,#0d1410,,body 22-22 #e5eee5,#0d1410,,body 23-96 d,#0d1410,,body 97-97 d,#1d2824,,tagline 98-103 #b2c3b8,#1d2824,,tagline 104-104 d,#1d2824,,tagline
+|8: 2 ⣂⢀⣉⣉⢉⣈⢁⣀⣀⢀⣀⣀⣀⢀⣀⣀⣀⣀⣀
++8: 7="⣂" 8="⢀" 9="⣉" 10="⣉" 11="⢉" 12="⣈" 13="⢁" 14="⣀" 15="⣀" 16="⢀" 17="⣀" 18="⣀" 19="⣀" 20="⢀" 21="⣀" 22="⣀" 23="⣀" 24="⣀" 25="⣀"
+@8: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-8 #b9f480,#0d1410,,body 9-11 #c9a7ed,#0d1410,,body 12-25 #b9f480,#0d1410,,body 26-104 d,#0d1410,,body
+|9: 3 ⠉⠉⠁⠉⠉⠉⠈⠈⠉⠉⠉⠉⠉⠉
++9: 7="⠉" 8="⠉" 9="⠁" 10="⠉" 11="⠉" 12="⠉" 13="⠈" 14="⠈" 15="⠉" 16="⠉" 17="⠉" 18="⠉" 19="⠉" 20="⠉"
+@9: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-17 #e5eee5,#0d1410,,body 18-19 #f8c082,#0d1410,,body 20-20 #e5eee5,#0d1410,,body 21-104 d,#0d1410,,body
+|10: 4
+@10: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
|11:
-@11: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
+@11: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
|12:
-@12: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
+@12: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
|13:
-@13: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
+@13: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
|14:
-@14: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
-|15: /tmp/pardes-snap/mini/cwd/Mini demo.zig Save Tty Del Collapse
-@15: 0-1 #000000,#adcc91,,tagline 2-62 #becfc4,#26362d,,tagline 63-104 d,#26362d,,tagline
-|16: 1 ⠭⠍⣥⢩⣭⡭⣭⣬⣌⢭⣭⠌⠬⠅⠍⠁
-+16: 7="⠭" 8="⠍" 9="⣥" 10="⢩" 11="⣭" 12="⡭" 13="⣭" 14="⣬" 15="⣌" 16="⢭" 17="⣭" 18="⠌" 19="⠬" 20="⠅" 21="⠍" 22="⠁"
-@16: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #616f64,#0d1410,b,body 7-8 #e5eee5,#0d1410,,body 9-9 #c9b0e4,#0d1410,,body 10-12 #e5eee5,#0d1410,,body 13-15 #c9b0e4,#0d1410,,body 16-21 #b6ce94,#0d1410,,body 22-22 #e5eee5,#0d1410,,body 23-104 d,#0d1410,,body
-|17: 2 ⣂⢀⣉⣉⢉⣈⢁⣀⣀⢀⣀⣀⣀⢀⣀⣀⣀⣀⣀
-+17: 7="⣂" 8="⢀" 9="⣉" 10="⣉" 11="⢉" 12="⣈" 13="⢁" 14="⣀" 15="⣀" 16="⢀" 17="⣀" 18="⣀" 19="⣀" 20="⢀" 21="⣀" 22="⣀" 23="⣀" 24="⣀" 25="⣀"
-@17: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-8 #b9e58f,#0d1410,,body 9-11 #c9b0e4,#0d1410,,body 12-25 #b9e58f,#0d1410,,body 26-104 d,#0d1410,,body
-|18: 3 ⠉⠉⠁⠉⠉⠉⠈⠈⠉⠉⠉⠉⠉⠉
-+18: 7="⠉" 8="⠉" 9="⠁" 10="⠉" 11="⠉" 12="⠉" 13="⠈" 14="⠈" 15="⠉" 16="⠉" 17="⠉" 18="⠉" 19="⠉" 20="⠉"
-@18: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-17 #e5eee5,#0d1410,,body 18-19 #e9bf91,#0d1410,,body 20-20 #e5eee5,#0d1410,,body 21-104 d,#0d1410,,body
-|19: 4
-@19: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
+@14: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
+|15:
+@15: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
+|16:
+@16: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
+|17:
+@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
|20:
-@20: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
+@20: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
|21:
-@21: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
+@21: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
|22:
-@22: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
+@22: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
|23:
-@23: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
+@23: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
|24:
-@24: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
+@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,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
+@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,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
+@26: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
diff --git a/test/snapshots/modal.golden b/test/snapshots/modal.golden
index ca89416e..9ebc72e9 100644
--- a/test/snapshots/modal.golden
+++ b/test/snapshots/modal.golden
@@ -1,7 +1,8 @@
-== snap top grid=100x31 cursor=2,3
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/modal/cwd Save Tty Del Togglett /tmp/pardes-snap/modal/cwd Save Tty Del Togglett
+== snap top grid=100x31 cursor=2,4
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/modal/cwd Tty+bash Save Mode Fi /tmp/pardes-snap/modal/cwd Tty+bash Save Mode Fi
+| lter Collapse Del lter Collapse Del
| ls ls
| words.txt words.txt
| printf 'one two three\nfour five six\nseven ei
@@ -15,55 +16,55 @@
|
|
|
-|
-| /tmp/pardes-snap/modal/cwd Save Tty Del Togglett
+| /tmp/pardes-snap/modal/cwd Tty+bash Save Mode Fi
+| lter Collapse Del
| ls
| words.txt
-== snap moved grid=100x31 cursor=8,5
-== snap xsel grid=100x31 cursor=48,5
+== snap moved grid=100x31 cursor=8,6
+== snap xsel grid=100x31 cursor=48,6
== style xsel grid=100x31
-|0: 0-70 #b2c3b8,#1d2824, 71-99 d,#1d2824,
-|1: 0-24 #becfc4,#26362d, 25-49 d,#26362d, 50-74 #b2c3b8,#1d2824, 75-99 d,#1d2824,
-|2: 0-1 #000000,#adcc91, 2-49 #becfc4,#26362d, 50-51 #ffffff,#4c6356, 52-99 #b2c3b8,#1d2824,
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|4: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|5: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-48 #f5f7ee,#405d4b, 49-49 d,#0d1410, 50-50 d,#637f6a, 51-99 d,#0d1410,
-|6: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|7: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|8: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|9: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|10: 0-0 d,#637f6a, 1-49 d,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|11: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|12: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|13: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|14: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|15: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|16: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|17: 0-1 #ffffff,#4c6356, 2-49 #b2c3b8,#1d2824, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|18: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|19: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|20: 0-0 d,#637f6a, 1-49 d,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|21: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|22: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|23: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|24: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|25: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|26: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|27: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|28: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|29: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|30: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-== snap xsel2 grid=100x31 cursor=13,6
-== snap yanked grid=100x31 cursor=13,6
-== snap vsel grid=100x31 cursor=14,7
+|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,
+|2: 0-1 d,#add38a, 2-28 #becfc4,#314738, 29-37 #dfbce5,#314738, 38-49 #becfc4,#314738, 50-51 #becfc4,#496656, 52-78 #b2c3b8,#1d2824, 79-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,#608269, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
+|5: 0-0 d,#608269, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
+|6: 0-0 d,#608269, 1-1 d,#0d1410, 2-48 #f5f7ee,#3c614a, 49-49 #f5f7ee,#0d1410, 50-50 #f5f7ee,#608269, 51-99 #f5f7ee,#0d1410,
+|7: 0-0 d,#608269, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
+|8: 0-0 d,#608269, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
+|9: 0-0 d,#608269, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
+|10: 0-0 d,#608269, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
+|11: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
+|12: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
+|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-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,
+|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-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,
+|26: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
+|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,
+== snap xsel2 grid=100x31 cursor=13,7
+== snap yanked grid=100x31 cursor=13,7
+== snap vsel grid=100x31 cursor=14,8
== style vsel grid=100x31
-|5: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #f5f7ee,#405d4b, 50-50 d,#637f6a, 51-99 d,#0d1410,
-|6: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #f5f7ee,#405d4b, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|7: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-14 #f5f7ee,#405d4b, 15-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-== snap typed grid=100x31 cursor=7,5
-|5: TYPEDprintf 'one two three\nfour five six\nseven
-== snap undone grid=100x31 cursor=14,7
-|5: printf 'one two three\nfour five six\nseven ei
-== snap redone grid=100x31 cursor=7,5
-|5: TYPEDprintf 'one two three\nfour five six\nseven
-== snap bottom grid=100x31 cursor=2,10
+|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
diff --git a/test/snapshots/msg.golden b/test/snapshots/msg.golden
index 9da23117..950c4d67 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 NextColor Debug Kil
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/msg/cwd/a.txt Save Tty Del Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Deb
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/msg/cwd/a.txt Save Tty Collapse Del
| 1 line 1
| 2 line 2
| 3 line 3
@@ -10,47 +10,45 @@
| 6 line 6
| 7
== snap saved grid=70x15 cursor=7,3
-|14: --:--:-- saved /tmp/pardes-snap/msg/cwd/a.txt
+|3: 1 line 1 --:--:-- saved /tmp/pardes-snap/msg/cwd/a.txt
== snap repainted grid=70x17 cursor=7,3
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kil
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/msg/cwd/a.txt Save Tty Del Collapse
-| 1 line 1
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Deb
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/msg/cwd/a.txt Save Tty Collapse Del
+| 1 line 1 --:--:-- saved /tmp/pardes-snap/msg/cwd/a.txt
| 2 line 2
| 3 line 3
| 4 line 4
| 5 line 5
| 6 line 6
| 7
-|
-|
-|
-|
-|
-|
-| --:--:-- saved /tmp/pardes-snap/msg/cwd/a.txt
== snap keycleared grid=70x17 cursor=7,4
-|16:
+|3: 1 line 1
== snap saved-again grid=70x17 cursor=7,4
-|16: --:--:-- saved /tmp/pardes-snap/msg/cwd/a.txt
+|3: 1 line 1 --:--:-- saved /tmp/pardes-snap/msg/cwd/a.txt
== snap mousecleared grid=70x17 cursor=7,4
-|16:
+|3: 1 line 1
== snap reloaded grid=70x17 cursor=7,4
-|3: 1 EXTERNAL
+|3: 1 EXTERNAL --:--:-- reloaded /tmp/pardes-snap/msg/cwd/a.txt
|4: 2
|5:
|6:
|7:
|8:
|9:
-|16: --:--:-- reloaded /tmp/pardes-snap/msg/cwd/a.txt
-== snap prompt grid=70x17 cursor=7,16
-|16: /EXT
-== snap prompt-wins grid=70x17 cursor=7,16
-|3: 1 AGAIN
+== 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: 2 Select /EXT
== snap esc grid=70x17 cursor=7,4
-|16:
+|3: 1 AGAIN
+|4: 2
== snap msgbuiltin grid=70x17 cursor=29,5
-|2: /tmp/pardes-snap/msg/cwd/a.txt * Save Tty Del Collapse
+|2: */tmp/pardes-snap/msg/cwd/a.txt Save Tty Collapse Del
+|3: 1 AGAIN hand-written report
|5: 3 Msg hand-written report
-|16: hand-written report
+== 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
diff --git a/test/snapshots/msg.snap b/test/snapshots/msg.snap
index c8a0a265..64a77bb2 100644
--- a/test/snapshots/msg.snap
+++ b/test/snapshots/msg.snap
@@ -58,7 +58,7 @@ snap reloaded
# its builtins instead of losing them to a long pattern. Note the tag row above
# ends at `Del`: the marker and the pattern are no longer on it at all. (The
# `/` keystroke also cleared the reload message, which is the rule above.)
-key /
+key s
text EXT
stable 700 15000
snap prompt
@@ -89,3 +89,15 @@ key x
key tab
stable 700 15000
snap msgbuiltin
+# A message wider than the pane keeps its TAIL, not its head: the end of a
+# message is the part that says something -- a path's file name, an error's
+# reason -- so the head is what a narrow pane goes without.
+key j
+key o
+text Msg 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 THE-END
+key esc
+settle 100
+key x
+key tab
+stable 700 15000
+snap msgtail
diff --git a/test/snapshots/multicursor.golden b/test/snapshots/multicursor.golden
index da2ad1d7..48ccefbf 100644
--- a/test/snapshots/multicursor.golden
+++ b/test/snapshots/multicursor.golden
@@ -1,11 +1,11 @@
== snap three-cursors grid=150x31 cursor=7,9
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/multicursor/cwd Save Tty Del Togglettymode Filter Collap /tmp/pardes-snap/multicursor/cwd Save Tty Del Togglettymode Filter Collap
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/multicursor/cwd Tty+bash Save Mode Filter Collapse Del /tmp/pardes-snap/multicursor/cwd Tty+bash Save Mode Filter Collapse Del
| ls ls
| f.txt f.txt
|
-| /tmp/pardes-snap/multicursor/cwd/f.txt Save Tty Del Collapse
+| /tmp/pardes-snap/multicursor/cwd/f.txt Save Tty Collapse Del
| 1 line 1
| 2 line 2
| 3 line 3
@@ -16,53 +16,53 @@
| 8 line 8
| 9 line 9
| 10 line 10
-| /tmp/pardes-snap/multicursor/cwd Save Tty Del Togglettymode Filter Collap
+| /tmp/pardes-snap/multicursor/cwd Tty+bash Save Mode Filter Collapse Del
| ls
| f.txt
== style three-cursors grid=150x31
-|0: 0-70 #b2c3b8,#1d2824, 71-149 d,#1d2824,
-|1: 0-24 #becfc4,#26362d, 25-74 d,#26362d, 75-99 #b2c3b8,#1d2824, 100-149 d,#1d2824,
-|2: 0-1 #ffffff,#4c6356, 2-74 #b2c3b8,#1d2824, 75-76 #ffffff,#4c6356, 77-149 #b2c3b8,#1d2824,
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|4: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|5: 0-0 d,#637f6a, 1-74 d,#0d1410, 75-75 d,#637f6a, 76-149 d,#0d1410,
-|6: 0-1 #000000,#adcc91, 2-61 #becfc4,#26362d, 62-74 d,#26362d, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|7: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-7 #405d4b,#f5f7ee, 8-12 #e5eee5,#0d1410, 13-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|8: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-7 #405d4b,#f5f7ee, 8-12 #e5eee5,#0d1410, 13-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|9: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #616f64,#0d1410,b 7-12 #e5eee5,#0d1410, 13-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|10: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|11: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|12: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|13: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|14: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|15: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|16: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-13 #e5eee5,#0d1410, 14-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|17: 0-1 #ffffff,#4c6356, 2-74 #b2c3b8,#1d2824, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|18: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|19: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|20: 0-0 d,#637f6a, 1-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|21: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|22: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|23: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|24: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|25: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|26: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|27: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|28: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|29: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|30: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
+|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-34 #b2c3b8,#1d2824, 35-43 #d3b0d9,#1d2824, 44-74 #b2c3b8,#1d2824, 75-76 #b2c3b8,#496656, 77-109 #b2c3b8,#1d2824, 110-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-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-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 edited-at-three grid=150x31 cursor=9,9
-|6: /tmp/pardes-snap/multicursor/cwd/f.txt * Save Tty Del Collapse
+|6: */tmp/pardes-snap/multicursor/cwd/f.txt Save Tty Collapse Del
|7: 1 >>line 1
|8: 2 >>line 2
|9: 3 >>line 3
== snap three-selections grid=150x31 cursor=8,9
== style three-selections grid=150x31
-|6: 0-1 #000000,#adcc91, 2-63 #becfc4,#26362d, 64-74 d,#26362d, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|7: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-7 #f5f7ee,#26382d, 8-8 #405d4b,#f5f7ee, 9-14 #e5eee5,#0d1410, 15-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|8: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-7 #f5f7ee,#26382d, 8-8 #405d4b,#f5f7ee, 9-14 #e5eee5,#0d1410, 15-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|9: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #616f64,#0d1410,b 7-8 #f5f7ee,#405d4b, 9-14 #e5eee5,#0d1410, 15-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
+|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
== style keep-primary grid=150x31
-|7: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-14 #e5eee5,#0d1410, 15-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|8: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-14 #e5eee5,#0d1410, 15-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
+|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,
diff --git a/test/snapshots/nested-optout.golden b/test/snapshots/nested-optout.golden
index 5d3fb8a7..0cb3b742 100644
--- a/test/snapshots/nested-optout.golden
+++ b/test/snapshots/nested-optout.golden
@@ -1,24 +1,54 @@
== snap optout-file grid=100x31 cursor=9,6
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-|$ /tmp/pardes-snap/nested-optout/cwd Save Tty Del Togglettymode Filter Collapse
-| Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-| New Tty Find Grep Joincol
-| /tmp/pardes-snap/nested-optout/cwd/nested.txt Save Tty Del Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+|$ /tmp/pardes-snap/nested-optout/cwd Tty+bash Save Mode Filter Collapse Del
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/nested-optout/cwd/nested.txt Save Tty Collapse Del
| 1 optout-marker
| 2 second-optout-line
| 3
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/nested-optout/cwd/+New Save Tty Collapse Del
+| 1
== snap inner-shell grid=100x31 cursor=6,6
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-|$ /tmp/pardes-snap/nested-optout/cwd Save Tty Del Togglettymode Filter Collapse
-| Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-| New Tty Find Grep Joincol
-| $ /tmp/pardes-snap/nested-optout/cwd/innerdir Save Tty Del Togglettymode Filter Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+|$ /tmp/pardes-snap/nested-optout/cwd Tty+bash Save Mode Filter Collapse Del
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| $ /tmp/pardes-snap/nested-optout/cwd/innerdir Tty+bash Save Mode Filter Collapse Del
| $
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/nested-optout/cwd/innerdir/+New Save Tty Collapse Del
+| 1
+|
+|
+|
+| /tmp/pardes-snap/nested-optout/cwd/+New Save Tty Collapse Del
+| 1
== snap inner-launch grid=100x31 cursor=11,9
-|6: Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|7: New Tty Find Grep Joincol
-|8: /tmp/pardes-snap/nested-optout/cwd/innerdir/deeper.txt Save Tty Del Collapse
+|6: Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+|7: New Tty Find Grep Joincol Delcol
+|8: /tmp/pardes-snap/nested-optout/cwd/innerdir/deeper.txt Save Tty Collapse Del
|9: 1 deepest-marker
|10: 2
diff --git a/test/snapshots/nested.golden b/test/snapshots/nested.golden
index 68d0a69b..466c34ae 100644
--- a/test/snapshots/nested.golden
+++ b/test/snapshots/nested.golden
@@ -1,28 +1,72 @@
== snap file-arg grid=100x31 cursor=7,6
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-|$ /tmp/pardes-snap/nested/cwd Save Tty Del Togglettymode Filter Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+|$ /tmp/pardes-snap/nested/cwd Tty+bash Save Mode Filter Collapse Del
| $ $(readlink /proc/$PPID/exe) nested.txt
| $
-| /tmp/pardes-snap/nested/cwd/nested.txt Save Tty Del Collapse
+| /tmp/pardes-snap/nested/cwd/nested.txt Save Tty Collapse Del
| 1 hello-from-nested
| 2 second-nested-line
| 3
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/nested/cwd/+New Save Tty Collapse Del
+| 1
== snap no-arg grid=100x31 cursor=4,7
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-|$ /tmp/pardes-snap/nested/cwd Save Tty Del Togglettymode Filter Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+|$ /tmp/pardes-snap/nested/cwd Tty+bash Save Mode Filter Collapse Del
| $ $(readlink /proc/$PPID/exe)
| pardes: this shell is already inside pardes, and a pardes inside a pardes
| is spicy. Name a file or a directory and the outer session opens it, or
| pass --nested if you really want a second one in here.
| $
-== snap dir-arg grid=100x31 cursor=4,8
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-|$ /tmp/pardes-snap/nested/cwd Save Tty Del Togglettymode Filter Collapse
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/nested/cwd/+New Save Tty Collapse Del
+| 1
+== snap dir-arg grid=100x31 cursor=7,6
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+|$ /tmp/pardes-snap/nested/cwd Tty+bash Save Mode Filter Collapse Del
| $ $(readlink /proc/$PPID/exe) nestdir
| $
-| /tmp/pardes-snap/nested/cwd/nestdir Save Tty Del Togglettymode Filter Collapse
-| ls
-| inside-nested.txt
+| /tmp/pardes-snap/nested/cwd/nestdir/ Get Tty Collapse Del
+| 1 inside-nested.txt
+| 2
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/nested/cwd/+New Save Tty Collapse Del
+| 1
diff --git a/test/snapshots/ninep.golden b/test/snapshots/ninep.golden
index 94ad4bcf..d10c7181 100644
--- a/test/snapshots/ninep.golden
+++ b/test/snapshots/ninep.golden
@@ -1,7 +1,7 @@
== snap opened grid=90x15 cursor=7,3
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/ninep/cwd/demo.zig Save Tty Del Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/ninep/cwd/demo.zig Save Tty Collapse TreeContext Def Refs Del
| 1 const greeting = "café λ 界 é";
| 2
| 3 pub fn choose(ok: bool) u32 {
@@ -10,70 +10,70 @@
| 6 }
| 7
== style opened grid=90x15
-|0: 0-70 #b2c3b8,#1d2824, 71-89 d,#1d2824,
-|1: 0-24 #becfc4,#26362d, 25-89 d,#26362d,
-|2: 0-1 #000000,#adcc91, 2-58 #becfc4,#26362d, 59-89 d,#26362d,
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #616f64,#0d1410,b 7-23 #e5eee5,#0d1410, 24-32 #b6ce94,#0d1410, 33-33 d,d, 34-36 #b6ce94,#0d1410, 37-37 #e5eee5,#0d1410, 38-89 d,#0d1410,
-|4: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-89 d,#0d1410,
-|5: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-12 #c9b0e4,#0d1410, 13-35 #e5eee5,#0d1410, 36-89 d,#0d1410,
-|6: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-12 #c9b0e4,#0d1410, 13-18 #e5eee5,#0d1410, 19-24 #c9b0e4,#0d1410, 25-25 #e5eee5,#0d1410, 26-27 #e9bf91,#0d1410, 28-28 #e5eee5,#0d1410, 29-89 d,#0d1410,
-|7: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-16 #c9b0e4,#0d1410, 17-17 #e5eee5,#0d1410, 18-18 #e9bf91,#0d1410, 19-19 #e5eee5,#0d1410, 20-89 d,#0d1410,
-|8: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-7 #e5eee5,#0d1410, 8-89 d,#0d1410,
-|9: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-89 d,#0d1410,
-|10: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-89 d,#0d1410,
-|11: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-89 d,#0d1410,
-|12: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-89 d,#0d1410,
-|13: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-89 d,#0d1410,
-|14: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-89 d,#0d1410,
+|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,
+|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
-|0: Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-@0: 0-70 #b2c3b8,#1d2824,,tagline 71-89 d,#1d2824,,tagline
-|1: New Tty Find Grep Joincol
-@1: 0-24 #becfc4,#26362d,,tagline 25-89 d,#26362d,,tagline
-|2: /tmp/pardes-snap/ninep/cwd/demo.zig Save Tty Del Collapse
-@2: 0-1 #000000,#adcc91,,tagline 2-58 #becfc4,#26362d,,tagline 59-89 d,#26362d,,tagline
+|0: Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+@0: 0-76 #b2c3b8,#1d2824,,tagline 77-89 d,#1d2824,,tagline
+|1: New Tty Find Grep Joincol Delcol
+@1: 0-1 #ffffff,#887455,,tagline 2-33 #becfc4,#314738,,tagline 34-89 d,#314738,,tagline
+|2: /tmp/pardes-snap/ninep/cwd/demo.zig Save Tty Collapse TreeContext Def Refs Del
+@2: 0-1 #000000,#add38a,,tagline 2-28 #becfc4,#314738,,tagline 29-36 #dfbce5,#314738,,tagline 37-79 #becfc4,#314738,,tagline 80-89 d,#314738,,tagline
|3: 1 const greeting = "café λ 界 é";
+3: 28="é" 30="λ" 32="界" 33="" 35="é"
-@3: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #616f64,#0d1410,b,body 7-23 #e5eee5,#0d1410,,body 24-36 #b6ce94,#0d1410,,body 37-37 #e5eee5,#0d1410,,body 38-89 d,#0d1410,,body
+@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,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
+@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,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-10 #e5eee5,#0d1410,,body 11-12 #c9b0e4,#0d1410,,body 13-35 #e5eee5,#0d1410,,body 36-89 d,#0d1410,,body
+@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,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-10 #e5eee5,#0d1410,,body 11-12 #c9b0e4,#0d1410,,body 13-18 #e5eee5,#0d1410,,body 19-24 #c9b0e4,#0d1410,,body 25-25 #e5eee5,#0d1410,,body 26-27 #e9bf91,#0d1410,,body 28-28 #e5eee5,#0d1410,,body 29-89 d,#0d1410,,body
+@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,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-10 #e5eee5,#0d1410,,body 11-16 #c9b0e4,#0d1410,,body 17-17 #e5eee5,#0d1410,,body 18-18 #e9bf91,#0d1410,,body 19-19 #e5eee5,#0d1410,,body 20-89 d,#0d1410,,body
+@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,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-7 #e5eee5,#0d1410,,body 8-89 d,#0d1410,,body
+@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: 7
-@9: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
+@9: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
|10:
-@10: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
+@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,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
+@11: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
|12:
-@12: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
+@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,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
+@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,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
+@14: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
== style colors-off grid=90x15
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #616f64,#0d1410,b 7-32 #e5eee5,#0d1410, 33-33 d,d, 34-37 #e5eee5,#0d1410, 38-89 d,#0d1410,
-|5: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-35 #e5eee5,#0d1410, 36-89 d,#0d1410,
-|6: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-28 #e5eee5,#0d1410, 29-89 d,#0d1410,
-|7: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-19 #e5eee5,#0d1410, 20-89 d,#0d1410,
+|3: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-32 #e5eee5,#0d1410, 33-33 d,d, 34-34 d,#0d1410, 35-81 #e5eee5,#0d1410, 82-82 #e5eee5,#1d2824, 83-89 #b2c3b8,#1d2824,
+|5: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-89 #e5eee5,#0d1410,
+|6: 0-0 d,#608269, 1-4 d,#0d1410, 5-10 #59675c,#0d1410, 11-89 #e5eee5,#0d1410,
+|7: 0-0 d,#608269, 1-4 d,#0d1410, 5-10 #59675c,#0d1410, 11-89 #e5eee5,#0d1410,
== 9p colors-off grid=90x15 cursor=7,3,block
-|3: 1 const greeting = "café λ 界 é";
+|3: 1 const greeting = "café λ 界 é"; Colors
+3: 28="é" 30="λ" 32="界" 33="" 35="é"
-@3: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #616f64,#0d1410,b,body 7-37 #e5eee5,#0d1410,,body 38-89 d,#0d1410,,body
+@3: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #616f64,#0d1410,b,body 7-37 #e5eee5,#0d1410,,body 38-81 d,#0d1410,,body 82-82 d,#1d2824,,tagline 83-88 #b2c3b8,#1d2824,,tagline 89-89 d,#1d2824,,tagline
|5: 3 pub fn choose(ok: bool) u32 {
-@5: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-35 #e5eee5,#0d1410,,body 36-89 d,#0d1410,,body
+@5: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-35 #e5eee5,#0d1410,,body 36-89 d,#0d1410,,body
|6: 4 if (ok) return 42;
-@6: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-28 #e5eee5,#0d1410,,body 29-89 d,#0d1410,,body
+@6: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-28 #e5eee5,#0d1410,,body 29-89 d,#0d1410,,body
|7: 5 return 7;
-@7: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-19 #e5eee5,#0d1410,,body 20-89 d,#0d1410,,body
+@7: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-19 #e5eee5,#0d1410,,body 20-89 d,#0d1410,,body
== snap edited-with-colors-off grid=90x15 cursor=7,4
-|2: /tmp/pardes-snap/ninep/cwd/demo.zig * Save Tty Del Collapse
+|2: */tmp/pardes-snap/ninep/cwd/demo.zig Save Tty Collapse TreeContext Def Refs Del
|3: 1 // café λ 界
|4: 2 const greeting = "café λ 界 é";
|5: 3
@@ -83,117 +83,118 @@
|9: 7 }
|10: 8
== 9p edited-with-colors-off grid=90x15 cursor=7,4,block
-|2: /tmp/pardes-snap/ninep/cwd/demo.zig * Save Tty Del Collapse
-@2: 0-1 #000000,#adcc91,,tagline 2-60 #becfc4,#26362d,,tagline 61-89 d,#26362d,,tagline
+|2: */tmp/pardes-snap/ninep/cwd/demo.zig Save Tty Collapse 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-79 #becfc4,#314738,,tagline 80-89 d,#314738,,tagline
|3: 1 // café λ 界
+3: 13="é" 15="λ" 17="界" 18=""
-@3: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-18 #e5eee5,#0d1410,,body 19-89 d,#0d1410,,body
+@3: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-18 #e5eee5,#0d1410,,body 19-89 d,#0d1410,,body
|4: 2 const greeting = "café λ 界 é";
+4: 28="é" 30="λ" 32="界" 33="" 35="é"
-@4: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #616f64,#0d1410,b,body 7-37 #e5eee5,#0d1410,,body 38-89 d,#0d1410,,body
+@4: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #616f64,#0d1410,b,body 7-37 #e5eee5,#0d1410,,body 38-89 d,#0d1410,,body
|5: 3
-@5: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
+@5: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
|6: 4 pub fn choose(ok: bool) u32 {
-@6: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-35 #e5eee5,#0d1410,,body 36-89 d,#0d1410,,body
+@6: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-35 #e5eee5,#0d1410,,body 36-89 d,#0d1410,,body
|7: 5 if (ok) return 42;
-@7: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-28 #e5eee5,#0d1410,,body 29-89 d,#0d1410,,body
+@7: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-28 #e5eee5,#0d1410,,body 29-89 d,#0d1410,,body
|8: 6 return 7;
-@8: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-19 #e5eee5,#0d1410,,body 20-89 d,#0d1410,,body
+@8: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-19 #e5eee5,#0d1410,,body 20-89 d,#0d1410,,body
|9: 7 }
-@9: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-7 #e5eee5,#0d1410,,body 8-89 d,#0d1410,,body
+@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: 8
-@10: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
+@10: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body
== style colors-on grid=90x15
-|2: 0-1 #000000,#adcc91, 2-60 #becfc4,#26362d, 61-89 d,#26362d,
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-17 #b9e58f,#0d1410, 18-18 d,d, 19-89 d,#0d1410,
-|4: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #616f64,#0d1410,b 7-23 #e5eee5,#0d1410, 24-32 #b6ce94,#0d1410, 33-33 d,d, 34-36 #b6ce94,#0d1410, 37-37 #e5eee5,#0d1410, 38-89 d,#0d1410,
-|5: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-89 d,#0d1410,
-|6: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-12 #c9b0e4,#0d1410, 13-35 #e5eee5,#0d1410, 36-89 d,#0d1410,
-|7: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-12 #c9b0e4,#0d1410, 13-18 #e5eee5,#0d1410, 19-24 #c9b0e4,#0d1410, 25-25 #e5eee5,#0d1410, 26-27 #e9bf91,#0d1410, 28-28 #e5eee5,#0d1410, 29-89 d,#0d1410,
-|8: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-16 #c9b0e4,#0d1410, 17-17 #e5eee5,#0d1410, 18-18 #e9bf91,#0d1410, 19-19 #e5eee5,#0d1410, 20-89 d,#0d1410,
-|9: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-7 #e5eee5,#0d1410, 8-89 d,#0d1410,
+|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-81 d,#0d1410, 82-82 d,#1d2824, 83-89 #b2c3b8,#1d2824,
+|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,
== 9p colors-on grid=90x15 cursor=7,4,block
-|3: 1 // café λ 界
+|3: 1 // café λ 界 Colors
+3: 13="é" 15="λ" 17="界" 18=""
-@3: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-18 #b9e58f,#0d1410,,body 19-89 d,#0d1410,,body
+@3: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-18 #b9f480,#0d1410,,body 19-81 d,#0d1410,,body 82-82 d,#1d2824,,tagline 83-88 #b2c3b8,#1d2824,,tagline 89-89 d,#1d2824,,tagline
|4: 2 const greeting = "café λ 界 é";
+4: 28="é" 30="λ" 32="界" 33="" 35="é"
-@4: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #616f64,#0d1410,b,body 7-23 #e5eee5,#0d1410,,body 24-36 #b6ce94,#0d1410,,body 37-37 #e5eee5,#0d1410,,body 38-89 d,#0d1410,,body
+@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
|6: 4 pub fn choose(ok: bool) u32 {
-@6: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-10 #e5eee5,#0d1410,,body 11-12 #c9b0e4,#0d1410,,body 13-35 #e5eee5,#0d1410,,body 36-89 d,#0d1410,,body
+@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: 5 if (ok) return 42;
-@7: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-10 #e5eee5,#0d1410,,body 11-12 #c9b0e4,#0d1410,,body 13-18 #e5eee5,#0d1410,,body 19-24 #c9b0e4,#0d1410,,body 25-25 #e5eee5,#0d1410,,body 26-27 #e9bf91,#0d1410,,body 28-28 #e5eee5,#0d1410,,body 29-89 d,#0d1410,,body
+@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: 6 return 7;
-@8: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-10 #e5eee5,#0d1410,,body 11-16 #c9b0e4,#0d1410,,body 17-17 #e5eee5,#0d1410,,body 18-18 #e9bf91,#0d1410,,body 19-19 #e5eee5,#0d1410,,body 20-89 d,#0d1410,,body
+@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
== style resized grid=105x20
-|0: 0-70 #b2c3b8,#1d2824, 71-104 d,#1d2824,
-|1: 0-24 #becfc4,#26362d, 25-104 d,#26362d,
-|2: 0-1 #000000,#adcc91, 2-60 #becfc4,#26362d, 61-104 d,#26362d,
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-17 #b9e58f,#0d1410, 18-18 d,d, 19-104 d,#0d1410,
-|4: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #616f64,#0d1410,b 7-23 #e5eee5,#0d1410, 24-32 #b6ce94,#0d1410, 33-33 d,d, 34-36 #b6ce94,#0d1410, 37-37 #e5eee5,#0d1410, 38-104 d,#0d1410,
-|5: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-104 d,#0d1410,
-|6: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-12 #c9b0e4,#0d1410, 13-35 #e5eee5,#0d1410, 36-104 d,#0d1410,
-|7: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-12 #c9b0e4,#0d1410, 13-18 #e5eee5,#0d1410, 19-24 #c9b0e4,#0d1410, 25-25 #e5eee5,#0d1410, 26-27 #e9bf91,#0d1410, 28-28 #e5eee5,#0d1410, 29-104 d,#0d1410,
-|8: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-16 #c9b0e4,#0d1410, 17-17 #e5eee5,#0d1410, 18-18 #e9bf91,#0d1410, 19-19 #e5eee5,#0d1410, 20-104 d,#0d1410,
-|9: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-7 #e5eee5,#0d1410, 8-104 d,#0d1410,
-|10: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-104 d,#0d1410,
-|11: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-104 d,#0d1410,
-|12: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-104 d,#0d1410,
-|13: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-104 d,#0d1410,
-|14: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-104 d,#0d1410,
-|15: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-104 d,#0d1410,
-|16: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-104 d,#0d1410,
-|17: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-104 d,#0d1410,
-|18: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-104 d,#0d1410,
-|19: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-104 d,#0d1410,
+|0: 0-1 d,#1d2824, 2-104 #b2c3b8,#1d2824,
+|1: 0-1 d,#887455, 2-104 #becfc4,#314738,
+|2: 0-0 d,#add38a, 1-1 #000000,#f9cb70,b 2-28 #becfc4,#314738, 29-37 #dfbce5,#314738, 38-104 #becfc4,#314738,
+|3: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-17 #b9f480,#0d1410, 18-18 d,d, 19-96 d,#0d1410, 97-97 d,#1d2824, 98-104 #b2c3b8,#1d2824,
+|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-104 #e5eee5,#0d1410,
+|5: 0-0 d,#608269, 1-4 d,#0d1410, 5-104 #59675c,#0d1410,
+|6: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-13 #c9a7ed,#0d1410, 14-104 #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-104 #e5eee5,#0d1410,
+|8: 0-0 d,#608269, 1-4 d,#0d1410, 5-10 #59675c,#0d1410, 11-17 #c9a7ed,#0d1410, 18-18 #f8c082,#0d1410, 19-104 #e5eee5,#0d1410,
+|9: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-104 #e5eee5,#0d1410,
+|10: 0-0 d,#608269, 1-4 d,#0d1410, 5-104 #59675c,#0d1410,
+|11: 0-0 d,#608269, 1-104 d,#0d1410,
+|12: 0-0 d,#608269, 1-104 d,#0d1410,
+|13: 0-0 d,#608269, 1-104 d,#0d1410,
+|14: 0-0 d,#608269, 1-104 d,#0d1410,
+|15: 0-0 d,#608269, 1-104 d,#0d1410,
+|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,
== 9p resized grid=105x20 cursor=7,4,block
-|0: Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-@0: 0-70 #b2c3b8,#1d2824,,tagline 71-104 d,#1d2824,,tagline
-|1: New Tty Find Grep Joincol
-@1: 0-24 #becfc4,#26362d,,tagline 25-104 d,#26362d,,tagline
-|2: /tmp/pardes-snap/ninep/cwd/demo.zig * Save Tty Del Collapse
-@2: 0-1 #000000,#adcc91,,tagline 2-60 #becfc4,#26362d,,tagline 61-104 d,#26362d,,tagline
-|3: 1 // café λ 界
+|0: Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+@0: 0-76 #b2c3b8,#1d2824,,tagline 77-104 d,#1d2824,,tagline
+|1: New Tty Find Grep Joincol Delcol
+@1: 0-1 #ffffff,#887455,,tagline 2-33 #becfc4,#314738,,tagline 34-104 d,#314738,,tagline
+|2: */tmp/pardes-snap/ninep/cwd/demo.zig Save Tty Collapse 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-79 #becfc4,#314738,,tagline 80-104 d,#314738,,tagline
+|3: 1 // café λ 界 Colors
+3: 13="é" 15="λ" 17="界" 18=""
-@3: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-18 #b9e58f,#0d1410,,body 19-104 d,#0d1410,,body
+@3: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-18 #b9f480,#0d1410,,body 19-96 d,#0d1410,,body 97-97 d,#1d2824,,tagline 98-103 #b2c3b8,#1d2824,,tagline 104-104 d,#1d2824,,tagline
|4: 2 const greeting = "café λ 界 é";
+4: 28="é" 30="λ" 32="界" 33="" 35="é"
-@4: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #616f64,#0d1410,b,body 7-23 #e5eee5,#0d1410,,body 24-36 #b6ce94,#0d1410,,body 37-37 #e5eee5,#0d1410,,body 38-104 d,#0d1410,,body
+@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-104 d,#0d1410,,body
|5: 3
-@5: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
+@5: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
|6: 4 pub fn choose(ok: bool) u32 {
-@6: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-10 #e5eee5,#0d1410,,body 11-12 #c9b0e4,#0d1410,,body 13-35 #e5eee5,#0d1410,,body 36-104 d,#0d1410,,body
+@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-104 d,#0d1410,,body
|7: 5 if (ok) return 42;
-@7: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-10 #e5eee5,#0d1410,,body 11-12 #c9b0e4,#0d1410,,body 13-18 #e5eee5,#0d1410,,body 19-24 #c9b0e4,#0d1410,,body 25-25 #e5eee5,#0d1410,,body 26-27 #e9bf91,#0d1410,,body 28-28 #e5eee5,#0d1410,,body 29-104 d,#0d1410,,body
+@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-104 d,#0d1410,,body
|8: 6 return 7;
-@8: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-10 #e5eee5,#0d1410,,body 11-16 #c9b0e4,#0d1410,,body 17-17 #e5eee5,#0d1410,,body 18-18 #e9bf91,#0d1410,,body 19-19 #e5eee5,#0d1410,,body 20-104 d,#0d1410,,body
+@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-104 d,#0d1410,,body
|9: 7 }
-@9: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-7 #e5eee5,#0d1410,,body 8-104 d,#0d1410,,body
+@9: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-7 #e5eee5,#0d1410,,body 8-104 d,#0d1410,,body
|10: 8
-@10: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
+@10: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
|11:
-@11: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
+@11: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
|12:
-@12: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
+@12: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
|13:
-@13: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
+@13: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
|14:
-@14: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
+@14: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
|15:
-@15: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
+@15: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
|16:
-@16: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
+@16: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
|17:
-@17: 0-0 d,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
+@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,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
+@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,#637f6a,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
+@19: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body
== snap resized grid=105x20 cursor=7,4
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/ninep/cwd/demo.zig * Save Tty Del Collapse
-| 1 // café λ 界
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| */tmp/pardes-snap/ninep/cwd/demo.zig Save Tty Collapse TreeContext Def Refs Del
+| 1 // café λ 界 Colors
| 2 const greeting = "café λ 界 é";
| 3
| 4 pub fn choose(ok: bool) u32 {
diff --git a/test/snapshots/pagercolor.golden b/test/snapshots/pagercolor.golden
new file mode 100644
index 00000000..e84359d8
--- /dev/null
+++ b/test/snapshots/pagercolor.golden
@@ -0,0 +1,131 @@
+== snap pager grid=100x50 cursor=4,5
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+|$ /tmp/pardes-snap/pagercolor/cwd Tty+bash Save Mode Filter Collapse Del
+| $ printf '\033]0;title\007\033[31mred\033[m \033[1;32mbold green\033[m \033[38;2;200;100;0mrgb\033
+| [m \033[4mul\033[m N\bNA\bAM\bME\bE _\bu_\bs plain\n' | $(readlink /proc/$PPID/exe) -
+| $
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/pagercolor/cwd/+New Save Tty Collapse Del
+| 1
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/pagercolor/cwd/+Pager Save Tty Filter Collapse Del
+| red bold green rgb ul NAME us plain
+== style pager-colours grid=100x50
+|0: 0-1 d,#1d2824, 2-99 #b2c3b8,#1d2824,
+|1: 0-1 d,#887455, 2-99 #becfc4,#314738,
+|2: 0-1 #000000,#add38a, 2-33 #becfc4,#314738, 34-42 #dfbce5,#314738, 43-99 #becfc4,#314738,
+|3: 0-0 d,#608269, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
+|4: 0-0 d,#608269, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
+|5: 0-0 d,#608269, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
+|6: 0-0 d,#608269, 1-99 d,#0d1410,
+|7: 0-0 d,#608269, 1-99 d,#0d1410,
+|8: 0-0 d,#608269, 1-99 d,#0d1410,
+|9: 0-0 d,#608269, 1-99 d,#0d1410,
+|10: 0-0 d,#608269, 1-99 d,#0d1410,
+|11: 0-0 d,#608269, 1-99 d,#0d1410,
+|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-0 d,#608269, 1-99 d,#0d1410,
+|17: 0-0 d,#608269, 1-99 d,#0d1410,
+|18: 0-0 d,#608269, 1-99 d,#0d1410,
+|19: 0-0 d,#608269, 1-99 d,#0d1410,
+|20: 0-0 d,#608269, 1-99 d,#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-0 d,#608269, 1-99 d,#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,
+|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,
+|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,
+|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,
+== 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' |
+|7: $(readlink /proc/$PPID/exe) -
+|8: $
+|9: /tmp/pardes-snap/pagercolor/cwd/+Diff Save Tty Diff Collapse LocationsConfig Del
+|10: commit 0123abc
+|11: x:1
+|12: -old
+|13: +new
+|34:
+|35:
+|38: /tmp/pardes-snap/pagercolor/cwd/+New Save Tty Collapse Del
+|39: 1
+|42:
+|43:
+|46: /tmp/pardes-snap/pagercolor/cwd/+Pager Save Tty Filter Collapse Del
+|47: 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,
+|8: 0-0 d,#608269, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
+|9: 0-1 d,#496656, 2-33 #b2c3b8,#1d2824, 34-39 #d3b0d9,#1d2824, 40-99 #b2c3b8,#1d2824,
+|10: 0-0 d,#608269, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
+|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,
+|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,
+|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,
diff --git a/test/snapshots/pagercolor.snap b/test/snapshots/pagercolor.snap
new file mode 100644
index 00000000..650792b3
--- /dev/null
+++ b/test/snapshots/pagercolor.snap
@@ -0,0 +1,24 @@
+# `pardes -` keeps a program's colours (PagerColor, on by default): its SGR
+# becomes the +Pager's own colours over the plain text (red through the
+# theme's palette, truecolor as given, bold and underline, a man page's
+# overstrike), and every other escape (the OSC title) is dropped. The
+# needles waited for are split by escapes in the typed line, so only the
+# paged text holds them.
+start 50 100
+wait 8000 $
+stable 700 20000
+text printf '\033]0;title\007\033[31mred\033[m \033[1;32mbold green\033[m \033[38;2;200;100;0mrgb\033[m \033[4mul\033[m N\bNA\bAM\bME\bE _\bu_\bs plain\n' | $(readlink /proc/$PPID/exe) -
+key enter
+wait 20000 red bold green
+stable 700 20000
+snap pager
+snapstyle pager-colours
+# A coloured diff: the rows pardes tints as added or removed are drawn as
+# its own diff, and git's colours stay on the rest (the bold header, the
+# cyan hunk line, the yellow commit line).
+text printf '\033[33mcommit 0123\033[33mabc\033[m\n\033[1mdiff --git a/x b/x\033[m\n\033[1m--- a/x\033[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' | $(readlink /proc/$PPID/exe) -
+key enter
+wait 20000 0123abc
+stable 700 20000
+snap pager-diff
+snapstyle pager-diff-colours
diff --git a/test/snapshots/pipe.golden b/test/snapshots/pipe.golden
index e6d558a6..8818499e 100644
--- a/test/snapshots/pipe.golden
+++ b/test/snapshots/pipe.golden
@@ -1,20 +1,12 @@
-== snap prompt grid=180x13 cursor=14,12
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/pipe/cwd/pipe.txt Save Tty Del Collapse
-| 1 alpha beta
+== snap prompt grid=180x13 cursor=179,3
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/pipe/cwd/pipe.txt Save Tty Collapse Del
+| 1 alpha beta |tr a-z A-Z
| 2 gamma delta
-|
-|
-|
-|
-|
-|
-|
-| |tr a-z A-Z
== snap filtered grid=180x13 cursor=17,3
-|2: /tmp/pardes-snap/pipe/cwd/pipe.txt * Save Tty Del Collapse
+|2: */tmp/pardes-snap/pipe/cwd/pipe.txt Save Tty Collapse Del
|3: 1 ALPHA BETA
-|12:
== snap undone grid=180x13 cursor=17,3
+|2: /tmp/pardes-snap/pipe/cwd/pipe.txt Save Tty Collapse Del
|3: 1 alpha beta
diff --git a/test/snapshots/psearch.golden b/test/snapshots/psearch.golden
index d1a28996..2a845a34 100644
--- a/test/snapshots/psearch.golden
+++ b/test/snapshots/psearch.golden
@@ -1,62 +1,81 @@
== snap output grid=140x31 cursor=4,9
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/psearch/cwd Save Tty Del Togglettymode Filter Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/psearch/cwd Tty+bash Save Mode Filter Collapse Del
| printf 'x MA''RK a\nzz\nx MA''RK b\nzz\nx MA''RK c\n'
| x MARK a
| zz
| x MARK b
| zz
| x MARK c
-== snap typing grid=140x31 cursor=8,30
-|30: /MARK
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/psearch/cwd/+New Save Tty Collapse Del
+| 1
+== 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
-|27: /tmp/pardes-snap/psearch/cwd/+Search Save Tty Del Collapse
-|28: 1 @p0:2:3-6 x MARK a
-|29: 2 @p0:4:3-6 x MARK b
-|30: 3 @p0:6:3-6 x MARK c
+|3: printf 'x MA''RK a\nzz\nx MA''RK b\nzz\nx MA''RK c\n'
+|10: /tmp/pardes-snap/psearch/cwd/+Search Save Tty Collapse LocationsConfig Del
+|11: 1 @p1:2:3-6
+|12: 2 x MARK a
+|13: 3 @p1:4:3-6
+|14: 4 x MARK b
+|15: 5 @p1:6:3-6
+|16: 6 x MARK c
+|17: 7
== style results grid=140x31
-|0: 0-70 #b2c3b8,#1d2824, 71-139 d,#1d2824,
-|1: 0-24 #becfc4,#26362d, 25-139 d,#26362d,
-|2: 0-1 #000000,#adcc91, 2-72 #becfc4,#26362d, 73-139 d,#26362d,
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-139 #e5eee5,#0d1410,
-|4: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-3 #e5eee5,#0d1410, 4-7 #f5f7ee,#405d4b, 8-139 #e5eee5,#0d1410,
-|5: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-139 #e5eee5,#0d1410,
-|6: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-139 #e5eee5,#0d1410,
-|7: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-139 #e5eee5,#0d1410,
-|8: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-139 #e5eee5,#0d1410,
-|9: 0-0 d,#637f6a, 1-139 d,#0d1410,
-|10: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-139 #e5eee5,#0d1410,
-|11: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-139 #e5eee5,#0d1410,
-|12: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-139 #e5eee5,#0d1410,
-|13: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-139 #e5eee5,#0d1410,
-|14: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-139 #e5eee5,#0d1410,
-|15: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-139 #e5eee5,#0d1410,
-|16: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-139 #e5eee5,#0d1410,
-|17: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-139 #e5eee5,#0d1410,
-|18: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-139 #e5eee5,#0d1410,
-|19: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-139 #e5eee5,#0d1410,
-|20: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-139 #e5eee5,#0d1410,
-|21: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-139 #e5eee5,#0d1410,
-|22: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-139 #e5eee5,#0d1410,
-|23: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-139 #e5eee5,#0d1410,
-|24: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-139 #e5eee5,#0d1410,
-|25: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-139 #e5eee5,#0d1410,
-|26: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-139 #e5eee5,#0d1410,
-|27: 0-1 #ffffff,#4c6356, 2-59 #b2c3b8,#1d2824, 60-139 d,#1d2824,
-|28: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-15 #59675c,#0d1410, 16-18 #e5eee5,#0d1410, 19-22 #f7e4a5,#57472a, 23-24 #e5eee5,#0d1410, 25-139 d,#0d1410,
-|29: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-15 #59675c,#0d1410, 16-18 #e5eee5,#0d1410, 19-22 #f7e4a5,#57472a, 23-24 #e5eee5,#0d1410, 25-139 d,#0d1410,
-|30: 0-0 d,#152019, 1-1 d,#0d1410, 2-15 #59675c,#0d1410, 16-18 #e5eee5,#0d1410, 19-22 #f7e4a5,#57472a, 23-24 #e5eee5,#0d1410, 25-139 d,#0d1410,
+|0: 0-1 d,#1d2824, 2-139 #b2c3b8,#1d2824,
+|1: 0-1 d,#887455, 2-139 #becfc4,#314738,
+|2: 0-1 d,#add38a, 2-30 #becfc4,#314738, 31-39 #dfbce5,#314738, 40-139 #becfc4,#314738,
+|3: 0-0 d,#608269, 1-1 d,#0d1410, 2-139 #e5eee5,#0d1410,
+|4: 0-0 d,#608269, 1-1 d,#0d1410, 2-3 #e5eee5,#0d1410, 4-7 #f5f7ee,#3c614a, 8-8 #f5f7ee,#0d1410, 9-139 #e5eee5,#0d1410,
+|5: 0-0 d,#608269, 1-1 d,#0d1410, 2-139 #e5eee5,#0d1410,
+|6: 0-0 d,#608269, 1-1 d,#0d1410, 2-139 #e5eee5,#0d1410,
+|7: 0-0 d,#608269, 1-1 d,#0d1410, 2-139 #e5eee5,#0d1410,
+|8: 0-0 d,#608269, 1-1 d,#0d1410, 2-139 #e5eee5,#0d1410,
+|9: 0-0 d,#608269, 1-139 d,#0d1410,
+|10: 0-1 d,#496656, 2-30 #b2c3b8,#1d2824, 31-38 #d3b0d9,#1d2824, 39-139 #b2c3b8,#1d2824,
+|11: 0-0 d,#608269, 1-4 d,#0d1410, 5-139 #59675c,#0d1410,
+|12: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-8 #e5eee5,#0d1410, 9-12 #f7e4a5,#5e4923, 13-13 #f7e4a5,#0d1410, 14-139 #e5eee5,#0d1410,
+|13: 0-0 d,#608269, 1-4 d,#0d1410, 5-139 #59675c,#0d1410,
+|14: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-8 #e5eee5,#0d1410, 9-12 #f7e4a5,#5e4923, 13-13 #f7e4a5,#0d1410, 14-139 #e5eee5,#0d1410,
+|15: 0-0 d,#608269, 1-4 d,#0d1410, 5-139 #59675c,#0d1410,
+|16: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-8 #e5eee5,#0d1410, 9-12 #f7e4a5,#5e4923, 13-13 #f7e4a5,#0d1410, 14-139 #e5eee5,#0d1410,
+|17: 0-0 d,#608269, 1-4 d,#0d1410, 5-139 #59675c,#0d1410,
+|18: 0-0 d,#608269, 1-139 d,#0d1410,
+|19: 0-0 d,#608269, 1-139 d,#0d1410,
+|20: 0-0 d,#608269, 1-139 d,#0d1410,
+|21: 0-1 d,#496656, 2-30 #b2c3b8,#1d2824, 31-35 #d3b0d9,#1d2824, 36-139 #b2c3b8,#1d2824,
+|22: 0-0 d,#608269, 1-4 d,#0d1410, 5-139 #59675c,#0d1410,
+|23: 0-0 d,#608269, 1-139 d,#0d1410,
+|24: 0-0 d,#608269, 1-139 d,#0d1410,
+|25: 0-0 d,#608269, 1-139 d,#0d1410,
+|26: 0-0 d,#608269, 1-139 d,#0d1410,
+|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,
== snap second grid=140x31 cursor=7,6
== snap back grid=140x31 cursor=7,4
-== snap nomatch grid=140x31 cursor=7,29
-|25: /tmp/pardes-snap/psearch/cwd/+Search Save Tty Del Collapse
-|26: 1
+== snap nomatch grid=140x31 cursor=7,13
+|24: /tmp/pardes-snap/psearch/cwd/+Search Save Tty Collapse LocationsConfig Del
+|25: 1
== snap ttyinert grid=140x31 cursor=4,9
-|2: $ /tmp/pardes-snap/psearch/cwd Save Tty Del Togglettymode Filter Collapse
+|2: $ /tmp/pardes-snap/psearch/cwd Tty+bash Save Mode Filter Collapse Del
|3: $ printf 'x MA''RK a\nzz\nx MA''RK b\nzz\nx MA''RK c\n'
|9: $
== snap rightsearch grid=140x31 cursor=7,6
-|2: /tmp/pardes-snap/psearch/cwd Save Tty Del Togglettymode Filter Collapse
+|2: /tmp/pardes-snap/psearch/cwd Tty+bash Save Mode Filter Collapse Del
|3: printf 'x MA''RK a\nzz\nx MA''RK b\nzz\nx MA''RK c\n'
|9:
diff --git a/test/snapshots/psearch.snap b/test/snapshots/psearch.snap
index a46e2b9d..d55fe833 100644
--- a/test/snapshots/psearch.snap
+++ b/test/snapshots/psearch.snap
@@ -1,7 +1,7 @@
# `/` search on a TERMINAL pane: the same tag input as a file pane, searching
# the shell's own scrollback (the plain text view Look reads, prompt rows
# hidden). Results land in a +Search OUTPUT BUFFER — a file pane with no file
-# behind it, so its tag has no Save — and point at `@p0:LINE:COL-ENDCOL`, the
+# behind it, so its tag has no Save — and point at `@p1:LINE:COL-ENDCOL` (the terminal's serial), the
# look target that names a live pane, since a terminal has no path. n/N SELECT
# the next/prev row in the buffer and open nothing; Enter — the look chord —
# is what scrolls the terminal to that line of its scrollback and selects the
@@ -31,22 +31,22 @@ stable 400 5000
text MARK
stable 400 5000
snap typing
-# Enter opens the results buffer — three @p0:LINE:COL rows — and goes to the
+# Enter opens the results buffer — three @p1:LINE:COL rows — and goes to the
# first of them: the terminal's cursor lands on that scrollback line, on the
# matched SPAN (cols 3..6, past the leading "x ") — not the start of the line,
# and selected rather than merely parked on. No `n` was pressed to get here.
key enter
-wait 10000 @p0:2:3
+wait 10000 @p1:2:3
stable 700 15000
snap results
snapstyle results
# n walks on to the next row, Enter looks it
-key n
+key space j n
key enter
stable 700 15000
snap second
# N walks back one row, Enter looks it
-key N
+key space j p
key enter
stable 700 15000
snap back
@@ -58,7 +58,7 @@ key /
text zzqq
key enter
stable 700 10000
-key n
+key space j n
stable 400 5000
snap nomatch
# right-clicking a word that names no file is the same search (acme button 3),
@@ -83,6 +83,6 @@ key c-b
stable 600 8000
press right 5 5
release right 5 5
-wait 10000 @p0:2:3
+wait 10000 @p1:2:3
stable 700 15000
snap rightsearch
diff --git a/test/snapshots/reflow.golden b/test/snapshots/reflow.golden
index 3c2f5ff4..db4b5a77 100644
--- a/test/snapshots/reflow.golden
+++ b/test/snapshots/reflow.golden
@@ -1,11 +1,7 @@
-== snap widened grid=200x25 cursor=4,20
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-|$ /tmp/pardes-snap/reflow/cwd Save Tty Del Togglettymode Filter Collapse
-| $ printf 'y%.0s' $(seq 1 3000); echo do''ne
-| yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
-| yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
-| yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
+== snap widened grid=200x25 cursor=4,16
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+|$ /tmp/pardes-snap/reflow/cwd Tty+bash Save Mode Filter Collapse Del
| yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
| yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
| yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
@@ -20,3 +16,5 @@
| yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
| yyyyyyyyyyyyyyyyyyyyyyyyyyyyyydone
| $
+| /tmp/pardes-snap/reflow/cwd/+New Save Tty Collapse Del
+| 1
diff --git a/test/snapshots/respawn.golden b/test/snapshots/respawn.golden
index 9aa6b46b..4810f9d3 100644
--- a/test/snapshots/respawn.golden
+++ b/test/snapshots/respawn.golden
@@ -1,10 +1,10 @@
-== snap respawn grid=100x31 cursor=4,9
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/respawn/cwd Save Tty Del Toggle /tmp/pardes-snap/respawn/cwd Save Tty Del Toggle
-| ls ls
+== snap respawn grid=140x31 cursor=4,9
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/respawn/cwd Tty+bash Save Mode Filter Collapse Del /tmp/pardes-snap/respawn/cwd Tty+bash Save Mode Filter Collapse Del
+| ls ls
|
-|$ /tmp/pardes-snap/respawn/cwd Save Tty Del Toggle
+|$ /tmp/pardes-snap/respawn/cwd Tty+bash Save Mode Filter Collapse Del
| $ ls
| $ echo RESP''AWNOK
| RESPAWNOK
diff --git a/test/snapshots/respawn.snap b/test/snapshots/respawn.snap
index 66393da9..e0ebea13 100644
--- a/test/snapshots/respawn.snap
+++ b/test/snapshots/respawn.snap
@@ -1,13 +1,13 @@
# a deleted shell pane's pty lingers in its slot (there is no close effect);
# a later spawn reusing the pane id must reap it instead of tripping the
# drainEffects spawn assert — this exact sequence crashed pre-fix
-start 31 100 -n 3
+start 31 140 -n 3
wait 8000 Newcol Joincol
stable 700 20000
# middle-click Del on the lower-left pane's tag: the pane id is freed while
# its shell process stays alive in the slot
-press middle @Del 18
-release middle @Del 18
+press middle @Collapse+9 18
+release middle @Collapse+9 18
stable 700 10000
# Alt-n reuses the freed id -> spawn effect lands on the occupied slot
key a-n
diff --git a/test/snapshots/restore.golden b/test/snapshots/restore.golden
index d2a60c4a..a8e39308 100644
--- a/test/snapshots/restore.golden
+++ b/test/snapshots/restore.golden
@@ -1,14 +1,12 @@
== snap dumped grid=100x31 cursor=4,6
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill Restore /tmp/pardes-snap/res
-|New Tty Find Grep Joincol
-|$ /tmp/pardes-snap/restore/cwd Save Tty Del Togglettymode Filter Collapse
-| $ ls
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit Restore /tmp/pardes-sn
+| New Tty Find Grep Joincol Delcol
+|$ /tmp/pardes-snap/restore/cwd Tty+bash Save Mode Filter Collapse Del
+| $ ls Dump
| $ echo KEEP''ME
| KEEPME
| $
-== snap restored grid=100x31 cursor=4,6
-|0: Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|2: /tmp/pardes-snap/restore/cwd Save Tty Del Togglettymode Filter Collapse
-|3: ls
-|4: echo KEEP''ME
-|6:
+== snap restored grid=100x31 cursor=4,8
+|2: /tmp/pardes-snap/restore/cwd Tty+bash Save Mode Filter Collapse Del
+|3: $ ls
+|7: ── restored history ──
diff --git a/test/snapshots/rsearch.golden b/test/snapshots/rsearch.golden
index f0bc0594..d69feb7a 100644
--- a/test/snapshots/rsearch.golden
+++ b/test/snapshots/rsearch.golden
@@ -1,32 +1,43 @@
-== snap opened grid=210x31 cursor=7,3
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/rsearch/cwd/code.txt Save Tty Del Collapse /tmp/pardes-snap/rsearch/cwd Save Tty Del Togglettymode Filter Collapse
-| 1 run count_x now ls
-| 2 open sub/dep.txt:3 here code.txt sub
+== snap opened grid=210x31 cursor=7,7
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/rsearch/cwd Tty+bash Save Mode Filter Collapse Del
+| ls
+| code.txt sub
+|
+| /tmp/pardes-snap/rsearch/cwd/code.txt Save Tty Collapse Del
+| 1 run count_x now
+| 2 open sub/dep.txt:3 here
| 3 count_x again
| 4 pick two words
-|
-| code.txt
-== snap search grid=210x31 cursor=13,5
-|28: /tmp/pardes-snap/rsearch/cwd/+Search Save Tty Del Collapse
-|29: 1 code.txt:1:5-11 run count_x now
-|30: 2 code.txt:3:1-7 count_x again
-== snap select grid=210x31 cursor=14,6
-|26: /tmp/pardes-snap/rsearch/cwd/+Search Save Tty Del Collapse
-|27: 1 code.txt:4:1-8 pick two words
-== snap path-open grid=210x31 cursor=7,17
-|14: /tmp/pardes-snap/rsearch/cwd/sub/dep.txt Save Tty Del Collapse
+== snap search grid=210x31 cursor=13,9
+|11: /tmp/pardes-snap/rsearch/cwd/+Search Save Tty Collapse LocationsConfig Del
+|12: 1 code.txt:1:5-11
+|13: 2 run count_x now
+|14: 3 code.txt:3:1-7
+|15: 4 count_x again
+|16: 5
+== snap select grid=210x31 cursor=14,10
+|12: 1 code.txt:4:1-8
+|13: 2 pick two words
+|14: 3
+|15:
+|16:
+== snap path-open grid=210x31 cursor=16,17
+|14: /tmp/pardes-snap/rsearch/cwd/sub/dep.txt Save Tty Collapse Del
|15: 1 d1
|16: 2 d2
|17: 3 DEPTARGET
|18: 4 d4
|19: 5 d5
|20: 6 d6
-== snap step1 grid=210x31 cursor=13,5
-== snap step2 grid=210x31 cursor=17,3
-== snap step3 grid=210x31 cursor=17,3
-== snap selclick grid=210x31 cursor=14,6
-== snap outside grid=210x31 cursor=20,6
-|12: /tmp/pardes-snap/rsearch/cwd/+Search Save Tty Del Collapse
-|13: 1 code.txt:4:10-14 pick two words
+== snap step1 grid=210x31 cursor=13,9
+|12: 2 run count_x now
+|13: 3 code.txt:3:1-7
+== snap step2 grid=210x31 cursor=13,9
+== snap step3 grid=210x31 cursor=13,9
+== snap selclick grid=210x31 cursor=14,10
+|12: 1 code.txt:4:1-8
+|13: 2 pick two words
+== snap outside grid=210x31 cursor=20,10
+|12: 1 code.txt:4:10-14
diff --git a/test/snapshots/rsearch.snap b/test/snapshots/rsearch.snap
index c413c559..75d0212c 100644
--- a/test/snapshots/rsearch.snap
+++ b/test/snapshots/rsearch.snap
@@ -7,6 +7,13 @@
dirmk sub
file sub/dep.txt d1\nd2\nDEPTARGET\nd4\nd5\nd6
file code.txt run count_x now\nopen sub/dep.txt:3 here\ncount_x again\npick two words
+# Builtins announce themselves by default, and an announcement is a band at
+# the top of the body -- which moves every row this script clicks. What the
+# verbs do is what is under test, not the announcement.
+config Verbose off
+# the +Search listing is what this walks: LookWord list (search, acme's look3,
+# is the default; ctl.zig tests it)
+config LookWord list
start 31 210 -n 1
wait 8000 code.txt
stable 700 20000
@@ -24,63 +31,69 @@ release right 6 9
wait 10000 count_x
stable 700 15000
snap opened
+# code.txt opens under the shell's text, its line 1 on screen row 8.
# right-CLICK the identifier `count_x` (line 1, the 'n' at col 15). It names no
# file, so the click searches for it: the results list both lines containing it.
-press right 15 4
-release right 15 4
-wait 10000 code.txt:1:5-11 run count_x
+press right 15 8
+release right 15 8
+# Locations stack the target under its line now: two rows, two waits.
+wait 10000 code.txt:1:5-11
+wait 10000 run count_x now
stable 700 15000
snap search
# right-SELECT `pick two` (line 4, sweep cols 8..15): a multi-word span passes
# through verbatim (the space is kept), unlike a click's single-word expansion.
-press right 8 7
-drag right 15 7
-release right 15 7
-wait 10000 code.txt:4:1-8 pick two
+press right 8 11
+drag right 15 11
+release right 15 11
+wait 10000 code.txt:4:1-8
+wait 10000 pick two words
stable 700 15000
snap select
# right-CLICK the path `sub/dep.txt:3` (line 2, col 18): isFileChar keeps / . :
# so the click expands the whole token and it RESOLVES — a look, not a search —
# opening dep.txt scrolled to line 3 (DEPTARGET). The "don't break paths" case.
-press right 18 5
-release right 18 5
+press right 18 9
+release right 18 9
wait 10000 DEPTARGET
stable 700 15000
snap path-open
# A click does not merely LIST the hits, it goes to one: this re-search of
# `count_x` (line 1, col 15) also STEPS onto hit 1, so the cursor lands in the
-# match — line 1 col 5, not the column that was clicked.
-press right 15 4
-release right 15 4
+# match, not where the click was.
+press right 15 8
+release right 15 8
stable 700 15000
snap step1
# ...and the same word clicked in its OTHER place (line 3, col 10) opens NO
# second +Search: the list is already armed on this pattern, so the click is
# `n`. Cursor moves to hit 2, line 3.
-press right 10 6
-release right 10 6
+press right 10 10
+release right 10 10
stable 700 15000
snap step2
# past the last hit the ring wraps: back to hit 1, line 1.
-press right 10 6
-release right 10 6
+press right 10 10
+release right 10 10
stable 700 15000
snap step3
+# acme sized code.txt to its four lines, so line 4 is on its last row: a
+# pane's last row is text like any other, never a resize handle.
# A LEFT sweep over `pick two` (line 4, cols 8..15) and then a right CLICK
# INSIDE it: the click takes the whole selection — the search is for the
# two-word span (`4:1-8`), which the file-ish word expansion could never
# produce from the single word under the click.
-press left 8 7
-drag left 15 7
-release left 15 7
+press left 8 11
+drag left 15 11
+release left 15 11
stable 400 5000
-press right 11 7
-release right 11 7
+press right 11 11
+release right 11 11
stable 700 15000
snap selclick
# ...and a right click OUTSIDE the selection is the ordinary word click again:
# `words` (line 4, col 19), not the span left lying in the pane.
-press right 19 7
-release right 19 7
+press right 19 11
+release right 19 11
stable 700 15000
snap outside
diff --git a/test/snapshots/savepane.golden b/test/snapshots/savepane.golden
index 070146d3..256b0074 100644
--- a/test/snapshots/savepane.golden
+++ b/test/snapshots/savepane.golden
@@ -1,16 +1,30 @@
-== snap scratch grid=100x31 cursor=20,6
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/savepane/cwd Save Tty Del Togglettymode Filter Collapse
+== snap scratch grid=100x31 cursor=20,18
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/savepane/cwd Tty+bash Save Mode Filter Collapse Del
| ls
|
-| /tmp/pardes-snap/savepane/cwd/+New * Save Tty Del Collapse
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| */tmp/pardes-snap/savepane/cwd/+New Save Tty Collapse Del
| 1 scratch bytes
-== snap prompt grid=100x31 cursor=38,30
-|30: Save /tmp/pardes-snap/savepane/cwd/
-== snap saved grid=100x31 cursor=20,6
-|5: /tmp/pardes-snap/savepane/cwd/saved.txt Save Tty Del Collapse
-|30: --:--:-- saved /tmp/pardes-snap/savepane/cwd/saved.txt
+== 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 Tty Collapse Del
+|18: 1 scratch bytes --:--:-- saved /tmp/pardes-snap/savepane/cwd/saved.txt
+|19:
== file bytes
scratch bytes
== end file
diff --git a/test/snapshots/scroll.golden b/test/snapshots/scroll.golden
index 46576f75..25bcd6ac 100644
--- a/test/snapshots/scroll.golden
+++ b/test/snapshots/scroll.golden
@@ -1,10 +1,10 @@
== snap bottom grid=100x31 cursor=4,16
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/scroll/cwd Save Tty Del Togglet /tmp/pardes-snap/scroll/cwd Save Tty Del Togglet
-| 188 ls
-| 189 s.txt
-| 190
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/scroll/cwd Tty+bash Save Mode F /tmp/pardes-snap/scroll/cwd Tty+bash Save Mode F
+| ilter Collapse Del ilter Collapse Del
+| 189 ls
+| 190 s.txt
| 191
| 192
| 193
@@ -16,13 +16,13 @@
| 199
| 200
|
-| /tmp/pardes-snap/scroll/cwd Save Tty Del Togglet
+| /tmp/pardes-snap/scroll/cwd Tty+bash Save Mode F
+| ilter Collapse Del
| ls
| s.txt
== snap wheel3 grid=100x31 cursor=4,16
-|3: 185 ls
-|4: 186 s.txt
-|5: 187
+|4: 186 ls
+|5: 187 s.txt
|6: 188
|7: 189
|8: 190
@@ -35,9 +35,8 @@
|15: 197
|16: 198
== snap gutter-up grid=100x31 cursor=4,16
-|3: 178 ls
-|4: 179 s.txt
-|5: 180
+|4: 179 ls
+|5: 180 s.txt
|6: 181
|7: 182
|8: 183
@@ -50,9 +49,8 @@
|15: 190
|16: 191
== snap gutter-down grid=100x31 cursor=4,16
-|3: 180 ls
-|4: 181 s.txt
-|5: 182
+|4: 181 ls
+|5: 182 s.txt
|6: 183
|7: 184
|8: 185
@@ -65,9 +63,8 @@
|15: 192
|16: 193
== snap wheel-down grid=100x31 cursor=4,16
-|3: 181 ls
-|4: 182 s.txt
-|5: 183
+|4: 182 ls
+|5: 183 s.txt
|6: 184
|7: 185
|8: 186
@@ -80,34 +77,34 @@
|15: 193
|16: 194
== style wheel-down grid=100x31
-|0: 0-70 #b2c3b8,#1d2824, 71-99 d,#1d2824,
-|1: 0-24 #becfc4,#26362d, 25-49 d,#26362d, 50-74 #b2c3b8,#1d2824, 75-99 d,#1d2824,
-|2: 0-1 #000000,#adcc91, 2-49 #becfc4,#26362d, 50-51 #ffffff,#4c6356, 52-99 #b2c3b8,#1d2824,
-|3: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|4: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|5: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-99 d,#0d1410,
-|6: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|7: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|8: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|9: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|10: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|11: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|12: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|13: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|14: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|15: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|16: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|17: 0-1 #ffffff,#4c6356, 2-49 #b2c3b8,#1d2824, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|18: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|19: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|20: 0-0 d,#637f6a, 1-49 d,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|21: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|22: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|23: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|24: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|25: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|26: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|27: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|28: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|29: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|30: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
+|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,
+|2: 0-1 d,#add38a, 2-29 #becfc4,#314738, 30-38 #dfbce5,#314738, 39-49 #becfc4,#314738, 50-51 #becfc4,#496656, 52-79 #b2c3b8,#1d2824, 80-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,#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-99 #e5eee5,#0d1410,
+|8: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
+|9: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
+|10: 0-0 d,#152019, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
+|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-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,
+|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-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,
+|26: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
+|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,
diff --git a/test/snapshots/scroll.snap b/test/snapshots/scroll.snap
index d8d3e665..4b723756 100644
--- a/test/snapshots/scroll.snap
+++ b/test/snapshots/scroll.snap
@@ -17,12 +17,12 @@ wheel up 10 8
wheel up 10 8
stable 500 8000
snap wheel3
-press left 1 11
-release left 1 11
+press left 1 12
+release left 1 12
stable 500 8000
snap gutter-up
-press right 1 6
-release right 1 6
+press right 1 7
+release right 1 7
stable 500 8000
snap gutter-down
wheel down 10 8
diff --git a/test/snapshots/scrolloff.golden b/test/snapshots/scrolloff.golden
index 6054e8bc..b56d2c36 100644
--- a/test/snapshots/scrolloff.golden
+++ b/test/snapshots/scrolloff.golden
@@ -1,9 +1,13 @@
-== snap top grid=210x12 cursor=7,3
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/scrolloff/cwd/g.txt Save Tty Del Collapse /tmp/pardes-snap/scrolloff/cwd Save Tty Del Togglettymode Filter Collapse
-| 1 line 1 ls
-| 2 line 2 g.txt
+== snap top grid=210x16 cursor=7,7
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/scrolloff/cwd Tty+bash Save Mode Filter Collapse Del
+| ls
+| g.txt
+|
+| /tmp/pardes-snap/scrolloff/cwd/g.txt Save Tty Collapse Del
+| 1 line 1
+| 2 line 2
| 3 line 3
| 4 line 4
| 5 line 5
@@ -11,54 +15,54 @@
| 7 line 7
| 8 line 8
| 9 line 9
-== snap edge grid=210x12 cursor=7,8
-== snap scrolled1 grid=210x12 cursor=7,8
-|3: 2 line 2 ls
-|4: 3 line 3 g.txt
-|5: 4 line 4
-|6: 5 line 5
+== 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
-== snap jdown grid=210x12 cursor=7,8
-|3: 6 line 6 ls
-|4: 7 line 7 g.txt
-|5: 8 line 8
-|6: 9 line 9
-|7: 10 line 10
-|8: 11 line 11
-|9: 12 line 12
-|10: 13 line 13
-|11: 14 line 14
-== snap end grid=210x12 cursor=7,10
-|3: 33 line 33 ls
-|4: 34 line 34 g.txt
-|5: 35 line 35
-|6: 36 line 36
-|7: 37 line 37
-|8: 38 line 38
-|9: 39 line 39
-|10: 40 line 40
-|11: 41
-== snap kup grid=210x12 cursor=7,6
-|3: 29 line 29 ls
-|4: 30 line 30 g.txt
-|5: 31 line 31
-|6: 32 line 32
+|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
-== snap top2 grid=210x12 cursor=7,3
-|3: 1 line 1 ls
-|4: 2 line 2 g.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: 38 line 38
+|13: 39 line 39
+|14: 40 line 40
+|15: 41
+== 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
diff --git a/test/snapshots/scrolloff.snap b/test/snapshots/scrolloff.snap
index caed9d47..3dbad2b8 100644
--- a/test/snapshots/scrolloff.snap
+++ b/test/snapshots/scrolloff.snap
@@ -1,16 +1,17 @@
# scrolloff: keyboard motion keeps 3 context rows above/below the cursor,
# clamped at file boundaries (cursor may reach the top/bottom body row there)
lines g.txt 40
-start 12 210 -n 1
+start 16 210 -n 1
wait 8000 g.txt
stable 700 20000
-# right-click the g.txt name in the greeting ls -> file pane, 9 body rows
+# right-click the g.txt name in the greeting ls -> file pane under the shell's
+# text, 9 body rows
press right 4 5
release right 4 5
wait 10000 line 3
stable 700 15000
-press left 10 4
-release left 10 4
+press left 10 9
+release left 10 9
stable 400 5000
# (b) gg: cursor CAN sit on the top body row, no forced scroll
key g g
diff --git a/test/snapshots/selarg.golden b/test/snapshots/selarg.golden
index b0a14b86..33338c6e 100644
--- a/test/snapshots/selarg.golden
+++ b/test/snapshots/selarg.golden
@@ -1,7 +1,8 @@
-== snap kept grid=100x31 cursor=6,3
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/selarg/cwd Save Tty Del Togglet /tmp/pardes-snap/selarg/cwd Save Tty Del Togglet
+== snap kept grid=100x31 cursor=6,4
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/selarg/cwd Tty+bash Save Mode F /tmp/pardes-snap/selarg/cwd Tty+bash Save Mode F
+| ilter Collapse Del ilter Collapse Del
| ZZARG ZZVEE ./c.sh
|
|
@@ -15,13 +16,13 @@
|
|
|
-|
-| /tmp/pardes-snap/selarg/cwd Save Tty Del Togglet
+| /tmp/pardes-snap/selarg/cwd Tty+bash Save Mode F
+| ilter Collapse Del
| ls
| s.txt
-== snap crosspane grid=100x31 cursor=6,3
-|4: ./c.sh ZZARG
-|5: CHORDARG:ZZARG
-== snap vselarg grid=100x31 cursor=12,3
-|6: ./c.sh ZZVEE
-|7: CHORDARG:ZZVEE
+== snap crosspane grid=100x31 cursor=6,4
+|5: ./c.sh ZZARG
+|6: CHORDARG:ZZARG
+== snap vselarg grid=100x31 cursor=12,4
+|7: ./c.sh ZZVEE
+|8: CHORDARG:ZZVEE
diff --git a/test/snapshots/selarg.snap b/test/snapshots/selarg.snap
index 1df7ee12..8aa59bbd 100644
--- a/test/snapshots/selarg.snap
+++ b/test/snapshots/selarg.snap
@@ -16,8 +16,8 @@ stable 700 15000
key c-b
stable 600 8000
# pane B (top right): create the arg-printing script and show its path
-press left 60 6
-release left 60 6
+press left 60 7
+release left 60 7
stable 400 5000
key c-b
stable 600 8000
@@ -28,31 +28,31 @@ stable 700 15000
key c-b
stable 600 8000
# keep a left selection over ZZARG in pane A (this also focuses A)
-press left 3 4
-drag left 7 4
-release left 7 4
+press left 3 5
+drag left 7 5
+release left 7 5
stable 400 5000
snap kept
# chord in pane B: middle on ./c.sh + left tap (B has NO selection: the
# argument comes from pane A's kept left selection) + middle release runs
-press middle 55 4
-press left 55 4
-release middle 55 4
-release left 55 4
+press middle 55 5
+press left 55 5
+release middle 55 5
+release left 55 5
wait 10000 CHORDARG:ZZARG
stable 700 10000
snap crosspane
# now an explicit modal selection: plain-click ZZVEE in A (drops A's kept
# left selection), select it with v e, chord in B again
-press left 9 4
-release left 9 4
+press left 9 5
+release left 9 5
stable 400 5000
text ve
stable 400 5000
-press middle 55 4
-press left 55 4
-release middle 55 4
-release left 55 4
+press middle 55 5
+press left 55 5
+release middle 55 5
+release left 55 5
wait 10000 CHORDARG:ZZVEE
stable 700 10000
snap vselarg
diff --git a/test/snapshots/selregex.golden b/test/snapshots/selregex.golden
index 4f380f9b..3fdab698 100644
--- a/test/snapshots/selregex.golden
+++ b/test/snapshots/selregex.golden
@@ -1,82 +1,62 @@
-== snap prompt-armed grid=160x25 cursor=11,24
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/selregex/cwd/m.zig Save Tty Del Collapse
-| 1 const one = 1;
+== snap prompt-armed grid=160x25 cursor=159,3
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/selregex/cwd/m.zig Save Tty Collapse TreeContext Def Refs Del
+| 1 const one = 1; Select /
| 2 const two = 2;
| 3 const three = 3;
| 4
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-| Select /
-== snap preview grid=160x25 cursor=16,24
-|24: Select /const
+== snap preview grid=160x25 cursor=159,3
+|3: 1 const one = 1; Select /const
== style preview grid=160x25
-|0: 0-70 #b2c3b8,#1d2824, 71-159 d,#1d2824,
-|1: 0-24 #becfc4,#26362d, 25-159 d,#26362d,
-|2: 0-1 #000000,#adcc91, 2-58 #becfc4,#26362d, 59-159 d,#26362d,
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #f5f7ee,#405d4b, 11-11 #405d4b,#f5f7ee, 12-18 #e5eee5,#0d1410, 19-19 #e9bf91,#0d1410, 20-20 #e5eee5,#0d1410, 21-159 d,#0d1410,
-|4: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #f5f7ee,#26382d, 11-11 #405d4b,#f5f7ee, 12-18 #e5eee5,#0d1410, 19-19 #e9bf91,#0d1410, 20-20 #e5eee5,#0d1410, 21-159 d,#0d1410,
-|5: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #f5f7ee,#26382d, 11-11 #405d4b,#f5f7ee, 12-20 #e5eee5,#0d1410, 21-21 #e9bf91,#0d1410, 22-22 #e5eee5,#0d1410, 23-159 d,#0d1410,
-|6: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-159 d,#0d1410,
-|7: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-159 d,#0d1410,
-|8: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-159 d,#0d1410,
-|9: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-159 d,#0d1410,
-|10: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-159 d,#0d1410,
-|11: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-159 d,#0d1410,
-|12: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-159 d,#0d1410,
-|13: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-159 d,#0d1410,
-|14: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-159 d,#0d1410,
-|15: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-159 d,#0d1410,
-|16: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-159 d,#0d1410,
-|17: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-159 d,#0d1410,
-|18: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-159 d,#0d1410,
-|19: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-159 d,#0d1410,
-|20: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-159 d,#0d1410,
-|21: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-159 d,#0d1410,
-|22: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-159 d,#0d1410,
-|23: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-159 d,#0d1410,
-|24: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-15 #e5eee5,#0d1410, 16-159 d,#0d1410,
+|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,
+|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,
+|9: 0-0 d,#608269, 1-159 d,#0d1410,
+|10: 0-0 d,#608269, 1-159 d,#0d1410,
+|11: 0-0 d,#608269, 1-159 d,#0d1410,
+|12: 0-0 d,#608269, 1-159 d,#0d1410,
+|13: 0-0 d,#608269, 1-159 d,#0d1410,
+|14: 0-0 d,#608269, 1-159 d,#0d1410,
+|15: 0-0 d,#608269, 1-159 d,#0d1410,
+|16: 0-0 d,#608269, 1-159 d,#0d1410,
+|17: 0-0 d,#608269, 1-159 d,#0d1410,
+|18: 0-0 d,#608269, 1-159 d,#0d1410,
+|19: 0-0 d,#608269, 1-159 d,#0d1410,
+|20: 0-0 d,#608269, 1-159 d,#0d1410,
+|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,
== snap three-selected grid=160x25 cursor=11,3
-|24:
+|3: 1 const one = 1;
== style three-selected grid=160x25
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #616f64,#0d1410,b 7-11 #f5f7ee,#405d4b, 12-18 #e5eee5,#0d1410, 19-19 #e9bf91,#0d1410, 20-20 #e5eee5,#0d1410, 21-159 d,#0d1410,
-|24: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-159 d,#0d1410,
-== snap narrowed grid=160x25 cursor=12,24
-|24: Select /t
+|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
== style narrowed grid=160x25
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-11 #405d4b,#f5f7ee, 12-18 #e5eee5,#0d1410, 19-19 #e9bf91,#0d1410, 20-20 #e5eee5,#0d1410, 21-159 d,#0d1410,
-|4: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-11 #405d4b,#f5f7ee, 12-18 #e5eee5,#0d1410, 19-19 #e9bf91,#0d1410, 20-20 #e5eee5,#0d1410, 21-159 d,#0d1410,
-|5: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-11 #405d4b,#f5f7ee, 12-20 #e5eee5,#0d1410, 21-21 #e9bf91,#0d1410, 22-22 #e5eee5,#0d1410, 23-159 d,#0d1410,
-|24: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-11 #e5eee5,#0d1410, 12-159 d,#0d1410,
+|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,
== snap esc-restores grid=160x25 cursor=11,3
-|24:
+|3: 1 const one = 1;
== style esc-restores grid=160x25
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #616f64,#0d1410,b 7-11 #f5f7ee,#405d4b, 12-18 #e5eee5,#0d1410, 19-19 #e9bf91,#0d1410, 20-20 #e5eee5,#0d1410, 21-159 d,#0d1410,
-|4: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #f5f7ee,#26382d, 11-11 #405d4b,#f5f7ee, 12-18 #e5eee5,#0d1410, 19-19 #e9bf91,#0d1410, 20-20 #e5eee5,#0d1410, 21-159 d,#0d1410,
-|5: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #f5f7ee,#26382d, 11-11 #405d4b,#f5f7ee, 12-20 #e5eee5,#0d1410, 21-21 #e9bf91,#0d1410, 22-22 #e5eee5,#0d1410, 23-159 d,#0d1410,
-|24: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-159 d,#0d1410,
+|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 Tty Del Collapse
+|2: */tmp/pardes-snap/selregex/cwd/m.zig Save Tty Collapse 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 Tty Collapse 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 33cbfb29..21875eca 100644
--- a/test/snapshots/shellset.golden
+++ b/test/snapshots/shellset.golden
@@ -1,11 +1,13 @@
== snap boot grid=90x21 cursor=7,3
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/shellset/cwd/cmd.txt Save Tty Del Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/shellset/cwd/cmd.txt Save Tty Collapse Del
| 1 Shell zznosuchshell
== snap builtin-ran grid=90x21 cursor=25,3
-== snap fallback-shell grid=90x21 cursor=49,5
-|1: New Tty Find Grep Joincol New Tty Find Grep Joincol
-|2: /tmp/pardes-snap/shellset/cwd/cmd.txt Save /tmp/pardes-snap/shellset/cwd Save Tty Del
-|3: 1 Shell zznosuchshell ls
-|4: cmd.txt zmarkfile.txt
+|3: Shell: shell "zznosuchshell" not found (a name on the usual paths, or a path to one)
+== snap fallback-shell grid=90x21 cursor=49,6
+|1: New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+|2: /tmp/pardes-snap/shellset/cwd/cmd.txt Save /tmp/pardes-snap/shellset/cwd Tty+bash Save
+|3: Tty Collapse Del Mode Filter Collapse Del
+|4: 1 Shell zznosuchshell ls
+|5: cmd.txt zmarkfile.txt
diff --git a/test/snapshots/shellset.snap b/test/snapshots/shellset.snap
index d2bacf38..7d213a84 100644
--- a/test/snapshots/shellset.snap
+++ b/test/snapshots/shellset.snap
@@ -1,12 +1,12 @@
# The Shell builtin names the binary the NEXT terminal execs. What is pinned
# here is the case that has to hold on a machine you did not set up: the name
-# resolves to nothing, and the pane opens anyway.
+# resolves to nothing, so Shell refuses it and says why on the message row,
+# and the next pane opens anyway with the shell that was set before.
#
-# That is not a corner — it is the DEFAULT's failure mode. pardes ships
-# `Shell fish` as the default, and a box without fish must still get a working
-# shell rather than a pane whose child dies at exec and shows one EOF. So the
-# lookup falls back, and this is the proof: a name nothing resolves to, and the
-# new pane still greets and lists like any other.
+# A default $SHELL that names nothing executable falls back to /bin/sh
+# (config.defaultShell), and the host's lookup still falls back at spawn for
+# a shell that went away after it was set: a pane never gets a child that
+# dies at exec and shows one EOF.
#
# The rest of the feature is unit-tested rather than pinned here, on purpose.
# Which family a binary belongs to, what argv each one gets and where the
diff --git a/test/snapshots/shrinktag.golden b/test/snapshots/shrinktag.golden
index 41098ef1..dc27a579 100644
--- a/test/snapshots/shrinktag.golden
+++ b/test/snapshots/shrinktag.golden
@@ -1,12 +1,12 @@
-== snap before grid=100x31 cursor=2,9
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/shrinktag/cwd Save Tty Del Togg /tmp/pardes-snap/shrinktag/cwd Save Tty Del Togg
+== snap before grid=100x31 cursor=4,9
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/shrinktag/cwd Tty+bash Save Mod /tmp/pardes-snap/shrinktag/cwd Tty+bash Save Mod
+| e Filter Collapse Del e Filter Collapse Del
| ls ls
| w.txt w.txt
|
|
-|
| echo one; echo two
|
|
@@ -16,29 +16,39 @@
|
|
|
-| /tmp/pardes-snap/shrinktag/cwd Save Tty Del Togg
+| /tmp/pardes-snap/shrinktag/cwd Tty+bash Save Mod
+| e Filter Collapse Del
| ls
| w.txt
-== snap shrunk grid=100x31 cursor=2,9
-|3: /tmp/pardes-snap/shrinktag/cwd Save Tty Del Togg ls
-|4: ls w.txt
-|5: w.txt
-|8:
+== snap shrunk grid=100x31 cursor=4,9
+|4: w.txt ls
+|5: w.txt
+|6: /tmp/pardes-snap/shrinktag/cwd Tty+bash Save Mod
+|7: e Filter Collapse Del
+|8: ls
+|9: w.txt
|17:
|18:
|19:
-== snap move-preview grid=100x31 cursor=2,9
-|8: ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌▌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
-== snap restored grid=100x31 cursor=2,9
-|3: ls ls
-|4: w.txt w.txt
-|5:
+|20:
+== snap move-preview grid=100x31 cursor=4,9
+|8: ls ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌▌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
+== snap restored grid=100x31 cursor=4,9
+|4: ls ls
+|5: w.txt w.txt
+|6:
+|7:
|8: echo one; echo two
-|17: /tmp/pardes-snap/shrinktag/cwd Save Tty Del Togg
-|18: ls
-|19: w.txt
-== snap bottom-shrunk grid=100x31 cursor=2,9
+|9:
+|17: /tmp/pardes-snap/shrinktag/cwd Tty+bash Save Mod
+|18: e Filter Collapse Del
+|19: ls
+|20: w.txt
+== snap bottom-shrunk grid=100x31 cursor=4,9
|17:
|18:
|19:
-|30: /tmp/pardes-snap/shrinktag/cwd Save Tty Del Togg
+|20:
+|27: /tmp/pardes-snap/shrinktag/cwd Tty+bash Save Mod
+|28: e Filter Collapse Del
+|29: w.txt
diff --git a/test/snapshots/shrinktag.snap b/test/snapshots/shrinktag.snap
index f17c402f..5264be74 100644
--- a/test/snapshots/shrinktag.snap
+++ b/test/snapshots/shrinktag.snap
@@ -1,6 +1,8 @@
-# a pane can shrink to just its tagline: border-drag the handle to the tag row
-# (0 body rows), the gutter box still grabs a move, and dragging back down
-# restores the body intact (the hidden pane's pty/vt is never resized)
+# a terminal shrinks only to its tag and 2 body rows (a text pane would go
+# to its tag alone): the pane below dragged by its grip up to the tag row
+# stops there -- a terminal has no rule between panes, so the grip is the
+# handle, as acme's button is -- the gutter box still grabs a move, and
+# dragging back down restores the body intact
file w.txt x
start 31 100 -n 3
wait 8000 w.txt
@@ -16,16 +18,15 @@ key esc
settle 100
stable 400 5000
snap before
-# drag pane 0's bottom handle (its last row) up to its tag row: tag-only pane
-press left 20 17
-drag left 20 3
-release left 20 3
+# drag the lower pane's grip up under pane 0's tag row: it keeps 2 body rows
+press left 1 18
+drag left 1 3
+release left 1 3
motion 40 25
stable 500 8000
snap shrunk
-# the shrunk pane's single row is now the pair's resize handle, but the gutter
-# box must still win: grab it, preview a move into the right column, abort by
-# releasing over the pane itself
+# the shrunk pane's gutter box grabs a move: preview one into the right
+# column, abort by releasing over the pane itself
press left 1 3
drag left 70 9
stable 400 5000
@@ -33,17 +34,19 @@ snap move-preview
drag left 20 3
release left 20 3
stable 400 5000
-# re-enlarge: the tag row doubles as the drag handle, pull it back down
-press left 20 3
-drag left 20 17
-release left 20 17
+# re-enlarge: the lower pane's grip, now under pane 0's 2 body rows, pulled
+# back down
+press left 1 7
+drag left 1 18
+release left 1 18
motion 40 25
stable 500 8000
snap restored
-# the bottom pane can shrink to ITS tag too: drag past the bottom, clamp holds
-press left 20 17
-drag left 20 31
-release left 20 31
+# the bottom pane stops at ITS tag and 2 rows too: its grip dragged past the
+# bottom
+press left 1 18
+drag left 1 31
+release left 1 31
motion 40 25
stable 500 8000
snap bottom-shrunk
diff --git a/test/snapshots/splitparent.golden b/test/snapshots/splitparent.golden
index 7382103d..0e870a37 100644
--- a/test/snapshots/splitparent.golden
+++ b/test/snapshots/splitparent.golden
@@ -1,35 +1,35 @@
-== snap shrunk grid=100x31 cursor=4,4
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/splitparent/cwd Save Tty Del To /tmp/pardes-snap/splitparent/cwd Save Tty Del To
-| /tmp/pardes-snap/splitparent/cwd Save Tty Del To ls
-| ls
-== snap swap-parent grid=100x31 cursor=4,8
-|6: /tmp/pardes-snap/splitparent/cwd Save Tty Del To
-|7: ls
-== snap tallest grid=100x6 cursor=54,5
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/splitparent/cwd Save Tty Del To /tmp/pardes-snap/splitparent/cwd Save Tty Del To
-| /tmp/pardes-snap/splitparent/cwd Save Tty Del To
-| /tmp/pardes-snap/splitparent/cwd Save Tty Del To /tmp/pardes-snap/splitparent/cwd Save Tty Del To
-== snap regrown grid=100x31 cursor=54,19
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/splitparent/cwd Save Tty Del To /tmp/pardes-snap/splitparent/cwd Save Tty Del To
-| /tmp/pardes-snap/splitparent/cwd Save Tty Del To ls
-| ls
+== snap shrunk grid=100x31 cursor=4,5
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/splitparent/cwd Tty+bash Save M /tmp/pardes-snap/splitparent/cwd Tty+bash Save M
+| ode Filter Collapse Del ode Filter Collapse Del
+| ls ls
|
-| /tmp/pardes-snap/splitparent/cwd Save Tty Del To
+| /tmp/pardes-snap/splitparent/cwd Tty+bash Save M
+| ode Filter Collapse Del
| ls
+== snap swap-parent grid=100x31 cursor=4,13
+|10: /tmp/pardes-snap/splitparent/cwd Tty+bash Save M
+|11: ode Filter Collapse Del
+|12: ls
+== snap tallest grid=100x6 cursor=4,5
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/splitparent/cwd Tty+bash Save M /tmp/pardes-snap/splitparent/cwd Tty+bash Save M
+| /tmp/pardes-snap/splitparent/cwd Tty+bash Save M ode Filter Collapse Del
+| /tmp/pardes-snap/splitparent/cwd Tty+bash Save M ls
+| e in that column: each keeps its tag and 2 rows
+== snap regrown grid=100x31 cursor=4,13
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/splitparent/cwd Tty+bash Save M /tmp/pardes-snap/splitparent/cwd Tty+bash Save M
+| ode Filter Collapse Del ode Filter Collapse Del
+| ls ls
|
+| /tmp/pardes-snap/splitparent/cwd Tty+bash Save M
+| ode Filter Collapse Del
+| ls
|
-|
-|
-|
-|
-|
-|
-|
-| /tmp/pardes-snap/splitparent/cwd Save Tty Del To
-| ls
+| /tmp/pardes-snap/splitparent/cwd Tty+bash Save M
+| ode Filter Collapse Del
+| e in that column: each keeps its tag and 2 rows
diff --git a/test/snapshots/splitparent.snap b/test/snapshots/splitparent.snap
index 1fd4e935..93ed9e21 100644
--- a/test/snapshots/splitparent.snap
+++ b/test/snapshots/splitparent.snap
@@ -1,22 +1,29 @@
-# a new pane never opens under a too-short parent: Alt-n from a tag-only pane
+# a new pane never opens under a too-short parent: Alt-n from a pane too short to halve
# splits the tall sibling in its column instead; when NO pane could leave the
-# newcomer 2 body rows, the tallest one anywhere is split
+# newcomer 2 body rows, the tallest one anywhere is split, and when that one
+# cannot keep its own tag and 2 rows either, the pane is refused
+# pins the pardes placement rule (Placement pardes), which it covers
+config Placement pardes
start 31 100 -n 3
stable 700 20000
-# shrink pane 0 (top-left) to just its tagline
-press left 20 17
-drag left 20 3
-release left 20 3
+# shrink pane 0 (top-left), a terminal, as far as it goes, its tag and 2 body
+# rows: the pane below's grip dragged up under its tag (a terminal has no
+# rule between panes; the grip is the handle)
+press left 1 18
+drag left 1 3
+release left 1 3
motion 40 25
stable 500 8000
snap shrunk
-# Alt-n from the tag-only pane: the new shell opens below the tall sibling
+# Alt-n from the short pane: the new shell opens below the tall sibling
# underneath it, not as another 1-row sliver
key a-n
stable 700 15000
snap swap-parent
-# squeeze the grid until no pane is 5 rows tall, then Alt-n again: the
-# tallest pane (right column) is split even though the active one is left
+# squeeze the grid until no pane can give a new one its tag and 2 rows, then
+# Alt-n again: the new shell is refused, and the message row says why (before
+# every pane had to keep only a tag and one row, the tallest pane anywhere was
+# split here)
resize 6 100
stable 700 15000
key a-n
diff --git a/test/snapshots/stepgrain.golden b/test/snapshots/stepgrain.golden
index 202a4f9a..33eea330 100644
--- a/test/snapshots/stepgrain.golden
+++ b/test/snapshots/stepgrain.golden
@@ -1,7 +1,7 @@
-== snap results grid=150x31 cursor=7,3
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/stepgrain/cwd/a.txt Save Tty Del Collapse
+== snap results grid=150x31 cursor=13,13
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/stepgrain/cwd/a.txt Save Tty Collapse Del
| 1 hello ZQMARK one
| 2 see also sub/b.txt for ZQMARK two
|
@@ -11,79 +11,78 @@
|
|
|
+|^ +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/+Search Save Tty Del Collapse
-| 1 a.txt:1:7-12 hello ZQMARK one
-| 2 a.txt:2:24-29 see also sub/b.txt for ZQMARK two
-| 3 sub/b.txt:1:1-6 ZQMARK inside sub
-== snap step-row1 grid=150x31 cursor=7,28
-== style step-row1 grid=150x31
-|0: 0-70 #b2c3b8,#1d2824, 71-149 d,#1d2824,
-|1: 0-24 #becfc4,#26362d, 25-149 d,#26362d,
-|2: 0-1 #ffffff,#4c6356, 2-59 #b2c3b8,#1d2824, 60-149 d,#1d2824,
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-22 #e5eee5,#0d1410, 23-149 d,#0d1410,
-|4: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-39 #e5eee5,#0d1410, 40-149 d,#0d1410,
-|5: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-|6: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-|7: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-|8: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-|9: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-|10: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-|11: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-|12: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-|13: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-|14: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-|15: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-|16: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-|17: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-|18: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-|19: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-|20: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-|21: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-|22: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-|23: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-|24: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-|25: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-|26: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-149 d,#0d1410,
-|27: 0-1 #000000,#adcc91, 2-61 #becfc4,#26362d, 62-149 d,#26362d,
-|28: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #616f64,#0d1410,b 7-18 #f5f7ee,#405d4b, 19-25 #e5eee5,#0d1410, 26-31 #f7e4a5,#57472a, 32-35 #e5eee5,#0d1410, 36-149 d,#0d1410,
-|29: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-19 #59675c,#0d1410, 20-43 #e5eee5,#0d1410, 44-49 #f7e4a5,#57472a, 50-53 #e5eee5,#0d1410, 54-149 d,#0d1410,
-|30: 0-0 d,#152019, 1-1 d,#0d1410, 2-21 #59675c,#0d1410, 22-22 #e5eee5,#0d1410, 23-28 #f7e4a5,#57472a, 29-39 #e5eee5,#0d1410, 40-149 d,#0d1410,
-== snap step-row2 grid=150x31 cursor=7,29
+| /tmp/pardes-snap/stepgrain/cwd/+Preview Del
+| 1
+== snap step-row2 grid=150x31 cursor=13,13
+|12: ^ +Search 2/3 Del
== style step-row2 grid=150x31
-|28: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-18 #59675c,#0d1410, 19-25 #e5eee5,#0d1410, 26-31 #f7e4a5,#57472a, 32-35 #e5eee5,#0d1410, 36-149 d,#0d1410,
-|29: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #616f64,#0d1410,b 7-19 #f5f7ee,#405d4b, 20-43 #e5eee5,#0d1410, 44-49 #f7e4a5,#57472a, 50-53 #e5eee5,#0d1410, 54-149 d,#0d1410,
-== snap step-row3 grid=150x31 cursor=7,29
-|28: 2 a.txt:2:24-29 see also sub/b.txt for ZQMARK two
-|29: 3 sub/b.txt:1:1-6 ZQMARK inside sub
-|30: 4
-== snap step-wrap grid=150x31 cursor=7,28
-|28: 1 a.txt:1:7-12 hello ZQMARK one
-|29: 2 a.txt:2:24-29 see also sub/b.txt for ZQMARK two
-|30: 3 sub/b.txt:1:1-6 ZQMARK inside sub
-== snap blank-in-path grid=150x31 cursor=7,26
-|25: /tmp/pardes-snap/stepgrain/cwd/+Search Save Tty Del Collapse
-|26: 1 two words.txt
+|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,
+|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,
+|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:
+|16:
+|17:
+|18:
+|22: /tmp/pardes-snap/stepgrain/cwd/two words.txt Del
+|23: 1
== style blank-in-path grid=150x31
-|25: 0-1 #000000,#adcc91, 2-61 #becfc4,#26362d, 62-149 d,#26362d,
-|26: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #616f64,#0d1410,b 7-19 #f5f7ee,#405d4b, 20-149 d,#0d1410,
-|27: 0-1 #ffffff,#4c6356, 2-61 #b2c3b8,#1d2824, 62-149 d,#1d2824,
-|28: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-18 #f5f7ee,#405d4b, 19-25 #e5eee5,#0d1410, 26-31 #f7e4a5,#57472a, 32-35 #e5eee5,#0d1410, 36-149 d,#0d1410,
-|29: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-19 #59675c,#0d1410, 20-43 #e5eee5,#0d1410, 44-49 #f7e4a5,#57472a, 50-53 #e5eee5,#0d1410, 54-149 d,#0d1410,
-== snap blank-opened grid=150x31 cursor=7,15
-|14: /tmp/pardes-snap/stepgrain/cwd/two words.txt Save Tty Del Collapse
-|15: 1
+|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,
+|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 Unattach Del
+|22: /tmp/pardes-snap/stepgrain/cwd/two words.txt Save Tty Collapse Del
diff --git a/test/snapshots/stepgrain.snap b/test/snapshots/stepgrain.snap
index 3c4d3e4c..e807981c 100644
--- a/test/snapshots/stepgrain.snap
+++ b/test/snapshots/stepgrain.snap
@@ -1,22 +1,11 @@
-# WHAT ONE PRESS OF `n` TAKES, and why that is not one answer. A pane's rows
-# decide it (output_pane.Grain, read in Pardes.lookSpanIn):
+# ONE PRESS, ONE ROW. A query pane's rows are one a line with a hit, the
+# hit's line under a gutter number, and Ctrl-n / Ctrl-p (typing on line 1)
+# step them a row at a time, round the end: row 2 below matched on a line
+# that mentions `sub/b.txt`, and the step does not stop on that word, as the
+# old word-grained walk did; the fourth press wraps back to row 1.
#
-# free text — a terminal, a file, a PDF — is stepped WORD by word, several
-# stops to a line, because a line of it may name several places at once (the
-# `ls` row in ttylook.snap hops big.txt -> plain.txt -> sub);
-#
-# a RESULTS BUFFER is stepped ROW by row, on the location at the head of the
-# row, because a row there IS one location and the words after it are the
-# MATCHED TEXT — the same hit, spelled out. That text is full of look-able
-# words, and stopping on them was stopping on the same result twice.
-#
-# This script is the second rule. Row 2 below matched on a line that mentions
-# `sub/b.txt`, so the old word-grained walk stopped there before it ever
-# reached row 3; now `n` presses and rows correspond one to one, and the fourth
-# press wraps the ring back to row 1.
-#
-# LARGEST from the head, so a path with a BLANK in it is one span rather than
-# the word in front of it: `two words.txt` selects whole and opens.
+# A path with a BLANK in it is one name: `two words.txt` is found whole by
+# Find and Enter opens exactly it.
dirmk sub
file a.txt hello ZQMARK one\nsee also sub/b.txt for ZQMARK two
file sub/b.txt ZQMARK inside sub
@@ -24,52 +13,36 @@ run touch 'two words.txt'
start 31 150 a.txt
wait 8000 hello ZQMARK
stable 700 20000
-# Grep from the leader: three hits, sorted by path, the empty file contributing
-# none. Row 2 is the one whose TEXT holds a path.
+# Grep from the leader: three hits, under their files, the empty file
+# contributing none. Row 2 is the one whose TEXT holds a path.
key space
key f
key g
stable 400 5000
text ZQMARK
-key enter
-wait 10000 sub/b.txt:1:1
+wait 10000 ZQMARK inside sub
stable 700 15000
snap results
-# one press, one row: the head of row 1...
-key n
-stable 400 5000
-snap step-row1
-snapstyle step-row1
-# ...the head of row 2, and NOT the `sub/b.txt` sitting in its matched text —
-# the cursor column is the assertion
-key n
+key c-n
stable 400 5000
snap step-row2
snapstyle step-row2
-# ...row 3, and then the ring comes round to row 1 again
-key n
+key c-n
stable 400 5000
snap step-row3
-key n
+key c-n
stable 400 5000
snap step-wrap
-# Back into the file, so the Find below is asked from a pane that is not a
-# results buffer (fillResults never refills the buffer it was asked from).
-press left 8 4
-release left 8 4
+key esc
+settle 100
stable 400 5000
-# A path with a blank in it: the row is one span from its first cell, because
-# the walk asks about the LONGEST run of the row first and the filesystem is
-# what vouches for it. Enter then opens exactly what is selected.
+# Find `words`: the name with a blank in it, whole
key space
key f
key f
text words
-key enter
wait 10000 two words.txt
stable 700 15000
-key n
-stable 400 5000
snap blank-in-path
snapstyle blank-in-path
key enter
diff --git a/test/snapshots/syntax.golden b/test/snapshots/syntax.golden
index 3199f03a..c4f44b86 100644
--- a/test/snapshots/syntax.golden
+++ b/test/snapshots/syntax.golden
@@ -1,11 +1,12 @@
-== snap zig-open grid=150x31 cursor=7,7
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/syntax/cwd Save Tty Del Togglettymode Filter Collapse /tmp/pardes-snap/syntax/cwd Save Tty Del Togglettymode Filter Collapse
+== snap zig-open grid=150x31 cursor=7,8
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/syntax/cwd Tty+bash Save Mode Filter Collapse Del /tmp/pardes-snap/syntax/cwd Tty+bash Save Mode Filter Collapse Del
| ls ls
| demo.zig demo.zig
|
-| /tmp/pardes-snap/syntax/cwd/demo.zig Save Tty Del Collapse
+| /tmp/pardes-snap/syntax/cwd/demo.zig Save Tty Collapse TreeContext Def Re
+| fs Del
| 1 const std = @import("std"); // greet
| 2 pub fn main() void {
| 3 var x: u32 = 42;
@@ -15,95 +16,46 @@
|
|
|
-|
-| /tmp/pardes-snap/syntax/cwd Save Tty Del Togglettymode Filter Collapse
+| /tmp/pardes-snap/syntax/cwd Tty+bash Save Mode Filter Collapse Del
| ls
| demo.zig
== style zig-open grid=150x31
-|0: 0-70 #b2c3b8,#1d2824, 71-149 d,#1d2824,
-|1: 0-24 #becfc4,#26362d, 25-74 d,#26362d, 75-99 #b2c3b8,#1d2824, 100-149 d,#1d2824,
-|2: 0-1 #ffffff,#4c6356, 2-71 #b2c3b8,#1d2824, 72-74 d,#1d2824, 75-76 #ffffff,#4c6356, 77-146 #b2c3b8,#1d2824, 147-149 d,#1d2824,
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|4: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|5: 0-0 d,#637f6a, 1-74 d,#0d1410, 75-75 d,#637f6a, 76-149 d,#0d1410,
-|6: 0-1 #000000,#adcc91, 2-59 #becfc4,#26362d, 60-74 d,#26362d, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|7: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #616f64,#0d1410,b 7-18 #e5eee5,#0d1410, 19-25 #c9b0e4,#0d1410, 26-26 #e5eee5,#0d1410, 27-31 #b6ce94,#0d1410, 32-34 #e5eee5,#0d1410, 35-42 #b9e58f,#0d1410, 43-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|8: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-12 #c9b0e4,#0d1410, 13-26 #e5eee5,#0d1410, 27-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|9: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-23 #e5eee5,#0d1410, 24-25 #e9bf91,#0d1410, 26-26 #e5eee5,#0d1410, 27-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|10: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-16 #e5eee5,#0d1410, 17-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|11: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-7 #e5eee5,#0d1410, 8-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|12: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|13: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|14: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|15: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|16: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|17: 0-1 #ffffff,#4c6356, 2-71 #b2c3b8,#1d2824, 72-74 d,#1d2824, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|18: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|19: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|20: 0-0 d,#637f6a, 1-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|21: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|22: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|23: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|24: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|25: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|26: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|27: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|28: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|29: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|30: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
+|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-38 #d3b0d9,#1d2824, 39-74 #b2c3b8,#1d2824, 75-76 #b2c3b8,#496656, 77-104 #b2c3b8,#1d2824, 105-113 #d3b0d9,#1d2824, 114-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,
+|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-38 #d3b0d9,#1d2824, 39-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,
== style colors-off grid=150x31
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-3 #e5eee5,#0d1410, 4-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-78 #e5eee5,#0d1410, 79-149 d,#0d1410,
-|4: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-9 #e5eee5,#0d1410, 10-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-84 #e5eee5,#0d1410, 85-149 d,#0d1410,
-|6: 0-1 #000000,#adcc91, 2-59 #becfc4,#26362d, 60-74 d,#26362d, 75-75 d,#637f6a, 76-149 d,#0d1410,
-|7: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #616f64,#0d1410,b 7-42 #e5eee5,#0d1410, 43-74 d,#0d1410, 75-75 d,#637f6a, 76-149 d,#0d1410,
-|8: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-26 #e5eee5,#0d1410, 27-74 d,#0d1410, 75-75 d,#637f6a, 76-149 d,#0d1410,
-|9: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-26 #e5eee5,#0d1410, 27-74 d,#0d1410, 75-75 d,#637f6a, 76-149 d,#0d1410,
-|10: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-16 #e5eee5,#0d1410, 17-74 d,#0d1410, 75-75 d,#637f6a, 76-149 d,#0d1410,
-|11: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-7 #e5eee5,#0d1410, 8-74 d,#0d1410, 75-75 d,#637f6a, 76-149 d,#0d1410,
-|12: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-74 d,#0d1410, 75-75 d,#637f6a, 76-149 d,#0d1410,
-|13: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-74 d,#0d1410, 75-75 d,#637f6a, 76-149 d,#0d1410,
-|14: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-74 d,#0d1410, 75-75 d,#637f6a, 76-149 d,#0d1410,
-|15: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-74 d,#0d1410, 75-75 d,#637f6a, 76-149 d,#0d1410,
-|16: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-74 d,#0d1410, 75-75 d,#637f6a, 76-149 d,#0d1410,
-|17: 0-1 #ffffff,#4c6356, 2-71 #b2c3b8,#1d2824, 72-74 d,#1d2824, 75-75 d,#637f6a, 76-149 d,#0d1410,
-|18: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-3 #e5eee5,#0d1410, 4-74 d,#0d1410, 75-75 d,#637f6a, 76-149 d,#0d1410,
-|19: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-9 #e5eee5,#0d1410, 10-74 d,#0d1410, 75-75 d,#637f6a, 76-149 d,#0d1410,
-|20: 0-0 d,#637f6a, 1-74 d,#0d1410, 75-75 d,#637f6a, 76-149 d,#0d1410,
-|21: 0-0 d,#637f6a, 1-74 d,#0d1410, 75-75 d,#637f6a, 76-149 d,#0d1410,
-|22: 0-0 d,#637f6a, 1-74 d,#0d1410, 75-75 d,#637f6a, 76-149 d,#0d1410,
-|23: 0-0 d,#637f6a, 1-74 d,#0d1410, 75-75 d,#637f6a, 76-149 d,#0d1410,
-|24: 0-0 d,#637f6a, 1-74 d,#0d1410, 75-75 d,#637f6a, 76-149 d,#0d1410,
-|25: 0-0 d,#637f6a, 1-74 d,#0d1410, 75-75 d,#637f6a, 76-149 d,#0d1410,
-|26: 0-0 d,#637f6a, 1-74 d,#0d1410, 75-75 d,#637f6a, 76-149 d,#0d1410,
-|27: 0-0 d,#637f6a, 1-74 d,#0d1410, 75-75 d,#637f6a, 76-149 d,#0d1410,
-|28: 0-0 d,#637f6a, 1-74 d,#0d1410, 75-75 d,#637f6a, 76-149 d,#0d1410,
-|29: 0-0 d,#637f6a, 1-74 d,#0d1410, 75-75 d,#637f6a, 76-149 d,#0d1410,
-|30: 0-0 d,#637f6a, 1-74 d,#0d1410, 75-75 d,#637f6a, 76-149 d,#0d1410,
+|8: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-66 #e5eee5,#0d1410, 67-67 #e5eee5,#1d2824, 68-74 #b2c3b8,#1d2824, 75-75 #b2c3b8,#608269, 76-149 #b2c3b8,#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-10 #59675c,#0d1410, 11-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410,
== style colors-on grid=150x31
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|4: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|6: 0-1 #000000,#adcc91, 2-59 #becfc4,#26362d, 60-74 d,#26362d, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|7: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #616f64,#0d1410,b 7-18 #e5eee5,#0d1410, 19-25 #c9b0e4,#0d1410, 26-26 #e5eee5,#0d1410, 27-31 #b6ce94,#0d1410, 32-34 #e5eee5,#0d1410, 35-42 #b9e58f,#0d1410, 43-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|8: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-12 #c9b0e4,#0d1410, 13-26 #e5eee5,#0d1410, 27-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|9: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-23 #e5eee5,#0d1410, 24-25 #e9bf91,#0d1410, 26-26 #e5eee5,#0d1410, 27-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|10: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-16 #e5eee5,#0d1410, 17-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|11: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-7 #e5eee5,#0d1410, 8-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|12: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|13: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|14: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|15: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|16: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|17: 0-1 #ffffff,#4c6356, 2-71 #b2c3b8,#1d2824, 72-74 d,#1d2824, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|18: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|19: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|20: 0-0 d,#637f6a, 1-74 d,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|21: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|22: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|23: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|24: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|25: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|26: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|27: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|28: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|29: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#0d1410,
-|30: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 d,#637f6a, 76-76 d,#0d1410, 77-149 #e5eee5,#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-66 #b9f480,#0d1410, 67-67 #b9f480,#1d2824, 68-74 #b2c3b8,#1d2824, 75-75 #b2c3b8,#608269, 76-149 #b2c3b8,#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,
diff --git a/test/snapshots/tag.golden b/test/snapshots/tag.golden
index abc83b8f..6e86f042 100644
--- a/test/snapshots/tag.golden
+++ b/test/snapshots/tag.golden
@@ -1,7 +1,7 @@
-== snap tag-focus grid=150x31 cursor=26,2
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/tag/cwd Save Tty Del Togglettymode Filter Collapse /tmp/pardes-snap/tag/cwd Save Tty Del Togglettymode Filter Collapse
+== snap tag-focus grid=150x31 cursor=35,2
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/tag/cwd Tty+bash Save Mode Filter Collapse Del /tmp/pardes-snap/tag/cwd Tty+bash Save Mode Filter Collapse Del
| ls ls
| t.txt t.txt
|
@@ -16,15 +16,15 @@
|
|
|
-| /tmp/pardes-snap/tag/cwd Save Tty Del Togglettymode Filter Collapse
+| /tmp/pardes-snap/tag/cwd Tty+bash Save Mode Filter Collapse Del
| ls
| t.txt
-== snap tag-typed grid=150x31 cursor=32,2
-|2: /tmp/pardes-snap/tag/cwd t.txt Save Tty Del Togglettymode Filter Collapse /tmp/pardes-snap/tag/cwd Save Tty Del Togglettymode Filter Collapse
-== snap tag-del grid=150x31 cursor=28,2
-|2: /tmp/pardes-snap/tag/cwd t Save Tty Del Togglettymode Filter Collapse /tmp/pardes-snap/tag/cwd Save Tty Del Togglettymode Filter Collapse
+== snap tag-typed grid=150x31 cursor=41,2
+|2: /tmp/pardes-snap/tag/cwd Tty+bash t.txt Save Mode Filter Collapse Del /tmp/pardes-snap/tag/cwd Tty+bash Save Mode Filter Collapse Del
+== snap tag-del grid=150x31 cursor=37,2
+|2: /tmp/pardes-snap/tag/cwd Tty+bash t Save Mode Filter Collapse Del /tmp/pardes-snap/tag/cwd Tty+bash Save Mode Filter Collapse Del
== snap tag-exit grid=150x31 cursor=4,5
-|2: /tmp/pardes-snap/tag/cwd t.txt Save Tty Del Togglettymode Filter Collapse /tmp/pardes-snap/tag/cwd Save Tty Del Togglettymode Filter Collapse
+|2: /tmp/pardes-snap/tag/cwd Tty+bash t.txt Save Mode Filter Collapse Del /tmp/pardes-snap/tag/cwd Tty+bash Save Mode Filter Collapse Del
== snap tag-look grid=150x31 cursor=7,7
-|6: /tmp/pardes-snap/tag/cwd/t.txt Save Tty Del Collapse
+|6: /tmp/pardes-snap/tag/cwd/t.txt Save Tty Collapse Del
|7: 1 ZZLOOKED
diff --git a/test/snapshots/tag.snap b/test/snapshots/tag.snap
index a545ff9f..4faf6062 100644
--- a/test/snapshots/tag.snap
+++ b/test/snapshots/tag.snap
@@ -1,7 +1,8 @@
-# a CLICKED tag is insert mode: type straight in (no 'i'; `:` is the normal-
-# mode door, see tagcmd); backspace edits; Esc leaves back to the body; Enter
-# looks the word at the cursor (Tab executes it). Multi-word execution from
-# the tag stays the mouse's job (middle-drag), like anywhere else.
+# a CLICKED tag is typed straight into (no 'i'; `:` is the normal-mode door,
+# see tagcmd); backspace edits; Esc drops to the tag's normal mode, which is
+# the body's normal mode, and `:` there hands the keyboard back to the body;
+# Enter looks the word at the cursor (Tab executes it). Multi-word execution
+# from the tag stays the mouse's job (middle-drag), like anywhere else.
file t.txt ZZLOOKED
start 31 150 -n 3
wait 8000 t.txt
@@ -29,16 +30,21 @@ snap tag-del
send .txt
stable 600 8000
stable 400 5000
-# Esc: out of the tag, body back in normal mode, typed tail stays as text
+# Esc: the tag's normal mode; `:` then gives the keyboard back to the body,
+# which is in normal mode, and the typed text stays
key esc
settle 100
+key :
stable 400 5000
snap tag-exit
-# re-enter the tag and look the typed word: Enter opens t.txt as a file pane.
-# Click the inserted word itself; filename, separator and commands are compact.
+# re-enter the tag and look the typed word: Enter in normal mode opens t.txt
+# as a file pane. Click the inserted word itself; filename, separator and
+# commands are compact.
press left @t.txt 3
release left @t.txt 3
stable 400 5000
+key esc
+settle 100
key enter
wait 10000 ZZLOOKED
stable 700 15000
diff --git a/test/snapshots/tagalign.golden b/test/snapshots/tagalign.golden
index eaed8e2e..0fa4807a 100644
--- a/test/snapshots/tagalign.golden
+++ b/test/snapshots/tagalign.golden
@@ -1,113 +1,58 @@
-== snap aligned grid=100x31 cursor=4,20
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/tagalign/cwd/deep/nested-project-directory/document.txt Save Tty Del Collapse
+== snap aligned grid=100x31 cursor=4,9
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/tagalign/cwd/deep/nested-project-directory/document.txt Save Tty Collapse Del
| 1 alpha
| 2 beta
| 3 gamma
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-| /tmp/pardes-snap/tagalign/cwd Save Tty Del Togglettymode Filter Collapse
+| /tmp/pardes-snap/tagalign/cwd Tty+bash Save Mode Filter Collapse Del
| ls
| deep
-== snap fits grid=87x31 cursor=4,20
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/tagalign/cwd/deep/nested-project-directory/document.txt Save Tty Del
+== snap fits grid=87x31 cursor=4,9
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/tagalign/cwd/deep/nested-project-directory/document.txt Save Tty Col
+| lapse Del
| 1 alpha
| 2 beta
-| 3 gamma
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-| /tmp/pardes-snap/tagalign/cwd Save Tty Del Togglettymode Filter Collapse
+| /tmp/pardes-snap/tagalign/cwd Tty+bash Save Mode Filter Collapse Del
| ls
| deep
-== snap overby1 grid=86x31 cursor=4,20
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/tagalign/cwd/deep/nested-project-directory/document.txt Save Tty De
+== snap overby1 grid=86x31 cursor=4,9
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/tagalign/cwd/deep/nested-project-directory/document.txt Save Tty Co
+| llapse Del
| 1 alpha
| 2 beta
-| 3 gamma
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-| /tmp/pardes-snap/tagalign/cwd Save Tty Del Togglettymode Filter Collapse
+| /tmp/pardes-snap/tagalign/cwd Tty+bash Save Mode Filter Collapse Del
| ls
| deep
== snap clicked grid=100x31 cursor=11,2
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/tagalign/cwd/deep/nested-project-directory/document.txt Save Tty Del Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/tagalign/cwd/deep/nested-project-directory/document.txt Save Tty Collapse Del
| 1 alpha
| 2 beta
| 3 gamma
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-| /tmp/pardes-snap/tagalign/cwd Save Tty Del Togglettymode Filter Collapse
+| /tmp/pardes-snap/tagalign/cwd Tty+bash Save Mode Filter Collapse Del
| ls
| deep
-== snap revealed grid=70x31 cursor=69,2
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kil
-|New Tty Find Grep Joincol
-| wd/deep/nested-project-directory/document.txt Save Tty Del Collapse
+== snap revealed grid=70x31 cursor=28,3
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Deb
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/tagalign/cwd/deep/nested-project-directory/document
+| .txt Save Tty Collapse Del
| 1 alpha
| 2 beta
-| 3 gamma
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-| /tmp/pardes-snap/tagalign/cwd Save Tty Del Togglettymode Filter Coll
+| /tmp/pardes-snap/tagalign/cwd Tty+bash Save Mode Filter Collapse Del
| ls
| deep
== snap alone grid=70x31 cursor=4,5
-|2: /tmp/pardes-snap/tagalign/cwd Save Tty Del Togglettymode Filter Coll
+|2: /tmp/pardes-snap/tagalign/cwd Tty+bash Save Mode Filter Collapse Del
|3: ls
|4: deep
|5:
-|17:
-|18:
-|19:
+|6:
+|7:
+|8:
diff --git a/test/snapshots/tagalign.snap b/test/snapshots/tagalign.snap
index 9df22f57..7237167a 100644
--- a/test/snapshots/tagalign.snap
+++ b/test/snapshots/tagalign.snap
@@ -22,12 +22,20 @@ press left 12 3
release left 12 3
stable 400 5000
snap clicked
-# End reveals the complete command suffix; a scrolled Del still executes.
+# The click was on the path, so it drafted a name; Esc keeps it pending and
+# a second Esc drops the draft. `:`
+# then `A` puts the caret after the tag's end, which reveals the complete
+# command suffix; a scrolled Del still executes.
resize 31 70
-key end
+key esc
+settle 100
+key esc
+settle 100
+key :
+key A
stable 400 5000
snap revealed
-press middle @Del 3
-release middle @Del 3
+press middle @Del 4
+release middle @Del 4
stable 700 15000
snap alone
diff --git a/test/snapshots/tagalign2col.golden b/test/snapshots/tagalign2col.golden
index cef20c73..411a3288 100644
--- a/test/snapshots/tagalign2col.golden
+++ b/test/snapshots/tagalign2col.golden
@@ -1,42 +1,17 @@
== snap onecol grid=160x31 cursor=7,3
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/tagalign2col/cwd/deep/proj/document.txt Save Tty Del Collapse /tmp/pardes-snap/tagalign2col/cwd Save Tty Del Togglettymode Filter Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/tagalign2col/cwd/deep/proj/document.txt Save Tty Collapse Del /tmp/pardes-snap/tagalign2col/cwd Tty+bash Save Mode Filter Collapse Del
| 1 alpha ls
| 2 beta deep
| 3 gamma
-== snap aligned grid=160x31 cursor=4,20
-|17: /tmp/pardes-snap/tagalign2col/cwd Save Tty Del Togglettymode Filter Collapse
-|18: ls
-|19: deep
-== snap widened grid=160x31 cursor=4,20
-|1: New Tty Find Grep Joincol ╎New Tty Find Grep Joincol
-|2: /tmp/pardes-snap/tagalign2col/cwd/deep/proj/document.txt Save Tty Del Collapse ╎ /tmp/pardes-snap/tagalign2col/cwd Save Tty Del Togglettymo
-|3: 1 alpha ╎ ls
-|4: 2 beta ╎ deep
-|5: 3 gamma ╎
-|6: ╎
-|7: ╎
-|8: ╎
-|9: ╎
-|10: ╎
-|11: ╎
-|12: ╎
-|13: ╎
-|14: ╎
-|15: ╎
-|16: ╎
-|17: /tmp/pardes-snap/tagalign2col/cwd Save Tty Del Togglettymode Filter Collapse ╎
-|18: ls ╎
-|19: deep ╎
-|20: ╎
-|21: ╎
-|22: ╎
-|23: ╎
-|24: ╎
-|25: ╎
-|26: ╎
-|27: ╎
-|28: ╎
-|29: ╎
-|30: ╎
+== snap aligned grid=160x31 cursor=4,9
+|6: /tmp/pardes-snap/tagalign2col/cwd Tty+bash Save Mode Filter Collapse Del
+|7: ls
+|8: deep
+== snap widened grid=160x31 cursor=4,9
+|1: New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+|2: /tmp/pardes-snap/tagalign2col/cwd/deep/proj/document.txt Save Tty Collapse Del /tmp/pardes-snap/tagalign2col/cwd Tty+bash Save Mode Filte
+|3: 1 alpha r Collapse Del
+|4: 2 beta ls
+|5: 3 gamma deep
diff --git a/test/snapshots/tagalign2col.snap b/test/snapshots/tagalign2col.snap
index 0849ffae..7bd99ff5 100644
--- a/test/snapshots/tagalign2col.snap
+++ b/test/snapshots/tagalign2col.snap
@@ -10,7 +10,7 @@ stable 700 20000
key a-n
key a-c
stable 700 15000
-key space w h
+key space w h enter
stable 400 5000
snap onecol
# A left sibling does not move either existing tag's command text.
diff --git a/test/snapshots/tagbottom.golden b/test/snapshots/tagbottom.golden
index f455c425..06798df3 100644
--- a/test/snapshots/tagbottom.golden
+++ b/test/snapshots/tagbottom.golden
@@ -1,7 +1,7 @@
== snap boot grid=100x31 cursor=7,3
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/tagbottom/cwd/top.txt Save Tty Del Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/tagbottom/cwd/top.txt Save Tty Collapse Del
| 1 aaa
| 2 bbb
| 3 ccc
@@ -56,9 +56,9 @@
|26: 25 yyy
|27: 26 zzz
|28:
-|30: /tmp/pardes-snap/tagbottom/cwd/top.txt Save Tty Del Collapse
+|30: /tmp/pardes-snap/tagbottom/cwd/top.txt Save Tty Collapse Del
== snap off grid=100x31 cursor=7,3
-|2: /tmp/pardes-snap/tagbottom/cwd/top.txt Save Tty Del Collapse
+|2: /tmp/pardes-snap/tagbottom/cwd/top.txt Save Tty Collapse Del
|3: 1 aaa
|4: 2 bbb
|5: 3 ccc
@@ -86,7 +86,7 @@
|27: 25 yyy
|28: 26 zzz
|30:
-== snap tag-typed grid=100x31 cursor=60,30
+== snap tag-typed grid=100x31 cursor=73,30
|2: 1 aaa
|3: 2 bbb
|4: 3 ccc
@@ -114,11 +114,12 @@
|26: 25 yyy
|27: 26 zzz
|28:
-|30: /tmp/pardes-snap/tagbottom/cwd/top.txt Save Tty bottom.txt Del Collapse
-== snap look-bottom-tag grid=100x31 cursor=7,17
-|16: /tmp/pardes-snap/tagbottom/cwd/top.txt Save Tty bottom.txt Del Collapse
-|17: 1 ZZONE
-|18: 2 ZZTWO
+|30: /tmp/pardes-snap/tagbottom/cwd/top.txt Save Tty Collapse Del bottom.txt
+== snap look-bottom-tag grid=100x31 cursor=7,16
+|15: /tmp/pardes-snap/tagbottom/cwd/top.txt Save Tty Collapse Del bottom.txt
+|16: 1 ZZONE
+|17: 2 ZZTWO
+|18:
|19:
|20:
|21:
@@ -128,18 +129,17 @@
|25:
|26:
|27:
-|30: /tmp/pardes-snap/tagbottom/cwd/bottom.txt Save Tty Del Collapse
+|30: /tmp/pardes-snap/tagbottom/cwd/bottom.txt Save Tty Collapse Del
== snap body-cursor grid=100x31 cursor=9,6
-== snap seam-noop grid=100x31 cursor=9,6
-== snap seam-dragged grid=100x31 cursor=9,6
-|11: /tmp/pardes-snap/tagbottom/cwd/top.txt Save Tty bottom.txt Del Collapse
+== snap seam-noop grid=100x31 cursor=12,16
+== snap seam-dragged grid=100x31 cursor=12,12
+|11: /tmp/pardes-snap/tagbottom/cwd/top.txt Save Tty Collapse Del bottom.txt
|12: 1 ZZONE
|13: 2 ZZTWO
|14:
|15:
|16:
|17:
-|18:
== snap gutter-click grid=100x31 cursor=9,5
|2: 2 bbb
|3: 3 ccc
@@ -150,10 +150,19 @@
|8: 8 hhh
|9: 9 iii
|10: 10 jjj
-== snap search-prompt grid=100x31 cursor=6,29
-|29: /ZZ
-== snap leader grid=100x31 cursor=9,14
-|29: SPC
+== snap search-prompt grid=100x31 cursor=5,21
+|20: /tmp/pardes-snap/tagbottom/cwd/bottom.txt Save Tty Collapse Del
+|21: /ZZ
+|22: bottom.txt:1:1 ZZONE
+|23: bottom.txt:2:1 ZZTWO
+|30: ^ +Search 1/2 Del
+== snap leader grid=100x31 cursor=9,13
+|12: 1 ZZONE SPC
+|20:
+|21:
+|22:
+|23:
+|30: /tmp/pardes-snap/tagbottom/cwd/bottom.txt Save Tty Collapse Del
== snap cut-down grid=100x31 cursor=7,5
|2: 1 aaa
|3: 2 bbb
@@ -164,8 +173,8 @@
|8: 7 mmm
|9: 8 nnn
|10: 9 ooo
-|11: /tmp/pardes-snap/tagbottom/cwd/top.txt * Save Tty bottom.txt Del Collapse
-|29:
+|11: */tmp/pardes-snap/tagbottom/cwd/top.txt Save Tty Collapse Del bottom.txt
+|12: 1 ZZONE
== file cut-buffer
aaa
bbb
@@ -200,9 +209,9 @@ zzz
|19: 18 xxx
|20: 19 yyy
|21: 20 zzz
-|30: /tmp/pardes-snap/tagbottom/cwd/top.txt Save Tty bottom.txt Del Collapse
+|30: /tmp/pardes-snap/tagbottom/cwd/top.txt Save Tty Collapse Del bottom.txt
== snap off-again grid=100x31 cursor=7,6
-|2: /tmp/pardes-snap/tagbottom/cwd/top.txt Save Tty bottom.txt Del Collapse
+|2: /tmp/pardes-snap/tagbottom/cwd/top.txt Save Tty Collapse Del bottom.txt
|3: 1 aaa
|4: 2 bbb
|5: 3 ccc
diff --git a/test/snapshots/tagbottom.snap b/test/snapshots/tagbottom.snap
index a6a7a882..68b79fc7 100644
--- a/test/snapshots/tagbottom.snap
+++ b/test/snapshots/tagbottom.snap
@@ -17,6 +17,10 @@
# exactly: `off` is byte-for-byte `boot`, cursor included.
file top.txt aaa\nbbb\nccc\nddd\neee\nfff\nggg\nhhh\niii\njjj\nkkk\nlll\nmmm\nnnn\nooo\nppp\nqqq\nrrr\nsss\nttt\nuuu\nvvv\nwww\nxxx\nyyy\nzzz
file bottom.txt ZZONE\nZZTWO
+# Builtins announce themselves by default, and an announcement is a band at
+# the top of the body -- which moves every row this script clicks. What the
+# verbs do is what is under test, not the announcement.
+config Verbose off
start 31 100 top.txt
wait 8000 Newcol Joincol
wait 8000 top.txt
@@ -38,8 +42,11 @@ stable 700 15000
# cursor is down on the tagline with it. Col 50 is past the end of the path,
# which is read-only — a click inside it parks the cursor there and the typing
# goes nowhere.
-press left 50 31
-release left 50 31
+# Past the last word rather than at a counted column: the tagline's words
+# have moved since (Del is last now), and a column that lands INSIDE one
+# types the filename into the middle of a builtin's name.
+press left 90 31
+release left 90 31
stable 400 5000
send \x20bottom.txt
stable 600 8000
@@ -48,8 +55,8 @@ snap tag-typed
# ...and LOOK the word just typed, from that same bottom tagline: bottom.txt
# opens as a second pane below. It only can if the press was mapped to the tag
# — mapped as a body row it lands on blank line 29 and looks nothing at all.
-press right 55 31
-release right 55 31
+press right @bottom.txt 31
+release right @bottom.txt 31
wait 10000 ZZONE
stable 700 15000
snap look-bottom-tag
@@ -60,19 +67,21 @@ press left 10 7
release left 10 7
stable 400 8000
snap body-cursor
-# The h-resize seam. With top taglines it is the upper pane's LAST row; here
-# that row is the upper pane's TAG, so the handle is the lower pane's FIRST row
-# (grid 16, click row 17). A no-drag click on it must leave both sizes alone.
-press left 40 18
-release left 40 18
+# No row of text is a resize handle: a click on the lower pane's FIRST row
+# (grid 16, click row 17), where the seam used to be, is a click in its text,
+# and both sizes stay.
+press left 40 17
+release left 40 17
motion 40 25
stable 500 8000
snap seam-noop
-# ...and the real drag, five rows up: the upper pane keeps 10 rows, the lower
-# grows to 19. Both taglines follow their own pane's bottom.
-press left 40 18
-drag left 40 13
-release left 40 13
+# A terminal has no rule between panes, so the grip resizes them, as acme's
+# button moves a window: the lower pane's, on its tag at the bottom, dragged up
+# to row 13. The upper pane keeps 10 rows, the lower grows to 19. Both
+# taglines follow their own pane's bottom.
+press left 1 31
+drag left 1 13
+release left 1 13
motion 40 25
stable 500 8000
snap seam-dragged
diff --git a/test/snapshots/tagbottomimage.golden b/test/snapshots/tagbottomimage.golden
index 523dd27c..9f3ff2fd 100644
--- a/test/snapshots/tagbottomimage.golden
+++ b/test/snapshots/tagbottomimage.golden
@@ -1,11 +1,11 @@
== snap img-top grid=150x31 cursor=11,8
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/tagbottomimage/cwd Save Tty Del Togglettymode Filter Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/tagbottomimage/cwd Tty+bash Save Mode Filter Collapse Del
| ls
| pic.ppm
|
-| img petscii:off palette:commodore ascii:on /tmp/pardes-snap/tagbottomimage/cwd/pic.ppm Tty Del Collapse
+| img petscii:on palette:commodore ascii:on /tmp/pardes-snap/tagbottomimage/cwd/pic.ppm Tty Collapse Del
| 4*🬹~F~N🬰|G🬏▚Y~KF🬴s<fcSf🬰b^🬘J%🬝ZH|S_"Z}╲%'"qA🬗a🬝🬻
| 8jDStG▄40e~.>>T&zZ/🬻iTY=`S~╳bkZR37v🬦🬵d4QHZ8X▛▟
| ^🬪🬛$}DrydNU&wsz=`*r🬒🬓🬳🬟*Y🬴G6🬧f🬮/>t🬧u🬲1Rg1t🬝🬻█
@@ -34,66 +34,66 @@
|2: ls
|3: pic.ppm
|4:
-|5: /tmp/pardes-snap/tagbottomimage/cwd Save Tty Del Togglettymode Filter Collapse
-|6: 4*🬹~F~N🬰|G🬏▚Y~KF🬴s<fcSf🬰b^🬘J%🬝ZH|S_"Z}╲%'"qA🬗a🬝🬻
-|7: 8jDStG▄40e~.>>T&zZ/🬻iTY=`S~╳bkZR37v🬦🬵d4QHZ8X▛▟
-|8: ^🬪🬛$}DrydNU&wsz=`*r🬒🬓🬳🬟*Y🬴G6🬧f🬮/>t🬧u🬲1Rg1t🬝🬻█
-|9: ▖#_{🬗X@🬢&$s'C%*=w@🬆▀wq%🬡d┼a┼m─>🬭🬜A▀A🬲H]p🬝🬹
-|10: %?WX🬕f🬩*TA8n╱┼E▘🬭Y#qo~XVE▐(╳▀H4^[mj🬗=🬒🬕▟█
-|11: ]Z🬷eb~Oyl3=SL▙a🬱🬉~MPMz}FMu<🬝▚>3&▖🬷WS🬝~█
-|12: EF-🬑y🬔!r🬙🬐╳O🬩▐%Qj─4za/?/\a🬜"🬖🬈🬛🬟A🬙🬝▄
-|13: 🬃N@xzOnczIK=t0@🬖j5🬮🬧65▟{🬮🬉🬄🬩zQ9/🬝🬻
-|14: ╲${&%@"#ctt▀Cr5F;🬐ARM╱uej╳75🬹9▛🬻
-|15: h^🬜"🬈🬨▜╲|W🬊🬦k6^🬰🬶rZ─▄\z9🬎🬉4^🬎🬻
-|16: 🬆f│Q_V🬗wGx🬱=5▛5*&V🬟🬄ZrXGz2🬝🬻█
-|17: !🬷W🬐(🬭]7x_>▗er🬯~▚di🬬4jY:🬝▟
-|18: gU~🬧3▙bjr\C#kKMpffAjps🬝🬻
-|19: *🬯G"🬣▟d🬮▀zJ🬪EHV▟╳9}y▛▄
-|20: ``))~RyJ🬴jA~w=hLpX🬝🬻█
-|21: 4x▀J"TG7=y-QZ🬙╲~▛🬻
-|22: 🬯/+╳f9ZG🬕+{QN_🬝🬹
-|23: E<'─🬫pS!"n4&🬝~
-|24: m$dx"!2🬳&{🬝🬻
-|25: *8f🬩▙Jb🬒🬝🬻█
-|26: m🬩7CiN🬎🬹
-|27: pG╲L🬝🬻
-|28: 🬡L🬝▄
-|29: 🬝~
-|30: img petscii:off palette:commodore ascii:on /tmp/pardes-snap/tagbottomimage/cwd/pic.ppm Tty Del Collapse
+|5: /tmp/pardes-snap/tagbottomimage/cwd Tty+bash Save Mode Filter Collapse Del
+|6: Tagbottom
+|7: {DbgY🬲s▜M^#▐FUJ[zNq=🬝g/y╱?V@🬱🬙▌UK╱🬍("🬕KJ8hSo🬝🬻
+|8: tX🬆s>🬌`🬵<w_🬏##?h🬫(}╲J,╳`bWz🬴Ea{╳j🬑🬢j-^d%^P🬝🬻█
+|9: p95a7Y╳B🬷x~🬬/E*🬜Gf🬂🬱YzS🬙[q4t2_A4🬴Fg]🬣🬐%&🬝🬻
+|10: 🬧8n}╱🬠gAQ╳)3p▞🬣🬝%<%🬡H─🬍z🬣/🬣🬁-(Q│🬅🬈a🬫,O🬎~█
+|11: ~$15ZB<gA6🬶2^╳ErWP🬆;c▛7🬒🬈Dc<dL▛~🬱`;&🬝🬻
+|12: G#48P='k=z9tB🬨Cz-xV5[$spp*▄r=it7v▛🬝▟
+|13: f>7/J<🬍$▘🬇unm▚ssbj?-AL▗t🬢A🬜🬪;r^#🬝~█
+|14: 🬈s🬋[\🬗t▛H🬙^p{🬟🬚▐🬘4▗mB=b🬒#*WYeu🬝~█
+|15: 1╱tzz▀g🬕@W=9🬡▚🬛Bj[xyg#$🬷█Bw▜🬝🬹
+|16: Q▌M/🬊N@╲U╳?J0XD🬫🬒gN╱2🬅2🬩🬡🬆🬝"█
+|17: z🬅lK~Xx$,─HQr*rTQ!q▛&n2P🬝🬻
+|18: 🬠🬮(n🬻t▌vw🬚:🬪╳F🬰Gx🬢a2X▌🬝~
+|19: *H🬮─2R┼*🬋yP4%QY%▜=🬌j🬝🬻
+|20: 🬴9🬦┼p*bT🬶▄oe&"╳Pg🬍🬝▟
+|21: 4k🬦#a[🬦🬛🬥🬮YMfG_.🬎🬻█
+|22: 🬳ZK🬭🬌$▙W&🬋x#🬜y🬝▟
+|23: j▙-:🬫$Y^▀7IP🬝~
+|24: 🬟P🬭4/🬶zD╳S🬝~
+|25: Q🬝🬙bKmeD🬝▄█
+|26: ▖=🬜🬘Xj🬝🬹
+|27: P4🬜1🬝~█
+|28: 🬮G🬝🬹
+|29: 🬭▟█
+|30: img petscii:on palette:commodore ascii:on /tmp/pardes-snap/tagbottomimage/cwd/pic.ppm Tty Collapse Del
== style img-bottom grid=150x31
-|0: 0-70 #b2c3b8,#1d2824, 71-149 d,#1d2824,
-|1: 0-24 #becfc4,#26362d, 25-149 d,#26362d,
-|2: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-149 #e5eee5,#0d1410,
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-149 #e5eee5,#0d1410,
-|4: 0-0 d,#637f6a, 1-149 d,#0d1410,
-|5: 0-1 #ffffff,#4c6356, 2-79 #b2c3b8,#1d2824, 80-149 d,#1d2824,
-|6: 0-0 d,#152019, 1-51 d,#0d1410, 52-59 #959595,#6c6c6c, 60-60 #6c6c6c,#959595, 61-65 #959595,#6c6c6c, 66-66 #6c6c6c,#959595, 67-70 #959595,#6c6c6c, 71-73 #6c6c6c,#959595, 74-75 #959595,#6c6c6c, 76-76 #6c6c6c,#959595, 77-84 #959595,#6c6c6c, 85-85 #6c6c6c,#959595, 86-90 #959595,#6c6c6c, 91-91 #6c6c6c,#959595, 92-95 #959595,#6c6c6c, 96-97 #6c6c6c,#959595, 98-98 #959595,#352879, 99-99 #352879,#959595, 100-149 d,#0d1410,
-|7: 0-0 d,#152019, 1-51 d,#0d1410, 52-52 #6c6c6c,#959595, 53-54 #959595,#6c6c6c, 55-55 #6c6c6c,#959595, 56-56 #959595,#6c6c6c, 57-57 #6c6c6c,#959595, 58-58 #959595,#6c6c6c, 59-59 #6c6c6c,#959595, 60-60 #959595,#6c6c6c, 61-61 #6c6c6c,#959595, 62-66 #959595,#6c6c6c, 67-67 #6c6c6c,#959595, 68-70 #959595,#6c6c6c, 71-72 #6c6c6c,#959595, 73-73 #959595,#6c6c6c, 74-74 #6c6c6c,#959595, 75-75 #959595,#6c6c6c, 76-76 #444444,#959595, 77-77 #6c6c6c,#959595, 78-81 #959595,#6c6c6c, 82-84 #6c6c6c,#959595, 85-85 #959595,#6c6c6c, 86-86 #6c6c6c,#959595, 87-89 #959595,#6c6c6c, 90-90 #6c6c6c,#959595, 91-92 #959595,#6c6c6c, 93-94 #6c6c6c,#959595, 95-95 #959595,#6c6c6c, 96-96 #959595,#352879, 97-97 #352879,#959595, 98-99 #352879,#352879, 100-149 d,#0d1410,
-|8: 0-0 d,#152019, 1-51 d,#0d1410, 52-55 #959595,#6c6c6c, 56-56 #6c6c6c,#959595, 57-57 #959595,#6c6c6c, 58-58 #6c6c6c,#959595, 59-59 #959595,#6c6c6c, 60-60 #6c6c6c,#959595, 61-61 #959595,#6c6c6c, 62-62 #6c6c6c,#959595, 63-64 #959595,#6c6c6c, 65-65 #6c6c6c,#959595, 66-66 #959595,#6c6c6c, 67-67 #6c6c6c,#959595, 68-68 #959595,#6c6c6c, 69-69 #6c6c6c,#959595, 70-70 #959595,#6c6c6c, 71-71 #6c6c6c,#959595, 72-75 #959595,#6c6c6c, 76-78 #6c6c6c,#959595, 79-80 #959595,#6c6c6c, 81-81 #6c6c6c,#959595, 82-83 #959595,#6c6c6c, 84-86 #6c6c6c,#959595, 87-88 #959595,#6c6c6c, 89-91 #6c6c6c,#959595, 92-92 #959595,#6c6c6c, 93-93 #6c6c6c,#959595, 94-94 #6c6c6c,#352879, 95-95 #352879,#959595, 96-96 #352879,#6c5eb5, 97-99 #352879,#352879, 100-149 d,#0d1410,
-|9: 0-0 d,#152019, 1-51 d,#0d1410, 52-56 #959595,#6c6c6c, 57-57 #6c6c6c,#959595, 58-60 #959595,#6c6c6c, 61-61 #6c6c6c,#959595, 62-66 #959595,#6c6c6c, 67-67 #444444,#6c6c6c, 68-68 #959595,#6c6c6c, 69-70 #6c6c6c,#959595, 71-71 #959595,#6c6c6c, 72-72 #6c6c6c,#959595, 73-73 #959595,#6c6c6c, 74-74 #6c6c6c,#959595, 75-75 #959595,#6c6c6c, 76-79 #6c6c6c,#959595, 80-82 #959595,#6c6c6c, 83-83 #6c6c6c,#959595, 84-84 #959595,#6c6c6c, 85-85 #6c6c6c,#959595, 86-86 #959595,#6c6c6c, 87-87 #6c6c6c,#959595, 88-88 #959595,#6c6c6c, 89-89 #6c6c6c,#959595, 90-91 #959595,#6c6c6c, 92-92 #6c6c6c,#352879, 93-93 #352879,#6c5eb5, 94-99 #352879,#352879, 100-149 d,#0d1410,
-|10: 0-0 d,#152019, 1-51 d,#0d1410, 52-55 #6c6c6c,#959595, 56-57 #959595,#6c6c6c, 58-59 #6c6c6c,#959595, 60-62 #959595,#6c6c6c, 63-63 #6c6c6c,#959595, 64-64 #959595,#6c6c6c, 65-66 #6c6c6c,#959595, 67-68 #959595,#6c6c6c, 69-72 #6c6c6c,#959595, 73-75 #959595,#6c6c6c, 76-76 #6c6c6c,#959595, 77-77 #959595,#6c6c6c, 78-80 #6c6c6c,#959595, 81-89 #959595,#6c6c6c, 90-90 #959595,#352879, 91-91 #352879,#6c6c6c, 92-92 #352879,#6c5eb5, 93-99 #352879,#352879, 100-149 d,#0d1410,
-|11: 0-0 d,#152019, 1-51 d,#0d1410, 52-55 #959595,#6c6c6c, 56-56 #6c6c6c,#959595, 57-57 #959595,#6c6c6c, 58-59 #6c6c6c,#959595, 60-60 #959595,#6c6c6c, 61-61 #6c6c6c,#959595, 62-62 #959595,#6c6c6c, 63-64 #6c6c6c,#959595, 65-66 #959595,#6c6c6c, 67-67 #6c6c6c,#959595, 68-70 #959595,#6c6c6c, 71-72 #6c6c6c,#959595, 73-78 #959595,#6c6c6c, 79-80 #6c6c6c,#959595, 81-85 #959595,#6c6c6c, 86-86 #6c6c6c,#959595, 87-87 #959595,#6c6c6c, 88-89 #959595,#352879, 90-90 #352879,#6c5eb5, 91-99 #352879,#352879, 100-149 d,#0d1410,
-|12: 0-0 d,#152019, 1-51 d,#0d1410, 52-52 #959595,#6c6c6c, 53-53 #6c6c6c,#959595, 54-56 #959595,#6c6c6c, 57-57 #6c6c6c,#959595, 58-58 #959595,#6c6c6c, 59-59 #6c6c6c,#959595, 60-66 #959595,#6c6c6c, 67-67 #6c6c6c,#959595, 68-71 #959595,#6c6c6c, 72-72 #6c6c6c,#959595, 73-73 #959595,#6c6c6c, 74-74 #6c6c6c,#959595, 75-76 #959595,#6c6c6c, 77-78 #6c6c6c,#959595, 79-81 #959595,#6c6c6c, 82-82 #6c6c6c,#959595, 83-83 #959595,#6c6c6c, 84-84 #6c6c6c,#959595, 85-85 #959595,#6c6c6c, 86-86 #959595,#352879, 87-87 #352879,#6c5eb5, 88-99 #352879,#352879, 100-149 d,#0d1410,
-|13: 0-0 d,#152019, 1-51 d,#0d1410, 52-52 #959595,#6c6c6c, 53-54 #6c6c6c,#959595, 55-55 #959595,#6c6c6c, 56-58 #6c6c6c,#959595, 59-61 #959595,#6c6c6c, 62-62 #6c6c6c,#959595, 63-65 #959595,#6c6c6c, 66-66 #6c6c6c,#959595, 67-67 #959595,#6c6c6c, 68-68 #6c6c6c,#959595, 69-72 #959595,#6c6c6c, 73-74 #6c6c6c,#959595, 75-75 #959595,#6c6c6c, 76-76 #6c6c6c,#959595, 77-77 #959595,#6c6c6c, 78-78 #6c6c6c,#959595, 79-79 #959595,#6c6c6c, 80-80 #6c6c6c,#959595, 81-81 #959595,#6c6c6c, 82-82 #6c6c6c,#959595, 83-83 #959595,#6c6c6c, 84-84 #6c6c6c,#352879, 85-85 #352879,#6c6c6c, 86-99 #352879,#352879, 100-149 d,#0d1410,
-|14: 0-0 d,#152019, 1-51 d,#0d1410, 52-52 #444444,#959595, 53-55 #959595,#6c6c6c, 56-56 #6c6c6c,#959595, 57-57 #959595,#6c6c6c, 58-58 #444444,#959595, 59-61 #959595,#6c6c6c, 62-63 #6c6c6c,#959595, 64-64 #959595,#6c6c6c, 65-66 #6c6c6c,#959595, 67-67 #959595,#6c6c6c, 68-68 #6c6c6c,#959595, 69-70 #959595,#6c6c6c, 71-71 #6c6c6c,#959595, 72-73 #959595,#6c6c6c, 74-74 #6c6c6c,#959595, 75-75 #959595,#6c6c6c, 76-76 #6c6c6c,#959595, 77-78 #959595,#6c6c6c, 79-80 #6c6c6c,#959595, 81-81 #959595,#6c6c6c, 82-82 #959595,#352879, 83-83 #352879,#6c6c6c, 84-99 #352879,#352879, 100-149 d,#0d1410,
-|15: 0-0 d,#152019, 1-51 d,#0d1410, 52-56 #959595,#6c6c6c, 57-57 #6c6c6c,#959595, 58-59 #959595,#6c6c6c, 60-61 #6c6c6c,#959595, 62-63 #959595,#6c6c6c, 64-64 #6c6c6c,#959595, 65-65 #959595,#6c6c6c, 66-66 #6c6c6c,#959595, 67-68 #959595,#6c6c6c, 69-69 #6c6c6c,#959595, 70-74 #959595,#6c6c6c, 75-76 #6c6c6c,#959595, 77-78 #959595,#6c6c6c, 79-79 #6c6c6c,#959595, 80-80 #959595,#352879, 81-81 #352879,#959595, 82-99 #352879,#352879, 100-149 d,#0d1410,
-|16: 0-0 d,#152019, 1-51 d,#0d1410, 52-52 #6c6c6c,#959595, 53-53 #959595,#6c6c6c, 54-54 #6c6c6c,#959595, 55-59 #959595,#6c6c6c, 60-61 #6c6c6c,#959595, 62-64 #959595,#6c6c6c, 65-65 #6c6c6c,#959595, 66-67 #959595,#6c6c6c, 68-69 #6c6c6c,#959595, 70-71 #959595,#6c6c6c, 72-75 #6c6c6c,#959595, 76-77 #959595,#6c6c6c, 78-78 #6c6c6c,#352879, 79-79 #352879,#959595, 80-80 #352879,#6c5eb5, 81-99 #352879,#352879, 100-149 d,#0d1410,
-|17: 0-0 d,#152019, 1-51 d,#0d1410, 52-52 #959595,#6c6c6c, 53-53 #6c6c6c,#959595, 54-63 #959595,#6c6c6c, 64-65 #6c6c6c,#959595, 66-68 #959595,#6c6c6c, 69-71 #6c6c6c,#959595, 72-73 #959595,#6c6c6c, 74-75 #6c6c6c,#959595, 76-76 #6c6c6c,#352879, 77-77 #352879,#6c6c6c, 78-99 #352879,#352879, 100-149 d,#0d1410,
-|18: 0-0 d,#152019, 1-51 d,#0d1410, 52-52 #959595,#6c6c6c, 53-55 #6c6c6c,#959595, 56-60 #959595,#6c6c6c, 61-61 #444444,#959595, 62-62 #959595,#6c6c6c, 63-63 #6c6c6c,#959595, 64-64 #959595,#6c6c6c, 65-66 #6c6c6c,#959595, 67-69 #959595,#6c6c6c, 70-71 #6c6c6c,#959595, 72-72 #959595,#6c6c6c, 73-73 #6c6c6c,#959595, 74-74 #6c6c6c,#352879, 75-75 #352879,#6c6c6c, 76-99 #352879,#352879, 100-149 d,#0d1410,
-|19: 0-0 d,#152019, 1-51 d,#0d1410, 52-52 #959595,#6c6c6c, 53-55 #6c6c6c,#959595, 56-63 #959595,#6c6c6c, 64-64 #6c6c6c,#959595, 65-66 #959595,#6c6c6c, 67-67 #6c6c6c,#959595, 68-69 #959595,#6c6c6c, 70-70 #6c6c6c,#959595, 71-71 #959595,#6c6c6c, 72-72 #959595,#352879, 73-73 #352879,#6c5eb5, 74-99 #352879,#352879, 100-149 d,#0d1410,
-|20: 0-0 d,#152019, 1-51 d,#0d1410, 52-56 #959595,#6c6c6c, 57-59 #6c6c6c,#959595, 60-62 #959595,#6c6c6c, 63-63 #6c6c6c,#959595, 64-66 #959595,#6c6c6c, 67-69 #6c6c6c,#959595, 70-70 #6c6c6c,#352879, 71-71 #352879,#6c6c6c, 72-72 #352879,#6c5eb5, 73-99 #352879,#352879, 100-149 d,#0d1410,
-|21: 0-0 d,#152019, 1-51 d,#0d1410, 52-52 #6c6c6c,#959595, 53-56 #959595,#6c6c6c, 57-57 #6c6c6c,#959595, 58-67 #959595,#6c6c6c, 68-68 #6c6c6c,#352879, 69-69 #352879,#6c6c6c, 70-99 #352879,#352879, 100-149 d,#0d1410,
-|22: 0-0 d,#152019, 1-51 d,#0d1410, 52-52 #959595,#6c6c6c, 53-53 #6c6c6c,#959595, 54-54 #959595,#6c6c6c, 55-55 #6c6c6c,#959595, 56-58 #959595,#6c6c6c, 59-62 #6c6c6c,#959595, 63-65 #959595,#6c6c6c, 66-66 #6c6c6c,#352879, 67-67 #352879,#6c5eb5, 68-99 #352879,#352879, 100-149 d,#0d1410,
-|23: 0-0 d,#152019, 1-51 d,#0d1410, 52-52 #959595,#6c6c6c, 53-53 #6c6c6c,#959595, 54-55 #959595,#6c6c6c, 56-56 #6c6c6c,#959595, 57-60 #959595,#6c6c6c, 61-62 #6c6c6c,#959595, 63-63 #959595,#6c6c6c, 64-64 #6c6c6c,#352879, 65-65 #959595,#352879, 66-99 #352879,#352879, 100-149 d,#0d1410,
-|24: 0-0 d,#152019, 1-51 d,#0d1410, 52-53 #959595,#6c6c6c, 54-55 #6c6c6c,#959595, 56-56 #959595,#6c6c6c, 57-57 #6c6c6c,#959595, 58-58 #959595,#6c6c6c, 59-61 #6c6c6c,#959595, 62-62 #6c6c6c,#352879, 63-63 #352879,#959595, 64-99 #352879,#352879, 100-149 d,#0d1410,
-|25: 0-0 d,#152019, 1-51 d,#0d1410, 52-52 #959595,#6c6c6c, 53-53 #6c6c6c,#959595, 54-55 #959595,#6c6c6c, 56-56 #6c6c6c,#959595, 57-57 #959595,#6c6c6c, 58-58 #6c6c6c,#959595, 59-59 #959595,#6c6c6c, 60-60 #6c6c6c,#352879, 61-61 #352879,#959595, 62-62 #352879,#6c5eb5, 63-99 #352879,#352879, 100-149 d,#0d1410,
-|26: 0-0 d,#152019, 1-51 d,#0d1410, 52-53 #959595,#6c6c6c, 54-57 #6c6c6c,#959595, 58-58 #959595,#352879, 59-59 #352879,#6c6c6c, 60-99 #352879,#352879, 100-149 d,#0d1410,
-|27: 0-0 d,#152019, 1-51 d,#0d1410, 52-52 #959595,#6c6c6c, 53-53 #6c6c6c,#959595, 54-55 #959595,#6c6c6c, 56-56 #6c6c6c,#352879, 57-57 #352879,#959595, 58-99 #352879,#352879, 100-149 d,#0d1410,
-|28: 0-0 d,#152019, 1-51 d,#0d1410, 52-53 #959595,#6c6c6c, 54-54 #6c6c6c,#352879, 55-55 #352879,#6c5eb5, 56-99 #352879,#352879, 100-149 d,#0d1410,
-|29: 0-0 d,#152019, 1-51 d,#0d1410, 52-52 #6c6c6c,#352879, 53-53 #959595,#352879, 54-99 #352879,#352879, 100-149 d,#0d1410,
-|30: 0-1 #000000,#adcc91, 2-104 #becfc4,#26362d, 105-149 d,#26362d,
-== snap search-prompt grid=150x31 cursor=6,29
-|29: /ZZ
+|0: 0-1 d,#1d2824, 2-149 #b2c3b8,#1d2824,
+|1: 0-1 d,#887455, 2-149 #becfc4,#314738,
+|2: 0-0 d,#608269, 1-1 d,#0d1410, 2-149 #e5eee5,#0d1410,
+|3: 0-0 d,#608269, 1-1 d,#0d1410, 2-149 #e5eee5,#0d1410,
+|4: 0-0 d,#608269, 1-149 d,#0d1410,
+|5: 0-1 d,#496656, 2-37 #b2c3b8,#1d2824, 38-46 #d3b0d9,#1d2824, 47-149 #b2c3b8,#1d2824,
+|6: 0-0 d,#152019, 1-138 d,#0d1410, 139-139 d,#1d2824, 140-149 #b2c3b8,#1d2824,
+|7: 0-0 d,#152019, 1-52 d,#0d1410, 53-55 #959595,#6c6c6c, 56-56 #6c6c6c,#959595, 57-57 #959595,#6c6c6c, 58-58 #6c6c6c,#959595, 59-60 #959595,#6c6c6c, 61-63 #6c6c6c,#959595, 64-65 #959595,#6c6c6c, 66-66 #6c6c6c,#959595, 67-71 #959595,#6c6c6c, 72-72 #6c6c6c,#959595, 73-73 #959595,#6c6c6c, 74-76 #6c6c6c,#959595, 77-77 #959595,#6c6c6c, 78-81 #6c6c6c,#959595, 82-84 #959595,#6c6c6c, 85-85 #6c6c6c,#959595, 86-87 #959595,#6c6c6c, 88-88 #6c6c6c,#959595, 89-89 #959595,#6c6c6c, 90-90 #6c6c6c,#959595, 91-92 #959595,#6c6c6c, 93-96 #6c6c6c,#959595, 97-97 #6c6c6c,#352879, 98-98 #352879,#959595, 99-149 #352879,#0d1410,
+|8: 0-0 d,#152019, 1-52 d,#0d1410, 53-58 #959595,#6c6c6c, 59-59 #444444,#959595, 60-64 #959595,#6c6c6c, 65-66 #6c6c6c,#959595, 67-71 #959595,#6c6c6c, 72-72 #444444,#959595, 73-73 #959595,#6c6c6c, 74-74 #6c6c6c,#959595, 75-75 #959595,#6c6c6c, 76-76 #444444,#959595, 77-81 #6c6c6c,#959595, 82-82 #959595,#6c6c6c, 83-85 #6c6c6c,#959595, 86-87 #959595,#6c6c6c, 88-89 #6c6c6c,#959595, 90-90 #959595,#6c6c6c, 91-92 #6c6c6c,#959595, 93-93 #959595,#6c6c6c, 94-94 #6c6c6c,#959595, 95-95 #6c6c6c,#352879, 96-96 #352879,#959595, 97-97 #352879,#6c5eb5, 98-98 #352879,#352879, 99-149 #352879,#0d1410,
+|9: 0-0 d,#152019, 1-52 d,#0d1410, 53-57 #959595,#6c6c6c, 58-58 #6c6c6c,#959595, 59-59 #959595,#6c6c6c, 60-60 #6c6c6c,#959595, 61-62 #959595,#6c6c6c, 63-63 #6c6c6c,#959595, 64-67 #959595,#6c6c6c, 68-68 #6c6c6c,#959595, 69-70 #959595,#6c6c6c, 71-71 #6c6c6c,#959595, 72-73 #959595,#6c6c6c, 74-75 #6c6c6c,#959595, 76-77 #959595,#6c6c6c, 78-79 #6c6c6c,#959595, 80-82 #959595,#6c6c6c, 83-86 #6c6c6c,#959595, 87-90 #959595,#6c6c6c, 91-91 #6c6c6c,#959595, 92-92 #959595,#6c6c6c, 93-93 #6c6c6c,#352879, 94-94 #352879,#6c6c6c, 95-98 #352879,#352879, 99-149 #352879,#0d1410,
+|10: 0-0 d,#152019, 1-52 d,#0d1410, 53-53 #6c6c6c,#959595, 54-54 #959595,#6c6c6c, 55-55 #6c6c6c,#959595, 56-59 #959595,#6c6c6c, 60-60 #6c6c6c,#959595, 61-61 #959595,#6c6c6c, 62-63 #6c6c6c,#959595, 64-64 #959595,#6c6c6c, 65-65 #6c6c6c,#959595, 66-67 #959595,#6c6c6c, 68-71 #6c6c6c,#959595, 72-75 #959595,#6c6c6c, 76-77 #6c6c6c,#959595, 78-78 #959595,#6c6c6c, 79-79 #6c6c6c,#959595, 80-81 #959595,#6c6c6c, 82-83 #6c6c6c,#959595, 84-86 #959595,#6c6c6c, 87-87 #6c6c6c,#959595, 88-90 #959595,#6c6c6c, 91-92 #6c6c6c,#352879, 93-93 #352879,#6c5eb5, 94-98 #352879,#352879, 99-149 #352879,#0d1410,
+|11: 0-0 d,#152019, 1-52 d,#0d1410, 53-54 #6c6c6c,#959595, 55-55 #959595,#6c6c6c, 56-56 #6c6c6c,#959595, 57-57 #959595,#6c6c6c, 58-59 #6c6c6c,#959595, 60-62 #959595,#6c6c6c, 63-63 #6c6c6c,#959595, 64-64 #959595,#6c6c6c, 65-65 #6c6c6c,#959595, 66-66 #959595,#6c6c6c, 67-70 #6c6c6c,#959595, 71-73 #959595,#6c6c6c, 74-74 #6c6c6c,#959595, 75-77 #959595,#6c6c6c, 78-80 #6c6c6c,#959595, 81-82 #959595,#6c6c6c, 83-83 #6c6c6c,#959595, 84-85 #959595,#6c6c6c, 86-86 #6c6c6c,#959595, 87-88 #959595,#6c6c6c, 89-89 #959595,#352879, 90-90 #352879,#6c6c6c, 91-98 #352879,#352879, 99-149 #352879,#0d1410,
+|12: 0-0 d,#152019, 1-52 d,#0d1410, 53-54 #6c6c6c,#959595, 55-55 #959595,#6c6c6c, 56-56 #6c6c6c,#959595, 57-58 #959595,#6c6c6c, 59-59 #6c6c6c,#959595, 60-60 #959595,#6c6c6c, 61-61 #6c6c6c,#959595, 62-64 #959595,#6c6c6c, 65-66 #6c6c6c,#959595, 67-69 #959595,#6c6c6c, 70-70 #6c6c6c,#959595, 71-72 #959595,#6c6c6c, 73-74 #6c6c6c,#959595, 75-75 #959595,#6c6c6c, 76-77 #6c6c6c,#959595, 78-83 #959595,#6c6c6c, 84-86 #6c6c6c,#959595, 87-87 #959595,#352879, 88-88 #352879,#6c6c6c, 89-98 #352879,#352879, 99-149 #352879,#0d1410,
+|13: 0-0 d,#152019, 1-52 d,#0d1410, 53-58 #959595,#6c6c6c, 59-59 #6c6c6c,#959595, 60-62 #959595,#6c6c6c, 63-64 #6c6c6c,#959595, 65-68 #959595,#6c6c6c, 69-69 #6c6c6c,#959595, 70-72 #959595,#6c6c6c, 73-73 #6c6c6c,#959595, 74-77 #959595,#6c6c6c, 78-79 #6c6c6c,#959595, 80-81 #959595,#6c6c6c, 82-83 #6c6c6c,#959595, 84-84 #959595,#6c6c6c, 85-85 #6c6c6c,#352879, 86-86 #959595,#352879, 87-87 #352879,#6c5eb5, 88-98 #352879,#352879, 99-149 #352879,#0d1410,
+|14: 0-0 d,#152019, 1-52 d,#0d1410, 53-53 #959595,#6c6c6c, 54-54 #6c6c6c,#959595, 55-55 #959595,#6c6c6c, 56-56 #6c6c6c,#959595, 57-58 #959595,#6c6c6c, 59-59 #6c6c6c,#959595, 60-60 #959595,#6c6c6c, 61-61 #6c6c6c,#959595, 62-62 #959595,#6c6c6c, 63-64 #6c6c6c,#959595, 65-71 #959595,#6c6c6c, 72-73 #6c6c6c,#959595, 74-76 #959595,#6c6c6c, 77-77 #6c6c6c,#959595, 78-79 #959595,#6c6c6c, 80-80 #6c6c6c,#959595, 81-82 #959595,#6c6c6c, 83-83 #6c6c6c,#352879, 84-84 #959595,#352879, 85-85 #352879,#6c5eb5, 86-98 #352879,#352879, 99-149 #352879,#0d1410,
+|15: 0-0 d,#152019, 1-52 d,#0d1410, 53-53 #6c6c6c,#959595, 54-55 #959595,#6c6c6c, 56-56 #6c6c6c,#959595, 57-60 #959595,#6c6c6c, 61-63 #6c6c6c,#959595, 64-64 #959595,#6c6c6c, 65-65 #6c6c6c,#959595, 66-66 #959595,#6c6c6c, 67-67 #6c6c6c,#959595, 68-70 #959595,#6c6c6c, 71-72 #6c6c6c,#959595, 73-75 #959595,#6c6c6c, 76-77 #6c6c6c,#959595, 78-79 #959595,#6c6c6c, 80-80 #6c6c6c,#959595, 81-81 #959595,#352879, 82-82 #352879,#6c5eb5, 83-98 #352879,#352879, 99-149 #352879,#0d1410,
+|16: 0-0 d,#152019, 1-52 d,#0d1410, 53-57 #959595,#6c6c6c, 58-58 #6c6c6c,#959595, 59-60 #959595,#6c6c6c, 61-61 #6c6c6c,#959595, 62-63 #959595,#6c6c6c, 64-64 #6c6c6c,#959595, 65-66 #959595,#6c6c6c, 67-67 #6c6c6c,#959595, 68-68 #959595,#6c6c6c, 69-69 #6c6c6c,#959595, 70-70 #959595,#6c6c6c, 71-72 #6c6c6c,#959595, 73-78 #959595,#6c6c6c, 79-79 #6c6c6c,#352879, 80-80 #959595,#352879, 81-81 #352879,#6c5eb5, 82-98 #352879,#352879, 99-149 #352879,#0d1410,
+|17: 0-0 d,#152019, 1-52 d,#0d1410, 53-54 #959595,#6c6c6c, 55-56 #6c6c6c,#959595, 57-58 #959595,#6c6c6c, 59-60 #6c6c6c,#959595, 61-62 #959595,#6c6c6c, 63-63 #6c6c6c,#959595, 64-64 #959595,#6c6c6c, 65-67 #6c6c6c,#959595, 68-68 #959595,#6c6c6c, 69-72 #6c6c6c,#959595, 73-74 #959595,#6c6c6c, 75-75 #6c6c6c,#959595, 76-76 #959595,#6c6c6c, 77-77 #6c6c6c,#352879, 78-78 #352879,#959595, 79-98 #352879,#352879, 99-149 #352879,#0d1410,
+|18: 0-0 d,#152019, 1-52 d,#0d1410, 53-54 #959595,#6c6c6c, 55-55 #6c6c6c,#959595, 56-60 #959595,#6c6c6c, 61-61 #6c6c6c,#959595, 62-62 #959595,#6c6c6c, 63-63 #444444,#6c6c6c, 64-66 #959595,#6c6c6c, 67-68 #6c6c6c,#959595, 69-71 #959595,#6c6c6c, 72-73 #6c6c6c,#959595, 74-74 #959595,#6c6c6c, 75-98 #6c6c6c,#352879, 99-149 #6c6c6c,#0d1410,
+|19: 0-0 d,#152019, 1-52 d,#0d1410, 53-53 #6c6c6c,#959595, 54-55 #959595,#6c6c6c, 56-56 #6c6c6c,#959595, 57-59 #959595,#6c6c6c, 60-60 #6c6c6c,#959595, 61-61 #959595,#6c6c6c, 62-64 #6c6c6c,#959595, 65-68 #959595,#6c6c6c, 69-69 #6c6c6c,#959595, 70-72 #959595,#6c6c6c, 73-73 #6c6c6c,#352879, 74-74 #352879,#6c6c6c, 75-98 #352879,#352879, 99-149 #352879,#0d1410,
+|20: 0-0 d,#152019, 1-52 d,#0d1410, 53-53 #6c6c6c,#959595, 54-56 #959595,#6c6c6c, 57-57 #6c6c6c,#959595, 58-58 #959595,#6c6c6c, 59-59 #6c6c6c,#959595, 60-60 #959595,#6c6c6c, 61-61 #6c6c6c,#959595, 62-63 #959595,#6c6c6c, 64-64 #6c6c6c,#959595, 65-70 #959595,#6c6c6c, 71-71 #959595,#352879, 72-72 #352879,#6c6c6c, 73-98 #352879,#352879, 99-149 #352879,#0d1410,
+|21: 0-0 d,#152019, 1-52 d,#0d1410, 53-53 #6c6c6c,#959595, 54-55 #959595,#6c6c6c, 56-56 #6c6c6c,#959595, 57-59 #959595,#6c6c6c, 60-60 #6c6c6c,#959595, 61-63 #959595,#6c6c6c, 64-65 #6c6c6c,#959595, 66-68 #959595,#6c6c6c, 69-69 #959595,#352879, 70-70 #352879,#6c6c6c, 71-71 #352879,#6c5eb5, 72-98 #352879,#352879, 99-149 #352879,#0d1410,
+|22: 0-0 d,#152019, 1-52 d,#0d1410, 53-55 #6c6c6c,#959595, 56-58 #959595,#6c6c6c, 59-59 #6c6c6c,#959595, 60-60 #959595,#6c6c6c, 61-61 #6c6c6c,#959595, 62-65 #959595,#6c6c6c, 66-66 #6c6c6c,#959595, 67-67 #6c6c6c,#352879, 68-68 #352879,#6c6c6c, 69-98 #352879,#352879, 99-149 #352879,#0d1410,
+|23: 0-0 d,#152019, 1-52 d,#0d1410, 53-53 #6c6c6c,#959595, 54-57 #959595,#6c6c6c, 58-59 #6c6c6c,#959595, 60-61 #959595,#6c6c6c, 62-62 #6c6c6c,#959595, 63-64 #959595,#6c6c6c, 65-65 #6c6c6c,#352879, 66-98 #959595,#352879, 99-149 #959595,#0d1410,
+|24: 0-0 d,#152019, 1-52 d,#0d1410, 53-60 #959595,#6c6c6c, 61-61 #6c6c6c,#959595, 62-62 #959595,#6c6c6c, 63-98 #959595,#352879, 99-149 #959595,#0d1410,
+|25: 0-0 d,#152019, 1-52 d,#0d1410, 53-56 #959595,#6c6c6c, 57-60 #6c6c6c,#959595, 61-61 #6c6c6c,#352879, 62-63 #352879,#6c5eb5, 64-98 #352879,#352879, 99-149 #352879,#0d1410,
+|26: 0-0 d,#152019, 1-52 d,#0d1410, 53-57 #959595,#6c6c6c, 58-58 #6c6c6c,#959595, 59-59 #6c6c6c,#352879, 60-60 #352879,#6c5eb5, 61-98 #352879,#352879, 99-149 #352879,#0d1410,
+|27: 0-0 d,#152019, 1-52 d,#0d1410, 53-54 #959595,#6c6c6c, 55-56 #6c6c6c,#959595, 57-57 #6c6c6c,#352879, 58-58 #959595,#352879, 59-59 #352879,#6c5eb5, 60-98 #352879,#352879, 99-149 #352879,#0d1410,
+|28: 0-0 d,#152019, 1-52 d,#0d1410, 53-54 #959595,#6c6c6c, 55-55 #6c6c6c,#352879, 56-56 #352879,#6c6c6c, 57-98 #352879,#352879, 99-149 #352879,#0d1410,
+|29: 0-0 d,#152019, 1-52 d,#0d1410, 53-53 #352879,#6c6c6c, 54-54 #352879,#959595, 55-55 #352879,#6c5eb5, 56-98 #352879,#352879, 99-149 #352879,#0d1410,
+|30: 0-1 d,#add38a, 2-79 #becfc4,#314738, 80-87 #dfbce5,#314738, 88-149 #becfc4,#314738,
+== snap search-prompt grid=150x31 cursor=149,6
+|6: /ZZ
== snap del-image grid=150x31 cursor=5,7
|5:
|6:
@@ -120,4 +120,4 @@
|27:
|28:
|29:
-|30: /tmp/pardes-snap/tagbottomimage/cwd Save Tty Del Togglettymode Filter Collapse
+|30: /tmp/pardes-snap/tagbottomimage/cwd Tty+bash Save Mode Filter Collapse Del
diff --git a/test/snapshots/tagbottomshort.golden b/test/snapshots/tagbottomshort.golden
index 0bb678cd..1979cc60 100644
--- a/test/snapshots/tagbottomshort.golden
+++ b/test/snapshots/tagbottomshort.golden
@@ -1,43 +1,43 @@
-== snap roomy grid=80x11 cursor=6,9
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
+== snap roomy grid=80x11 cursor=5,5
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
| 1 one
| 2 two
-| 3 three
-| 4 four
-| 5 five
-| 6 six
+| /tmp/pardes-snap/tagbottomshort/cwd/s.txt Save Tty Collapse Del
+| /ZZ
|
-| /ZZ
-| /tmp/pardes-snap/tagbottomshort/cwd/s.txt Save Tty Del Collapse
-== snap two-body grid=80x5 cursor=6,3
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| 1 one
-| /ZZ
-| /tmp/pardes-snap/tagbottomshort/cwd/s.txt Save Tty Del Collapse
-== snap one-body grid=80x4 cursor=6,2
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /ZZ
-| /tmp/pardes-snap/tagbottomshort/cwd/s.txt Save Tty Del Collapse
-== snap tag-only grid=80x2 cursor=69,1
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-| /tmp/pardes-snap/tagbottomshort/cwd/s.txt Save Tty Del Collapse
-== snap regrown grid=80x11 cursor=6,9
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
+|
+|
+|
+|^ +Search 0 Del
+== snap two-body grid=80x5 cursor=5,3
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/tagbottomshort/cwd/s.txt Save Tty Collapse Del
+| /ZZ
+|^ +Search 0 Del
+== snap one-body grid=80x4 cursor=79,3
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/tagbottomshort/cwd/s.txt Save Tty Collapse Del
+|^ +Search 0 Del
+== snap tag-only grid=80x2 cursor=79,1
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| /tmp/pardes-snap/tagbottomshort/cwd/s.txt Save Tty Collapse Del
+== snap regrown grid=80x11 cursor=5,5
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
| 1 one
| 2 two
-| 3 three
-| 4 four
-| 5 five
-| 6 six
+| /tmp/pardes-snap/tagbottomshort/cwd/s.txt Save Tty Collapse Del
+| /ZZ
+|
+|
+|
|
-| /ZZ
-| /tmp/pardes-snap/tagbottomshort/cwd/s.txt Save Tty Del Collapse
+|^ +Search 0 Del
== snap leader-one-body grid=80x4 cursor=7,2
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| SPC
-| /tmp/pardes-snap/tagbottomshort/cwd/s.txt Save Tty Del Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| 1 one SPC
+| /tmp/pardes-snap/tagbottomshort/cwd/s.txt Save Tty Collapse Del
diff --git a/test/snapshots/tagbottomshort.snap b/test/snapshots/tagbottomshort.snap
index 2574df36..58da6a87 100644
--- a/test/snapshots/tagbottomshort.snap
+++ b/test/snapshots/tagbottomshort.snap
@@ -10,8 +10,8 @@ wait 8000 s.txt
stable 700 20000
key space t b
stable 700 15000
-# `/` with room to spare: the prompt is cut off the tagline (grid 9) and drawn
-# on grid 8, the last body row, with the cursor.
+# `/` with room to spare: the prompt is its own line, drawn on grid 8, the last
+# body row, with the cursor; the tagline (grid 9) never holds any of it.
key /
send ZZ
stable 600 8000
@@ -27,9 +27,8 @@ resize 4 80
stable 700 10000
snap one-body
# the tagline alone. No body row, so nothing of the prompt is drawn anywhere —
-# not over the tag, not on the row above the pane. The tagline itself is
-# untouched: the marker sits after the builtins, so cutting the tail there
-# leaves every column of it exactly as `tag-only` would look unarmed.
+# not over the tag, not on the row above the pane, and its caret with it. The
+# tagline itself is untouched, exactly as `tag-only` would look unarmed.
resize 2 80
stable 700 10000
snap tag-only
diff --git a/test/snapshots/tagcmd.golden b/test/snapshots/tagcmd.golden
index 8fd1a9dd..3887daec 100644
--- a/test/snapshots/tagcmd.golden
+++ b/test/snapshots/tagcmd.golden
@@ -1,7 +1,7 @@
== snap edited grid=100x31 cursor=13,3
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/tagcmd/cwd/c.txt * Save Tty Del Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| */tmp/pardes-snap/tagcmd/cwd/c.txt Save Tty Collapse Del
| 1 ZZEDITline 1
| 2 line 2
| 3 line 3
@@ -9,11 +9,11 @@
| 5 line 5
| 6 line 6
| 7
-== snap colon grid=100x31 cursor=38,2
-== snap word grid=100x31 cursor=42,2
+== 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 Tty Del Collapse
-|30: --:--:-- saved /tmp/pardes-snap/tagcmd/cwd/c.txt
+|2: /tmp/pardes-snap/tagcmd/cwd/c.txt Save Tty Collapse Del
+|3: 1 ZZEDITline 1 --:--:-- saved /tmp/pardes-snap/tagcmd/cwd/c.txt
== file written
ZZEDITline 1
line 2
@@ -24,4 +24,4 @@ line 6
== end file
== snap escaped grid=100x31 cursor=13,3
-|30:
+|3: 1 ZZEDITline 1
diff --git a/test/snapshots/tagcmd.snap b/test/snapshots/tagcmd.snap
index 305ed521..0e9047fb 100644
--- a/test/snapshots/tagcmd.snap
+++ b/test/snapshots/tagcmd.snap
@@ -1,11 +1,12 @@
# `:` — vim's command line with acme's vocabulary. It focuses the pane's OWN
# tag in NORMAL mode (block cursor; the layout box shows the pane's BODY mode,
-# which for this file pane is normal either way), parked at the tail's
-# START — always the start, so `:w` is the same two keystrokes every time.
-# Motions walk the tag's words (w selects the "Save" span, exactly like a body
-# word motion), the execute chord runs the one under the cursor and hands the
-# body back in normal mode — same keys as the body, so Tab by default (see
-# config.look_key/exec_key). Esc backs out instead, leaving the tail as it was.
+# which for this file pane is normal either way). The tag remembers where its
+# cursor was; the first time there is nothing to remember and it starts on
+# Save. The tag's normal mode is the body's: w selects the "Save" span exactly
+# as a body word motion does, and the execute key runs the word under the
+# cursor and hands the body back — same keys as the body, so Tab by default
+# (see config.look_key/exec_key). `:` again backs out instead, leaving the tag
+# as it was.
lines c.txt 6
start 31 100 c.txt
wait 8000 Newcol Joincol
@@ -18,7 +19,7 @@ key esc
settle 100
stable 400 5000
snap edited
-# `:` -> the tag, in normal mode, cursor on the tail's first cell
+# `:` -> the tag, in normal mode, cursor on Save
key :
stable 400 5000
snap colon
@@ -32,10 +33,9 @@ stable 600 8000
stable 400 5000
snap saved
snapfile written /tmp/pardes-snap/tagcmd/cwd/c.txt
-# `:` then Esc: back to the body with the tail untouched, nothing run
+# `:` then `:`: back to the body with the tag untouched, nothing run
key :
stable 400 5000
-key esc
-settle 100
+key :
stable 400 5000
snap escaped
diff --git a/test/snapshots/tagnav.golden b/test/snapshots/tagnav.golden
index 6491dd38..e7c6eca4 100644
--- a/test/snapshots/tagnav.golden
+++ b/test/snapshots/tagnav.golden
@@ -1,66 +1,48 @@
-== snap start grid=100x31 cursor=7,3
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/tagnav/cwd/w.txt Save Tty Del C /tmp/pardes-snap/tagnav/cwd Save Tty Del Togglet
+== snap start grid=100x31 cursor=7,4
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/tagnav/cwd/w.txt Save Tty Colla /tmp/pardes-snap/tagnav/cwd Tty+bash Save Mode F
+| pse Del ilter Collapse Del
| 1 alpha ls
| 2 beta w.txt
| 3 gamma
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-| /tmp/pardes-snap/tagnav/cwd Save Tty Del Togglet
+| /tmp/pardes-snap/tagnav/cwd Tty+bash Save Mode F
+| ilter Collapse Del
| ls
| w.txt
-== snap colon grid=100x31 cursor=28,2
-|2: des-snap/tagnav/cwd/w.txt Save Tty Del Collapse /tmp/pardes-snap/tagnav/cwd Save Tty Del Togglet
-== snap right-tag grid=100x31 cursor=57,2
-|2: /tmp/pardes-snap/tagnav/cwd/w.txt Save Tty Del C /cwd Save Tty Del Togglettymode Filter Collapse
-== snap left-tag grid=100x31 cursor=28,2
-|2: des-snap/tagnav/cwd/w.txt Save Tty Del Collapse /tmp/pardes-snap/tagnav/cwd Save Tty Del Togglet
-== snap down-tag grid=100x31 cursor=7,17
-|2: /tmp/pardes-snap/tagnav/cwd/w.txt Save Tty Del C /tmp/pardes-snap/tagnav/cwd Save Tty Del Togglet
-|17: /cwd Save Tty Del Togglettymode Filter Collapse
-== snap up-tag grid=100x31 cursor=28,2
-|2: des-snap/tagnav/cwd/w.txt Save Tty Del Collapse /tmp/pardes-snap/tagnav/cwd Save Tty Del Togglet
-|17: /tmp/pardes-snap/tagnav/cwd Save Tty Del Togglet
-== snap column-tag grid=100x31 cursor=0,1
-|2: /tmp/pardes-snap/tagnav/cwd/w.txt Save Tty Del C /tmp/pardes-snap/tagnav/cwd Save Tty Del Togglet
-== snap up-edge grid=100x31 cursor=0,0
-== snap topbar-word grid=100x31 cursor=6,0
-== snap topbar-graphemes grid=100x31 cursor=8,0
-== snap column-down grid=100x31 cursor=0,1
-== snap back-down grid=100x31 cursor=28,2
-|2: des-snap/tagnav/cwd/w.txt Save Tty Del Collapse /tmp/pardes-snap/tagnav/cwd Save Tty Del Togglet
-== snap arrows-still-motion grid=100x31 cursor=30,2
-== snap back-to-body grid=100x31 cursor=7,3
-|2: /tmp/pardes-snap/tagnav/cwd/w.txt Save Tty Del C /tmp/pardes-snap/tagnav/cwd Save Tty Del Togglet
-== snap tty-on grid=100x31 cursor=54,5
-|2: /tmp/pardes-snap/tagnav/cwd/w.txt Save Tty Del C$ /tmp/pardes-snap/tagnav/cwd Save Tty Del Togglet
-|3: 1 alpha $ ls
-|5: 3 gamma $
-== snap tty-tag grid=100x31 cursor=57,2
-|2: /tmp/pardes-snap/tagnav/cwd/w.txt Save Tty Del C$ /cwd Save Tty Del Togglettymode Filter Collapse
-|3: 1 alpha ls
-|5: 3 gamma
-== snap tty-restored grid=100x31 cursor=54,5
-|2: /tmp/pardes-snap/tagnav/cwd/w.txt Save Tty Del C$ /tmp/pardes-snap/tagnav/cwd Save Tty Del Togglet
-|3: 1 alpha $ ls
-|5: 3 gamma $
-== snap topbar-dollar grid=100x31 cursor=70,0
-== snap topbar-dump-word grid=100x31 cursor=46,0
-== snap topbar-exec grid=100x31 cursor=7,3
-|0: Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill Restore /tmp/pardes-snap/tag
-== snap topbar-restore-word grid=100x31 cursor=72,0
-== snap topbar-restored grid=100x31 cursor=7,3
-|0: Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|2: /tmp/pardes-snap/tagnav/cwd/w.txt Save Tty Del C /tmp/pardes-snap/tagnav/cwd Save Tty Del Togglet
-|3: 1 alpha ls
-|5: 3 gamma
+== snap colon grid=100x31 cursor=36,2
+== snap word grid=100x31 cursor=40,2
+== snap in-tag grid=100x31 cursor=42,2
+== snap right grid=100x31 cursor=54,6
+== snap right-tag grid=100x31 cursor=89,2
+== snap left-tag grid=100x31 cursor=42,2
+== 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 Tty Colla$ /tmp/pardes-snap/tagnav/cwd Tty+bash Save Mode F
+|4: 1 alpha $ ls
+|6: 3 gamma $
+== snap tty-tag grid=100x31 cursor=94,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 Tty Colla /tmp/pardes-snap/tagnav/cwd Tty+bash Save Mode F
+|4: 1 alpha Up ls
+|6: 3 gamma
+== 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
+== snap topbar-dollar grid=100x31 cursor=76,0
+|4: 1 alpha ls
+== snap topbar-dump-word grid=100x31 cursor=48,0
+== snap topbar-exec grid=100x31 cursor=7,4
+|0: Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit Restore /tmp/pardes-sn
+|4: 1 alpha Dump ls
+== snap topbar-restore-word grid=100x31 cursor=78,0
+|4: 1 alpha ls
+== snap topbar-restored grid=100x31 cursor=7,4
+|4: 1 alpha $ ls
+|6: 3 gamma $
+|7: /tmp/pardes-snap/tagnav/cwd Tty+bash Save Mode F ── restored history ──
+|9: $ ls
+|11: $
+|12: ── restored history ──
diff --git a/test/snapshots/tagnav.snap b/test/snapshots/tagnav.snap
index c375e644..cd83dbd9 100644
--- a/test/snapshots/tagnav.snap
+++ b/test/snapshots/tagnav.snap
@@ -1,141 +1,122 @@
-# h/j/k/l ON A TAGLINE move focus BETWEEN taglines. A tag is a place in the
-# LAYOUT, not just a line of text, so the four letters walk the layout and land
-# on the neighbour's TAG (top row of the window), still in normal mode — you
-# walk the taglines and never drop through a body. They run the SAME
-# Left/Down/Up/Right builtins `SPC w h/j/k/l` and `Ctrl-w h/j/k/l` run: one
-# focusDir, three routes to it. The ARROWS keep the in-tag grapheme motion, so
-# no capability was traded away.
+# A tag's normal mode is the body's: h/l/w move in the tag's own text, and
+# moving between panes is the window keys' job from a tag as from a body --
+# there are no tag-only hops. `:` is the one key a tag and a body do not
+# share: from the body it focuses the pane's own tag, from the tag it hands the
+# keyboard back to the body. Each tag remembers its cursor; the first time
+# there is nothing to remember and it starts on Save.
#
# Evidence is the `cursor=` header (the ACTIVE pane's cursor, which while a tag
# is focused sits on THAT pane's tag row) plus each pane's layout box, which
-# carries its BODY mode as one character: `•` normal, `^` insert, `$` tty. A
-# tag edit parks the body mode rather than overwriting it, so the box keeps
-# saying what the pane we left will be when we hop back off its tagline.
+# carries its BODY mode as one character: ` ` normal, `^` insert, `$` tty. The
+# tag has a mode of its own, so the box never changes while a tag is used.
file w.txt alpha\nbeta\ngamma
start 31 100 w.txt
wait 8000 Newcol Joincol
wait 8000 w.txt
stable 700 20000
-# A FILE boots alone now, so the shell this script calls "the launch shell" is
-# opened here: Alt-n opens it and focuses it, Alt-c puts it in a column of its
-# own on the right, SPC w h comes back to the file. (`New`/`Newcol` open an
-# empty +New scratch now, not a shell.)
+# A FILE boots alone, so the launch shell is opened here: Alt-n opens it and
+# focuses it, Alt-c puts it in a column of its own on the right, SPC w h Enter
+# comes back to the file.
key a-n
key a-c
stable 700 15000
-key space w h
+key space w h enter
stable 400 5000
# Alt-n: a shell below the file, so the left column has two rows and every
# direction has somewhere to go
key a-n
stable 700 15000
-key space w k
+key space w k enter
stable 400 5000
snap start
-# `:` -> the file's OWN tagline, normal mode, parked at the tail's start
+# `:` -> the file's OWN tagline, normal mode, on Save
key :
stable 400 5000
snap colon
-# l -> right, onto the launch shell's TAGLINE (not its body)
-key l
-stable 400 5000
-snap right-tag
-# h -> back left onto the file's tagline
-key h
-stable 400 5000
-snap left-tag
-# j -> down onto the tagline of the shell under the file
-key j
-stable 400 5000
-snap down-tag
-# k -> back up onto the file's
-key k
-stable 400 5000
-snap up-tag
-# k visits the column tag first, then the workspace tag. Both stay in normal
-# navigation mode; neither hop drops into a pane body.
-key k
-stable 400 5000
-snap column-tag
-key k
-stable 400 5000
-snap up-edge
-# the bar speaks the tag's own one-line vocabulary: w to the next word start
+# w selects in the tag the way it selects in a body
key w
stable 400 5000
-snap topbar-word
-# h/l are plain graphemes up here — row 0 has no window to its left or right to
-# walk to — and the arrows still mean what they always did
-key l right
+snap word
+# l is a motion in the tag, not a hop to the next pane
+key l l
stable 400 5000
-snap topbar-graphemes
-# j is the mirror of the k that got you here: back DOWN onto the topmost pane's
-# tagline, still in normal mode, so the hop is a round trip
-key j
+snap in-tag
+# the window keys move between panes from a tag as from a body: the tag lets
+# go and the neighbour's BODY takes the keyboard
+key c-w l enter
stable 400 5000
-snap column-down
-key j
+snap right
+# `:` there -> that pane's own tag, on its Save the first time
+key :
stable 400 5000
-snap back-down
-# the arrows are still in-tag motion: two rights walk two columns of the tail
-key right right
+snap right-tag
+# back left, and `:` finds the file's tag cursor where l left it
+key c-w h enter
stable 400 5000
-snap arrows-still-motion
-key esc
-settle 100
+key :
+stable 400 5000
+snap left-tag
+# `:` in the tag's normal mode: back to the body
+key :
stable 400 5000
snap back-to-body
-# A TERMINAL MUST NOT LOSE ITS TTY MODE. Put the launch shell in raw tty mode
-# (Ctrl-b), come back, then hop onto its tagline and off again: exitTagEdit
-# restores the body mode the tag hijacked, and its box reads `$` throughout —
-# during the hop too, because the box shows the PARKED mode, not the tag's.
-key c-w l
+# A TERMINAL KEEPS ITS TTY MODE. Put the launch shell in raw tty mode (Ctrl-b),
+# click its tagline and come back: its box reads `$` throughout, because the
+# tag's mode is the tag's own.
+key c-w l enter
stable 400 5000
key c-b
stable 700 15000
snap tty-on
-key c-w h
-stable 400 5000
-key :
-key l
+press left @Mode 3
+release left @Mode 3
stable 400 5000
snap tty-tag
key esc
settle 100
+key :
stable 400 5000
snap tty-restored
-# Enter/Tab on the BAR runs the word under the cursor through the very dispatch
-# a middle click on it uses, and leaves the bar FIRST — `Kill` lives up here, so
-# a builtin that frees the session must never return into a focused topbar (the
-# same hazard the pane-tag chord has with `Del`). `$` proves the destructive
-# word is exactly last; four long-word steps back land on `Dump`, the visible
-# non-destructive action used here. It grows a `Restore <path>` word, which is
-# also the case where the line gets longer than the column you were parked on.
-key c-w h
+# The column and workspace tags are Texts in the same layout, with the same
+# keys: Up from a pane with nothing above it reaches its column's tag, in
+# normal mode, then the workspace's; Down comes back the same way.
+key c-b
+stable 700 15000
+key c-w h enter
stable 400 5000
-key :
-key k k
+key c-w k
stable 400 5000
-key $
+snap column-tag
+key w
+stable 400 5000
+snap column-word
+key c-w k
+stable 400 5000
+snap workspace-tag
+# `$` is the last cell; five long-word steps back land on `Dump`, and the
+# execute key runs it and gives the keyboard back to the body FIRST -- `Exit`
+# lives up here too, so a builtin that frees the session must never return
+# into a focused header. Dump grows a `Restore <path>` word, which is also the
+# case where the line gets longer than the column you were parked on.
+key g l
stable 400 5000
snap topbar-dollar
-key B B B B
+key B B B B B
stable 400 5000
snap topbar-dump-word
-key enter
+key tab
stable 700 15000
snap topbar-exec
# THE DELETION HAZARD, from the bar itself: `Restore` frees every pane and
-# swaps the core out from under the caller. Walk back onto the word the Dump
-# just grew — B twice off the tail, because the LONG word motions are the ones
-# that step over a path in one go — and run it. The bar drops focus BEFORE the
-# builtin, so nothing reaches for state the swap already freed.
-key :
-key k k
+# swaps the core out from under the caller. Walk back up onto the word the
+# Dump just grew -- B twice off the tail, because the LONG word motions are the
+# ones that step over a path in one go -- and run it.
+key c-w k
+key c-w k
stable 400 5000
-key $ B B
+key g l B B
stable 400 5000
snap topbar-restore-word
-key enter
+key tab
stable 900 15000
snap topbar-restored
diff --git a/test/snapshots/tagpath.golden b/test/snapshots/tagpath.golden
index 4f758365..641c5a26 100644
--- a/test/snapshots/tagpath.golden
+++ b/test/snapshots/tagpath.golden
@@ -1,7 +1,7 @@
== snap start grid=100x31 cursor=7,3
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/tagpath/cwd/c.txt Save Tty Del Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/tagpath/cwd/c.txt Save Tty Collapse Del
| 1 line 1
| 2 line 2
| 3 line 3
@@ -11,47 +11,47 @@
== snap col0 grid=100x31 cursor=2,2
== snap sel-path grid=100x31 cursor=35,2
== style sel-path grid=100x31
-|0: 0-70 #b2c3b8,#1d2824, 71-99 d,#1d2824,
-|1: 0-24 #becfc4,#26362d, 25-99 d,#26362d,
-|2: 0-1 #000000,#adcc91, 2-35 #f5f7ee,#405d4b, 36-57 #becfc4,#26362d, 58-99 d,#26362d,
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-99 d,#0d1410,
-|4: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-99 d,#0d1410,
-|5: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-99 d,#0d1410,
-|6: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-99 d,#0d1410,
-|7: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|8: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|9: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|10: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|11: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|12: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|13: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|14: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|15: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|16: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|17: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|18: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|19: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|20: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|21: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|22: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|23: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|24: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|25: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|26: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|27: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|28: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|29: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
-|30: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-99 d,#0d1410,
+|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,
+|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,
+|6: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-99 #e5eee5,#0d1410,
+|7: 0-0 d,#608269, 1-4 d,#0d1410, 5-99 #59675c,#0d1410,
+|8: 0-0 d,#608269, 1-99 d,#0d1410,
+|9: 0-0 d,#608269, 1-99 d,#0d1410,
+|10: 0-0 d,#608269, 1-99 d,#0d1410,
+|11: 0-0 d,#608269, 1-99 d,#0d1410,
+|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-0 d,#608269, 1-99 d,#0d1410,
+|17: 0-0 d,#608269, 1-99 d,#0d1410,
+|18: 0-0 d,#608269, 1-99 d,#0d1410,
+|19: 0-0 d,#608269, 1-99 d,#0d1410,
+|20: 0-0 d,#608269, 1-99 d,#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-0 d,#608269, 1-99 d,#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,
== snap yanked-path grid=100x31 cursor=41,3
-|2: /tmp/pardes-snap/tagpath/cwd/c.txt * Save Tty Del Collapse
+|2: */tmp/pardes-snap/tagpath/cwd/c.txt Save Tty Collapse Del
|3: 1 l/tmp/pardes-snap/tagpath/cwd/c.txtine 1
== snap drag-cross grid=100x31 cursor=41,2
== style drag-cross grid=100x31
-|2: 0-1 #000000,#adcc91, 2-10 #becfc4,#26362d, 11-41 #f5f7ee,#405d4b, 42-59 #becfc4,#26362d, 60-99 d,#26362d,
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-46 #e5eee5,#0d1410, 47-99 d,#0d1410,
+|2: 0-0 d,#add38a, 1-1 #000000,#f9cb70,b 2-10 #becfc4,#314738, 11-41 #f5f7ee,#3c614a, 42-99 #becfc4,#314738,
+|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 Tty Del Collapse
+|2: */renamed/tmp/pardes-snap/tagpath/cwd/c.txt Save Tty Collapse Del
== snap name-cancelled grid=100x31 cursor=41,3
-|2: /tmp/pardes-snap/tagpath/cwd/c.txt * Save Tty Del Collapse
+|2: */tmp/pardes-snap/tagpath/cwd/c.txt Save Tty Collapse Del
== snap name-committed grid=100x31 cursor=41,3
-|2: /renamed/tmp/pardes-snap/tagpath/cwd/c.txt * Save Tty Del Collapse
+|2: */renamed/tmp/pardes-snap/tagpath/cwd/c.txt Save Tty Collapse Del
diff --git a/test/snapshots/tagpath.snap b/test/snapshots/tagpath.snap
index cf431fa1..841d4fed 100644
--- a/test/snapshots/tagpath.snap
+++ b/test/snapshots/tagpath.snap
@@ -1,5 +1,7 @@
-# Filename drafts share the selectable tag coordinate space with commands.
-# Escape cancels; Enter changes buffer identity, never renames a disk file.
+# The path is part of the tag's text for the keyboard as for the mouse: `0`
+# goes to its start, `E` selects it and `y` yanks it. It is read-only, but
+# typing into it drafts a new name there, as a click on it does. Escape
+# cancels; Enter changes buffer identity, never renames a disk file.
lines c.txt 4
start 31 100 c.txt
wait 8000 Newcol Joincol
@@ -17,8 +19,8 @@ stable 400 5000
snap sel-path
snapstyle sel-path
key y
-key esc
-settle 100
+# `:` gives the keyboard back to the body, and `p` puts the path there
+key :
key p
stable 400 5000
snap yanked-path
@@ -30,14 +32,18 @@ release left 42 3
stable 400 5000
snap drag-cross
snapstyle drag-cross
+# Esc is the tag's normal mode; typed at the path's start, `/renamed` drafts
+# a name
key esc
settle 100
-key :
key 0
key i
text /renamed
stable 400 5000
snap name-draft
+# Esc keeps the draft pending; a second drops it
+key esc
+settle 100
key esc
stable 400 5000
snap name-cancelled
diff --git a/test/snapshots/theme.golden b/test/snapshots/theme.golden
index beada5be..43b09089 100644
--- a/test/snapshots/theme.golden
+++ b/test/snapshots/theme.golden
@@ -1,7 +1,8 @@
-== snap orchard grid=100x31 cursor=4,5
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/theme/cwd Save Tty Del Togglett /tmp/pardes-snap/theme/cwd Save Tty Del Togglett
+== snap orchard grid=100x31 cursor=87,0
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit NextColor
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/theme/cwd Tty+bash Save Mode Fi /tmp/pardes-snap/theme/cwd Tty+bash Save Mode Fi
+| lter Collapse Del lter Collapse Del
| ls ls
| t.txt t.txt
|
@@ -15,662 +16,641 @@
|
|
|
-|
-| /tmp/pardes-snap/theme/cwd Save Tty Del Togglett
+| /tmp/pardes-snap/theme/cwd Tty+bash Save Mode Fi
+| lter Collapse Del
| ls
| t.txt
== style orchard grid=100x31
-|0: 0-70 #b2c3b8,#1d2824, 71-99 d,#1d2824,
-|1: 0-24 #becfc4,#26362d, 25-49 d,#26362d, 50-74 #b2c3b8,#1d2824, 75-99 d,#1d2824,
-|2: 0-1 #000000,#adcc91, 2-49 #becfc4,#26362d, 50-51 #ffffff,#4c6356, 52-99 #b2c3b8,#1d2824,
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|4: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|5: 0-0 d,#637f6a, 1-49 d,#0d1410, 50-50 d,#637f6a, 51-99 d,#0d1410,
-|6: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|7: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|8: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|9: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|10: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|11: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|12: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|13: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|14: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|15: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|16: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|17: 0-1 #ffffff,#4c6356, 2-49 #b2c3b8,#1d2824, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|18: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|19: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|20: 0-0 d,#637f6a, 1-49 d,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|21: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|22: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|23: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|24: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|25: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|26: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|27: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|28: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|29: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-|30: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 d,#637f6a, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410,
-== snap dusk grid=100x31 cursor=4,5
+|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,
+|2: 0-1 d,#add38a, 2-28 #becfc4,#314738, 29-37 #dfbce5,#314738, 38-49 #becfc4,#314738, 50-51 #becfc4,#496656, 52-78 #b2c3b8,#1d2824, 79-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,#608269, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
+|5: 0-0 d,#608269, 1-1 d,#0d1410, 2-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410,
+|6: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
+|7: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
+|8: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
+|9: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
+|10: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
+|11: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
+|12: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
+|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-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,
+|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-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,
+|26: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410,
+|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,
+== snap dusk grid=100x31 cursor=4,6
+|4: ls NextColor ls
== style dusk grid=100x31
-|0: 0-50 #c6b6c5,#2c2630, 51-59 #fff0eb,#614453, 60-70 #c6b6c5,#2c2630, 71-99 d,#2c2630,
-|1: 0-24 #d2c2d1,#3b2f3b, 25-49 d,#3b2f3b, 50-74 #c6b6c5,#2c2630, 75-99 d,#2c2630,
-|2: 0-1 #000000,#e4b39b, 2-49 #d2c2d1,#3b2f3b, 50-51 #ffffff,#715768, 52-99 #c6b6c5,#2c2630,
-|3: 0-0 d,#8b697c, 1-1 d,#39323b, 2-49 #c3b6c1,#39323b, 50-50 d,#8b697c, 51-51 d,#39323b, 52-99 #c3b6c1,#39323b,
-|4: 0-0 d,#8b697c, 1-1 d,#39323b, 2-49 #c3b6c1,#39323b, 50-50 d,#8b697c, 51-51 d,#39323b, 52-99 #c3b6c1,#39323b,
-|5: 0-0 d,#8b697c, 1-49 d,#39323b, 50-50 d,#8b697c, 51-99 d,#39323b,
-|6: 0-0 d,#8b697c, 1-1 d,#39323b, 2-49 #c3b6c1,#39323b, 50-50 d,#8b697c, 51-51 d,#39323b, 52-99 #c3b6c1,#39323b,
-|7: 0-0 d,#8b697c, 1-1 d,#39323b, 2-49 #c3b6c1,#39323b, 50-50 d,#8b697c, 51-51 d,#39323b, 52-99 #c3b6c1,#39323b,
-|8: 0-0 d,#8b697c, 1-1 d,#39323b, 2-49 #c3b6c1,#39323b, 50-50 d,#8b697c, 51-51 d,#39323b, 52-99 #c3b6c1,#39323b,
-|9: 0-0 d,#8b697c, 1-1 d,#39323b, 2-49 #c3b6c1,#39323b, 50-50 d,#8b697c, 51-51 d,#39323b, 52-99 #c3b6c1,#39323b,
-|10: 0-0 d,#8b697c, 1-1 d,#39323b, 2-49 #c3b6c1,#39323b, 50-50 d,#8b697c, 51-51 d,#39323b, 52-99 #c3b6c1,#39323b,
-|11: 0-0 d,#8b697c, 1-1 d,#39323b, 2-49 #c3b6c1,#39323b, 50-50 d,#8b697c, 51-51 d,#39323b, 52-99 #c3b6c1,#39323b,
-|12: 0-0 d,#8b697c, 1-1 d,#39323b, 2-49 #c3b6c1,#39323b, 50-50 d,#8b697c, 51-51 d,#39323b, 52-99 #c3b6c1,#39323b,
-|13: 0-0 d,#8b697c, 1-1 d,#39323b, 2-49 #c3b6c1,#39323b, 50-50 d,#8b697c, 51-51 d,#39323b, 52-99 #c3b6c1,#39323b,
-|14: 0-0 d,#8b697c, 1-1 d,#39323b, 2-49 #c3b6c1,#39323b, 50-50 d,#8b697c, 51-51 d,#39323b, 52-99 #c3b6c1,#39323b,
-|15: 0-0 d,#8b697c, 1-1 d,#39323b, 2-49 #c3b6c1,#39323b, 50-50 d,#8b697c, 51-51 d,#39323b, 52-99 #c3b6c1,#39323b,
-|16: 0-0 d,#8b697c, 1-1 d,#39323b, 2-49 #c3b6c1,#39323b, 50-50 d,#8b697c, 51-51 d,#39323b, 52-99 #c3b6c1,#39323b,
-|17: 0-1 #ffffff,#715768, 2-49 #c6b6c5,#2c2630, 50-50 d,#8b697c, 51-51 d,#39323b, 52-99 #c3b6c1,#39323b,
-|18: 0-0 d,#8b697c, 1-1 d,#39323b, 2-49 #c3b6c1,#39323b, 50-50 d,#8b697c, 51-51 d,#39323b, 52-99 #c3b6c1,#39323b,
-|19: 0-0 d,#8b697c, 1-1 d,#39323b, 2-49 #c3b6c1,#39323b, 50-50 d,#8b697c, 51-51 d,#39323b, 52-99 #c3b6c1,#39323b,
-|20: 0-0 d,#8b697c, 1-49 d,#39323b, 50-50 d,#8b697c, 51-51 d,#39323b, 52-99 #c3b6c1,#39323b,
-|21: 0-0 d,#8b697c, 1-1 d,#39323b, 2-49 #c3b6c1,#39323b, 50-50 d,#8b697c, 51-51 d,#39323b, 52-99 #c3b6c1,#39323b,
-|22: 0-0 d,#8b697c, 1-1 d,#39323b, 2-49 #c3b6c1,#39323b, 50-50 d,#8b697c, 51-51 d,#39323b, 52-99 #c3b6c1,#39323b,
-|23: 0-0 d,#8b697c, 1-1 d,#39323b, 2-49 #c3b6c1,#39323b, 50-50 d,#8b697c, 51-51 d,#39323b, 52-99 #c3b6c1,#39323b,
-|24: 0-0 d,#8b697c, 1-1 d,#39323b, 2-49 #c3b6c1,#39323b, 50-50 d,#8b697c, 51-51 d,#39323b, 52-99 #c3b6c1,#39323b,
-|25: 0-0 d,#8b697c, 1-1 d,#39323b, 2-49 #c3b6c1,#39323b, 50-50 d,#8b697c, 51-51 d,#39323b, 52-99 #c3b6c1,#39323b,
-|26: 0-0 d,#8b697c, 1-1 d,#39323b, 2-49 #c3b6c1,#39323b, 50-50 d,#8b697c, 51-51 d,#39323b, 52-99 #c3b6c1,#39323b,
-|27: 0-0 d,#8b697c, 1-1 d,#39323b, 2-49 #c3b6c1,#39323b, 50-50 d,#8b697c, 51-51 d,#39323b, 52-99 #c3b6c1,#39323b,
-|28: 0-0 d,#8b697c, 1-1 d,#39323b, 2-49 #c3b6c1,#39323b, 50-50 d,#8b697c, 51-51 d,#39323b, 52-99 #c3b6c1,#39323b,
-|29: 0-0 d,#8b697c, 1-1 d,#39323b, 2-49 #c3b6c1,#39323b, 50-50 d,#8b697c, 51-51 d,#39323b, 52-99 #c3b6c1,#39323b,
-|30: 0-0 d,#8b697c, 1-1 d,#39323b, 2-49 #c3b6c1,#39323b, 50-50 d,#8b697c, 51-51 d,#39323b, 52-99 #c3b6c1,#39323b,
-== snap ink grid=100x31 cursor=4,5
+|0: 0-1 d,#2c2630, 2-77 #c6b6c5,#2c2630, 78-86 #fff0eb,#654053, 87-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-37 #a1d5c4,#533d4d, 38-49 #d2c2d1,#533d4d, 50-51 #d2c2d1,#745469, 52-78 #c6b6c5,#2c2630, 79-87 #96c9b8,#2c2630, 88-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,
+|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,
+|8: 0-0 d,#8e667c, 1-49 d,#39323b, 50-50 d,#8e667c, 51-99 d,#39323b,
+|9: 0-0 d,#8e667c, 1-49 d,#39323b, 50-50 d,#8e667c, 51-99 d,#39323b,
+|10: 0-0 d,#8e667c, 1-49 d,#39323b, 50-50 d,#8e667c, 51-99 d,#39323b,
+|11: 0-0 d,#8e667c, 1-49 d,#39323b, 50-50 d,#8e667c, 51-99 d,#39323b,
+|12: 0-0 d,#8e667c, 1-49 d,#39323b, 50-50 d,#8e667c, 51-99 d,#39323b,
+|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-37 #96c9b8,#2c2630, 38-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,
+|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,
+|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,
+|24: 0-0 d,#8e667c, 1-49 d,#39323b, 50-50 d,#8e667c, 51-99 d,#39323b,
+|25: 0-0 d,#8e667c, 1-49 d,#39323b, 50-50 d,#8e667c, 51-99 d,#39323b,
+|26: 0-0 d,#8e667c, 1-49 d,#39323b, 50-50 d,#8e667c, 51-99 d,#39323b,
+|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,
+== snap ink grid=100x31 cursor=4,6
== style ink grid=100x31
-|0: 0-50 #d5e4f1,#15212c, 51-59 #ffffff,#265271, 60-70 #d5e4f1,#15212c, 71-99 d,#15212c,
-|1: 0-24 #e1eef9,#223342, 25-49 d,#223342, 50-74 #d5e4f1,#15212c, 75-99 d,#15212c,
-|2: 0-1 #000000,#86d8ff, 2-49 #e1eef9,#223342, 50-51 #ffffff,#64798b, 52-99 #d5e4f1,#15212c,
-|3: 0-0 d,#8ba7bd, 1-1 d,#000000, 2-49 #f3f7fc,#000000, 50-50 d,#8ba7bd, 51-51 d,#000000, 52-99 #f3f7fc,#000000,
-|4: 0-0 d,#8ba7bd, 1-1 d,#000000, 2-49 #f3f7fc,#000000, 50-50 d,#8ba7bd, 51-51 d,#000000, 52-99 #f3f7fc,#000000,
-|5: 0-0 d,#8ba7bd, 1-49 d,#000000, 50-50 d,#8ba7bd, 51-99 d,#000000,
-|6: 0-0 d,#8ba7bd, 1-1 d,#000000, 2-49 #f3f7fc,#000000, 50-50 d,#8ba7bd, 51-51 d,#000000, 52-99 #f3f7fc,#000000,
-|7: 0-0 d,#8ba7bd, 1-1 d,#000000, 2-49 #f3f7fc,#000000, 50-50 d,#8ba7bd, 51-51 d,#000000, 52-99 #f3f7fc,#000000,
-|8: 0-0 d,#8ba7bd, 1-1 d,#000000, 2-49 #f3f7fc,#000000, 50-50 d,#8ba7bd, 51-51 d,#000000, 52-99 #f3f7fc,#000000,
-|9: 0-0 d,#8ba7bd, 1-1 d,#000000, 2-49 #f3f7fc,#000000, 50-50 d,#8ba7bd, 51-51 d,#000000, 52-99 #f3f7fc,#000000,
-|10: 0-0 d,#8ba7bd, 1-1 d,#000000, 2-49 #f3f7fc,#000000, 50-50 d,#8ba7bd, 51-51 d,#000000, 52-99 #f3f7fc,#000000,
-|11: 0-0 d,#8ba7bd, 1-1 d,#000000, 2-49 #f3f7fc,#000000, 50-50 d,#8ba7bd, 51-51 d,#000000, 52-99 #f3f7fc,#000000,
-|12: 0-0 d,#8ba7bd, 1-1 d,#000000, 2-49 #f3f7fc,#000000, 50-50 d,#8ba7bd, 51-51 d,#000000, 52-99 #f3f7fc,#000000,
-|13: 0-0 d,#8ba7bd, 1-1 d,#000000, 2-49 #f3f7fc,#000000, 50-50 d,#8ba7bd, 51-51 d,#000000, 52-99 #f3f7fc,#000000,
-|14: 0-0 d,#8ba7bd, 1-1 d,#000000, 2-49 #f3f7fc,#000000, 50-50 d,#8ba7bd, 51-51 d,#000000, 52-99 #f3f7fc,#000000,
-|15: 0-0 d,#8ba7bd, 1-1 d,#000000, 2-49 #f3f7fc,#000000, 50-50 d,#8ba7bd, 51-51 d,#000000, 52-99 #f3f7fc,#000000,
-|16: 0-0 d,#8ba7bd, 1-1 d,#000000, 2-49 #f3f7fc,#000000, 50-50 d,#8ba7bd, 51-51 d,#000000, 52-99 #f3f7fc,#000000,
-|17: 0-1 #ffffff,#64798b, 2-49 #d5e4f1,#15212c, 50-50 d,#8ba7bd, 51-51 d,#000000, 52-99 #f3f7fc,#000000,
-|18: 0-0 d,#8ba7bd, 1-1 d,#000000, 2-49 #f3f7fc,#000000, 50-50 d,#8ba7bd, 51-51 d,#000000, 52-99 #f3f7fc,#000000,
-|19: 0-0 d,#8ba7bd, 1-1 d,#000000, 2-49 #f3f7fc,#000000, 50-50 d,#8ba7bd, 51-51 d,#000000, 52-99 #f3f7fc,#000000,
-|20: 0-0 d,#8ba7bd, 1-49 d,#000000, 50-50 d,#8ba7bd, 51-51 d,#000000, 52-99 #f3f7fc,#000000,
-|21: 0-0 d,#8ba7bd, 1-1 d,#000000, 2-49 #f3f7fc,#000000, 50-50 d,#8ba7bd, 51-51 d,#000000, 52-99 #f3f7fc,#000000,
-|22: 0-0 d,#8ba7bd, 1-1 d,#000000, 2-49 #f3f7fc,#000000, 50-50 d,#8ba7bd, 51-51 d,#000000, 52-99 #f3f7fc,#000000,
-|23: 0-0 d,#8ba7bd, 1-1 d,#000000, 2-49 #f3f7fc,#000000, 50-50 d,#8ba7bd, 51-51 d,#000000, 52-99 #f3f7fc,#000000,
-|24: 0-0 d,#8ba7bd, 1-1 d,#000000, 2-49 #f3f7fc,#000000, 50-50 d,#8ba7bd, 51-51 d,#000000, 52-99 #f3f7fc,#000000,
-|25: 0-0 d,#8ba7bd, 1-1 d,#000000, 2-49 #f3f7fc,#000000, 50-50 d,#8ba7bd, 51-51 d,#000000, 52-99 #f3f7fc,#000000,
-|26: 0-0 d,#8ba7bd, 1-1 d,#000000, 2-49 #f3f7fc,#000000, 50-50 d,#8ba7bd, 51-51 d,#000000, 52-99 #f3f7fc,#000000,
-|27: 0-0 d,#8ba7bd, 1-1 d,#000000, 2-49 #f3f7fc,#000000, 50-50 d,#8ba7bd, 51-51 d,#000000, 52-99 #f3f7fc,#000000,
-|28: 0-0 d,#8ba7bd, 1-1 d,#000000, 2-49 #f3f7fc,#000000, 50-50 d,#8ba7bd, 51-51 d,#000000, 52-99 #f3f7fc,#000000,
-|29: 0-0 d,#8ba7bd, 1-1 d,#000000, 2-49 #f3f7fc,#000000, 50-50 d,#8ba7bd, 51-51 d,#000000, 52-99 #f3f7fc,#000000,
-|30: 0-0 d,#8ba7bd, 1-1 d,#000000, 2-49 #f3f7fc,#000000, 50-50 d,#8ba7bd, 51-51 d,#000000, 52-99 #f3f7fc,#000000,
-== snap paper grid=100x31 cursor=4,5
+|0: 0-1 d,#15212c, 2-77 #d5e4f1,#15212c, 78-86 #ffffff,#1b547c, 87-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-37 #ffeab8,#2b4051, 38-49 #e1eef9,#2b4051, 50-51 #e1eef9,#5f7990, 52-78 #d5e4f1,#15212c, 79-87 #f5e0ac,#15212c, 88-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,
+|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,
+|8: 0-0 d,#86a8c2, 1-49 d,#000000, 50-50 d,#86a8c2, 51-99 d,#000000,
+|9: 0-0 d,#86a8c2, 1-49 d,#000000, 50-50 d,#86a8c2, 51-99 d,#000000,
+|10: 0-0 d,#86a8c2, 1-49 d,#000000, 50-50 d,#86a8c2, 51-99 d,#000000,
+|11: 0-0 d,#86a8c2, 1-49 d,#000000, 50-50 d,#86a8c2, 51-99 d,#000000,
+|12: 0-0 d,#86a8c2, 1-49 d,#000000, 50-50 d,#86a8c2, 51-99 d,#000000,
+|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-37 #f5e0ac,#15212c, 38-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,
+|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,
+|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,
+|24: 0-0 d,#86a8c2, 1-49 d,#000000, 50-50 d,#86a8c2, 51-99 d,#000000,
+|25: 0-0 d,#86a8c2, 1-49 d,#000000, 50-50 d,#86a8c2, 51-99 d,#000000,
+|26: 0-0 d,#86a8c2, 1-49 d,#000000, 50-50 d,#86a8c2, 51-99 d,#000000,
+|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,
+== snap paper grid=100x31 cursor=4,6
== style paper grid=100x31
-|0: 0-50 #52625a,#e8eae3, 51-59 #203e31,#c8dfd1, 60-70 #52625a,#e8eae3, 71-99 d,#e8eae3,
-|1: 0-24 #4a5a52,#dce5dc, 25-49 d,#dce5dc, 50-74 #52625a,#e8eae3, 75-99 d,#e8eae3,
-|2: 0-1 #ffffff,#3c6b56, 2-49 #4a5a52,#dce5dc, 50-51 #000000,#91a395, 52-99 #52625a,#e8eae3,
-|3: 0-0 d,#889b8b, 1-1 d,#f5f3ed, 2-49 #303b3b,#f5f3ed, 50-50 d,#889b8b, 51-51 d,#f5f3ed, 52-99 #303b3b,#f5f3ed,
-|4: 0-0 d,#889b8b, 1-1 d,#f5f3ed, 2-49 #303b3b,#f5f3ed, 50-50 d,#889b8b, 51-51 d,#f5f3ed, 52-99 #303b3b,#f5f3ed,
-|5: 0-0 d,#889b8b, 1-49 d,#f5f3ed, 50-50 d,#889b8b, 51-99 d,#f5f3ed,
-|6: 0-0 d,#889b8b, 1-1 d,#f5f3ed, 2-49 #303b3b,#f5f3ed, 50-50 d,#889b8b, 51-51 d,#f5f3ed, 52-99 #303b3b,#f5f3ed,
-|7: 0-0 d,#889b8b, 1-1 d,#f5f3ed, 2-49 #303b3b,#f5f3ed, 50-50 d,#889b8b, 51-51 d,#f5f3ed, 52-99 #303b3b,#f5f3ed,
-|8: 0-0 d,#889b8b, 1-1 d,#f5f3ed, 2-49 #303b3b,#f5f3ed, 50-50 d,#889b8b, 51-51 d,#f5f3ed, 52-99 #303b3b,#f5f3ed,
-|9: 0-0 d,#889b8b, 1-1 d,#f5f3ed, 2-49 #303b3b,#f5f3ed, 50-50 d,#889b8b, 51-51 d,#f5f3ed, 52-99 #303b3b,#f5f3ed,
-|10: 0-0 d,#889b8b, 1-1 d,#f5f3ed, 2-49 #303b3b,#f5f3ed, 50-50 d,#889b8b, 51-51 d,#f5f3ed, 52-99 #303b3b,#f5f3ed,
-|11: 0-0 d,#889b8b, 1-1 d,#f5f3ed, 2-49 #303b3b,#f5f3ed, 50-50 d,#889b8b, 51-51 d,#f5f3ed, 52-99 #303b3b,#f5f3ed,
-|12: 0-0 d,#889b8b, 1-1 d,#f5f3ed, 2-49 #303b3b,#f5f3ed, 50-50 d,#889b8b, 51-51 d,#f5f3ed, 52-99 #303b3b,#f5f3ed,
-|13: 0-0 d,#889b8b, 1-1 d,#f5f3ed, 2-49 #303b3b,#f5f3ed, 50-50 d,#889b8b, 51-51 d,#f5f3ed, 52-99 #303b3b,#f5f3ed,
-|14: 0-0 d,#889b8b, 1-1 d,#f5f3ed, 2-49 #303b3b,#f5f3ed, 50-50 d,#889b8b, 51-51 d,#f5f3ed, 52-99 #303b3b,#f5f3ed,
-|15: 0-0 d,#889b8b, 1-1 d,#f5f3ed, 2-49 #303b3b,#f5f3ed, 50-50 d,#889b8b, 51-51 d,#f5f3ed, 52-99 #303b3b,#f5f3ed,
-|16: 0-0 d,#889b8b, 1-1 d,#f5f3ed, 2-49 #303b3b,#f5f3ed, 50-50 d,#889b8b, 51-51 d,#f5f3ed, 52-99 #303b3b,#f5f3ed,
-|17: 0-1 #000000,#91a395, 2-49 #52625a,#e8eae3, 50-50 d,#889b8b, 51-51 d,#f5f3ed, 52-99 #303b3b,#f5f3ed,
-|18: 0-0 d,#889b8b, 1-1 d,#f5f3ed, 2-49 #303b3b,#f5f3ed, 50-50 d,#889b8b, 51-51 d,#f5f3ed, 52-99 #303b3b,#f5f3ed,
-|19: 0-0 d,#889b8b, 1-1 d,#f5f3ed, 2-49 #303b3b,#f5f3ed, 50-50 d,#889b8b, 51-51 d,#f5f3ed, 52-99 #303b3b,#f5f3ed,
-|20: 0-0 d,#889b8b, 1-49 d,#f5f3ed, 50-50 d,#889b8b, 51-51 d,#f5f3ed, 52-99 #303b3b,#f5f3ed,
-|21: 0-0 d,#889b8b, 1-1 d,#f5f3ed, 2-49 #303b3b,#f5f3ed, 50-50 d,#889b8b, 51-51 d,#f5f3ed, 52-99 #303b3b,#f5f3ed,
-|22: 0-0 d,#889b8b, 1-1 d,#f5f3ed, 2-49 #303b3b,#f5f3ed, 50-50 d,#889b8b, 51-51 d,#f5f3ed, 52-99 #303b3b,#f5f3ed,
-|23: 0-0 d,#889b8b, 1-1 d,#f5f3ed, 2-49 #303b3b,#f5f3ed, 50-50 d,#889b8b, 51-51 d,#f5f3ed, 52-99 #303b3b,#f5f3ed,
-|24: 0-0 d,#889b8b, 1-1 d,#f5f3ed, 2-49 #303b3b,#f5f3ed, 50-50 d,#889b8b, 51-51 d,#f5f3ed, 52-99 #303b3b,#f5f3ed,
-|25: 0-0 d,#889b8b, 1-1 d,#f5f3ed, 2-49 #303b3b,#f5f3ed, 50-50 d,#889b8b, 51-51 d,#f5f3ed, 52-99 #303b3b,#f5f3ed,
-|26: 0-0 d,#889b8b, 1-1 d,#f5f3ed, 2-49 #303b3b,#f5f3ed, 50-50 d,#889b8b, 51-51 d,#f5f3ed, 52-99 #303b3b,#f5f3ed,
-|27: 0-0 d,#889b8b, 1-1 d,#f5f3ed, 2-49 #303b3b,#f5f3ed, 50-50 d,#889b8b, 51-51 d,#f5f3ed, 52-99 #303b3b,#f5f3ed,
-|28: 0-0 d,#889b8b, 1-1 d,#f5f3ed, 2-49 #303b3b,#f5f3ed, 50-50 d,#889b8b, 51-51 d,#f5f3ed, 52-99 #303b3b,#f5f3ed,
-|29: 0-0 d,#889b8b, 1-1 d,#f5f3ed, 2-49 #303b3b,#f5f3ed, 50-50 d,#889b8b, 51-51 d,#f5f3ed, 52-99 #303b3b,#f5f3ed,
-|30: 0-0 d,#889b8b, 1-1 d,#f5f3ed, 2-49 #303b3b,#f5f3ed, 50-50 d,#889b8b, 51-51 d,#f5f3ed, 52-99 #303b3b,#f5f3ed,
-== snap daybreak grid=100x31 cursor=4,5
+|0: 0-1 d,#e8eae3, 2-77 #52625a,#e8eae3, 78-86 #203e31,#c5e2d0, 87-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-37 #69447a,#bdd8ca, 38-49 #4a5a52,#bdd8ca, 50-51 #4a5a52,#8fa594, 52-78 #52625a,#e8eae3, 79-87 #724c83,#e8eae3, 88-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,
+|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,
+|8: 0-0 d,#869d8a, 1-49 d,#f5f3ed, 50-50 d,#869d8a, 51-99 d,#f5f3ed,
+|9: 0-0 d,#869d8a, 1-49 d,#f5f3ed, 50-50 d,#869d8a, 51-99 d,#f5f3ed,
+|10: 0-0 d,#869d8a, 1-49 d,#f5f3ed, 50-50 d,#869d8a, 51-99 d,#f5f3ed,
+|11: 0-0 d,#869d8a, 1-49 d,#f5f3ed, 50-50 d,#869d8a, 51-99 d,#f5f3ed,
+|12: 0-0 d,#869d8a, 1-49 d,#f5f3ed, 50-50 d,#869d8a, 51-99 d,#f5f3ed,
+|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-37 #724c83,#e8eae3, 38-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,
+|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,
+|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,
+|24: 0-0 d,#869d8a, 1-49 d,#f5f3ed, 50-50 d,#869d8a, 51-99 d,#f5f3ed,
+|25: 0-0 d,#869d8a, 1-49 d,#f5f3ed, 50-50 d,#869d8a, 51-99 d,#f5f3ed,
+|26: 0-0 d,#869d8a, 1-49 d,#f5f3ed, 50-50 d,#869d8a, 51-99 d,#f5f3ed,
+|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,
+== snap daybreak grid=100x31 cursor=4,6
== style daybreak grid=100x31
-|0: 0-50 #29465e,#edf2f7, 51-59 #10364f,#c1def3, 60-70 #29465e,#edf2f7, 71-99 d,#edf2f7,
-|1: 0-24 #213e56,#dfeaf3, 25-49 d,#dfeaf3, 50-74 #29465e,#edf2f7, 75-99 d,#edf2f7,
-|2: 0-1 #ffffff,#075f91, 2-49 #213e56,#dfeaf3, 50-51 #000000,#819db1, 52-99 #29465e,#edf2f7,
-|3: 0-0 d,#6b859b, 1-1 d,#ffffff, 2-49 #142d40,#ffffff, 50-50 d,#6b859b, 51-51 d,#ffffff, 52-99 #142d40,#ffffff,
-|4: 0-0 d,#6b859b, 1-1 d,#ffffff, 2-49 #142d40,#ffffff, 50-50 d,#6b859b, 51-51 d,#ffffff, 52-99 #142d40,#ffffff,
-|5: 0-0 d,#6b859b, 1-49 d,#ffffff, 50-50 d,#6b859b, 51-99 d,#ffffff,
-|6: 0-0 d,#6b859b, 1-1 d,#ffffff, 2-49 #142d40,#ffffff, 50-50 d,#6b859b, 51-51 d,#ffffff, 52-99 #142d40,#ffffff,
-|7: 0-0 d,#6b859b, 1-1 d,#ffffff, 2-49 #142d40,#ffffff, 50-50 d,#6b859b, 51-51 d,#ffffff, 52-99 #142d40,#ffffff,
-|8: 0-0 d,#6b859b, 1-1 d,#ffffff, 2-49 #142d40,#ffffff, 50-50 d,#6b859b, 51-51 d,#ffffff, 52-99 #142d40,#ffffff,
-|9: 0-0 d,#6b859b, 1-1 d,#ffffff, 2-49 #142d40,#ffffff, 50-50 d,#6b859b, 51-51 d,#ffffff, 52-99 #142d40,#ffffff,
-|10: 0-0 d,#6b859b, 1-1 d,#ffffff, 2-49 #142d40,#ffffff, 50-50 d,#6b859b, 51-51 d,#ffffff, 52-99 #142d40,#ffffff,
-|11: 0-0 d,#6b859b, 1-1 d,#ffffff, 2-49 #142d40,#ffffff, 50-50 d,#6b859b, 51-51 d,#ffffff, 52-99 #142d40,#ffffff,
-|12: 0-0 d,#6b859b, 1-1 d,#ffffff, 2-49 #142d40,#ffffff, 50-50 d,#6b859b, 51-51 d,#ffffff, 52-99 #142d40,#ffffff,
-|13: 0-0 d,#6b859b, 1-1 d,#ffffff, 2-49 #142d40,#ffffff, 50-50 d,#6b859b, 51-51 d,#ffffff, 52-99 #142d40,#ffffff,
-|14: 0-0 d,#6b859b, 1-1 d,#ffffff, 2-49 #142d40,#ffffff, 50-50 d,#6b859b, 51-51 d,#ffffff, 52-99 #142d40,#ffffff,
-|15: 0-0 d,#6b859b, 1-1 d,#ffffff, 2-49 #142d40,#ffffff, 50-50 d,#6b859b, 51-51 d,#ffffff, 52-99 #142d40,#ffffff,
-|16: 0-0 d,#6b859b, 1-1 d,#ffffff, 2-49 #142d40,#ffffff, 50-50 d,#6b859b, 51-51 d,#ffffff, 52-99 #142d40,#ffffff,
-|17: 0-1 #000000,#819db1, 2-49 #29465e,#edf2f7, 50-50 d,#6b859b, 51-51 d,#ffffff, 52-99 #142d40,#ffffff,
-|18: 0-0 d,#6b859b, 1-1 d,#ffffff, 2-49 #142d40,#ffffff, 50-50 d,#6b859b, 51-51 d,#ffffff, 52-99 #142d40,#ffffff,
-|19: 0-0 d,#6b859b, 1-1 d,#ffffff, 2-49 #142d40,#ffffff, 50-50 d,#6b859b, 51-51 d,#ffffff, 52-99 #142d40,#ffffff,
-|20: 0-0 d,#6b859b, 1-49 d,#ffffff, 50-50 d,#6b859b, 51-51 d,#ffffff, 52-99 #142d40,#ffffff,
-|21: 0-0 d,#6b859b, 1-1 d,#ffffff, 2-49 #142d40,#ffffff, 50-50 d,#6b859b, 51-51 d,#ffffff, 52-99 #142d40,#ffffff,
-|22: 0-0 d,#6b859b, 1-1 d,#ffffff, 2-49 #142d40,#ffffff, 50-50 d,#6b859b, 51-51 d,#ffffff, 52-99 #142d40,#ffffff,
-|23: 0-0 d,#6b859b, 1-1 d,#ffffff, 2-49 #142d40,#ffffff, 50-50 d,#6b859b, 51-51 d,#ffffff, 52-99 #142d40,#ffffff,
-|24: 0-0 d,#6b859b, 1-1 d,#ffffff, 2-49 #142d40,#ffffff, 50-50 d,#6b859b, 51-51 d,#ffffff, 52-99 #142d40,#ffffff,
-|25: 0-0 d,#6b859b, 1-1 d,#ffffff, 2-49 #142d40,#ffffff, 50-50 d,#6b859b, 51-51 d,#ffffff, 52-99 #142d40,#ffffff,
-|26: 0-0 d,#6b859b, 1-1 d,#ffffff, 2-49 #142d40,#ffffff, 50-50 d,#6b859b, 51-51 d,#ffffff, 52-99 #142d40,#ffffff,
-|27: 0-0 d,#6b859b, 1-1 d,#ffffff, 2-49 #142d40,#ffffff, 50-50 d,#6b859b, 51-51 d,#ffffff, 52-99 #142d40,#ffffff,
-|28: 0-0 d,#6b859b, 1-1 d,#ffffff, 2-49 #142d40,#ffffff, 50-50 d,#6b859b, 51-51 d,#ffffff, 52-99 #142d40,#ffffff,
-|29: 0-0 d,#6b859b, 1-1 d,#ffffff, 2-49 #142d40,#ffffff, 50-50 d,#6b859b, 51-51 d,#ffffff, 52-99 #142d40,#ffffff,
-|30: 0-0 d,#6b859b, 1-1 d,#ffffff, 2-49 #142d40,#ffffff, 50-50 d,#6b859b, 51-51 d,#ffffff, 52-99 #142d40,#ffffff,
-== snap atelier grid=100x31 cursor=4,5
+|0: 0-1 d,#edf2f7, 2-77 #29465e,#edf2f7, 78-86 #10364f,#b9dffb, 87-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-37 #52255f,#c7dcec, 38-49 #213e56,#c7dcec, 50-51 #213e56,#7b9eb7, 52-78 #29465e,#edf2f7, 79-87 #5a2d67,#edf2f7, 88-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,
+|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,
+|8: 0-0 d,#6685a0, 1-49 d,#ffffff, 50-50 d,#6685a0, 51-99 d,#ffffff,
+|9: 0-0 d,#6685a0, 1-49 d,#ffffff, 50-50 d,#6685a0, 51-99 d,#ffffff,
+|10: 0-0 d,#6685a0, 1-49 d,#ffffff, 50-50 d,#6685a0, 51-99 d,#ffffff,
+|11: 0-0 d,#6685a0, 1-49 d,#ffffff, 50-50 d,#6685a0, 51-99 d,#ffffff,
+|12: 0-0 d,#6685a0, 1-49 d,#ffffff, 50-50 d,#6685a0, 51-99 d,#ffffff,
+|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-37 #5a2d67,#edf2f7, 38-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,
+|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,
+|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,
+|24: 0-0 d,#6685a0, 1-49 d,#ffffff, 50-50 d,#6685a0, 51-99 d,#ffffff,
+|25: 0-0 d,#6685a0, 1-49 d,#ffffff, 50-50 d,#6685a0, 51-99 d,#ffffff,
+|26: 0-0 d,#6685a0, 1-49 d,#ffffff, 50-50 d,#6685a0, 51-99 d,#ffffff,
+|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,
+== snap atelier grid=100x31 cursor=4,6
== style atelier grid=100x31
-|0: 0-50 #3d6055,#e4f0ed, 51-59 #35492d,#e5e9ae, 60-70 #3d6055,#e4f0ed, 71-99 d,#e4f0ed,
-|1: 0-24 #35584d,#d3e7df, 25-49 d,#d3e7df, 50-74 #3d6055,#e4f0ed, 75-99 d,#e4f0ed,
-|2: 0-1 #ffffff,#3e7a68, 2-49 #35584d,#d3e7df, 50-51 #000000,#99b6a3, 52-99 #3d6055,#e4f0ed,
-|3: 0-0 d,#9da97b, 1-1 d,#fffdeb, 2-49 #293f35,#fffdeb, 50-50 d,#9da97b, 51-51 d,#fffdeb, 52-99 #293f35,#fffdeb,
-|4: 0-0 d,#9da97b, 1-1 d,#fffdeb, 2-49 #293f35,#fffdeb, 50-50 d,#9da97b, 51-51 d,#fffdeb, 52-99 #293f35,#fffdeb,
-|5: 0-0 d,#9da97b, 1-49 d,#fffdeb, 50-50 d,#9da97b, 51-99 d,#fffdeb,
-|6: 0-0 d,#9da97b, 1-1 d,#fffdeb, 2-49 #293f35,#fffdeb, 50-50 d,#9da97b, 51-51 d,#fffdeb, 52-99 #293f35,#fffdeb,
-|7: 0-0 d,#9da97b, 1-1 d,#fffdeb, 2-49 #293f35,#fffdeb, 50-50 d,#9da97b, 51-51 d,#fffdeb, 52-99 #293f35,#fffdeb,
-|8: 0-0 d,#9da97b, 1-1 d,#fffdeb, 2-49 #293f35,#fffdeb, 50-50 d,#9da97b, 51-51 d,#fffdeb, 52-99 #293f35,#fffdeb,
-|9: 0-0 d,#9da97b, 1-1 d,#fffdeb, 2-49 #293f35,#fffdeb, 50-50 d,#9da97b, 51-51 d,#fffdeb, 52-99 #293f35,#fffdeb,
-|10: 0-0 d,#9da97b, 1-1 d,#fffdeb, 2-49 #293f35,#fffdeb, 50-50 d,#9da97b, 51-51 d,#fffdeb, 52-99 #293f35,#fffdeb,
-|11: 0-0 d,#9da97b, 1-1 d,#fffdeb, 2-49 #293f35,#fffdeb, 50-50 d,#9da97b, 51-51 d,#fffdeb, 52-99 #293f35,#fffdeb,
-|12: 0-0 d,#9da97b, 1-1 d,#fffdeb, 2-49 #293f35,#fffdeb, 50-50 d,#9da97b, 51-51 d,#fffdeb, 52-99 #293f35,#fffdeb,
-|13: 0-0 d,#9da97b, 1-1 d,#fffdeb, 2-49 #293f35,#fffdeb, 50-50 d,#9da97b, 51-51 d,#fffdeb, 52-99 #293f35,#fffdeb,
-|14: 0-0 d,#9da97b, 1-1 d,#fffdeb, 2-49 #293f35,#fffdeb, 50-50 d,#9da97b, 51-51 d,#fffdeb, 52-99 #293f35,#fffdeb,
-|15: 0-0 d,#9da97b, 1-1 d,#fffdeb, 2-49 #293f35,#fffdeb, 50-50 d,#9da97b, 51-51 d,#fffdeb, 52-99 #293f35,#fffdeb,
-|16: 0-0 d,#9da97b, 1-1 d,#fffdeb, 2-49 #293f35,#fffdeb, 50-50 d,#9da97b, 51-51 d,#fffdeb, 52-99 #293f35,#fffdeb,
-|17: 0-1 #000000,#99b6a3, 2-49 #3d6055,#e4f0ed, 50-50 d,#9da97b, 51-51 d,#fffdeb, 52-99 #293f35,#fffdeb,
-|18: 0-0 d,#9da97b, 1-1 d,#fffdeb, 2-49 #293f35,#fffdeb, 50-50 d,#9da97b, 51-51 d,#fffdeb, 52-99 #293f35,#fffdeb,
-|19: 0-0 d,#9da97b, 1-1 d,#fffdeb, 2-49 #293f35,#fffdeb, 50-50 d,#9da97b, 51-51 d,#fffdeb, 52-99 #293f35,#fffdeb,
-|20: 0-0 d,#9da97b, 1-49 d,#fffdeb, 50-50 d,#9da97b, 51-51 d,#fffdeb, 52-99 #293f35,#fffdeb,
-|21: 0-0 d,#9da97b, 1-1 d,#fffdeb, 2-49 #293f35,#fffdeb, 50-50 d,#9da97b, 51-51 d,#fffdeb, 52-99 #293f35,#fffdeb,
-|22: 0-0 d,#9da97b, 1-1 d,#fffdeb, 2-49 #293f35,#fffdeb, 50-50 d,#9da97b, 51-51 d,#fffdeb, 52-99 #293f35,#fffdeb,
-|23: 0-0 d,#9da97b, 1-1 d,#fffdeb, 2-49 #293f35,#fffdeb, 50-50 d,#9da97b, 51-51 d,#fffdeb, 52-99 #293f35,#fffdeb,
-|24: 0-0 d,#9da97b, 1-1 d,#fffdeb, 2-49 #293f35,#fffdeb, 50-50 d,#9da97b, 51-51 d,#fffdeb, 52-99 #293f35,#fffdeb,
-|25: 0-0 d,#9da97b, 1-1 d,#fffdeb, 2-49 #293f35,#fffdeb, 50-50 d,#9da97b, 51-51 d,#fffdeb, 52-99 #293f35,#fffdeb,
-|26: 0-0 d,#9da97b, 1-1 d,#fffdeb, 2-49 #293f35,#fffdeb, 50-50 d,#9da97b, 51-51 d,#fffdeb, 52-99 #293f35,#fffdeb,
-|27: 0-0 d,#9da97b, 1-1 d,#fffdeb, 2-49 #293f35,#fffdeb, 50-50 d,#9da97b, 51-51 d,#fffdeb, 52-99 #293f35,#fffdeb,
-|28: 0-0 d,#9da97b, 1-1 d,#fffdeb, 2-49 #293f35,#fffdeb, 50-50 d,#9da97b, 51-51 d,#fffdeb, 52-99 #293f35,#fffdeb,
-|29: 0-0 d,#9da97b, 1-1 d,#fffdeb, 2-49 #293f35,#fffdeb, 50-50 d,#9da97b, 51-51 d,#fffdeb, 52-99 #293f35,#fffdeb,
-|30: 0-0 d,#9da97b, 1-1 d,#fffdeb, 2-49 #293f35,#fffdeb, 50-50 d,#9da97b, 51-51 d,#fffdeb, 52-99 #293f35,#fffdeb,
-== snap colors-off grid=100x31 cursor=4,5
+|0: 0-1 d,#e4f0ed, 2-77 #3d6055,#e4f0ed, 78-86 #35492d,#edf2a5, 87-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-37 #653f6b,#bfdcce, 38-49 #35584d,#bfdcce, 50-51 #35584d,#95baa2, 52-78 #3d6055,#e4f0ed, 79-87 #6e4774,#e4f0ed, 88-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,
+|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,
+|8: 0-0 d,#9fae76, 1-49 d,#fffdeb, 50-50 d,#9fae76, 51-99 d,#fffdeb,
+|9: 0-0 d,#9fae76, 1-49 d,#fffdeb, 50-50 d,#9fae76, 51-99 d,#fffdeb,
+|10: 0-0 d,#9fae76, 1-49 d,#fffdeb, 50-50 d,#9fae76, 51-99 d,#fffdeb,
+|11: 0-0 d,#9fae76, 1-49 d,#fffdeb, 50-50 d,#9fae76, 51-99 d,#fffdeb,
+|12: 0-0 d,#9fae76, 1-49 d,#fffdeb, 50-50 d,#9fae76, 51-99 d,#fffdeb,
+|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-37 #6e4774,#e4f0ed, 38-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,
+|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,
+|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,
+|24: 0-0 d,#9fae76, 1-49 d,#fffdeb, 50-50 d,#9fae76, 51-99 d,#fffdeb,
+|25: 0-0 d,#9fae76, 1-49 d,#fffdeb, 50-50 d,#9fae76, 51-99 d,#fffdeb,
+|26: 0-0 d,#9fae76, 1-49 d,#fffdeb, 50-50 d,#9fae76, 51-99 d,#fffdeb,
+|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,
+== snap colors-off grid=100x31 cursor=4,6
+|4: ls Colors ls
== style colors-off grid=100x31
-|3: 0-0 d,#9da97b, 1-1 d,#fffdeb, 2-3 #293f35,#fffdeb, 4-49 d,#fffdeb, 50-50 d,#9da97b, 51-51 d,#fffdeb, 52-53 #293f35,#fffdeb, 54-99 d,#fffdeb,
-|4: 0-0 d,#9da97b, 1-1 d,#fffdeb, 2-6 #293f35,#fffdeb, 7-49 d,#fffdeb, 50-50 d,#9da97b, 51-51 d,#fffdeb, 52-56 #293f35,#fffdeb, 57-99 d,#fffdeb,
-|6: 0-0 d,#9da97b, 1-49 d,#fffdeb, 50-50 d,#9da97b, 51-99 d,#fffdeb,
-|7: 0-0 d,#9da97b, 1-49 d,#fffdeb, 50-50 d,#9da97b, 51-99 d,#fffdeb,
-|8: 0-0 d,#9da97b, 1-49 d,#fffdeb, 50-50 d,#9da97b, 51-99 d,#fffdeb,
-|9: 0-0 d,#9da97b, 1-49 d,#fffdeb, 50-50 d,#9da97b, 51-99 d,#fffdeb,
-|10: 0-0 d,#9da97b, 1-49 d,#fffdeb, 50-50 d,#9da97b, 51-99 d,#fffdeb,
-|11: 0-0 d,#9da97b, 1-49 d,#fffdeb, 50-50 d,#9da97b, 51-99 d,#fffdeb,
-|12: 0-0 d,#9da97b, 1-49 d,#fffdeb, 50-50 d,#9da97b, 51-99 d,#fffdeb,
-|13: 0-0 d,#9da97b, 1-49 d,#fffdeb, 50-50 d,#9da97b, 51-99 d,#fffdeb,
-|14: 0-0 d,#9da97b, 1-49 d,#fffdeb, 50-50 d,#9da97b, 51-99 d,#fffdeb,
-|15: 0-0 d,#9da97b, 1-49 d,#fffdeb, 50-50 d,#9da97b, 51-99 d,#fffdeb,
-|16: 0-0 d,#9da97b, 1-49 d,#fffdeb, 50-50 d,#9da97b, 51-99 d,#fffdeb,
-|17: 0-1 #000000,#99b6a3, 2-49 #3d6055,#e4f0ed, 50-50 d,#9da97b, 51-99 d,#fffdeb,
-|18: 0-0 d,#9da97b, 1-1 d,#fffdeb, 2-3 #293f35,#fffdeb, 4-49 d,#fffdeb, 50-50 d,#9da97b, 51-99 d,#fffdeb,
-|19: 0-0 d,#9da97b, 1-1 d,#fffdeb, 2-6 #293f35,#fffdeb, 7-49 d,#fffdeb, 50-50 d,#9da97b, 51-99 d,#fffdeb,
-|20: 0-0 d,#9da97b, 1-49 d,#fffdeb, 50-50 d,#9da97b, 51-99 d,#fffdeb,
-|21: 0-0 d,#9da97b, 1-49 d,#fffdeb, 50-50 d,#9da97b, 51-99 d,#fffdeb,
-|22: 0-0 d,#9da97b, 1-49 d,#fffdeb, 50-50 d,#9da97b, 51-99 d,#fffdeb,
-|23: 0-0 d,#9da97b, 1-49 d,#fffdeb, 50-50 d,#9da97b, 51-99 d,#fffdeb,
-|24: 0-0 d,#9da97b, 1-49 d,#fffdeb, 50-50 d,#9da97b, 51-99 d,#fffdeb,
-|25: 0-0 d,#9da97b, 1-49 d,#fffdeb, 50-50 d,#9da97b, 51-99 d,#fffdeb,
-|26: 0-0 d,#9da97b, 1-49 d,#fffdeb, 50-50 d,#9da97b, 51-99 d,#fffdeb,
-|27: 0-0 d,#9da97b, 1-49 d,#fffdeb, 50-50 d,#9da97b, 51-99 d,#fffdeb,
-|28: 0-0 d,#9da97b, 1-49 d,#fffdeb, 50-50 d,#9da97b, 51-99 d,#fffdeb,
-|29: 0-0 d,#9da97b, 1-49 d,#fffdeb, 50-50 d,#9da97b, 51-99 d,#fffdeb,
-|30: 0-0 d,#9da97b, 1-49 d,#fffdeb, 50-50 d,#9da97b, 51-99 d,#fffdeb,
-== snap forge grid=100x31 cursor=4,5
+|4: 0-0 d,#9fae76, 1-1 d,#fffdeb, 2-41 #293f35,#fffdeb, 42-42 #293f35,#e4f0ed, 43-49 #3d6055,#e4f0ed, 50-50 #3d6055,#9fae76, 51-51 #3d6055,#fffdeb, 52-99 #293f35,#fffdeb,
+== snap forge grid=100x31 cursor=4,6
+|4: ls NextColor ls
== style forge grid=100x31
-|0: 0-50 #c5c9d2,#22252b, 51-59 #e2eef4,#264f68, 60-70 #c5c9d2,#22252b, 71-99 d,#22252b,
-|1: 0-24 #d1d5de,#2d3440, 25-49 d,#2d3440, 50-74 #c5c9d2,#22252b, 75-99 d,#22252b,
-|2: 0-1 #000000,#a5c4ee, 2-49 #d1d5de,#2d3440, 50-51 #ffffff,#596577, 52-99 #c5c9d2,#22252b,
-|3: 0-0 d,#738092, 1-1 d,#0c0c0e, 2-49 #e5e5e5,#0c0c0e, 50-50 d,#738092, 51-51 d,#0c0c0e, 52-99 #e5e5e5,#0c0c0e,
-|4: 0-0 d,#738092, 1-1 d,#0c0c0e, 2-49 #e5e5e5,#0c0c0e, 50-50 d,#738092, 51-51 d,#0c0c0e, 52-99 #e5e5e5,#0c0c0e,
-|5: 0-0 d,#738092, 1-49 d,#0c0c0e, 50-50 d,#738092, 51-99 d,#0c0c0e,
-|6: 0-0 d,#738092, 1-1 d,#0c0c0e, 2-49 #e5e5e5,#0c0c0e, 50-50 d,#738092, 51-51 d,#0c0c0e, 52-99 #e5e5e5,#0c0c0e,
-|7: 0-0 d,#738092, 1-1 d,#0c0c0e, 2-49 #e5e5e5,#0c0c0e, 50-50 d,#738092, 51-51 d,#0c0c0e, 52-99 #e5e5e5,#0c0c0e,
-|8: 0-0 d,#738092, 1-1 d,#0c0c0e, 2-49 #e5e5e5,#0c0c0e, 50-50 d,#738092, 51-51 d,#0c0c0e, 52-99 #e5e5e5,#0c0c0e,
-|9: 0-0 d,#738092, 1-1 d,#0c0c0e, 2-49 #e5e5e5,#0c0c0e, 50-50 d,#738092, 51-51 d,#0c0c0e, 52-99 #e5e5e5,#0c0c0e,
-|10: 0-0 d,#738092, 1-1 d,#0c0c0e, 2-49 #e5e5e5,#0c0c0e, 50-50 d,#738092, 51-51 d,#0c0c0e, 52-99 #e5e5e5,#0c0c0e,
-|11: 0-0 d,#738092, 1-1 d,#0c0c0e, 2-49 #e5e5e5,#0c0c0e, 50-50 d,#738092, 51-51 d,#0c0c0e, 52-99 #e5e5e5,#0c0c0e,
-|12: 0-0 d,#738092, 1-1 d,#0c0c0e, 2-49 #e5e5e5,#0c0c0e, 50-50 d,#738092, 51-51 d,#0c0c0e, 52-99 #e5e5e5,#0c0c0e,
-|13: 0-0 d,#738092, 1-1 d,#0c0c0e, 2-49 #e5e5e5,#0c0c0e, 50-50 d,#738092, 51-51 d,#0c0c0e, 52-99 #e5e5e5,#0c0c0e,
-|14: 0-0 d,#738092, 1-1 d,#0c0c0e, 2-49 #e5e5e5,#0c0c0e, 50-50 d,#738092, 51-51 d,#0c0c0e, 52-99 #e5e5e5,#0c0c0e,
-|15: 0-0 d,#738092, 1-1 d,#0c0c0e, 2-49 #e5e5e5,#0c0c0e, 50-50 d,#738092, 51-51 d,#0c0c0e, 52-99 #e5e5e5,#0c0c0e,
-|16: 0-0 d,#738092, 1-1 d,#0c0c0e, 2-49 #e5e5e5,#0c0c0e, 50-50 d,#738092, 51-51 d,#0c0c0e, 52-99 #e5e5e5,#0c0c0e,
-|17: 0-1 #ffffff,#596577, 2-49 #c5c9d2,#22252b, 50-50 d,#738092, 51-51 d,#0c0c0e, 52-99 #e5e5e5,#0c0c0e,
-|18: 0-0 d,#738092, 1-1 d,#0c0c0e, 2-49 #e5e5e5,#0c0c0e, 50-50 d,#738092, 51-51 d,#0c0c0e, 52-99 #e5e5e5,#0c0c0e,
-|19: 0-0 d,#738092, 1-1 d,#0c0c0e, 2-49 #e5e5e5,#0c0c0e, 50-50 d,#738092, 51-51 d,#0c0c0e, 52-99 #e5e5e5,#0c0c0e,
-|20: 0-0 d,#738092, 1-49 d,#0c0c0e, 50-50 d,#738092, 51-51 d,#0c0c0e, 52-99 #e5e5e5,#0c0c0e,
-|21: 0-0 d,#738092, 1-1 d,#0c0c0e, 2-49 #e5e5e5,#0c0c0e, 50-50 d,#738092, 51-51 d,#0c0c0e, 52-99 #e5e5e5,#0c0c0e,
-|22: 0-0 d,#738092, 1-1 d,#0c0c0e, 2-49 #e5e5e5,#0c0c0e, 50-50 d,#738092, 51-51 d,#0c0c0e, 52-99 #e5e5e5,#0c0c0e,
-|23: 0-0 d,#738092, 1-1 d,#0c0c0e, 2-49 #e5e5e5,#0c0c0e, 50-50 d,#738092, 51-51 d,#0c0c0e, 52-99 #e5e5e5,#0c0c0e,
-|24: 0-0 d,#738092, 1-1 d,#0c0c0e, 2-49 #e5e5e5,#0c0c0e, 50-50 d,#738092, 51-51 d,#0c0c0e, 52-99 #e5e5e5,#0c0c0e,
-|25: 0-0 d,#738092, 1-1 d,#0c0c0e, 2-49 #e5e5e5,#0c0c0e, 50-50 d,#738092, 51-51 d,#0c0c0e, 52-99 #e5e5e5,#0c0c0e,
-|26: 0-0 d,#738092, 1-1 d,#0c0c0e, 2-49 #e5e5e5,#0c0c0e, 50-50 d,#738092, 51-51 d,#0c0c0e, 52-99 #e5e5e5,#0c0c0e,
-|27: 0-0 d,#738092, 1-1 d,#0c0c0e, 2-49 #e5e5e5,#0c0c0e, 50-50 d,#738092, 51-51 d,#0c0c0e, 52-99 #e5e5e5,#0c0c0e,
-|28: 0-0 d,#738092, 1-1 d,#0c0c0e, 2-49 #e5e5e5,#0c0c0e, 50-50 d,#738092, 51-51 d,#0c0c0e, 52-99 #e5e5e5,#0c0c0e,
-|29: 0-0 d,#738092, 1-1 d,#0c0c0e, 2-49 #e5e5e5,#0c0c0e, 50-50 d,#738092, 51-51 d,#0c0c0e, 52-99 #e5e5e5,#0c0c0e,
-|30: 0-0 d,#738092, 1-1 d,#0c0c0e, 2-49 #e5e5e5,#0c0c0e, 50-50 d,#738092, 51-51 d,#0c0c0e, 52-99 #e5e5e5,#0c0c0e,
-== snap lagoon grid=100x31 cursor=4,5
+|0: 0-1 d,#22252b, 2-77 #c5c9d2,#22252b, 78-86 #e2eef4,#1c5172, 87-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-37 #f8cba7,#374253, 38-49 #d1d5de,#374253, 50-51 #d1d5de,#55647b, 52-78 #c5c9d2,#22252b, 79-87 #ecbf9b,#22252b, 88-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,
+|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,
+|8: 0-0 d,#708095, 1-49 d,#0c0c0e, 50-50 d,#708095, 51-99 d,#0c0c0e,
+|9: 0-0 d,#708095, 1-49 d,#0c0c0e, 50-50 d,#708095, 51-99 d,#0c0c0e,
+|10: 0-0 d,#708095, 1-49 d,#0c0c0e, 50-50 d,#708095, 51-99 d,#0c0c0e,
+|11: 0-0 d,#708095, 1-49 d,#0c0c0e, 50-50 d,#708095, 51-99 d,#0c0c0e,
+|12: 0-0 d,#708095, 1-49 d,#0c0c0e, 50-50 d,#708095, 51-99 d,#0c0c0e,
+|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-37 #ecbf9b,#22252b, 38-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,
+|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,
+|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,
+|24: 0-0 d,#708095, 1-49 d,#0c0c0e, 50-50 d,#708095, 51-99 d,#0c0c0e,
+|25: 0-0 d,#708095, 1-49 d,#0c0c0e, 50-50 d,#708095, 51-99 d,#0c0c0e,
+|26: 0-0 d,#708095, 1-49 d,#0c0c0e, 50-50 d,#708095, 51-99 d,#0c0c0e,
+|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,
+== snap lagoon grid=100x31 cursor=4,6
== style lagoon grid=100x31
-|0: 0-50 #bbd7cb,#29443f, 51-59 #e6f2f3,#395b65, 60-70 #bbd7cb,#29443f, 71-99 d,#29443f,
-|1: 0-24 #c7e3d7,#34574d, 25-49 d,#34574d, 50-74 #bbd7cb,#29443f, 75-99 d,#29443f,
-|2: 0-1 #000000,#89c7b4, 2-49 #c7e3d7,#34574d, 50-51 #ffffff,#597e71, 52-99 #bbd7cb,#29443f,
-|3: 0-0 d,#72978a, 1-1 d,#34464c, 2-49 #bac9ce,#34464c, 50-50 d,#72978a, 51-51 d,#34464c, 52-99 #bac9ce,#34464c,
-|4: 0-0 d,#72978a, 1-1 d,#34464c, 2-49 #bac9ce,#34464c, 50-50 d,#72978a, 51-51 d,#34464c, 52-99 #bac9ce,#34464c,
-|5: 0-0 d,#72978a, 1-49 d,#34464c, 50-50 d,#72978a, 51-99 d,#34464c,
-|6: 0-0 d,#72978a, 1-1 d,#34464c, 2-49 #bac9ce,#34464c, 50-50 d,#72978a, 51-51 d,#34464c, 52-99 #bac9ce,#34464c,
-|7: 0-0 d,#72978a, 1-1 d,#34464c, 2-49 #bac9ce,#34464c, 50-50 d,#72978a, 51-51 d,#34464c, 52-99 #bac9ce,#34464c,
-|8: 0-0 d,#72978a, 1-1 d,#34464c, 2-49 #bac9ce,#34464c, 50-50 d,#72978a, 51-51 d,#34464c, 52-99 #bac9ce,#34464c,
-|9: 0-0 d,#72978a, 1-1 d,#34464c, 2-49 #bac9ce,#34464c, 50-50 d,#72978a, 51-51 d,#34464c, 52-99 #bac9ce,#34464c,
-|10: 0-0 d,#72978a, 1-1 d,#34464c, 2-49 #bac9ce,#34464c, 50-50 d,#72978a, 51-51 d,#34464c, 52-99 #bac9ce,#34464c,
-|11: 0-0 d,#72978a, 1-1 d,#34464c, 2-49 #bac9ce,#34464c, 50-50 d,#72978a, 51-51 d,#34464c, 52-99 #bac9ce,#34464c,
-|12: 0-0 d,#72978a, 1-1 d,#34464c, 2-49 #bac9ce,#34464c, 50-50 d,#72978a, 51-51 d,#34464c, 52-99 #bac9ce,#34464c,
-|13: 0-0 d,#72978a, 1-1 d,#34464c, 2-49 #bac9ce,#34464c, 50-50 d,#72978a, 51-51 d,#34464c, 52-99 #bac9ce,#34464c,
-|14: 0-0 d,#72978a, 1-1 d,#34464c, 2-49 #bac9ce,#34464c, 50-50 d,#72978a, 51-51 d,#34464c, 52-99 #bac9ce,#34464c,
-|15: 0-0 d,#72978a, 1-1 d,#34464c, 2-49 #bac9ce,#34464c, 50-50 d,#72978a, 51-51 d,#34464c, 52-99 #bac9ce,#34464c,
-|16: 0-0 d,#72978a, 1-1 d,#34464c, 2-49 #bac9ce,#34464c, 50-50 d,#72978a, 51-51 d,#34464c, 52-99 #bac9ce,#34464c,
-|17: 0-1 #ffffff,#597e71, 2-49 #bbd7cb,#29443f, 50-50 d,#72978a, 51-51 d,#34464c, 52-99 #bac9ce,#34464c,
-|18: 0-0 d,#72978a, 1-1 d,#34464c, 2-49 #bac9ce,#34464c, 50-50 d,#72978a, 51-51 d,#34464c, 52-99 #bac9ce,#34464c,
-|19: 0-0 d,#72978a, 1-1 d,#34464c, 2-49 #bac9ce,#34464c, 50-50 d,#72978a, 51-51 d,#34464c, 52-99 #bac9ce,#34464c,
-|20: 0-0 d,#72978a, 1-49 d,#34464c, 50-50 d,#72978a, 51-51 d,#34464c, 52-99 #bac9ce,#34464c,
-|21: 0-0 d,#72978a, 1-1 d,#34464c, 2-49 #bac9ce,#34464c, 50-50 d,#72978a, 51-51 d,#34464c, 52-99 #bac9ce,#34464c,
-|22: 0-0 d,#72978a, 1-1 d,#34464c, 2-49 #bac9ce,#34464c, 50-50 d,#72978a, 51-51 d,#34464c, 52-99 #bac9ce,#34464c,
-|23: 0-0 d,#72978a, 1-1 d,#34464c, 2-49 #bac9ce,#34464c, 50-50 d,#72978a, 51-51 d,#34464c, 52-99 #bac9ce,#34464c,
-|24: 0-0 d,#72978a, 1-1 d,#34464c, 2-49 #bac9ce,#34464c, 50-50 d,#72978a, 51-51 d,#34464c, 52-99 #bac9ce,#34464c,
-|25: 0-0 d,#72978a, 1-1 d,#34464c, 2-49 #bac9ce,#34464c, 50-50 d,#72978a, 51-51 d,#34464c, 52-99 #bac9ce,#34464c,
-|26: 0-0 d,#72978a, 1-1 d,#34464c, 2-49 #bac9ce,#34464c, 50-50 d,#72978a, 51-51 d,#34464c, 52-99 #bac9ce,#34464c,
-|27: 0-0 d,#72978a, 1-1 d,#34464c, 2-49 #bac9ce,#34464c, 50-50 d,#72978a, 51-51 d,#34464c, 52-99 #bac9ce,#34464c,
-|28: 0-0 d,#72978a, 1-1 d,#34464c, 2-49 #bac9ce,#34464c, 50-50 d,#72978a, 51-51 d,#34464c, 52-99 #bac9ce,#34464c,
-|29: 0-0 d,#72978a, 1-1 d,#34464c, 2-49 #bac9ce,#34464c, 50-50 d,#72978a, 51-51 d,#34464c, 52-99 #bac9ce,#34464c,
-|30: 0-0 d,#72978a, 1-1 d,#34464c, 2-49 #bac9ce,#34464c, 50-50 d,#72978a, 51-51 d,#34464c, 52-99 #bac9ce,#34464c,
-== snap solarium grid=100x31 cursor=4,5
+|0: 0-1 d,#29443f, 2-77 #bbd7cb,#29443f, 78-86 #e6f2f3,#325f6c, 87-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-37 #f0cef8,#3a6154, 38-49 #c7e3d7,#3a6154, 50-51 #c7e3d7,#548372, 52-78 #bbd7cb,#29443f, 79-87 #e4c2ec,#29443f, 88-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,
+|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,
+|8: 0-0 d,#6e9b8b, 1-49 d,#34464c, 50-50 d,#6e9b8b, 51-99 d,#34464c,
+|9: 0-0 d,#6e9b8b, 1-49 d,#34464c, 50-50 d,#6e9b8b, 51-99 d,#34464c,
+|10: 0-0 d,#6e9b8b, 1-49 d,#34464c, 50-50 d,#6e9b8b, 51-99 d,#34464c,
+|11: 0-0 d,#6e9b8b, 1-49 d,#34464c, 50-50 d,#6e9b8b, 51-99 d,#34464c,
+|12: 0-0 d,#6e9b8b, 1-49 d,#34464c, 50-50 d,#6e9b8b, 51-99 d,#34464c,
+|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-37 #e4c2ec,#29443f, 38-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,
+|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,
+|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,
+|24: 0-0 d,#6e9b8b, 1-49 d,#34464c, 50-50 d,#6e9b8b, 51-99 d,#34464c,
+|25: 0-0 d,#6e9b8b, 1-49 d,#34464c, 50-50 d,#6e9b8b, 51-99 d,#34464c,
+|26: 0-0 d,#6e9b8b, 1-49 d,#34464c, 50-50 d,#6e9b8b, 51-99 d,#34464c,
+|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,
+== snap solarium grid=100x31 cursor=4,6
== style solarium grid=100x31
-|0: 0-50 #c7d4bd,#123f43, 51-59 #eee8d5,#27565c, 60-70 #c7d4bd,#123f43, 71-99 d,#123f43,
-|1: 0-24 #d3e0c9,#214e50, 25-49 d,#214e50, 50-74 #c7d4bd,#123f43, 75-99 d,#123f43,
-|2: 0-1 #000000,#d5bc72, 2-49 #d3e0c9,#214e50, 50-51 #ffffff,#4c7972, 52-99 #c7d4bd,#123f43,
-|3: 0-0 d,#69938a, 1-1 d,#173e45, 2-49 #a7b7ae,#173e45, 50-50 d,#69938a, 51-51 d,#173e45, 52-99 #a7b7ae,#173e45,
-|4: 0-0 d,#69938a, 1-1 d,#173e45, 2-49 #a7b7ae,#173e45, 50-50 d,#69938a, 51-51 d,#173e45, 52-99 #a7b7ae,#173e45,
-|5: 0-0 d,#69938a, 1-49 d,#173e45, 50-50 d,#69938a, 51-99 d,#173e45,
-|6: 0-0 d,#69938a, 1-1 d,#173e45, 2-49 #a7b7ae,#173e45, 50-50 d,#69938a, 51-51 d,#173e45, 52-99 #a7b7ae,#173e45,
-|7: 0-0 d,#69938a, 1-1 d,#173e45, 2-49 #a7b7ae,#173e45, 50-50 d,#69938a, 51-51 d,#173e45, 52-99 #a7b7ae,#173e45,
-|8: 0-0 d,#69938a, 1-1 d,#173e45, 2-49 #a7b7ae,#173e45, 50-50 d,#69938a, 51-51 d,#173e45, 52-99 #a7b7ae,#173e45,
-|9: 0-0 d,#69938a, 1-1 d,#173e45, 2-49 #a7b7ae,#173e45, 50-50 d,#69938a, 51-51 d,#173e45, 52-99 #a7b7ae,#173e45,
-|10: 0-0 d,#69938a, 1-1 d,#173e45, 2-49 #a7b7ae,#173e45, 50-50 d,#69938a, 51-51 d,#173e45, 52-99 #a7b7ae,#173e45,
-|11: 0-0 d,#69938a, 1-1 d,#173e45, 2-49 #a7b7ae,#173e45, 50-50 d,#69938a, 51-51 d,#173e45, 52-99 #a7b7ae,#173e45,
-|12: 0-0 d,#69938a, 1-1 d,#173e45, 2-49 #a7b7ae,#173e45, 50-50 d,#69938a, 51-51 d,#173e45, 52-99 #a7b7ae,#173e45,
-|13: 0-0 d,#69938a, 1-1 d,#173e45, 2-49 #a7b7ae,#173e45, 50-50 d,#69938a, 51-51 d,#173e45, 52-99 #a7b7ae,#173e45,
-|14: 0-0 d,#69938a, 1-1 d,#173e45, 2-49 #a7b7ae,#173e45, 50-50 d,#69938a, 51-51 d,#173e45, 52-99 #a7b7ae,#173e45,
-|15: 0-0 d,#69938a, 1-1 d,#173e45, 2-49 #a7b7ae,#173e45, 50-50 d,#69938a, 51-51 d,#173e45, 52-99 #a7b7ae,#173e45,
-|16: 0-0 d,#69938a, 1-1 d,#173e45, 2-49 #a7b7ae,#173e45, 50-50 d,#69938a, 51-51 d,#173e45, 52-99 #a7b7ae,#173e45,
-|17: 0-1 #ffffff,#4c7972, 2-49 #c7d4bd,#123f43, 50-50 d,#69938a, 51-51 d,#173e45, 52-99 #a7b7ae,#173e45,
-|18: 0-0 d,#69938a, 1-1 d,#173e45, 2-49 #a7b7ae,#173e45, 50-50 d,#69938a, 51-51 d,#173e45, 52-99 #a7b7ae,#173e45,
-|19: 0-0 d,#69938a, 1-1 d,#173e45, 2-49 #a7b7ae,#173e45, 50-50 d,#69938a, 51-51 d,#173e45, 52-99 #a7b7ae,#173e45,
-|20: 0-0 d,#69938a, 1-49 d,#173e45, 50-50 d,#69938a, 51-51 d,#173e45, 52-99 #a7b7ae,#173e45,
-|21: 0-0 d,#69938a, 1-1 d,#173e45, 2-49 #a7b7ae,#173e45, 50-50 d,#69938a, 51-51 d,#173e45, 52-99 #a7b7ae,#173e45,
-|22: 0-0 d,#69938a, 1-1 d,#173e45, 2-49 #a7b7ae,#173e45, 50-50 d,#69938a, 51-51 d,#173e45, 52-99 #a7b7ae,#173e45,
-|23: 0-0 d,#69938a, 1-1 d,#173e45, 2-49 #a7b7ae,#173e45, 50-50 d,#69938a, 51-51 d,#173e45, 52-99 #a7b7ae,#173e45,
-|24: 0-0 d,#69938a, 1-1 d,#173e45, 2-49 #a7b7ae,#173e45, 50-50 d,#69938a, 51-51 d,#173e45, 52-99 #a7b7ae,#173e45,
-|25: 0-0 d,#69938a, 1-1 d,#173e45, 2-49 #a7b7ae,#173e45, 50-50 d,#69938a, 51-51 d,#173e45, 52-99 #a7b7ae,#173e45,
-|26: 0-0 d,#69938a, 1-1 d,#173e45, 2-49 #a7b7ae,#173e45, 50-50 d,#69938a, 51-51 d,#173e45, 52-99 #a7b7ae,#173e45,
-|27: 0-0 d,#69938a, 1-1 d,#173e45, 2-49 #a7b7ae,#173e45, 50-50 d,#69938a, 51-51 d,#173e45, 52-99 #a7b7ae,#173e45,
-|28: 0-0 d,#69938a, 1-1 d,#173e45, 2-49 #a7b7ae,#173e45, 50-50 d,#69938a, 51-51 d,#173e45, 52-99 #a7b7ae,#173e45,
-|29: 0-0 d,#69938a, 1-1 d,#173e45, 2-49 #a7b7ae,#173e45, 50-50 d,#69938a, 51-51 d,#173e45, 52-99 #a7b7ae,#173e45,
-|30: 0-0 d,#69938a, 1-1 d,#173e45, 2-49 #a7b7ae,#173e45, 50-50 d,#69938a, 51-51 d,#173e45, 52-99 #a7b7ae,#173e45,
-== snap spectrum grid=100x31 cursor=4,5
+|0: 0-1 d,#123f43, 2-77 #c7d4bd,#123f43, 78-86 #eee8d5,#1f5c64, 87-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-37 #f5cdec,#2f5c5c, 38-49 #d3e0c9,#2f5c5c, 50-51 #d3e0c9,#467f76, 52-78 #c7d4bd,#123f43, 79-87 #e9c1e0,#123f43, 88-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,
+|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,
+|8: 0-0 d,#65978c, 1-49 d,#173e45, 50-50 d,#65978c, 51-99 d,#173e45,
+|9: 0-0 d,#65978c, 1-49 d,#173e45, 50-50 d,#65978c, 51-99 d,#173e45,
+|10: 0-0 d,#65978c, 1-49 d,#173e45, 50-50 d,#65978c, 51-99 d,#173e45,
+|11: 0-0 d,#65978c, 1-49 d,#173e45, 50-50 d,#65978c, 51-99 d,#173e45,
+|12: 0-0 d,#65978c, 1-49 d,#173e45, 50-50 d,#65978c, 51-99 d,#173e45,
+|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-37 #e9c1e0,#123f43, 38-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,
+|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,
+|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,
+|24: 0-0 d,#65978c, 1-49 d,#173e45, 50-50 d,#65978c, 51-99 d,#173e45,
+|25: 0-0 d,#65978c, 1-49 d,#173e45, 50-50 d,#65978c, 51-99 d,#173e45,
+|26: 0-0 d,#65978c, 1-49 d,#173e45, 50-50 d,#65978c, 51-99 d,#173e45,
+|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,
+== snap spectrum grid=100x31 cursor=4,6
== style spectrum grid=100x31
-|0: 0-50 #ddd8bb,#3b3830, 51-59 #fcfcfa,#51435c, 60-70 #ddd8bb,#3b3830, 71-99 d,#3b3830,
-|1: 0-24 #e9e4c7,#4d4736, 25-49 d,#4d4736, 50-74 #ddd8bb,#3b3830, 75-99 d,#3b3830,
-|2: 0-1 #000000,#ffd866, 2-49 #e9e4c7,#4d4736, 50-51 #ffffff,#8b8056, 52-99 #ddd8bb,#3b3830,
-|3: 0-0 d,#918b72, 1-1 d,#100e11, 2-49 #fcfcfa,#100e11, 50-50 d,#918b72, 51-51 d,#100e11, 52-99 #fcfcfa,#100e11,
-|4: 0-0 d,#918b72, 1-1 d,#100e11, 2-49 #fcfcfa,#100e11, 50-50 d,#918b72, 51-51 d,#100e11, 52-99 #fcfcfa,#100e11,
-|5: 0-0 d,#918b72, 1-49 d,#100e11, 50-50 d,#918b72, 51-99 d,#100e11,
-|6: 0-0 d,#918b72, 1-1 d,#100e11, 2-49 #fcfcfa,#100e11, 50-50 d,#918b72, 51-51 d,#100e11, 52-99 #fcfcfa,#100e11,
-|7: 0-0 d,#918b72, 1-1 d,#100e11, 2-49 #fcfcfa,#100e11, 50-50 d,#918b72, 51-51 d,#100e11, 52-99 #fcfcfa,#100e11,
-|8: 0-0 d,#918b72, 1-1 d,#100e11, 2-49 #fcfcfa,#100e11, 50-50 d,#918b72, 51-51 d,#100e11, 52-99 #fcfcfa,#100e11,
-|9: 0-0 d,#918b72, 1-1 d,#100e11, 2-49 #fcfcfa,#100e11, 50-50 d,#918b72, 51-51 d,#100e11, 52-99 #fcfcfa,#100e11,
-|10: 0-0 d,#918b72, 1-1 d,#100e11, 2-49 #fcfcfa,#100e11, 50-50 d,#918b72, 51-51 d,#100e11, 52-99 #fcfcfa,#100e11,
-|11: 0-0 d,#918b72, 1-1 d,#100e11, 2-49 #fcfcfa,#100e11, 50-50 d,#918b72, 51-51 d,#100e11, 52-99 #fcfcfa,#100e11,
-|12: 0-0 d,#918b72, 1-1 d,#100e11, 2-49 #fcfcfa,#100e11, 50-50 d,#918b72, 51-51 d,#100e11, 52-99 #fcfcfa,#100e11,
-|13: 0-0 d,#918b72, 1-1 d,#100e11, 2-49 #fcfcfa,#100e11, 50-50 d,#918b72, 51-51 d,#100e11, 52-99 #fcfcfa,#100e11,
-|14: 0-0 d,#918b72, 1-1 d,#100e11, 2-49 #fcfcfa,#100e11, 50-50 d,#918b72, 51-51 d,#100e11, 52-99 #fcfcfa,#100e11,
-|15: 0-0 d,#918b72, 1-1 d,#100e11, 2-49 #fcfcfa,#100e11, 50-50 d,#918b72, 51-51 d,#100e11, 52-99 #fcfcfa,#100e11,
-|16: 0-0 d,#918b72, 1-1 d,#100e11, 2-49 #fcfcfa,#100e11, 50-50 d,#918b72, 51-51 d,#100e11, 52-99 #fcfcfa,#100e11,
-|17: 0-1 #ffffff,#8b8056, 2-49 #ddd8bb,#3b3830, 50-50 d,#918b72, 51-51 d,#100e11, 52-99 #fcfcfa,#100e11,
-|18: 0-0 d,#918b72, 1-1 d,#100e11, 2-49 #fcfcfa,#100e11, 50-50 d,#918b72, 51-51 d,#100e11, 52-99 #fcfcfa,#100e11,
-|19: 0-0 d,#918b72, 1-1 d,#100e11, 2-49 #fcfcfa,#100e11, 50-50 d,#918b72, 51-51 d,#100e11, 52-99 #fcfcfa,#100e11,
-|20: 0-0 d,#918b72, 1-49 d,#100e11, 50-50 d,#918b72, 51-51 d,#100e11, 52-99 #fcfcfa,#100e11,
-|21: 0-0 d,#918b72, 1-1 d,#100e11, 2-49 #fcfcfa,#100e11, 50-50 d,#918b72, 51-51 d,#100e11, 52-99 #fcfcfa,#100e11,
-|22: 0-0 d,#918b72, 1-1 d,#100e11, 2-49 #fcfcfa,#100e11, 50-50 d,#918b72, 51-51 d,#100e11, 52-99 #fcfcfa,#100e11,
-|23: 0-0 d,#918b72, 1-1 d,#100e11, 2-49 #fcfcfa,#100e11, 50-50 d,#918b72, 51-51 d,#100e11, 52-99 #fcfcfa,#100e11,
-|24: 0-0 d,#918b72, 1-1 d,#100e11, 2-49 #fcfcfa,#100e11, 50-50 d,#918b72, 51-51 d,#100e11, 52-99 #fcfcfa,#100e11,
-|25: 0-0 d,#918b72, 1-1 d,#100e11, 2-49 #fcfcfa,#100e11, 50-50 d,#918b72, 51-51 d,#100e11, 52-99 #fcfcfa,#100e11,
-|26: 0-0 d,#918b72, 1-1 d,#100e11, 2-49 #fcfcfa,#100e11, 50-50 d,#918b72, 51-51 d,#100e11, 52-99 #fcfcfa,#100e11,
-|27: 0-0 d,#918b72, 1-1 d,#100e11, 2-49 #fcfcfa,#100e11, 50-50 d,#918b72, 51-51 d,#100e11, 52-99 #fcfcfa,#100e11,
-|28: 0-0 d,#918b72, 1-1 d,#100e11, 2-49 #fcfcfa,#100e11, 50-50 d,#918b72, 51-51 d,#100e11, 52-99 #fcfcfa,#100e11,
-|29: 0-0 d,#918b72, 1-1 d,#100e11, 2-49 #fcfcfa,#100e11, 50-50 d,#918b72, 51-51 d,#100e11, 52-99 #fcfcfa,#100e11,
-|30: 0-0 d,#918b72, 1-1 d,#100e11, 2-49 #fcfcfa,#100e11, 50-50 d,#918b72, 51-51 d,#100e11, 52-99 #fcfcfa,#100e11,
-== snap harvest grid=100x31 cursor=4,5
+|0: 0-1 d,#3b3830, 2-77 #ddd8bb,#3b3830, 78-86 #fcfcfa,#513f60, 87-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-37 #d7e3ff,#5a523a, 38-49 #e9e4c7,#5a523a, 50-51 #e9e4c7,#92844f, 52-78 #ddd8bb,#3b3830, 79-87 #c5d7ff,#3b3830, 88-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,
+|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,
+|8: 0-0 d,#948d6f, 1-49 d,#100e11, 50-50 d,#948d6f, 51-99 d,#100e11,
+|9: 0-0 d,#948d6f, 1-49 d,#100e11, 50-50 d,#948d6f, 51-99 d,#100e11,
+|10: 0-0 d,#948d6f, 1-49 d,#100e11, 50-50 d,#948d6f, 51-99 d,#100e11,
+|11: 0-0 d,#948d6f, 1-49 d,#100e11, 50-50 d,#948d6f, 51-99 d,#100e11,
+|12: 0-0 d,#948d6f, 1-49 d,#100e11, 50-50 d,#948d6f, 51-99 d,#100e11,
+|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-37 #c5d7ff,#3b3830, 38-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,
+|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,
+|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,
+|24: 0-0 d,#948d6f, 1-49 d,#100e11, 50-50 d,#948d6f, 51-99 d,#100e11,
+|25: 0-0 d,#948d6f, 1-49 d,#100e11, 50-50 d,#948d6f, 51-99 d,#100e11,
+|26: 0-0 d,#948d6f, 1-49 d,#100e11, 50-50 d,#948d6f, 51-99 d,#100e11,
+|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,
+== snap harvest grid=100x31 cursor=4,6
== style harvest grid=100x31
-|0: 0-50 #d5d8b8,#343b2e, 51-59 #f3f2cc,#4d5438, 60-70 #d5d8b8,#343b2e, 71-99 d,#343b2e,
-|1: 0-24 #e1e4c4,#424d38, 25-49 d,#424d38, 50-74 #d5d8b8,#343b2e, 75-99 d,#343b2e,
-|2: 0-1 #000000,#cfba8b, 2-49 #e1e4c4,#424d38, 50-51 #ffffff,#777953, 52-99 #d5d8b8,#343b2e,
-|3: 0-0 d,#858a62, 1-1 d,#100e0b, 2-49 #f3f2cc,#100e0b, 50-50 d,#858a62, 51-51 d,#100e0b, 52-99 #f3f2cc,#100e0b,
-|4: 0-0 d,#858a62, 1-1 d,#100e0b, 2-49 #f3f2cc,#100e0b, 50-50 d,#858a62, 51-51 d,#100e0b, 52-99 #f3f2cc,#100e0b,
-|5: 0-0 d,#858a62, 1-49 d,#100e0b, 50-50 d,#858a62, 51-99 d,#100e0b,
-|6: 0-0 d,#858a62, 1-1 d,#100e0b, 2-49 #f3f2cc,#100e0b, 50-50 d,#858a62, 51-51 d,#100e0b, 52-99 #f3f2cc,#100e0b,
-|7: 0-0 d,#858a62, 1-1 d,#100e0b, 2-49 #f3f2cc,#100e0b, 50-50 d,#858a62, 51-51 d,#100e0b, 52-99 #f3f2cc,#100e0b,
-|8: 0-0 d,#858a62, 1-1 d,#100e0b, 2-49 #f3f2cc,#100e0b, 50-50 d,#858a62, 51-51 d,#100e0b, 52-99 #f3f2cc,#100e0b,
-|9: 0-0 d,#858a62, 1-1 d,#100e0b, 2-49 #f3f2cc,#100e0b, 50-50 d,#858a62, 51-51 d,#100e0b, 52-99 #f3f2cc,#100e0b,
-|10: 0-0 d,#858a62, 1-1 d,#100e0b, 2-49 #f3f2cc,#100e0b, 50-50 d,#858a62, 51-51 d,#100e0b, 52-99 #f3f2cc,#100e0b,
-|11: 0-0 d,#858a62, 1-1 d,#100e0b, 2-49 #f3f2cc,#100e0b, 50-50 d,#858a62, 51-51 d,#100e0b, 52-99 #f3f2cc,#100e0b,
-|12: 0-0 d,#858a62, 1-1 d,#100e0b, 2-49 #f3f2cc,#100e0b, 50-50 d,#858a62, 51-51 d,#100e0b, 52-99 #f3f2cc,#100e0b,
-|13: 0-0 d,#858a62, 1-1 d,#100e0b, 2-49 #f3f2cc,#100e0b, 50-50 d,#858a62, 51-51 d,#100e0b, 52-99 #f3f2cc,#100e0b,
-|14: 0-0 d,#858a62, 1-1 d,#100e0b, 2-49 #f3f2cc,#100e0b, 50-50 d,#858a62, 51-51 d,#100e0b, 52-99 #f3f2cc,#100e0b,
-|15: 0-0 d,#858a62, 1-1 d,#100e0b, 2-49 #f3f2cc,#100e0b, 50-50 d,#858a62, 51-51 d,#100e0b, 52-99 #f3f2cc,#100e0b,
-|16: 0-0 d,#858a62, 1-1 d,#100e0b, 2-49 #f3f2cc,#100e0b, 50-50 d,#858a62, 51-51 d,#100e0b, 52-99 #f3f2cc,#100e0b,
-|17: 0-1 #ffffff,#777953, 2-49 #d5d8b8,#343b2e, 50-50 d,#858a62, 51-51 d,#100e0b, 52-99 #f3f2cc,#100e0b,
-|18: 0-0 d,#858a62, 1-1 d,#100e0b, 2-49 #f3f2cc,#100e0b, 50-50 d,#858a62, 51-51 d,#100e0b, 52-99 #f3f2cc,#100e0b,
-|19: 0-0 d,#858a62, 1-1 d,#100e0b, 2-49 #f3f2cc,#100e0b, 50-50 d,#858a62, 51-51 d,#100e0b, 52-99 #f3f2cc,#100e0b,
-|20: 0-0 d,#858a62, 1-49 d,#100e0b, 50-50 d,#858a62, 51-51 d,#100e0b, 52-99 #f3f2cc,#100e0b,
-|21: 0-0 d,#858a62, 1-1 d,#100e0b, 2-49 #f3f2cc,#100e0b, 50-50 d,#858a62, 51-51 d,#100e0b, 52-99 #f3f2cc,#100e0b,
-|22: 0-0 d,#858a62, 1-1 d,#100e0b, 2-49 #f3f2cc,#100e0b, 50-50 d,#858a62, 51-51 d,#100e0b, 52-99 #f3f2cc,#100e0b,
-|23: 0-0 d,#858a62, 1-1 d,#100e0b, 2-49 #f3f2cc,#100e0b, 50-50 d,#858a62, 51-51 d,#100e0b, 52-99 #f3f2cc,#100e0b,
-|24: 0-0 d,#858a62, 1-1 d,#100e0b, 2-49 #f3f2cc,#100e0b, 50-50 d,#858a62, 51-51 d,#100e0b, 52-99 #f3f2cc,#100e0b,
-|25: 0-0 d,#858a62, 1-1 d,#100e0b, 2-49 #f3f2cc,#100e0b, 50-50 d,#858a62, 51-51 d,#100e0b, 52-99 #f3f2cc,#100e0b,
-|26: 0-0 d,#858a62, 1-1 d,#100e0b, 2-49 #f3f2cc,#100e0b, 50-50 d,#858a62, 51-51 d,#100e0b, 52-99 #f3f2cc,#100e0b,
-|27: 0-0 d,#858a62, 1-1 d,#100e0b, 2-49 #f3f2cc,#100e0b, 50-50 d,#858a62, 51-51 d,#100e0b, 52-99 #f3f2cc,#100e0b,
-|28: 0-0 d,#858a62, 1-1 d,#100e0b, 2-49 #f3f2cc,#100e0b, 50-50 d,#858a62, 51-51 d,#100e0b, 52-99 #f3f2cc,#100e0b,
-|29: 0-0 d,#858a62, 1-1 d,#100e0b, 2-49 #f3f2cc,#100e0b, 50-50 d,#858a62, 51-51 d,#100e0b, 52-99 #f3f2cc,#100e0b,
-|30: 0-0 d,#858a62, 1-1 d,#100e0b, 2-49 #f3f2cc,#100e0b, 50-50 d,#858a62, 51-51 d,#100e0b, 52-99 #f3f2cc,#100e0b,
-== snap clay grid=100x31 cursor=4,5
+|0: 0-1 d,#343b2e, 2-77 #d5d8b8,#343b2e, 78-86 #f3f2cc,#4f5834, 87-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-37 #c5e7f7,#4a583e, 38-49 #e1e4c4,#4a583e, 50-51 #e1e4c4,#7b7e4e, 52-78 #d5d8b8,#343b2e, 79-87 #badbeb,#343b2e, 88-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,
+|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,
+|8: 0-0 d,#888e5e, 1-49 d,#100e0b, 50-50 d,#888e5e, 51-99 d,#100e0b,
+|9: 0-0 d,#888e5e, 1-49 d,#100e0b, 50-50 d,#888e5e, 51-99 d,#100e0b,
+|10: 0-0 d,#888e5e, 1-49 d,#100e0b, 50-50 d,#888e5e, 51-99 d,#100e0b,
+|11: 0-0 d,#888e5e, 1-49 d,#100e0b, 50-50 d,#888e5e, 51-99 d,#100e0b,
+|12: 0-0 d,#888e5e, 1-49 d,#100e0b, 50-50 d,#888e5e, 51-99 d,#100e0b,
+|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-37 #badbeb,#343b2e, 38-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,
+|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,
+|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,
+|24: 0-0 d,#888e5e, 1-49 d,#100e0b, 50-50 d,#888e5e, 51-99 d,#100e0b,
+|25: 0-0 d,#888e5e, 1-49 d,#100e0b, 50-50 d,#888e5e, 51-99 d,#100e0b,
+|26: 0-0 d,#888e5e, 1-49 d,#100e0b, 50-50 d,#888e5e, 51-99 d,#100e0b,
+|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,
+== snap clay grid=100x31 cursor=4,6
== style clay grid=100x31
-|0: 0-50 #d7d6b6,#343f36, 51-59 #fbf1c7,#4f583c, 60-70 #d7d6b6,#343f36, 71-99 d,#343f36,
-|1: 0-24 #e3e2c2,#424f40, 25-49 d,#424f40, 50-74 #d7d6b6,#343f36, 75-99 d,#343f36,
-|2: 0-1 #000000,#8ec07c, 2-49 #e3e2c2,#424f40, 50-51 #ffffff,#677752, 52-99 #d7d6b6,#343f36,
-|3: 0-0 d,#8a906b, 1-1 d,#10100e, 2-49 #f3e5bc,#10100e, 50-50 d,#8a906b, 51-51 d,#10100e, 52-99 #f3e5bc,#10100e,
-|4: 0-0 d,#8a906b, 1-1 d,#10100e, 2-49 #f3e5bc,#10100e, 50-50 d,#8a906b, 51-51 d,#10100e, 52-99 #f3e5bc,#10100e,
-|5: 0-0 d,#8a906b, 1-49 d,#10100e, 50-50 d,#8a906b, 51-99 d,#10100e,
-|6: 0-0 d,#8a906b, 1-1 d,#10100e, 2-49 #f3e5bc,#10100e, 50-50 d,#8a906b, 51-51 d,#10100e, 52-99 #f3e5bc,#10100e,
-|7: 0-0 d,#8a906b, 1-1 d,#10100e, 2-49 #f3e5bc,#10100e, 50-50 d,#8a906b, 51-51 d,#10100e, 52-99 #f3e5bc,#10100e,
-|8: 0-0 d,#8a906b, 1-1 d,#10100e, 2-49 #f3e5bc,#10100e, 50-50 d,#8a906b, 51-51 d,#10100e, 52-99 #f3e5bc,#10100e,
-|9: 0-0 d,#8a906b, 1-1 d,#10100e, 2-49 #f3e5bc,#10100e, 50-50 d,#8a906b, 51-51 d,#10100e, 52-99 #f3e5bc,#10100e,
-|10: 0-0 d,#8a906b, 1-1 d,#10100e, 2-49 #f3e5bc,#10100e, 50-50 d,#8a906b, 51-51 d,#10100e, 52-99 #f3e5bc,#10100e,
-|11: 0-0 d,#8a906b, 1-1 d,#10100e, 2-49 #f3e5bc,#10100e, 50-50 d,#8a906b, 51-51 d,#10100e, 52-99 #f3e5bc,#10100e,
-|12: 0-0 d,#8a906b, 1-1 d,#10100e, 2-49 #f3e5bc,#10100e, 50-50 d,#8a906b, 51-51 d,#10100e, 52-99 #f3e5bc,#10100e,
-|13: 0-0 d,#8a906b, 1-1 d,#10100e, 2-49 #f3e5bc,#10100e, 50-50 d,#8a906b, 51-51 d,#10100e, 52-99 #f3e5bc,#10100e,
-|14: 0-0 d,#8a906b, 1-1 d,#10100e, 2-49 #f3e5bc,#10100e, 50-50 d,#8a906b, 51-51 d,#10100e, 52-99 #f3e5bc,#10100e,
-|15: 0-0 d,#8a906b, 1-1 d,#10100e, 2-49 #f3e5bc,#10100e, 50-50 d,#8a906b, 51-51 d,#10100e, 52-99 #f3e5bc,#10100e,
-|16: 0-0 d,#8a906b, 1-1 d,#10100e, 2-49 #f3e5bc,#10100e, 50-50 d,#8a906b, 51-51 d,#10100e, 52-99 #f3e5bc,#10100e,
-|17: 0-1 #ffffff,#677752, 2-49 #d7d6b6,#343f36, 50-50 d,#8a906b, 51-51 d,#10100e, 52-99 #f3e5bc,#10100e,
-|18: 0-0 d,#8a906b, 1-1 d,#10100e, 2-49 #f3e5bc,#10100e, 50-50 d,#8a906b, 51-51 d,#10100e, 52-99 #f3e5bc,#10100e,
-|19: 0-0 d,#8a906b, 1-1 d,#10100e, 2-49 #f3e5bc,#10100e, 50-50 d,#8a906b, 51-51 d,#10100e, 52-99 #f3e5bc,#10100e,
-|20: 0-0 d,#8a906b, 1-49 d,#10100e, 50-50 d,#8a906b, 51-51 d,#10100e, 52-99 #f3e5bc,#10100e,
-|21: 0-0 d,#8a906b, 1-1 d,#10100e, 2-49 #f3e5bc,#10100e, 50-50 d,#8a906b, 51-51 d,#10100e, 52-99 #f3e5bc,#10100e,
-|22: 0-0 d,#8a906b, 1-1 d,#10100e, 2-49 #f3e5bc,#10100e, 50-50 d,#8a906b, 51-51 d,#10100e, 52-99 #f3e5bc,#10100e,
-|23: 0-0 d,#8a906b, 1-1 d,#10100e, 2-49 #f3e5bc,#10100e, 50-50 d,#8a906b, 51-51 d,#10100e, 52-99 #f3e5bc,#10100e,
-|24: 0-0 d,#8a906b, 1-1 d,#10100e, 2-49 #f3e5bc,#10100e, 50-50 d,#8a906b, 51-51 d,#10100e, 52-99 #f3e5bc,#10100e,
-|25: 0-0 d,#8a906b, 1-1 d,#10100e, 2-49 #f3e5bc,#10100e, 50-50 d,#8a906b, 51-51 d,#10100e, 52-99 #f3e5bc,#10100e,
-|26: 0-0 d,#8a906b, 1-1 d,#10100e, 2-49 #f3e5bc,#10100e, 50-50 d,#8a906b, 51-51 d,#10100e, 52-99 #f3e5bc,#10100e,
-|27: 0-0 d,#8a906b, 1-1 d,#10100e, 2-49 #f3e5bc,#10100e, 50-50 d,#8a906b, 51-51 d,#10100e, 52-99 #f3e5bc,#10100e,
-|28: 0-0 d,#8a906b, 1-1 d,#10100e, 2-49 #f3e5bc,#10100e, 50-50 d,#8a906b, 51-51 d,#10100e, 52-99 #f3e5bc,#10100e,
-|29: 0-0 d,#8a906b, 1-1 d,#10100e, 2-49 #f3e5bc,#10100e, 50-50 d,#8a906b, 51-51 d,#10100e, 52-99 #f3e5bc,#10100e,
-|30: 0-0 d,#8a906b, 1-1 d,#10100e, 2-49 #f3e5bc,#10100e, 50-50 d,#8a906b, 51-51 d,#10100e, 52-99 #f3e5bc,#10100e,
-== snap forge-black grid=100x31 cursor=4,5
+|0: 0-1 d,#343f36, 2-77 #d7d6b6,#343f36, 78-86 #fbf1c7,#505c38, 87-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-37 #b5ecec,#4d5c48, 38-49 #e3e2c2,#4d5c48, 50-51 #e3e2c2,#687c4d, 52-78 #d7d6b6,#343f36, 79-87 #aae0e0,#343f36, 88-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,
+|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,
+|8: 0-0 d,#8c9467, 1-49 d,#10100e, 50-50 d,#8c9467, 51-99 d,#10100e,
+|9: 0-0 d,#8c9467, 1-49 d,#10100e, 50-50 d,#8c9467, 51-99 d,#10100e,
+|10: 0-0 d,#8c9467, 1-49 d,#10100e, 50-50 d,#8c9467, 51-99 d,#10100e,
+|11: 0-0 d,#8c9467, 1-49 d,#10100e, 50-50 d,#8c9467, 51-99 d,#10100e,
+|12: 0-0 d,#8c9467, 1-49 d,#10100e, 50-50 d,#8c9467, 51-99 d,#10100e,
+|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-37 #aae0e0,#343f36, 38-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,
+|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,
+|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,
+|24: 0-0 d,#8c9467, 1-49 d,#10100e, 50-50 d,#8c9467, 51-99 d,#10100e,
+|25: 0-0 d,#8c9467, 1-49 d,#10100e, 50-50 d,#8c9467, 51-99 d,#10100e,
+|26: 0-0 d,#8c9467, 1-49 d,#10100e, 50-50 d,#8c9467, 51-99 d,#10100e,
+|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,
+== snap forge-black grid=100x31 cursor=4,6
== style forge-black grid=100x31
-|0: 0-50 #c5c9d2,#22252b, 51-59 #e2eef4,#264f68, 60-70 #c5c9d2,#22252b, 71-99 d,#22252b,
-|1: 0-24 #d1d5de,#2d3440, 25-49 d,#2d3440, 50-74 #c5c9d2,#22252b, 75-99 d,#22252b,
-|2: 0-1 #000000,#a5c4ee, 2-49 #d1d5de,#2d3440, 50-51 #ffffff,#596577, 52-99 #c5c9d2,#22252b,
-|3: 0-0 d,#738092, 1-1 d,#000000, 2-49 #f6f6f6,#000000, 50-50 d,#738092, 51-51 d,#000000, 52-99 #f6f6f6,#000000,
-|4: 0-0 d,#738092, 1-1 d,#000000, 2-49 #f6f6f6,#000000, 50-50 d,#738092, 51-51 d,#000000, 52-99 #f6f6f6,#000000,
-|5: 0-0 d,#738092, 1-49 d,#000000, 50-50 d,#738092, 51-99 d,#000000,
-|6: 0-0 d,#738092, 1-1 d,#000000, 2-49 #f6f6f6,#000000, 50-50 d,#738092, 51-51 d,#000000, 52-99 #f6f6f6,#000000,
-|7: 0-0 d,#738092, 1-1 d,#000000, 2-49 #f6f6f6,#000000, 50-50 d,#738092, 51-51 d,#000000, 52-99 #f6f6f6,#000000,
-|8: 0-0 d,#738092, 1-1 d,#000000, 2-49 #f6f6f6,#000000, 50-50 d,#738092, 51-51 d,#000000, 52-99 #f6f6f6,#000000,
-|9: 0-0 d,#738092, 1-1 d,#000000, 2-49 #f6f6f6,#000000, 50-50 d,#738092, 51-51 d,#000000, 52-99 #f6f6f6,#000000,
-|10: 0-0 d,#738092, 1-1 d,#000000, 2-49 #f6f6f6,#000000, 50-50 d,#738092, 51-51 d,#000000, 52-99 #f6f6f6,#000000,
-|11: 0-0 d,#738092, 1-1 d,#000000, 2-49 #f6f6f6,#000000, 50-50 d,#738092, 51-51 d,#000000, 52-99 #f6f6f6,#000000,
-|12: 0-0 d,#738092, 1-1 d,#000000, 2-49 #f6f6f6,#000000, 50-50 d,#738092, 51-51 d,#000000, 52-99 #f6f6f6,#000000,
-|13: 0-0 d,#738092, 1-1 d,#000000, 2-49 #f6f6f6,#000000, 50-50 d,#738092, 51-51 d,#000000, 52-99 #f6f6f6,#000000,
-|14: 0-0 d,#738092, 1-1 d,#000000, 2-49 #f6f6f6,#000000, 50-50 d,#738092, 51-51 d,#000000, 52-99 #f6f6f6,#000000,
-|15: 0-0 d,#738092, 1-1 d,#000000, 2-49 #f6f6f6,#000000, 50-50 d,#738092, 51-51 d,#000000, 52-99 #f6f6f6,#000000,
-|16: 0-0 d,#738092, 1-1 d,#000000, 2-49 #f6f6f6,#000000, 50-50 d,#738092, 51-51 d,#000000, 52-99 #f6f6f6,#000000,
-|17: 0-1 #ffffff,#596577, 2-49 #c5c9d2,#22252b, 50-50 d,#738092, 51-51 d,#000000, 52-99 #f6f6f6,#000000,
-|18: 0-0 d,#738092, 1-1 d,#000000, 2-49 #f6f6f6,#000000, 50-50 d,#738092, 51-51 d,#000000, 52-99 #f6f6f6,#000000,
-|19: 0-0 d,#738092, 1-1 d,#000000, 2-49 #f6f6f6,#000000, 50-50 d,#738092, 51-51 d,#000000, 52-99 #f6f6f6,#000000,
-|20: 0-0 d,#738092, 1-49 d,#000000, 50-50 d,#738092, 51-51 d,#000000, 52-99 #f6f6f6,#000000,
-|21: 0-0 d,#738092, 1-1 d,#000000, 2-49 #f6f6f6,#000000, 50-50 d,#738092, 51-51 d,#000000, 52-99 #f6f6f6,#000000,
-|22: 0-0 d,#738092, 1-1 d,#000000, 2-49 #f6f6f6,#000000, 50-50 d,#738092, 51-51 d,#000000, 52-99 #f6f6f6,#000000,
-|23: 0-0 d,#738092, 1-1 d,#000000, 2-49 #f6f6f6,#000000, 50-50 d,#738092, 51-51 d,#000000, 52-99 #f6f6f6,#000000,
-|24: 0-0 d,#738092, 1-1 d,#000000, 2-49 #f6f6f6,#000000, 50-50 d,#738092, 51-51 d,#000000, 52-99 #f6f6f6,#000000,
-|25: 0-0 d,#738092, 1-1 d,#000000, 2-49 #f6f6f6,#000000, 50-50 d,#738092, 51-51 d,#000000, 52-99 #f6f6f6,#000000,
-|26: 0-0 d,#738092, 1-1 d,#000000, 2-49 #f6f6f6,#000000, 50-50 d,#738092, 51-51 d,#000000, 52-99 #f6f6f6,#000000,
-|27: 0-0 d,#738092, 1-1 d,#000000, 2-49 #f6f6f6,#000000, 50-50 d,#738092, 51-51 d,#000000, 52-99 #f6f6f6,#000000,
-|28: 0-0 d,#738092, 1-1 d,#000000, 2-49 #f6f6f6,#000000, 50-50 d,#738092, 51-51 d,#000000, 52-99 #f6f6f6,#000000,
-|29: 0-0 d,#738092, 1-1 d,#000000, 2-49 #f6f6f6,#000000, 50-50 d,#738092, 51-51 d,#000000, 52-99 #f6f6f6,#000000,
-|30: 0-0 d,#738092, 1-1 d,#000000, 2-49 #f6f6f6,#000000, 50-50 d,#738092, 51-51 d,#000000, 52-99 #f6f6f6,#000000,
-== snap forge-soft grid=100x31 cursor=4,5
+|0: 0-1 d,#22252b, 2-77 #c5c9d2,#22252b, 78-86 #e2eef4,#1c5172, 87-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-37 #f8cba7,#374253, 38-49 #d1d5de,#374253, 50-51 #d1d5de,#55647b, 52-78 #c5c9d2,#22252b, 79-87 #ecbf9b,#22252b, 88-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,
+|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,
+|8: 0-0 d,#708095, 1-49 d,#000000, 50-50 d,#708095, 51-99 d,#000000,
+|9: 0-0 d,#708095, 1-49 d,#000000, 50-50 d,#708095, 51-99 d,#000000,
+|10: 0-0 d,#708095, 1-49 d,#000000, 50-50 d,#708095, 51-99 d,#000000,
+|11: 0-0 d,#708095, 1-49 d,#000000, 50-50 d,#708095, 51-99 d,#000000,
+|12: 0-0 d,#708095, 1-49 d,#000000, 50-50 d,#708095, 51-99 d,#000000,
+|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-37 #ecbf9b,#22252b, 38-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,
+|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,
+|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,
+|24: 0-0 d,#708095, 1-49 d,#000000, 50-50 d,#708095, 51-99 d,#000000,
+|25: 0-0 d,#708095, 1-49 d,#000000, 50-50 d,#708095, 51-99 d,#000000,
+|26: 0-0 d,#708095, 1-49 d,#000000, 50-50 d,#708095, 51-99 d,#000000,
+|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,
+== snap forge-soft grid=100x31 cursor=4,6
== style forge-soft grid=100x31
-|0: 0-50 #c5c9d2,#2a2d34, 51-59 #e2eef4,#264f68, 60-70 #c5c9d2,#2a2d34, 71-99 d,#2a2d34,
-|1: 0-24 #d1d5de,#373e49, 25-49 d,#373e49, 50-74 #c5c9d2,#2a2d34, 75-99 d,#2a2d34,
-|2: 0-1 #000000,#a5c4ee, 2-49 #d1d5de,#373e49, 50-51 #ffffff,#596577, 52-99 #c5c9d2,#2a2d34,
-|3: 0-0 d,#738092, 1-1 d,#35383e, 2-49 #bfc3cc,#35383e, 50-50 d,#738092, 51-51 d,#35383e, 52-99 #bfc3cc,#35383e,
-|4: 0-0 d,#738092, 1-1 d,#35383e, 2-49 #bfc3cc,#35383e, 50-50 d,#738092, 51-51 d,#35383e, 52-99 #bfc3cc,#35383e,
-|5: 0-0 d,#738092, 1-49 d,#35383e, 50-50 d,#738092, 51-99 d,#35383e,
-|6: 0-0 d,#738092, 1-1 d,#35383e, 2-49 #bfc3cc,#35383e, 50-50 d,#738092, 51-51 d,#35383e, 52-99 #bfc3cc,#35383e,
-|7: 0-0 d,#738092, 1-1 d,#35383e, 2-49 #bfc3cc,#35383e, 50-50 d,#738092, 51-51 d,#35383e, 52-99 #bfc3cc,#35383e,
-|8: 0-0 d,#738092, 1-1 d,#35383e, 2-49 #bfc3cc,#35383e, 50-50 d,#738092, 51-51 d,#35383e, 52-99 #bfc3cc,#35383e,
-|9: 0-0 d,#738092, 1-1 d,#35383e, 2-49 #bfc3cc,#35383e, 50-50 d,#738092, 51-51 d,#35383e, 52-99 #bfc3cc,#35383e,
-|10: 0-0 d,#738092, 1-1 d,#35383e, 2-49 #bfc3cc,#35383e, 50-50 d,#738092, 51-51 d,#35383e, 52-99 #bfc3cc,#35383e,
-|11: 0-0 d,#738092, 1-1 d,#35383e, 2-49 #bfc3cc,#35383e, 50-50 d,#738092, 51-51 d,#35383e, 52-99 #bfc3cc,#35383e,
-|12: 0-0 d,#738092, 1-1 d,#35383e, 2-49 #bfc3cc,#35383e, 50-50 d,#738092, 51-51 d,#35383e, 52-99 #bfc3cc,#35383e,
-|13: 0-0 d,#738092, 1-1 d,#35383e, 2-49 #bfc3cc,#35383e, 50-50 d,#738092, 51-51 d,#35383e, 52-99 #bfc3cc,#35383e,
-|14: 0-0 d,#738092, 1-1 d,#35383e, 2-49 #bfc3cc,#35383e, 50-50 d,#738092, 51-51 d,#35383e, 52-99 #bfc3cc,#35383e,
-|15: 0-0 d,#738092, 1-1 d,#35383e, 2-49 #bfc3cc,#35383e, 50-50 d,#738092, 51-51 d,#35383e, 52-99 #bfc3cc,#35383e,
-|16: 0-0 d,#738092, 1-1 d,#35383e, 2-49 #bfc3cc,#35383e, 50-50 d,#738092, 51-51 d,#35383e, 52-99 #bfc3cc,#35383e,
-|17: 0-1 #ffffff,#596577, 2-49 #c5c9d2,#2a2d34, 50-50 d,#738092, 51-51 d,#35383e, 52-99 #bfc3cc,#35383e,
-|18: 0-0 d,#738092, 1-1 d,#35383e, 2-49 #bfc3cc,#35383e, 50-50 d,#738092, 51-51 d,#35383e, 52-99 #bfc3cc,#35383e,
-|19: 0-0 d,#738092, 1-1 d,#35383e, 2-49 #bfc3cc,#35383e, 50-50 d,#738092, 51-51 d,#35383e, 52-99 #bfc3cc,#35383e,
-|20: 0-0 d,#738092, 1-49 d,#35383e, 50-50 d,#738092, 51-51 d,#35383e, 52-99 #bfc3cc,#35383e,
-|21: 0-0 d,#738092, 1-1 d,#35383e, 2-49 #bfc3cc,#35383e, 50-50 d,#738092, 51-51 d,#35383e, 52-99 #bfc3cc,#35383e,
-|22: 0-0 d,#738092, 1-1 d,#35383e, 2-49 #bfc3cc,#35383e, 50-50 d,#738092, 51-51 d,#35383e, 52-99 #bfc3cc,#35383e,
-|23: 0-0 d,#738092, 1-1 d,#35383e, 2-49 #bfc3cc,#35383e, 50-50 d,#738092, 51-51 d,#35383e, 52-99 #bfc3cc,#35383e,
-|24: 0-0 d,#738092, 1-1 d,#35383e, 2-49 #bfc3cc,#35383e, 50-50 d,#738092, 51-51 d,#35383e, 52-99 #bfc3cc,#35383e,
-|25: 0-0 d,#738092, 1-1 d,#35383e, 2-49 #bfc3cc,#35383e, 50-50 d,#738092, 51-51 d,#35383e, 52-99 #bfc3cc,#35383e,
-|26: 0-0 d,#738092, 1-1 d,#35383e, 2-49 #bfc3cc,#35383e, 50-50 d,#738092, 51-51 d,#35383e, 52-99 #bfc3cc,#35383e,
-|27: 0-0 d,#738092, 1-1 d,#35383e, 2-49 #bfc3cc,#35383e, 50-50 d,#738092, 51-51 d,#35383e, 52-99 #bfc3cc,#35383e,
-|28: 0-0 d,#738092, 1-1 d,#35383e, 2-49 #bfc3cc,#35383e, 50-50 d,#738092, 51-51 d,#35383e, 52-99 #bfc3cc,#35383e,
-|29: 0-0 d,#738092, 1-1 d,#35383e, 2-49 #bfc3cc,#35383e, 50-50 d,#738092, 51-51 d,#35383e, 52-99 #bfc3cc,#35383e,
-|30: 0-0 d,#738092, 1-1 d,#35383e, 2-49 #bfc3cc,#35383e, 50-50 d,#738092, 51-51 d,#35383e, 52-99 #bfc3cc,#35383e,
-== snap orchard-black grid=100x31 cursor=4,5
+|0: 0-1 d,#2a2d34, 2-77 #c5c9d2,#2a2d34, 78-86 #e2eef4,#1c5172, 87-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-37 #f8cba7,#404a58, 38-49 #d1d5de,#404a58, 50-51 #d1d5de,#55647b, 52-78 #c5c9d2,#2a2d34, 79-87 #ecbf9b,#2a2d34, 88-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,
+|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,
+|8: 0-0 d,#708095, 1-49 d,#35383e, 50-50 d,#708095, 51-99 d,#35383e,
+|9: 0-0 d,#708095, 1-49 d,#35383e, 50-50 d,#708095, 51-99 d,#35383e,
+|10: 0-0 d,#708095, 1-49 d,#35383e, 50-50 d,#708095, 51-99 d,#35383e,
+|11: 0-0 d,#708095, 1-49 d,#35383e, 50-50 d,#708095, 51-99 d,#35383e,
+|12: 0-0 d,#708095, 1-49 d,#35383e, 50-50 d,#708095, 51-99 d,#35383e,
+|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-37 #ecbf9b,#2a2d34, 38-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,
+|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,
+|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,
+|24: 0-0 d,#708095, 1-49 d,#35383e, 50-50 d,#708095, 51-99 d,#35383e,
+|25: 0-0 d,#708095, 1-49 d,#35383e, 50-50 d,#708095, 51-99 d,#35383e,
+|26: 0-0 d,#708095, 1-49 d,#35383e, 50-50 d,#708095, 51-99 d,#35383e,
+|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,
+== snap orchard-black grid=100x31 cursor=4,6
== style orchard-black grid=100x31
-|0: 0-50 #b2c3b8,#1d2824, 51-59 #f5f7ee,#405d4b, 60-70 #b2c3b8,#1d2824, 71-99 d,#1d2824,
-|1: 0-24 #becfc4,#26362d, 25-49 d,#26362d, 50-74 #b2c3b8,#1d2824, 75-99 d,#1d2824,
-|2: 0-1 #000000,#adcc91, 2-49 #becfc4,#26362d, 50-51 #ffffff,#4c6356, 52-99 #b2c3b8,#1d2824,
-|3: 0-0 d,#637f6a, 1-1 d,#000000, 2-49 #f2f8ef,#000000, 50-50 d,#637f6a, 51-51 d,#000000, 52-99 #f2f8ef,#000000,
-|4: 0-0 d,#637f6a, 1-1 d,#000000, 2-49 #f2f8ef,#000000, 50-50 d,#637f6a, 51-51 d,#000000, 52-99 #f2f8ef,#000000,
-|5: 0-0 d,#637f6a, 1-49 d,#000000, 50-50 d,#637f6a, 51-99 d,#000000,
-|6: 0-0 d,#637f6a, 1-1 d,#000000, 2-49 #f2f8ef,#000000, 50-50 d,#637f6a, 51-51 d,#000000, 52-99 #f2f8ef,#000000,
-|7: 0-0 d,#637f6a, 1-1 d,#000000, 2-49 #f2f8ef,#000000, 50-50 d,#637f6a, 51-51 d,#000000, 52-99 #f2f8ef,#000000,
-|8: 0-0 d,#637f6a, 1-1 d,#000000, 2-49 #f2f8ef,#000000, 50-50 d,#637f6a, 51-51 d,#000000, 52-99 #f2f8ef,#000000,
-|9: 0-0 d,#637f6a, 1-1 d,#000000, 2-49 #f2f8ef,#000000, 50-50 d,#637f6a, 51-51 d,#000000, 52-99 #f2f8ef,#000000,
-|10: 0-0 d,#637f6a, 1-1 d,#000000, 2-49 #f2f8ef,#000000, 50-50 d,#637f6a, 51-51 d,#000000, 52-99 #f2f8ef,#000000,
-|11: 0-0 d,#637f6a, 1-1 d,#000000, 2-49 #f2f8ef,#000000, 50-50 d,#637f6a, 51-51 d,#000000, 52-99 #f2f8ef,#000000,
-|12: 0-0 d,#637f6a, 1-1 d,#000000, 2-49 #f2f8ef,#000000, 50-50 d,#637f6a, 51-51 d,#000000, 52-99 #f2f8ef,#000000,
-|13: 0-0 d,#637f6a, 1-1 d,#000000, 2-49 #f2f8ef,#000000, 50-50 d,#637f6a, 51-51 d,#000000, 52-99 #f2f8ef,#000000,
-|14: 0-0 d,#637f6a, 1-1 d,#000000, 2-49 #f2f8ef,#000000, 50-50 d,#637f6a, 51-51 d,#000000, 52-99 #f2f8ef,#000000,
-|15: 0-0 d,#637f6a, 1-1 d,#000000, 2-49 #f2f8ef,#000000, 50-50 d,#637f6a, 51-51 d,#000000, 52-99 #f2f8ef,#000000,
-|16: 0-0 d,#637f6a, 1-1 d,#000000, 2-49 #f2f8ef,#000000, 50-50 d,#637f6a, 51-51 d,#000000, 52-99 #f2f8ef,#000000,
-|17: 0-1 #ffffff,#4c6356, 2-49 #b2c3b8,#1d2824, 50-50 d,#637f6a, 51-51 d,#000000, 52-99 #f2f8ef,#000000,
-|18: 0-0 d,#637f6a, 1-1 d,#000000, 2-49 #f2f8ef,#000000, 50-50 d,#637f6a, 51-51 d,#000000, 52-99 #f2f8ef,#000000,
-|19: 0-0 d,#637f6a, 1-1 d,#000000, 2-49 #f2f8ef,#000000, 50-50 d,#637f6a, 51-51 d,#000000, 52-99 #f2f8ef,#000000,
-|20: 0-0 d,#637f6a, 1-49 d,#000000, 50-50 d,#637f6a, 51-51 d,#000000, 52-99 #f2f8ef,#000000,
-|21: 0-0 d,#637f6a, 1-1 d,#000000, 2-49 #f2f8ef,#000000, 50-50 d,#637f6a, 51-51 d,#000000, 52-99 #f2f8ef,#000000,
-|22: 0-0 d,#637f6a, 1-1 d,#000000, 2-49 #f2f8ef,#000000, 50-50 d,#637f6a, 51-51 d,#000000, 52-99 #f2f8ef,#000000,
-|23: 0-0 d,#637f6a, 1-1 d,#000000, 2-49 #f2f8ef,#000000, 50-50 d,#637f6a, 51-51 d,#000000, 52-99 #f2f8ef,#000000,
-|24: 0-0 d,#637f6a, 1-1 d,#000000, 2-49 #f2f8ef,#000000, 50-50 d,#637f6a, 51-51 d,#000000, 52-99 #f2f8ef,#000000,
-|25: 0-0 d,#637f6a, 1-1 d,#000000, 2-49 #f2f8ef,#000000, 50-50 d,#637f6a, 51-51 d,#000000, 52-99 #f2f8ef,#000000,
-|26: 0-0 d,#637f6a, 1-1 d,#000000, 2-49 #f2f8ef,#000000, 50-50 d,#637f6a, 51-51 d,#000000, 52-99 #f2f8ef,#000000,
-|27: 0-0 d,#637f6a, 1-1 d,#000000, 2-49 #f2f8ef,#000000, 50-50 d,#637f6a, 51-51 d,#000000, 52-99 #f2f8ef,#000000,
-|28: 0-0 d,#637f6a, 1-1 d,#000000, 2-49 #f2f8ef,#000000, 50-50 d,#637f6a, 51-51 d,#000000, 52-99 #f2f8ef,#000000,
-|29: 0-0 d,#637f6a, 1-1 d,#000000, 2-49 #f2f8ef,#000000, 50-50 d,#637f6a, 51-51 d,#000000, 52-99 #f2f8ef,#000000,
-|30: 0-0 d,#637f6a, 1-1 d,#000000, 2-49 #f2f8ef,#000000, 50-50 d,#637f6a, 51-51 d,#000000, 52-99 #f2f8ef,#000000,
-== snap helix grid=100x31 cursor=4,5
-== style helix grid=100x31
-|0: 0-50 #949494,#121212, 51-59 #080808,#80a0ff, 60-70 #949494,#121212, 71-99 d,#121212,
-|1: 0-24 #949494,#121212, 25-49 d,#121212, 50-74 #949494,#121212, 75-99 d,#121212,
-|2: 0-1 #ffffff,#626262, 2-49 #949494,#121212, 50-51 #ffffff,#262626, 52-99 #949494,#121212,
-|3: 0-0 d,#444444, 1-1 d,#080808, 2-49 #bdbdbd,#080808, 50-50 d,#444444, 51-51 d,#080808, 52-99 #bdbdbd,#080808,
-|4: 0-0 d,#444444, 1-1 d,#080808, 2-49 #bdbdbd,#080808, 50-50 d,#444444, 51-51 d,#080808, 52-99 #bdbdbd,#080808,
-|5: 0-0 d,#444444, 1-49 d,#080808, 50-50 d,#444444, 51-99 d,#080808,
-|6: 0-0 d,#444444, 1-1 d,#080808, 2-49 #bdbdbd,#080808, 50-50 d,#444444, 51-51 d,#080808, 52-99 #bdbdbd,#080808,
-|7: 0-0 d,#444444, 1-1 d,#080808, 2-49 #bdbdbd,#080808, 50-50 d,#444444, 51-51 d,#080808, 52-99 #bdbdbd,#080808,
-|8: 0-0 d,#444444, 1-1 d,#080808, 2-49 #bdbdbd,#080808, 50-50 d,#444444, 51-51 d,#080808, 52-99 #bdbdbd,#080808,
-|9: 0-0 d,#444444, 1-1 d,#080808, 2-49 #bdbdbd,#080808, 50-50 d,#444444, 51-51 d,#080808, 52-99 #bdbdbd,#080808,
-|10: 0-0 d,#444444, 1-1 d,#080808, 2-49 #bdbdbd,#080808, 50-50 d,#444444, 51-51 d,#080808, 52-99 #bdbdbd,#080808,
-|11: 0-0 d,#444444, 1-1 d,#080808, 2-49 #bdbdbd,#080808, 50-50 d,#444444, 51-51 d,#080808, 52-99 #bdbdbd,#080808,
-|12: 0-0 d,#444444, 1-1 d,#080808, 2-49 #bdbdbd,#080808, 50-50 d,#444444, 51-51 d,#080808, 52-99 #bdbdbd,#080808,
-|13: 0-0 d,#444444, 1-1 d,#080808, 2-49 #bdbdbd,#080808, 50-50 d,#444444, 51-51 d,#080808, 52-99 #bdbdbd,#080808,
-|14: 0-0 d,#444444, 1-1 d,#080808, 2-49 #bdbdbd,#080808, 50-50 d,#444444, 51-51 d,#080808, 52-99 #bdbdbd,#080808,
-|15: 0-0 d,#444444, 1-1 d,#080808, 2-49 #bdbdbd,#080808, 50-50 d,#444444, 51-51 d,#080808, 52-99 #bdbdbd,#080808,
-|16: 0-0 d,#444444, 1-1 d,#080808, 2-49 #bdbdbd,#080808, 50-50 d,#444444, 51-51 d,#080808, 52-99 #bdbdbd,#080808,
-|17: 0-1 #ffffff,#262626, 2-49 #949494,#121212, 50-50 d,#444444, 51-51 d,#080808, 52-99 #bdbdbd,#080808,
-|18: 0-0 d,#444444, 1-1 d,#080808, 2-49 #bdbdbd,#080808, 50-50 d,#444444, 51-51 d,#080808, 52-99 #bdbdbd,#080808,
-|19: 0-0 d,#444444, 1-1 d,#080808, 2-49 #bdbdbd,#080808, 50-50 d,#444444, 51-51 d,#080808, 52-99 #bdbdbd,#080808,
-|20: 0-0 d,#444444, 1-49 d,#080808, 50-50 d,#444444, 51-51 d,#080808, 52-99 #bdbdbd,#080808,
-|21: 0-0 d,#444444, 1-1 d,#080808, 2-49 #bdbdbd,#080808, 50-50 d,#444444, 51-51 d,#080808, 52-99 #bdbdbd,#080808,
-|22: 0-0 d,#444444, 1-1 d,#080808, 2-49 #bdbdbd,#080808, 50-50 d,#444444, 51-51 d,#080808, 52-99 #bdbdbd,#080808,
-|23: 0-0 d,#444444, 1-1 d,#080808, 2-49 #bdbdbd,#080808, 50-50 d,#444444, 51-51 d,#080808, 52-99 #bdbdbd,#080808,
-|24: 0-0 d,#444444, 1-1 d,#080808, 2-49 #bdbdbd,#080808, 50-50 d,#444444, 51-51 d,#080808, 52-99 #bdbdbd,#080808,
-|25: 0-0 d,#444444, 1-1 d,#080808, 2-49 #bdbdbd,#080808, 50-50 d,#444444, 51-51 d,#080808, 52-99 #bdbdbd,#080808,
-|26: 0-0 d,#444444, 1-1 d,#080808, 2-49 #bdbdbd,#080808, 50-50 d,#444444, 51-51 d,#080808, 52-99 #bdbdbd,#080808,
-|27: 0-0 d,#444444, 1-1 d,#080808, 2-49 #bdbdbd,#080808, 50-50 d,#444444, 51-51 d,#080808, 52-99 #bdbdbd,#080808,
-|28: 0-0 d,#444444, 1-1 d,#080808, 2-49 #bdbdbd,#080808, 50-50 d,#444444, 51-51 d,#080808, 52-99 #bdbdbd,#080808,
-|29: 0-0 d,#444444, 1-1 d,#080808, 2-49 #bdbdbd,#080808, 50-50 d,#444444, 51-51 d,#080808, 52-99 #bdbdbd,#080808,
-|30: 0-0 d,#444444, 1-1 d,#080808, 2-49 #bdbdbd,#080808, 50-50 d,#444444, 51-51 d,#080808, 52-99 #bdbdbd,#080808,
-== snap dark grid=100x31 cursor=4,5
-== style dark grid=100x31
-|0: 0-50 #969696,#2c2a3e, 51-59 #d8c8a8,#4a3a1e, 60-70 #969696,#2c2a3e, 71-99 d,#2c2a3e,
-|1: 0-24 #969696,#2c2a3e, 25-49 d,#2c2a3e, 50-74 #969696,#2c2a3e, 75-99 d,#2c2a3e,
-|2: 0-1 #ffffff,#6e4fd0, 2-49 #969696,#2c2a3e, 50-51 #ffffff,#383c54, 52-99 #969696,#2c2a3e,
-|3: 0-0 d,#525252, 1-1 d,d, 2-49 #969696,#2c2a3e, 50-50 d,#525252, 51-51 d,d, 52-99 #969696,#2c2a3e,
-|4: 0-0 d,#525252, 1-1 d,d, 2-49 #969696,#2c2a3e, 50-50 d,#525252, 51-51 d,d, 52-99 #969696,#2c2a3e,
-|5: 0-0 d,#525252, 1-49 d,d, 50-50 d,#525252, 51-99 d,d,
-|6: 0-0 d,#525252, 1-1 d,d, 2-49 #969696,#2c2a3e, 50-50 d,#525252, 51-51 d,d, 52-99 #969696,#2c2a3e,
-|7: 0-0 d,#525252, 1-1 d,d, 2-49 #969696,#2c2a3e, 50-50 d,#525252, 51-51 d,d, 52-99 #969696,#2c2a3e,
-|8: 0-0 d,#525252, 1-1 d,d, 2-49 #969696,#2c2a3e, 50-50 d,#525252, 51-51 d,d, 52-99 #969696,#2c2a3e,
-|9: 0-0 d,#525252, 1-1 d,d, 2-49 #969696,#2c2a3e, 50-50 d,#525252, 51-51 d,d, 52-99 #969696,#2c2a3e,
-|10: 0-0 d,#525252, 1-1 d,d, 2-49 #969696,#2c2a3e, 50-50 d,#525252, 51-51 d,d, 52-99 #969696,#2c2a3e,
-|11: 0-0 d,#525252, 1-1 d,d, 2-49 #969696,#2c2a3e, 50-50 d,#525252, 51-51 d,d, 52-99 #969696,#2c2a3e,
-|12: 0-0 d,#525252, 1-1 d,d, 2-49 #969696,#2c2a3e, 50-50 d,#525252, 51-51 d,d, 52-99 #969696,#2c2a3e,
-|13: 0-0 d,#525252, 1-1 d,d, 2-49 #969696,#2c2a3e, 50-50 d,#525252, 51-51 d,d, 52-99 #969696,#2c2a3e,
-|14: 0-0 d,#525252, 1-1 d,d, 2-49 #969696,#2c2a3e, 50-50 d,#525252, 51-51 d,d, 52-99 #969696,#2c2a3e,
-|15: 0-0 d,#525252, 1-1 d,d, 2-49 #969696,#2c2a3e, 50-50 d,#525252, 51-51 d,d, 52-99 #969696,#2c2a3e,
-|16: 0-0 d,#525252, 1-1 d,d, 2-49 #969696,#2c2a3e, 50-50 d,#525252, 51-51 d,d, 52-99 #969696,#2c2a3e,
-|17: 0-1 #ffffff,#383c54, 2-49 #969696,#2c2a3e, 50-50 d,#525252, 51-51 d,d, 52-99 #969696,#2c2a3e,
-|18: 0-0 d,#525252, 1-1 d,d, 2-49 #969696,#2c2a3e, 50-50 d,#525252, 51-51 d,d, 52-99 #969696,#2c2a3e,
-|19: 0-0 d,#525252, 1-1 d,d, 2-49 #969696,#2c2a3e, 50-50 d,#525252, 51-51 d,d, 52-99 #969696,#2c2a3e,
-|20: 0-0 d,#525252, 1-49 d,d, 50-50 d,#525252, 51-51 d,d, 52-99 #969696,#2c2a3e,
-|21: 0-0 d,#525252, 1-1 d,d, 2-49 #969696,#2c2a3e, 50-50 d,#525252, 51-51 d,d, 52-99 #969696,#2c2a3e,
-|22: 0-0 d,#525252, 1-1 d,d, 2-49 #969696,#2c2a3e, 50-50 d,#525252, 51-51 d,d, 52-99 #969696,#2c2a3e,
-|23: 0-0 d,#525252, 1-1 d,d, 2-49 #969696,#2c2a3e, 50-50 d,#525252, 51-51 d,d, 52-99 #969696,#2c2a3e,
-|24: 0-0 d,#525252, 1-1 d,d, 2-49 #969696,#2c2a3e, 50-50 d,#525252, 51-51 d,d, 52-99 #969696,#2c2a3e,
-|25: 0-0 d,#525252, 1-1 d,d, 2-49 #969696,#2c2a3e, 50-50 d,#525252, 51-51 d,d, 52-99 #969696,#2c2a3e,
-|26: 0-0 d,#525252, 1-1 d,d, 2-49 #969696,#2c2a3e, 50-50 d,#525252, 51-51 d,d, 52-99 #969696,#2c2a3e,
-|27: 0-0 d,#525252, 1-1 d,d, 2-49 #969696,#2c2a3e, 50-50 d,#525252, 51-51 d,d, 52-99 #969696,#2c2a3e,
-|28: 0-0 d,#525252, 1-1 d,d, 2-49 #969696,#2c2a3e, 50-50 d,#525252, 51-51 d,d, 52-99 #969696,#2c2a3e,
-|29: 0-0 d,#525252, 1-1 d,d, 2-49 #969696,#2c2a3e, 50-50 d,#525252, 51-51 d,d, 52-99 #969696,#2c2a3e,
-|30: 0-0 d,#525252, 1-1 d,d, 2-49 #969696,#2c2a3e, 50-50 d,#525252, 51-51 d,d, 52-99 #969696,#2c2a3e,
-== snap acme grid=100x31 cursor=4,5
+|0: 0-1 d,#1d2824, 2-77 #b2c3b8,#1d2824, 78-86 #f5f7ee,#3c614a, 87-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-37 #dfbce5,#314738, 38-49 #becfc4,#314738, 50-51 #becfc4,#496656, 52-78 #b2c3b8,#1d2824, 79-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,#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,
+|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,
+|8: 0-0 d,#608269, 1-49 d,#000000, 50-50 d,#608269, 51-99 d,#000000,
+|9: 0-0 d,#608269, 1-49 d,#000000, 50-50 d,#608269, 51-99 d,#000000,
+|10: 0-0 d,#608269, 1-49 d,#000000, 50-50 d,#608269, 51-99 d,#000000,
+|11: 0-0 d,#608269, 1-49 d,#000000, 50-50 d,#608269, 51-99 d,#000000,
+|12: 0-0 d,#608269, 1-49 d,#000000, 50-50 d,#608269, 51-99 d,#000000,
+|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-37 #d3b0d9,#1d2824, 38-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,
+|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,
+|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,
+|24: 0-0 d,#608269, 1-49 d,#000000, 50-50 d,#608269, 51-99 d,#000000,
+|25: 0-0 d,#608269, 1-49 d,#000000, 50-50 d,#608269, 51-99 d,#000000,
+|26: 0-0 d,#608269, 1-49 d,#000000, 50-50 d,#608269, 51-99 d,#000000,
+|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,
+== snap acme grid=100x31 cursor=4,6
== style acme grid=100x31
-|0: 0-50 #000000,#eaffff, 51-59 #000000,#eeee9e, 60-70 #000000,#eaffff, 71-99 d,#eaffff,
-|1: 0-24 #000000,#eaffff, 25-49 d,#eaffff, 50-74 #000000,#eaffff, 75-99 d,#eaffff,
-|2: 0-1 #ffffff,#6e4fd0, 2-49 #000000,#eaffff, 50-51 #ffffff,#383c54, 52-99 #000000,#eaffff,
-|3: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea,
-|4: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea,
-|5: 0-99 d,#ffffea,
-|6: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea,
-|7: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea,
-|8: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea,
-|9: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea,
-|10: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea,
-|11: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea,
-|12: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea,
-|13: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea,
-|14: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea,
-|15: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea,
-|16: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea,
-|17: 0-1 #ffffff,#383c54, 2-49 #000000,#eaffff, 50-51 d,#ffffea, 52-99 #000000,#ffffea,
-|18: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea,
-|19: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea,
-|20: 0-51 d,#ffffea, 52-99 #000000,#ffffea,
-|21: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea,
-|22: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea,
-|23: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea,
-|24: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea,
-|25: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea,
-|26: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea,
-|27: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea,
-|28: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea,
-|29: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea,
-|30: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea,
-== snap generated grid=100x31 cursor=4,5
-== style generated grid=100x31
-|0: 0-50 #e0e0e0,#1e262e, 51-59 #e0e0e0,#303840, 60-70 #e0e0e0,#1e262e, 71-99 d,#1e262e,
-|1: 0-24 #e0e0e0,#1e262e, 25-49 d,#1e262e, 50-74 #e0e0e0,#1e262e, 75-99 d,#1e262e,
-|2: 0-1 #000000,#ffa060, 2-49 #e0e0e0,#1e262e, 50-51 #ffffff,#303840, 52-99 #e0e0e0,#1e262e,
-|3: 0-0 d,#303840, 1-1 d,#161e26, 2-49 #e0e0e0,#161e26, 50-50 d,#303840, 51-51 d,#161e26, 52-99 #e0e0e0,#161e26,
-|4: 0-0 d,#303840, 1-1 d,#161e26, 2-49 #e0e0e0,#161e26, 50-50 d,#303840, 51-51 d,#161e26, 52-99 #e0e0e0,#161e26,
-|5: 0-0 d,#303840, 1-49 d,#161e26, 50-50 d,#303840, 51-99 d,#161e26,
-|6: 0-0 d,#303840, 1-1 d,#161e26, 2-49 #e0e0e0,#161e26, 50-50 d,#303840, 51-51 d,#161e26, 52-99 #e0e0e0,#161e26,
-|7: 0-0 d,#303840, 1-1 d,#161e26, 2-49 #e0e0e0,#161e26, 50-50 d,#303840, 51-51 d,#161e26, 52-99 #e0e0e0,#161e26,
-|8: 0-0 d,#303840, 1-1 d,#161e26, 2-49 #e0e0e0,#161e26, 50-50 d,#303840, 51-51 d,#161e26, 52-99 #e0e0e0,#161e26,
-|9: 0-0 d,#303840, 1-1 d,#161e26, 2-49 #e0e0e0,#161e26, 50-50 d,#303840, 51-51 d,#161e26, 52-99 #e0e0e0,#161e26,
-|10: 0-0 d,#303840, 1-1 d,#161e26, 2-49 #e0e0e0,#161e26, 50-50 d,#303840, 51-51 d,#161e26, 52-99 #e0e0e0,#161e26,
-|11: 0-0 d,#303840, 1-1 d,#161e26, 2-49 #e0e0e0,#161e26, 50-50 d,#303840, 51-51 d,#161e26, 52-99 #e0e0e0,#161e26,
-|12: 0-0 d,#303840, 1-1 d,#161e26, 2-49 #e0e0e0,#161e26, 50-50 d,#303840, 51-51 d,#161e26, 52-99 #e0e0e0,#161e26,
-|13: 0-0 d,#303840, 1-1 d,#161e26, 2-49 #e0e0e0,#161e26, 50-50 d,#303840, 51-51 d,#161e26, 52-99 #e0e0e0,#161e26,
-|14: 0-0 d,#303840, 1-1 d,#161e26, 2-49 #e0e0e0,#161e26, 50-50 d,#303840, 51-51 d,#161e26, 52-99 #e0e0e0,#161e26,
-|15: 0-0 d,#303840, 1-1 d,#161e26, 2-49 #e0e0e0,#161e26, 50-50 d,#303840, 51-51 d,#161e26, 52-99 #e0e0e0,#161e26,
-|16: 0-0 d,#303840, 1-1 d,#161e26, 2-49 #e0e0e0,#161e26, 50-50 d,#303840, 51-51 d,#161e26, 52-99 #e0e0e0,#161e26,
-|17: 0-1 #ffffff,#303840, 2-49 #e0e0e0,#1e262e, 50-50 d,#303840, 51-51 d,#161e26, 52-99 #e0e0e0,#161e26,
-|18: 0-0 d,#303840, 1-1 d,#161e26, 2-49 #e0e0e0,#161e26, 50-50 d,#303840, 51-51 d,#161e26, 52-99 #e0e0e0,#161e26,
-|19: 0-0 d,#303840, 1-1 d,#161e26, 2-49 #e0e0e0,#161e26, 50-50 d,#303840, 51-51 d,#161e26, 52-99 #e0e0e0,#161e26,
-|20: 0-0 d,#303840, 1-49 d,#161e26, 50-50 d,#303840, 51-51 d,#161e26, 52-99 #e0e0e0,#161e26,
-|21: 0-0 d,#303840, 1-1 d,#161e26, 2-49 #e0e0e0,#161e26, 50-50 d,#303840, 51-51 d,#161e26, 52-99 #e0e0e0,#161e26,
-|22: 0-0 d,#303840, 1-1 d,#161e26, 2-49 #e0e0e0,#161e26, 50-50 d,#303840, 51-51 d,#161e26, 52-99 #e0e0e0,#161e26,
-|23: 0-0 d,#303840, 1-1 d,#161e26, 2-49 #e0e0e0,#161e26, 50-50 d,#303840, 51-51 d,#161e26, 52-99 #e0e0e0,#161e26,
-|24: 0-0 d,#303840, 1-1 d,#161e26, 2-49 #e0e0e0,#161e26, 50-50 d,#303840, 51-51 d,#161e26, 52-99 #e0e0e0,#161e26,
-|25: 0-0 d,#303840, 1-1 d,#161e26, 2-49 #e0e0e0,#161e26, 50-50 d,#303840, 51-51 d,#161e26, 52-99 #e0e0e0,#161e26,
-|26: 0-0 d,#303840, 1-1 d,#161e26, 2-49 #e0e0e0,#161e26, 50-50 d,#303840, 51-51 d,#161e26, 52-99 #e0e0e0,#161e26,
-|27: 0-0 d,#303840, 1-1 d,#161e26, 2-49 #e0e0e0,#161e26, 50-50 d,#303840, 51-51 d,#161e26, 52-99 #e0e0e0,#161e26,
-|28: 0-0 d,#303840, 1-1 d,#161e26, 2-49 #e0e0e0,#161e26, 50-50 d,#303840, 51-51 d,#161e26, 52-99 #e0e0e0,#161e26,
-|29: 0-0 d,#303840, 1-1 d,#161e26, 2-49 #e0e0e0,#161e26, 50-50 d,#303840, 51-51 d,#161e26, 52-99 #e0e0e0,#161e26,
-|30: 0-0 d,#303840, 1-1 d,#161e26, 2-49 #e0e0e0,#161e26, 50-50 d,#303840, 51-51 d,#161e26, 52-99 #e0e0e0,#161e26,
+|0: 0-1 d,#eaffff, 2-77 #000000,#eaffff, 78-86 #000000,#9eeeee, 87-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-37 #000099,#eaffff, 38-49 #000000,#eaffff, 50-51 #000000,#b9c3e5, 52-78 #000000,#eaffff, 79-87 #000099,#eaffff, 88-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,
+|5: 0-1 d,#ffffea, 2-99 #000000,#ffffea,
+|6: 0-99 d,#ffffea,
+|7: 0-99 d,#ffffea,
+|8: 0-99 d,#ffffea,
+|9: 0-99 d,#ffffea,
+|10: 0-99 d,#ffffea,
+|11: 0-99 d,#ffffea,
+|12: 0-99 d,#ffffea,
+|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-37 #000099,#eaffff, 38-49 #000000,#eaffff, 50-99 #000000,#ffffea,
+|18: 0-1 d,#eaffff, 2-49 #000000,#eaffff, 50-99 #000000,#ffffea,
+|19: 0-1 d,#ffffea, 2-99 #000000,#ffffea,
+|20: 0-1 d,#ffffea, 2-99 #000000,#ffffea,
+|21: 0-99 d,#ffffea,
+|22: 0-99 d,#ffffea,
+|23: 0-99 d,#ffffea,
+|24: 0-99 d,#ffffea,
+|25: 0-99 d,#ffffea,
+|26: 0-99 d,#ffffea,
+|27: 0-99 d,#ffffea,
+|28: 0-99 d,#ffffea,
+|29: 0-99 d,#ffffea,
+|30: 0-99 d,#ffffea,
+== snap lapis grid=100x31 cursor=4,6
+== style lapis grid=100x31
+|0: 0-1 d,#0f1a4a, 2-77 #9aa6d9,#0f1a4a, 78-86 #0f1a4a,#e8c46a, 87-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-37 #f2d280,#25397d, 38-49 #eee6d2,#25397d, 50-51 #eee6d2,#6a78b1, 52-78 #9aa6d9,#0f1a4a, 79-87 #e8c46a,#0f1a4a, 88-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,
+|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,
+|8: 0-0 d,#e8c46a, 1-49 d,#0a1030, 50-50 d,#e8c46a, 51-99 d,#0a1030,
+|9: 0-0 d,#e8c46a, 1-49 d,#0a1030, 50-50 d,#e8c46a, 51-99 d,#0a1030,
+|10: 0-0 d,#e8c46a, 1-49 d,#0a1030, 50-50 d,#e8c46a, 51-99 d,#0a1030,
+|11: 0-0 d,#e8c46a, 1-49 d,#0a1030, 50-50 d,#e8c46a, 51-99 d,#0a1030,
+|12: 0-0 d,#e8c46a, 1-49 d,#0a1030, 50-50 d,#e8c46a, 51-99 d,#0a1030,
+|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-37 #e8c46a,#0f1a4a, 38-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,
+|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,
+|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,
+|24: 0-0 d,#e8c46a, 1-49 d,#0a1030, 50-50 d,#e8c46a, 51-99 d,#0a1030,
+|25: 0-0 d,#e8c46a, 1-49 d,#0a1030, 50-50 d,#e8c46a, 51-99 d,#0a1030,
+|26: 0-0 d,#e8c46a, 1-49 d,#0a1030, 50-50 d,#e8c46a, 51-99 d,#0a1030,
+|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,
+== snap lapis-plain grid=100x31 cursor=4,6
+== style lapis-plain grid=100x31
+== snap dark-plus grid=100x31 cursor=4,6
+== style dark-plus grid=100x31
+|0: 0-1 d,#3c3c3c, 2-77 #a7a7a7,#3c3c3c, 78-86 #d4d4d4,#264f78, 87-99 #d4d4d4,#3c3c3c,
+|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-37 #cbe5fc,#1e1e1e, 38-49 #ffffff,#1e1e1e, 50-51 #ffffff,#1c608e, 52-78 #a7a7a7,#3c3c3c, 79-87 #68aee9,#3c3c3c, 88-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,
+|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,
+|8: 0-0 d,#424242, 1-49 d,#1e1e1e, 50-50 d,#424242, 51-99 d,#1e1e1e,
+|9: 0-0 d,#424242, 1-49 d,#1e1e1e, 50-50 d,#424242, 51-99 d,#1e1e1e,
+|10: 0-0 d,#424242, 1-49 d,#1e1e1e, 50-50 d,#424242, 51-99 d,#1e1e1e,
+|11: 0-0 d,#424242, 1-49 d,#1e1e1e, 50-50 d,#424242, 51-99 d,#1e1e1e,
+|12: 0-0 d,#424242, 1-49 d,#1e1e1e, 50-50 d,#424242, 51-99 d,#1e1e1e,
+|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-37 #68aee9,#3c3c3c, 38-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,
+|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,
+|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,
+|24: 0-0 d,#424242, 1-49 d,#1e1e1e, 50-50 d,#424242, 51-99 d,#1e1e1e,
+|25: 0-0 d,#424242, 1-49 d,#1e1e1e, 50-50 d,#424242, 51-99 d,#1e1e1e,
+|26: 0-0 d,#424242, 1-49 d,#1e1e1e, 50-50 d,#424242, 51-99 d,#1e1e1e,
+|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,
+== snap solarized-dark grid=100x31 cursor=4,6
+== style solarized-dark grid=100x31
+|0: 0-1 d,#657b83, 2-77 #01090b,#657b83, 78-86 #002b36,#586e75, 87-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-37 #2d3502,#93a1a1, 38-49 #073642,#93a1a1, 50-51 #073642,#185986, 52-78 #01090b,#657b83, 79-87 #121600,#657b83, 88-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,
+|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,
+|8: 0-0 d,#839496, 1-49 d,#002b36, 50-50 d,#839496, 51-99 d,#002b36,
+|9: 0-0 d,#839496, 1-49 d,#002b36, 50-50 d,#839496, 51-99 d,#002b36,
+|10: 0-0 d,#839496, 1-49 d,#002b36, 50-50 d,#839496, 51-99 d,#002b36,
+|11: 0-0 d,#839496, 1-49 d,#002b36, 50-50 d,#839496, 51-99 d,#002b36,
+|12: 0-0 d,#839496, 1-49 d,#002b36, 50-50 d,#839496, 51-99 d,#002b36,
+|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-37 #121600,#657b83, 38-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,
+|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,
+|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,
+|24: 0-0 d,#839496, 1-49 d,#002b36, 50-50 d,#839496, 51-99 d,#002b36,
+|25: 0-0 d,#839496, 1-49 d,#002b36, 50-50 d,#839496, 51-99 d,#002b36,
+|26: 0-0 d,#839496, 1-49 d,#002b36, 50-50 d,#839496, 51-99 d,#002b36,
+|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,
diff --git a/test/snapshots/theme.snap b/test/snapshots/theme.snap
index 2c7610b3..2a046ef3 100644
--- a/test/snapshots/theme.snap
+++ b/test/snapshots/theme.snap
@@ -5,6 +5,14 @@ file t.txt x
start 31 100 -n 3
wait 8000 t.txt
stable 700 20000
+# NextColor is no default word of the workspace tag: typed onto its end
+press left 99 1
+release left 99 1
+key space
+text NextColor
+key esc
+settle 100
+stable 700 10000
snap orchard
snapstyle orchard
press middle @NextColor 1
@@ -91,20 +99,26 @@ snapstyle orchard-black
press middle @NextColor 1
release middle @NextColor 1
stable 700 10000
-snap helix
-snapstyle helix
+snap acme
+snapstyle acme
press middle @NextColor 1
release middle @NextColor 1
stable 700 10000
-snap dark
-snapstyle dark
+snap lapis
+snapstyle lapis
press middle @NextColor 1
release middle @NextColor 1
stable 700 10000
-snap acme
-snapstyle acme
+snap lapis-plain
+snapstyle lapis-plain
+press middle @NextColor 1
+release middle @NextColor 1
+stable 700 10000
+snap dark-plus
+snapstyle dark-plus
press middle @NextColor 1
release middle @NextColor 1
stable 700 10000
-snap generated
-snapstyle generated
+# After orchard_black: acme, lapis and lapis_plain, then the first faithful ports.
+snap solarized-dark
+snapstyle solarized-dark
diff --git a/test/snapshots/themesel.golden b/test/snapshots/themesel.golden
index 76d5d71b..346bb898 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 NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/themesel/cwd/t.txt Save Tty Del Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/themesel/cwd/t.txt Save Tty Collapse Del
| 1 line 1
| 2 line 2
| 3 line 3
@@ -31,219 +31,9 @@
| 27 line 27
| 28 line 28
== snap list grid=100x31 cursor=7,3
-|17: /tmp/pardes-snap/themesel/cwd/+Themes Save Tty Del Collapse
-|18: 1 # Pardes themes
-|19: 2 Theme orchard
-|20: 3 Theme dusk
-|21: 4 Theme ink
-|22: 5 Theme paper
-|23: 6 Theme daybreak
-|24: 7 Theme atelier
-|25: 8 Theme forge
-|26: 9 Theme lagoon
-|27: 10 Theme solarium
-|28: 11 Theme spectrum
-|29: 12 Theme harvest
-|30: 13 Theme clay
-== snap step-orchard grid=100x31 cursor=7,19
-== style step-orchard grid=100x31
-|0: 0-70 #b2c3b8,#1d2824, 71-99 d,#1d2824,
-|1: 0-24 #becfc4,#26362d, 25-99 d,#26362d,
-|2: 0-1 #ffffff,#4c6356, 2-58 #b2c3b8,#1d2824, 59-99 d,#1d2824,
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-99 d,#0d1410,
-|4: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-99 d,#0d1410,
-|5: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-99 d,#0d1410,
-|6: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-99 d,#0d1410,
-|7: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-99 d,#0d1410,
-|8: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-99 d,#0d1410,
-|9: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-99 d,#0d1410,
-|10: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-99 d,#0d1410,
-|11: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-99 d,#0d1410,
-|12: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-13 #e5eee5,#0d1410, 14-99 d,#0d1410,
-|13: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-13 #e5eee5,#0d1410, 14-99 d,#0d1410,
-|14: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-13 #e5eee5,#0d1410, 14-99 d,#0d1410,
-|15: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-13 #e5eee5,#0d1410, 14-99 d,#0d1410,
-|16: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-13 #e5eee5,#0d1410, 14-99 d,#0d1410,
-|17: 0-1 #000000,#adcc91, 2-60 #becfc4,#26362d, 61-99 d,#26362d,
-|18: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-21 #e5eee5,#0d1410, 22-99 d,#0d1410,
-|19: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #616f64,#0d1410,b 7-19 #e5eee5,#0d1410, 20-99 d,#0d1410,
-|20: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-16 #e5eee5,#0d1410, 17-99 d,#0d1410,
-|21: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-15 #e5eee5,#0d1410, 16-99 d,#0d1410,
-|22: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-17 #e5eee5,#0d1410, 18-99 d,#0d1410,
-|23: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-20 #e5eee5,#0d1410, 21-99 d,#0d1410,
-|24: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-19 #e5eee5,#0d1410, 20-99 d,#0d1410,
-|25: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-17 #e5eee5,#0d1410, 18-99 d,#0d1410,
-|26: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-18 #e5eee5,#0d1410, 19-99 d,#0d1410,
-|27: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-20 #e5eee5,#0d1410, 21-99 d,#0d1410,
-|28: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-20 #e5eee5,#0d1410, 21-99 d,#0d1410,
-|29: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-19 #e5eee5,#0d1410, 20-99 d,#0d1410,
-|30: 0-0 d,#152019, 1-1 d,#0d1410, 2-6 #59675c,#0d1410, 7-16 #e5eee5,#0d1410, 17-99 d,#0d1410,
-== snap step-dusk grid=100x31 cursor=7,20
-== style step-dusk grid=100x31
-|0: 0-70 #c6b6c5,#2c2630, 71-99 d,#2c2630,
-|1: 0-24 #d2c2d1,#3b2f3b, 25-99 d,#3b2f3b,
-|2: 0-1 #ffffff,#715768, 2-58 #c6b6c5,#2c2630, 59-99 d,#2c2630,
-|3: 0-0 d,#8b697c, 1-1 d,#39323b, 2-6 #82717e,#39323b, 7-12 #c3b6c1,#39323b, 13-99 d,#39323b,
-|4: 0-0 d,#8b697c, 1-1 d,#39323b, 2-6 #82717e,#39323b, 7-12 #c3b6c1,#39323b, 13-99 d,#39323b,
-|5: 0-0 d,#8b697c, 1-1 d,#39323b, 2-6 #82717e,#39323b, 7-12 #c3b6c1,#39323b, 13-99 d,#39323b,
-|6: 0-0 d,#8b697c, 1-1 d,#39323b, 2-6 #82717e,#39323b, 7-12 #c3b6c1,#39323b, 13-99 d,#39323b,
-|7: 0-0 d,#3d3540, 1-1 d,#39323b, 2-6 #82717e,#39323b, 7-12 #c3b6c1,#39323b, 13-99 d,#39323b,
-|8: 0-0 d,#3d3540, 1-1 d,#39323b, 2-6 #82717e,#39323b, 7-12 #c3b6c1,#39323b, 13-99 d,#39323b,
-|9: 0-0 d,#3d3540, 1-1 d,#39323b, 2-6 #82717e,#39323b, 7-12 #c3b6c1,#39323b, 13-99 d,#39323b,
-|10: 0-0 d,#3d3540, 1-1 d,#39323b, 2-6 #82717e,#39323b, 7-12 #c3b6c1,#39323b, 13-99 d,#39323b,
-|11: 0-0 d,#3d3540, 1-1 d,#39323b, 2-6 #82717e,#39323b, 7-12 #c3b6c1,#39323b, 13-99 d,#39323b,
-|12: 0-0 d,#3d3540, 1-1 d,#39323b, 2-6 #82717e,#39323b, 7-13 #c3b6c1,#39323b, 14-99 d,#39323b,
-|13: 0-0 d,#3d3540, 1-1 d,#39323b, 2-6 #82717e,#39323b, 7-13 #c3b6c1,#39323b, 14-99 d,#39323b,
-|14: 0-0 d,#3d3540, 1-1 d,#39323b, 2-6 #82717e,#39323b, 7-13 #c3b6c1,#39323b, 14-99 d,#39323b,
-|15: 0-0 d,#3d3540, 1-1 d,#39323b, 2-6 #82717e,#39323b, 7-13 #c3b6c1,#39323b, 14-99 d,#39323b,
-|16: 0-0 d,#3d3540, 1-1 d,#39323b, 2-6 #82717e,#39323b, 7-13 #c3b6c1,#39323b, 14-99 d,#39323b,
-|17: 0-1 #000000,#e4b39b, 2-60 #d2c2d1,#3b2f3b, 61-99 d,#3b2f3b,
-|18: 0-0 d,#8b697c, 1-1 d,#39323b, 2-6 #82717e,#39323b, 7-21 #c3b6c1,#39323b, 22-99 d,#39323b,
-|19: 0-0 d,#3d3540, 1-1 d,#39323b, 2-6 #82717e,#39323b, 7-19 #c3b6c1,#39323b, 20-99 d,#39323b,
-|20: 0-0 d,#3d3540, 1-1 d,#39323b, 2-6 #8a7986,#39323b,b 7-16 #c3b6c1,#39323b, 17-99 d,#39323b,
-|21: 0-0 d,#3d3540, 1-1 d,#39323b, 2-6 #82717e,#39323b, 7-15 #c3b6c1,#39323b, 16-99 d,#39323b,
-|22: 0-0 d,#3d3540, 1-1 d,#39323b, 2-6 #82717e,#39323b, 7-17 #c3b6c1,#39323b, 18-99 d,#39323b,
-|23: 0-0 d,#3d3540, 1-1 d,#39323b, 2-6 #82717e,#39323b, 7-20 #c3b6c1,#39323b, 21-99 d,#39323b,
-|24: 0-0 d,#3d3540, 1-1 d,#39323b, 2-6 #82717e,#39323b, 7-19 #c3b6c1,#39323b, 20-99 d,#39323b,
-|25: 0-0 d,#3d3540, 1-1 d,#39323b, 2-6 #82717e,#39323b, 7-17 #c3b6c1,#39323b, 18-99 d,#39323b,
-|26: 0-0 d,#3d3540, 1-1 d,#39323b, 2-6 #82717e,#39323b, 7-18 #c3b6c1,#39323b, 19-99 d,#39323b,
-|27: 0-0 d,#3d3540, 1-1 d,#39323b, 2-6 #82717e,#39323b, 7-20 #c3b6c1,#39323b, 21-99 d,#39323b,
-|28: 0-0 d,#3d3540, 1-1 d,#39323b, 2-6 #82717e,#39323b, 7-20 #c3b6c1,#39323b, 21-99 d,#39323b,
-|29: 0-0 d,#3d3540, 1-1 d,#39323b, 2-6 #82717e,#39323b, 7-19 #c3b6c1,#39323b, 20-99 d,#39323b,
-|30: 0-0 d,#3d3540, 1-1 d,#39323b, 2-6 #82717e,#39323b, 7-16 #c3b6c1,#39323b, 17-99 d,#39323b,
-== snap step-atelier grid=100x31 cursor=7,24
-== style step-atelier grid=100x31
-|0: 0-70 #3d6055,#e4f0ed, 71-99 d,#e4f0ed,
-|1: 0-24 #35584d,#d3e7df, 25-99 d,#d3e7df,
-|2: 0-1 #000000,#99b6a3, 2-58 #3d6055,#e4f0ed, 59-99 d,#e4f0ed,
-|3: 0-0 d,#9da97b, 1-1 d,#fffdeb, 2-6 #909880,#fffdeb, 7-12 #293f35,#fffdeb, 13-99 d,#fffdeb,
-|4: 0-0 d,#9da97b, 1-1 d,#fffdeb, 2-6 #909880,#fffdeb, 7-12 #293f35,#fffdeb, 13-99 d,#fffdeb,
-|5: 0-0 d,#9da97b, 1-1 d,#fffdeb, 2-6 #909880,#fffdeb, 7-12 #293f35,#fffdeb, 13-99 d,#fffdeb,
-|6: 0-0 d,#9da97b, 1-1 d,#fffdeb, 2-6 #909880,#fffdeb, 7-12 #293f35,#fffdeb, 13-99 d,#fffdeb,
-|7: 0-0 d,#eeeccf, 1-1 d,#fffdeb, 2-6 #909880,#fffdeb, 7-12 #293f35,#fffdeb, 13-99 d,#fffdeb,
-|8: 0-0 d,#eeeccf, 1-1 d,#fffdeb, 2-6 #909880,#fffdeb, 7-12 #293f35,#fffdeb, 13-99 d,#fffdeb,
-|9: 0-0 d,#eeeccf, 1-1 d,#fffdeb, 2-6 #909880,#fffdeb, 7-12 #293f35,#fffdeb, 13-99 d,#fffdeb,
-|10: 0-0 d,#eeeccf, 1-1 d,#fffdeb, 2-6 #909880,#fffdeb, 7-12 #293f35,#fffdeb, 13-99 d,#fffdeb,
-|11: 0-0 d,#eeeccf, 1-1 d,#fffdeb, 2-6 #909880,#fffdeb, 7-12 #293f35,#fffdeb, 13-99 d,#fffdeb,
-|12: 0-0 d,#eeeccf, 1-1 d,#fffdeb, 2-6 #909880,#fffdeb, 7-13 #293f35,#fffdeb, 14-99 d,#fffdeb,
-|13: 0-0 d,#eeeccf, 1-1 d,#fffdeb, 2-6 #909880,#fffdeb, 7-13 #293f35,#fffdeb, 14-99 d,#fffdeb,
-|14: 0-0 d,#eeeccf, 1-1 d,#fffdeb, 2-6 #909880,#fffdeb, 7-13 #293f35,#fffdeb, 14-99 d,#fffdeb,
-|15: 0-0 d,#eeeccf, 1-1 d,#fffdeb, 2-6 #909880,#fffdeb, 7-13 #293f35,#fffdeb, 14-99 d,#fffdeb,
-|16: 0-0 d,#eeeccf, 1-1 d,#fffdeb, 2-6 #909880,#fffdeb, 7-13 #293f35,#fffdeb, 14-99 d,#fffdeb,
-|17: 0-1 #ffffff,#3e7a68, 2-60 #35584d,#d3e7df, 61-99 d,#d3e7df,
-|18: 0-0 d,#9da97b, 1-1 d,#fffdeb, 2-6 #909880,#fffdeb, 7-21 #293f35,#fffdeb, 22-99 d,#fffdeb,
-|19: 0-0 d,#eeeccf, 1-1 d,#fffdeb, 2-6 #909880,#fffdeb, 7-19 #293f35,#fffdeb, 20-99 d,#fffdeb,
-|20: 0-0 d,#eeeccf, 1-1 d,#fffdeb, 2-6 #909880,#fffdeb, 7-16 #293f35,#fffdeb, 17-99 d,#fffdeb,
-|21: 0-0 d,#eeeccf, 1-1 d,#fffdeb, 2-6 #909880,#fffdeb, 7-15 #293f35,#fffdeb, 16-99 d,#fffdeb,
-|22: 0-0 d,#eeeccf, 1-1 d,#fffdeb, 2-6 #909880,#fffdeb, 7-17 #293f35,#fffdeb, 18-99 d,#fffdeb,
-|23: 0-0 d,#eeeccf, 1-1 d,#fffdeb, 2-6 #909880,#fffdeb, 7-20 #293f35,#fffdeb, 21-99 d,#fffdeb,
-|24: 0-0 d,#eeeccf, 1-1 d,#fffdeb, 2-6 #889078,#fffdeb,b 7-19 #293f35,#fffdeb, 20-99 d,#fffdeb,
-|25: 0-0 d,#eeeccf, 1-1 d,#fffdeb, 2-6 #909880,#fffdeb, 7-17 #293f35,#fffdeb, 18-99 d,#fffdeb,
-|26: 0-0 d,#eeeccf, 1-1 d,#fffdeb, 2-6 #909880,#fffdeb, 7-18 #293f35,#fffdeb, 19-99 d,#fffdeb,
-|27: 0-0 d,#eeeccf, 1-1 d,#fffdeb, 2-6 #909880,#fffdeb, 7-20 #293f35,#fffdeb, 21-99 d,#fffdeb,
-|28: 0-0 d,#eeeccf, 1-1 d,#fffdeb, 2-6 #909880,#fffdeb, 7-20 #293f35,#fffdeb, 21-99 d,#fffdeb,
-|29: 0-0 d,#eeeccf, 1-1 d,#fffdeb, 2-6 #909880,#fffdeb, 7-19 #293f35,#fffdeb, 20-99 d,#fffdeb,
-|30: 0-0 d,#eeeccf, 1-1 d,#fffdeb, 2-6 #909880,#fffdeb, 7-16 #293f35,#fffdeb, 17-99 d,#fffdeb,
-== snap step-forge grid=100x31 cursor=7,25
-== style step-forge grid=100x31
-|0: 0-70 #c5c9d2,#22252b, 71-99 d,#22252b,
-|1: 0-24 #d1d5de,#2d3440, 25-99 d,#2d3440,
-|2: 0-1 #ffffff,#596577, 2-58 #c5c9d2,#22252b, 59-99 d,#22252b,
-|3: 0-0 d,#738092, 1-1 d,#0c0c0e, 2-6 #62656c,#0c0c0e, 7-12 #e5e5e5,#0c0c0e, 13-99 d,#0c0c0e,
-|4: 0-0 d,#738092, 1-1 d,#0c0c0e, 2-6 #62656c,#0c0c0e, 7-12 #e5e5e5,#0c0c0e, 13-99 d,#0c0c0e,
-|5: 0-0 d,#738092, 1-1 d,#0c0c0e, 2-6 #62656c,#0c0c0e, 7-12 #e5e5e5,#0c0c0e, 13-99 d,#0c0c0e,
-|6: 0-0 d,#738092, 1-1 d,#0c0c0e, 2-6 #62656c,#0c0c0e, 7-12 #e5e5e5,#0c0c0e, 13-99 d,#0c0c0e,
-|7: 0-0 d,#1a1c21, 1-1 d,#0c0c0e, 2-6 #62656c,#0c0c0e, 7-12 #e5e5e5,#0c0c0e, 13-99 d,#0c0c0e,
-|8: 0-0 d,#1a1c21, 1-1 d,#0c0c0e, 2-6 #62656c,#0c0c0e, 7-12 #e5e5e5,#0c0c0e, 13-99 d,#0c0c0e,
-|9: 0-0 d,#1a1c21, 1-1 d,#0c0c0e, 2-6 #62656c,#0c0c0e, 7-12 #e5e5e5,#0c0c0e, 13-99 d,#0c0c0e,
-|10: 0-0 d,#1a1c21, 1-1 d,#0c0c0e, 2-6 #62656c,#0c0c0e, 7-12 #e5e5e5,#0c0c0e, 13-99 d,#0c0c0e,
-|11: 0-0 d,#1a1c21, 1-1 d,#0c0c0e, 2-6 #62656c,#0c0c0e, 7-12 #e5e5e5,#0c0c0e, 13-99 d,#0c0c0e,
-|12: 0-0 d,#1a1c21, 1-1 d,#0c0c0e, 2-6 #62656c,#0c0c0e, 7-13 #e5e5e5,#0c0c0e, 14-99 d,#0c0c0e,
-|13: 0-0 d,#1a1c21, 1-1 d,#0c0c0e, 2-6 #62656c,#0c0c0e, 7-13 #e5e5e5,#0c0c0e, 14-99 d,#0c0c0e,
-|14: 0-0 d,#1a1c21, 1-1 d,#0c0c0e, 2-6 #62656c,#0c0c0e, 7-13 #e5e5e5,#0c0c0e, 14-99 d,#0c0c0e,
-|15: 0-0 d,#1a1c21, 1-1 d,#0c0c0e, 2-6 #62656c,#0c0c0e, 7-13 #e5e5e5,#0c0c0e, 14-99 d,#0c0c0e,
-|16: 0-0 d,#1a1c21, 1-1 d,#0c0c0e, 2-6 #62656c,#0c0c0e, 7-13 #e5e5e5,#0c0c0e, 14-99 d,#0c0c0e,
-|17: 0-1 #000000,#a5c4ee, 2-60 #d1d5de,#2d3440, 61-99 d,#2d3440,
-|18: 0-0 d,#738092, 1-1 d,#0c0c0e, 2-6 #62656c,#0c0c0e, 7-21 #e5e5e5,#0c0c0e, 22-99 d,#0c0c0e,
-|19: 0-0 d,#1a1c21, 1-1 d,#0c0c0e, 2-6 #62656c,#0c0c0e, 7-19 #e5e5e5,#0c0c0e, 20-99 d,#0c0c0e,
-|20: 0-0 d,#1a1c21, 1-1 d,#0c0c0e, 2-6 #62656c,#0c0c0e, 7-16 #e5e5e5,#0c0c0e, 17-99 d,#0c0c0e,
-|21: 0-0 d,#1a1c21, 1-1 d,#0c0c0e, 2-6 #62656c,#0c0c0e, 7-15 #e5e5e5,#0c0c0e, 16-99 d,#0c0c0e,
-|22: 0-0 d,#1a1c21, 1-1 d,#0c0c0e, 2-6 #62656c,#0c0c0e, 7-17 #e5e5e5,#0c0c0e, 18-99 d,#0c0c0e,
-|23: 0-0 d,#1a1c21, 1-1 d,#0c0c0e, 2-6 #62656c,#0c0c0e, 7-20 #e5e5e5,#0c0c0e, 21-99 d,#0c0c0e,
-|24: 0-0 d,#1a1c21, 1-1 d,#0c0c0e, 2-6 #62656c,#0c0c0e, 7-19 #e5e5e5,#0c0c0e, 20-99 d,#0c0c0e,
-|25: 0-0 d,#1a1c21, 1-1 d,#0c0c0e, 2-6 #6a6d74,#0c0c0e,b 7-17 #e5e5e5,#0c0c0e, 18-99 d,#0c0c0e,
-|26: 0-0 d,#1a1c21, 1-1 d,#0c0c0e, 2-6 #62656c,#0c0c0e, 7-18 #e5e5e5,#0c0c0e, 19-99 d,#0c0c0e,
-|27: 0-0 d,#1a1c21, 1-1 d,#0c0c0e, 2-6 #62656c,#0c0c0e, 7-20 #e5e5e5,#0c0c0e, 21-99 d,#0c0c0e,
-|28: 0-0 d,#1a1c21, 1-1 d,#0c0c0e, 2-6 #62656c,#0c0c0e, 7-20 #e5e5e5,#0c0c0e, 21-99 d,#0c0c0e,
-|29: 0-0 d,#1a1c21, 1-1 d,#0c0c0e, 2-6 #62656c,#0c0c0e, 7-19 #e5e5e5,#0c0c0e, 20-99 d,#0c0c0e,
-|30: 0-0 d,#1a1c21, 1-1 d,#0c0c0e, 2-6 #62656c,#0c0c0e, 7-16 #e5e5e5,#0c0c0e, 17-99 d,#0c0c0e,
-== snap step-lagoon grid=100x31 cursor=7,26
-== style step-lagoon grid=100x31
-|0: 0-70 #bbd7cb,#29443f, 71-99 d,#29443f,
-|1: 0-24 #c7e3d7,#34574d, 25-99 d,#34574d,
-|2: 0-1 #ffffff,#597e71, 2-58 #bbd7cb,#29443f, 59-99 d,#29443f,
-|3: 0-0 d,#72978a, 1-1 d,#34464c, 2-6 #7b9194,#34464c, 7-12 #bac9ce,#34464c, 13-99 d,#34464c,
-|4: 0-0 d,#72978a, 1-1 d,#34464c, 2-6 #7b9194,#34464c, 7-12 #bac9ce,#34464c, 13-99 d,#34464c,
-|5: 0-0 d,#72978a, 1-1 d,#34464c, 2-6 #7b9194,#34464c, 7-12 #bac9ce,#34464c, 13-99 d,#34464c,
-|6: 0-0 d,#72978a, 1-1 d,#34464c, 2-6 #7b9194,#34464c, 7-12 #bac9ce,#34464c, 13-99 d,#34464c,
-|7: 0-0 d,#3a4c50, 1-1 d,#34464c, 2-6 #7b9194,#34464c, 7-12 #bac9ce,#34464c, 13-99 d,#34464c,
-|8: 0-0 d,#3a4c50, 1-1 d,#34464c, 2-6 #7b9194,#34464c, 7-12 #bac9ce,#34464c, 13-99 d,#34464c,
-|9: 0-0 d,#3a4c50, 1-1 d,#34464c, 2-6 #7b9194,#34464c, 7-12 #bac9ce,#34464c, 13-99 d,#34464c,
-|10: 0-0 d,#3a4c50, 1-1 d,#34464c, 2-6 #7b9194,#34464c, 7-12 #bac9ce,#34464c, 13-99 d,#34464c,
-|11: 0-0 d,#3a4c50, 1-1 d,#34464c, 2-6 #7b9194,#34464c, 7-12 #bac9ce,#34464c, 13-99 d,#34464c,
-|12: 0-0 d,#3a4c50, 1-1 d,#34464c, 2-6 #7b9194,#34464c, 7-13 #bac9ce,#34464c, 14-99 d,#34464c,
-|13: 0-0 d,#3a4c50, 1-1 d,#34464c, 2-6 #7b9194,#34464c, 7-13 #bac9ce,#34464c, 14-99 d,#34464c,
-|14: 0-0 d,#3a4c50, 1-1 d,#34464c, 2-6 #7b9194,#34464c, 7-13 #bac9ce,#34464c, 14-99 d,#34464c,
-|15: 0-0 d,#3a4c50, 1-1 d,#34464c, 2-6 #7b9194,#34464c, 7-13 #bac9ce,#34464c, 14-99 d,#34464c,
-|16: 0-0 d,#3a4c50, 1-1 d,#34464c, 2-6 #7b9194,#34464c, 7-13 #bac9ce,#34464c, 14-99 d,#34464c,
-|17: 0-1 #000000,#89c7b4, 2-60 #c7e3d7,#34574d, 61-99 d,#34574d,
-|18: 0-0 d,#72978a, 1-1 d,#34464c, 2-6 #7b9194,#34464c, 7-21 #bac9ce,#34464c, 22-99 d,#34464c,
-|19: 0-0 d,#3a4c50, 1-1 d,#34464c, 2-6 #7b9194,#34464c, 7-19 #bac9ce,#34464c, 20-99 d,#34464c,
-|20: 0-0 d,#3a4c50, 1-1 d,#34464c, 2-6 #7b9194,#34464c, 7-16 #bac9ce,#34464c, 17-99 d,#34464c,
-|21: 0-0 d,#3a4c50, 1-1 d,#34464c, 2-6 #7b9194,#34464c, 7-15 #bac9ce,#34464c, 16-99 d,#34464c,
-|22: 0-0 d,#3a4c50, 1-1 d,#34464c, 2-6 #7b9194,#34464c, 7-17 #bac9ce,#34464c, 18-99 d,#34464c,
-|23: 0-0 d,#3a4c50, 1-1 d,#34464c, 2-6 #7b9194,#34464c, 7-20 #bac9ce,#34464c, 21-99 d,#34464c,
-|24: 0-0 d,#3a4c50, 1-1 d,#34464c, 2-6 #7b9194,#34464c, 7-19 #bac9ce,#34464c, 20-99 d,#34464c,
-|25: 0-0 d,#3a4c50, 1-1 d,#34464c, 2-6 #7b9194,#34464c, 7-17 #bac9ce,#34464c, 18-99 d,#34464c,
-|26: 0-0 d,#3a4c50, 1-1 d,#34464c, 2-6 #83999c,#34464c,b 7-18 #bac9ce,#34464c, 19-99 d,#34464c,
-|27: 0-0 d,#3a4c50, 1-1 d,#34464c, 2-6 #7b9194,#34464c, 7-20 #bac9ce,#34464c, 21-99 d,#34464c,
-|28: 0-0 d,#3a4c50, 1-1 d,#34464c, 2-6 #7b9194,#34464c, 7-20 #bac9ce,#34464c, 21-99 d,#34464c,
-|29: 0-0 d,#3a4c50, 1-1 d,#34464c, 2-6 #7b9194,#34464c, 7-19 #bac9ce,#34464c, 20-99 d,#34464c,
-|30: 0-0 d,#3a4c50, 1-1 d,#34464c, 2-6 #7b9194,#34464c, 7-16 #bac9ce,#34464c, 17-99 d,#34464c,
-== snap step-solarium grid=100x31 cursor=7,27
-== style step-solarium grid=100x31
-|0: 0-70 #c7d4bd,#123f43, 71-99 d,#123f43,
-|1: 0-24 #d3e0c9,#214e50, 25-99 d,#214e50,
-|2: 0-1 #ffffff,#4c7972, 2-58 #c7d4bd,#123f43, 59-99 d,#123f43,
-|3: 0-0 d,#69938a, 1-1 d,#173e45, 2-6 #647e7c,#173e45, 7-12 #a7b7ae,#173e45, 13-99 d,#173e45,
-|4: 0-0 d,#69938a, 1-1 d,#173e45, 2-6 #647e7c,#173e45, 7-12 #a7b7ae,#173e45, 13-99 d,#173e45,
-|5: 0-0 d,#69938a, 1-1 d,#173e45, 2-6 #647e7c,#173e45, 7-12 #a7b7ae,#173e45, 13-99 d,#173e45,
-|6: 0-0 d,#69938a, 1-1 d,#173e45, 2-6 #647e7c,#173e45, 7-12 #a7b7ae,#173e45, 13-99 d,#173e45,
-|7: 0-0 d,#1c454c, 1-1 d,#173e45, 2-6 #647e7c,#173e45, 7-12 #a7b7ae,#173e45, 13-99 d,#173e45,
-|8: 0-0 d,#1c454c, 1-1 d,#173e45, 2-6 #647e7c,#173e45, 7-12 #a7b7ae,#173e45, 13-99 d,#173e45,
-|9: 0-0 d,#1c454c, 1-1 d,#173e45, 2-6 #647e7c,#173e45, 7-12 #a7b7ae,#173e45, 13-99 d,#173e45,
-|10: 0-0 d,#1c454c, 1-1 d,#173e45, 2-6 #647e7c,#173e45, 7-12 #a7b7ae,#173e45, 13-99 d,#173e45,
-|11: 0-0 d,#1c454c, 1-1 d,#173e45, 2-6 #647e7c,#173e45, 7-12 #a7b7ae,#173e45, 13-99 d,#173e45,
-|12: 0-0 d,#1c454c, 1-1 d,#173e45, 2-6 #647e7c,#173e45, 7-13 #a7b7ae,#173e45, 14-99 d,#173e45,
-|13: 0-0 d,#1c454c, 1-1 d,#173e45, 2-6 #647e7c,#173e45, 7-13 #a7b7ae,#173e45, 14-99 d,#173e45,
-|14: 0-0 d,#1c454c, 1-1 d,#173e45, 2-6 #647e7c,#173e45, 7-13 #a7b7ae,#173e45, 14-99 d,#173e45,
-|15: 0-0 d,#1c454c, 1-1 d,#173e45, 2-6 #647e7c,#173e45, 7-13 #a7b7ae,#173e45, 14-99 d,#173e45,
-|16: 0-0 d,#1c454c, 1-1 d,#173e45, 2-6 #647e7c,#173e45, 7-13 #a7b7ae,#173e45, 14-99 d,#173e45,
-|17: 0-1 #000000,#d5bc72, 2-60 #d3e0c9,#214e50, 61-99 d,#214e50,
-|18: 0-0 d,#69938a, 1-1 d,#173e45, 2-6 #647e7c,#173e45, 7-21 #a7b7ae,#173e45, 22-99 d,#173e45,
-|19: 0-0 d,#1c454c, 1-1 d,#173e45, 2-6 #647e7c,#173e45, 7-19 #a7b7ae,#173e45, 20-99 d,#173e45,
-|20: 0-0 d,#1c454c, 1-1 d,#173e45, 2-6 #647e7c,#173e45, 7-16 #a7b7ae,#173e45, 17-99 d,#173e45,
-|21: 0-0 d,#1c454c, 1-1 d,#173e45, 2-6 #647e7c,#173e45, 7-15 #a7b7ae,#173e45, 16-99 d,#173e45,
-|22: 0-0 d,#1c454c, 1-1 d,#173e45, 2-6 #647e7c,#173e45, 7-17 #a7b7ae,#173e45, 18-99 d,#173e45,
-|23: 0-0 d,#1c454c, 1-1 d,#173e45, 2-6 #647e7c,#173e45, 7-20 #a7b7ae,#173e45, 21-99 d,#173e45,
-|24: 0-0 d,#1c454c, 1-1 d,#173e45, 2-6 #647e7c,#173e45, 7-19 #a7b7ae,#173e45, 20-99 d,#173e45,
-|25: 0-0 d,#1c454c, 1-1 d,#173e45, 2-6 #647e7c,#173e45, 7-17 #a7b7ae,#173e45, 18-99 d,#173e45,
-|26: 0-0 d,#1c454c, 1-1 d,#173e45, 2-6 #647e7c,#173e45, 7-18 #a7b7ae,#173e45, 19-99 d,#173e45,
-|27: 0-0 d,#1c454c, 1-1 d,#173e45, 2-6 #6c8684,#173e45,b 7-20 #a7b7ae,#173e45, 21-99 d,#173e45,
-|28: 0-0 d,#1c454c, 1-1 d,#173e45, 2-6 #647e7c,#173e45, 7-20 #a7b7ae,#173e45, 21-99 d,#173e45,
-|29: 0-0 d,#1c454c, 1-1 d,#173e45, 2-6 #647e7c,#173e45, 7-19 #a7b7ae,#173e45, 20-99 d,#173e45,
-|30: 0-0 d,#1c454c, 1-1 d,#173e45, 2-6 #647e7c,#173e45, 7-16 #a7b7ae,#173e45, 17-99 d,#173e45,
-== snap step-spectrum grid=100x31 cursor=7,27
+|3: 1 line 1 Themes
+|16: /tmp/pardes-snap/themesel/cwd/+Themes Save Tty Collapse Del
+|17: 1 # Pardes themes
|18: 2 Theme orchard
|19: 3 Theme dusk
|20: 4 Theme ink
@@ -257,39 +47,241 @@
|28: 12 Theme harvest
|29: 13 Theme clay
|30: 14 Theme forge_black
+== snap step-orchard grid=100x31 cursor=7,18
+|3: 1 line 1
+|17: 1 # Pardes themes Theme
+== 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,
+|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,
+|6: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-99 #e5eee5,#0d1410,
+|7: 0-0 d,#152019, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-99 #e5eee5,#0d1410,
+|8: 0-0 d,#152019, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-99 #e5eee5,#0d1410,
+|9: 0-0 d,#152019, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-99 #e5eee5,#0d1410,
+|10: 0-0 d,#152019, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-99 #e5eee5,#0d1410,
+|11: 0-0 d,#152019, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-99 #e5eee5,#0d1410,
+|12: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-99 #e5eee5,#0d1410,
+|13: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-99 #e5eee5,#0d1410,
+|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,
+|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,
+|21: 0-0 d,#152019, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-99 #e5eee5,#0d1410,
+|22: 0-0 d,#152019, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-99 #e5eee5,#0d1410,
+|23: 0-0 d,#152019, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-99 #e5eee5,#0d1410,
+|24: 0-0 d,#152019, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-99 #e5eee5,#0d1410,
+|25: 0-0 d,#152019, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-99 #e5eee5,#0d1410,
+|26: 0-0 d,#152019, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-99 #e5eee5,#0d1410,
+|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,
+== snap step-dusk grid=100x31 cursor=7,19
+== 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,
+|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,
+|6: 0-0 d,#8e667c, 1-4 d,#39323b, 5-6 #82717e,#39323b, 7-99 #c3b6c1,#39323b,
+|7: 0-0 d,#3d3540, 1-4 d,#39323b, 5-6 #82717e,#39323b, 7-99 #c3b6c1,#39323b,
+|8: 0-0 d,#3d3540, 1-4 d,#39323b, 5-6 #82717e,#39323b, 7-99 #c3b6c1,#39323b,
+|9: 0-0 d,#3d3540, 1-4 d,#39323b, 5-6 #82717e,#39323b, 7-99 #c3b6c1,#39323b,
+|10: 0-0 d,#3d3540, 1-4 d,#39323b, 5-6 #82717e,#39323b, 7-99 #c3b6c1,#39323b,
+|11: 0-0 d,#3d3540, 1-4 d,#39323b, 5-6 #82717e,#39323b, 7-99 #c3b6c1,#39323b,
+|12: 0-0 d,#3d3540, 1-3 d,#39323b, 4-6 #82717e,#39323b, 7-99 #c3b6c1,#39323b,
+|13: 0-0 d,#3d3540, 1-3 d,#39323b, 4-6 #82717e,#39323b, 7-99 #c3b6c1,#39323b,
+|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,
+|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,
+|21: 0-0 d,#3d3540, 1-4 d,#39323b, 5-6 #82717e,#39323b, 7-99 #c3b6c1,#39323b,
+|22: 0-0 d,#3d3540, 1-4 d,#39323b, 5-6 #82717e,#39323b, 7-99 #c3b6c1,#39323b,
+|23: 0-0 d,#3d3540, 1-4 d,#39323b, 5-6 #82717e,#39323b, 7-99 #c3b6c1,#39323b,
+|24: 0-0 d,#3d3540, 1-4 d,#39323b, 5-6 #82717e,#39323b, 7-99 #c3b6c1,#39323b,
+|25: 0-0 d,#3d3540, 1-4 d,#39323b, 5-6 #82717e,#39323b, 7-99 #c3b6c1,#39323b,
+|26: 0-0 d,#3d3540, 1-3 d,#39323b, 4-6 #82717e,#39323b, 7-99 #c3b6c1,#39323b,
+|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,
+== snap step-atelier grid=100x31 cursor=7,23
+== 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,
+|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,
+|6: 0-0 d,#9fae76, 1-4 d,#fffdeb, 5-6 #909880,#fffdeb, 7-99 #293f35,#fffdeb,
+|7: 0-0 d,#eeeccf, 1-4 d,#fffdeb, 5-6 #909880,#fffdeb, 7-99 #293f35,#fffdeb,
+|8: 0-0 d,#eeeccf, 1-4 d,#fffdeb, 5-6 #909880,#fffdeb, 7-99 #293f35,#fffdeb,
+|9: 0-0 d,#eeeccf, 1-4 d,#fffdeb, 5-6 #909880,#fffdeb, 7-99 #293f35,#fffdeb,
+|10: 0-0 d,#eeeccf, 1-4 d,#fffdeb, 5-6 #909880,#fffdeb, 7-99 #293f35,#fffdeb,
+|11: 0-0 d,#eeeccf, 1-4 d,#fffdeb, 5-6 #909880,#fffdeb, 7-99 #293f35,#fffdeb,
+|12: 0-0 d,#eeeccf, 1-3 d,#fffdeb, 4-6 #909880,#fffdeb, 7-99 #293f35,#fffdeb,
+|13: 0-0 d,#eeeccf, 1-3 d,#fffdeb, 4-6 #909880,#fffdeb, 7-99 #293f35,#fffdeb,
+|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,
+|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,
+|21: 0-0 d,#eeeccf, 1-4 d,#fffdeb, 5-6 #909880,#fffdeb, 7-99 #293f35,#fffdeb,
+|22: 0-0 d,#eeeccf, 1-4 d,#fffdeb, 5-6 #909880,#fffdeb, 7-99 #293f35,#fffdeb,
+|23: 0-0 d,#eeeccf, 1-1 d,#fffdeb, 2-4 d,#fffdeb,b 5-6 #889078,#fffdeb,b 7-99 #293f35,#fffdeb,
+|24: 0-0 d,#eeeccf, 1-4 d,#fffdeb, 5-6 #909880,#fffdeb, 7-99 #293f35,#fffdeb,
+|25: 0-0 d,#eeeccf, 1-4 d,#fffdeb, 5-6 #909880,#fffdeb, 7-99 #293f35,#fffdeb,
+|26: 0-0 d,#eeeccf, 1-3 d,#fffdeb, 4-6 #909880,#fffdeb, 7-99 #293f35,#fffdeb,
+|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,
+== snap step-forge grid=100x31 cursor=7,24
+== 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,
+|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,
+|6: 0-0 d,#708095, 1-4 d,#0c0c0e, 5-6 #62656c,#0c0c0e, 7-99 #e5e5e5,#0c0c0e,
+|7: 0-0 d,#1a1c21, 1-4 d,#0c0c0e, 5-6 #62656c,#0c0c0e, 7-99 #e5e5e5,#0c0c0e,
+|8: 0-0 d,#1a1c21, 1-4 d,#0c0c0e, 5-6 #62656c,#0c0c0e, 7-99 #e5e5e5,#0c0c0e,
+|9: 0-0 d,#1a1c21, 1-4 d,#0c0c0e, 5-6 #62656c,#0c0c0e, 7-99 #e5e5e5,#0c0c0e,
+|10: 0-0 d,#1a1c21, 1-4 d,#0c0c0e, 5-6 #62656c,#0c0c0e, 7-99 #e5e5e5,#0c0c0e,
+|11: 0-0 d,#1a1c21, 1-4 d,#0c0c0e, 5-6 #62656c,#0c0c0e, 7-99 #e5e5e5,#0c0c0e,
+|12: 0-0 d,#1a1c21, 1-3 d,#0c0c0e, 4-6 #62656c,#0c0c0e, 7-99 #e5e5e5,#0c0c0e,
+|13: 0-0 d,#1a1c21, 1-3 d,#0c0c0e, 4-6 #62656c,#0c0c0e, 7-99 #e5e5e5,#0c0c0e,
+|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,
+|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,
+|21: 0-0 d,#1a1c21, 1-4 d,#0c0c0e, 5-6 #62656c,#0c0c0e, 7-99 #e5e5e5,#0c0c0e,
+|22: 0-0 d,#1a1c21, 1-4 d,#0c0c0e, 5-6 #62656c,#0c0c0e, 7-99 #e5e5e5,#0c0c0e,
+|23: 0-0 d,#1a1c21, 1-4 d,#0c0c0e, 5-6 #62656c,#0c0c0e, 7-99 #e5e5e5,#0c0c0e,
+|24: 0-0 d,#1a1c21, 1-1 d,#0c0c0e, 2-4 d,#0c0c0e,b 5-6 #6a6d74,#0c0c0e,b 7-99 #e5e5e5,#0c0c0e,
+|25: 0-0 d,#1a1c21, 1-4 d,#0c0c0e, 5-6 #62656c,#0c0c0e, 7-99 #e5e5e5,#0c0c0e,
+|26: 0-0 d,#1a1c21, 1-3 d,#0c0c0e, 4-6 #62656c,#0c0c0e, 7-99 #e5e5e5,#0c0c0e,
+|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,
+== snap step-lagoon grid=100x31 cursor=7,25
+== 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,
+|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,
+|6: 0-0 d,#6e9b8b, 1-4 d,#34464c, 5-6 #7b9194,#34464c, 7-99 #bac9ce,#34464c,
+|7: 0-0 d,#3a4c50, 1-4 d,#34464c, 5-6 #7b9194,#34464c, 7-99 #bac9ce,#34464c,
+|8: 0-0 d,#3a4c50, 1-4 d,#34464c, 5-6 #7b9194,#34464c, 7-99 #bac9ce,#34464c,
+|9: 0-0 d,#3a4c50, 1-4 d,#34464c, 5-6 #7b9194,#34464c, 7-99 #bac9ce,#34464c,
+|10: 0-0 d,#3a4c50, 1-4 d,#34464c, 5-6 #7b9194,#34464c, 7-99 #bac9ce,#34464c,
+|11: 0-0 d,#3a4c50, 1-4 d,#34464c, 5-6 #7b9194,#34464c, 7-99 #bac9ce,#34464c,
+|12: 0-0 d,#3a4c50, 1-3 d,#34464c, 4-6 #7b9194,#34464c, 7-99 #bac9ce,#34464c,
+|13: 0-0 d,#3a4c50, 1-3 d,#34464c, 4-6 #7b9194,#34464c, 7-99 #bac9ce,#34464c,
+|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,
+|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,
+|21: 0-0 d,#3a4c50, 1-4 d,#34464c, 5-6 #7b9194,#34464c, 7-99 #bac9ce,#34464c,
+|22: 0-0 d,#3a4c50, 1-4 d,#34464c, 5-6 #7b9194,#34464c, 7-99 #bac9ce,#34464c,
+|23: 0-0 d,#3a4c50, 1-4 d,#34464c, 5-6 #7b9194,#34464c, 7-99 #bac9ce,#34464c,
+|24: 0-0 d,#3a4c50, 1-4 d,#34464c, 5-6 #7b9194,#34464c, 7-99 #bac9ce,#34464c,
+|25: 0-0 d,#3a4c50, 1-1 d,#34464c, 2-4 d,#34464c,b 5-6 #83999c,#34464c,b 7-99 #bac9ce,#34464c,
+|26: 0-0 d,#3a4c50, 1-3 d,#34464c, 4-6 #7b9194,#34464c, 7-99 #bac9ce,#34464c,
+|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,
+== snap step-solarium grid=100x31 cursor=7,26
+== 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,
+|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,
+|6: 0-0 d,#65978c, 1-4 d,#173e45, 5-6 #647e7c,#173e45, 7-99 #a7b7ae,#173e45,
+|7: 0-0 d,#1c454c, 1-4 d,#173e45, 5-6 #647e7c,#173e45, 7-99 #a7b7ae,#173e45,
+|8: 0-0 d,#1c454c, 1-4 d,#173e45, 5-6 #647e7c,#173e45, 7-99 #a7b7ae,#173e45,
+|9: 0-0 d,#1c454c, 1-4 d,#173e45, 5-6 #647e7c,#173e45, 7-99 #a7b7ae,#173e45,
+|10: 0-0 d,#1c454c, 1-4 d,#173e45, 5-6 #647e7c,#173e45, 7-99 #a7b7ae,#173e45,
+|11: 0-0 d,#1c454c, 1-4 d,#173e45, 5-6 #647e7c,#173e45, 7-99 #a7b7ae,#173e45,
+|12: 0-0 d,#1c454c, 1-3 d,#173e45, 4-6 #647e7c,#173e45, 7-99 #a7b7ae,#173e45,
+|13: 0-0 d,#1c454c, 1-3 d,#173e45, 4-6 #647e7c,#173e45, 7-99 #a7b7ae,#173e45,
+|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,
+|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,
+|21: 0-0 d,#1c454c, 1-4 d,#173e45, 5-6 #647e7c,#173e45, 7-99 #a7b7ae,#173e45,
+|22: 0-0 d,#1c454c, 1-4 d,#173e45, 5-6 #647e7c,#173e45, 7-99 #a7b7ae,#173e45,
+|23: 0-0 d,#1c454c, 1-4 d,#173e45, 5-6 #647e7c,#173e45, 7-99 #a7b7ae,#173e45,
+|24: 0-0 d,#1c454c, 1-4 d,#173e45, 5-6 #647e7c,#173e45, 7-99 #a7b7ae,#173e45,
+|25: 0-0 d,#1c454c, 1-4 d,#173e45, 5-6 #647e7c,#173e45, 7-99 #a7b7ae,#173e45,
+|26: 0-0 d,#1c454c, 1-1 d,#173e45, 2-3 d,#173e45,b 4-6 #6c8684,#173e45,b 7-99 #a7b7ae,#173e45,
+|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
== style step-spectrum grid=100x31
-|0: 0-70 #ddd8bb,#3b3830, 71-99 d,#3b3830,
-|1: 0-24 #e9e4c7,#4d4736, 25-99 d,#4d4736,
-|2: 0-1 #ffffff,#8b8056, 2-58 #ddd8bb,#3b3830, 59-99 d,#3b3830,
-|3: 0-0 d,#918b72, 1-1 d,#100e11, 2-6 #68616b,#100e11, 7-12 #fcfcfa,#100e11, 13-99 d,#100e11,
-|4: 0-0 d,#918b72, 1-1 d,#100e11, 2-6 #68616b,#100e11, 7-12 #fcfcfa,#100e11, 13-99 d,#100e11,
-|5: 0-0 d,#918b72, 1-1 d,#100e11, 2-6 #68616b,#100e11, 7-12 #fcfcfa,#100e11, 13-99 d,#100e11,
-|6: 0-0 d,#918b72, 1-1 d,#100e11, 2-6 #68616b,#100e11, 7-12 #fcfcfa,#100e11, 13-99 d,#100e11,
-|7: 0-0 d,#211d23, 1-1 d,#100e11, 2-6 #68616b,#100e11, 7-12 #fcfcfa,#100e11, 13-99 d,#100e11,
-|8: 0-0 d,#211d23, 1-1 d,#100e11, 2-6 #68616b,#100e11, 7-12 #fcfcfa,#100e11, 13-99 d,#100e11,
-|9: 0-0 d,#211d23, 1-1 d,#100e11, 2-6 #68616b,#100e11, 7-12 #fcfcfa,#100e11, 13-99 d,#100e11,
-|10: 0-0 d,#211d23, 1-1 d,#100e11, 2-6 #68616b,#100e11, 7-12 #fcfcfa,#100e11, 13-99 d,#100e11,
-|11: 0-0 d,#211d23, 1-1 d,#100e11, 2-6 #68616b,#100e11, 7-12 #fcfcfa,#100e11, 13-99 d,#100e11,
-|12: 0-0 d,#211d23, 1-1 d,#100e11, 2-6 #68616b,#100e11, 7-13 #fcfcfa,#100e11, 14-99 d,#100e11,
-|13: 0-0 d,#211d23, 1-1 d,#100e11, 2-6 #68616b,#100e11, 7-13 #fcfcfa,#100e11, 14-99 d,#100e11,
-|14: 0-0 d,#211d23, 1-1 d,#100e11, 2-6 #68616b,#100e11, 7-13 #fcfcfa,#100e11, 14-99 d,#100e11,
-|15: 0-0 d,#211d23, 1-1 d,#100e11, 2-6 #68616b,#100e11, 7-13 #fcfcfa,#100e11, 14-99 d,#100e11,
-|16: 0-0 d,#211d23, 1-1 d,#100e11, 2-6 #68616b,#100e11, 7-13 #fcfcfa,#100e11, 14-99 d,#100e11,
-|17: 0-1 #000000,#ffd866, 2-60 #e9e4c7,#4d4736, 61-99 d,#4d4736,
-|18: 0-0 d,#918b72, 1-1 d,#100e11, 2-6 #68616b,#100e11, 7-19 #fcfcfa,#100e11, 20-99 d,#100e11,
-|19: 0-0 d,#211d23, 1-1 d,#100e11, 2-6 #68616b,#100e11, 7-16 #fcfcfa,#100e11, 17-99 d,#100e11,
-|20: 0-0 d,#211d23, 1-1 d,#100e11, 2-6 #68616b,#100e11, 7-15 #fcfcfa,#100e11, 16-99 d,#100e11,
-|21: 0-0 d,#211d23, 1-1 d,#100e11, 2-6 #68616b,#100e11, 7-17 #fcfcfa,#100e11, 18-99 d,#100e11,
-|22: 0-0 d,#211d23, 1-1 d,#100e11, 2-6 #68616b,#100e11, 7-20 #fcfcfa,#100e11, 21-99 d,#100e11,
-|23: 0-0 d,#211d23, 1-1 d,#100e11, 2-6 #68616b,#100e11, 7-19 #fcfcfa,#100e11, 20-99 d,#100e11,
-|24: 0-0 d,#211d23, 1-1 d,#100e11, 2-6 #68616b,#100e11, 7-17 #fcfcfa,#100e11, 18-99 d,#100e11,
-|25: 0-0 d,#211d23, 1-1 d,#100e11, 2-6 #68616b,#100e11, 7-18 #fcfcfa,#100e11, 19-99 d,#100e11,
-|26: 0-0 d,#211d23, 1-1 d,#100e11, 2-6 #68616b,#100e11, 7-20 #fcfcfa,#100e11, 21-99 d,#100e11,
-|27: 0-0 d,#211d23, 1-1 d,#100e11, 2-6 #706973,#100e11,b 7-20 #fcfcfa,#100e11, 21-99 d,#100e11,
-|28: 0-0 d,#211d23, 1-1 d,#100e11, 2-6 #68616b,#100e11, 7-19 #fcfcfa,#100e11, 20-99 d,#100e11,
-|29: 0-0 d,#211d23, 1-1 d,#100e11, 2-6 #68616b,#100e11, 7-16 #fcfcfa,#100e11, 17-99 d,#100e11,
-|30: 0-0 d,#211d23, 1-1 d,#100e11, 2-6 #68616b,#100e11, 7-23 #fcfcfa,#100e11, 24-99 d,#100e11,
+|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,
+|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,
+|6: 0-0 d,#948d6f, 1-4 d,#100e11, 5-6 #68616b,#100e11, 7-99 #fcfcfa,#100e11,
+|7: 0-0 d,#211d23, 1-4 d,#100e11, 5-6 #68616b,#100e11, 7-99 #fcfcfa,#100e11,
+|8: 0-0 d,#211d23, 1-4 d,#100e11, 5-6 #68616b,#100e11, 7-99 #fcfcfa,#100e11,
+|9: 0-0 d,#211d23, 1-4 d,#100e11, 5-6 #68616b,#100e11, 7-99 #fcfcfa,#100e11,
+|10: 0-0 d,#211d23, 1-4 d,#100e11, 5-6 #68616b,#100e11, 7-99 #fcfcfa,#100e11,
+|11: 0-0 d,#211d23, 1-4 d,#100e11, 5-6 #68616b,#100e11, 7-99 #fcfcfa,#100e11,
+|12: 0-0 d,#211d23, 1-3 d,#100e11, 4-6 #68616b,#100e11, 7-99 #fcfcfa,#100e11,
+|13: 0-0 d,#211d23, 1-3 d,#100e11, 4-6 #68616b,#100e11, 7-99 #fcfcfa,#100e11,
+|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,
+|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,
+|21: 0-0 d,#211d23, 1-4 d,#100e11, 5-6 #68616b,#100e11, 7-99 #fcfcfa,#100e11,
+|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,
+|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
@@ -304,38 +296,39 @@
|29: 14 Theme forge_black
|30: 15 Theme forge_soft
== style step-harvest grid=100x31
-|0: 0-70 #d5d8b8,#343b2e, 71-99 d,#343b2e,
-|1: 0-24 #e1e4c4,#424d38, 25-99 d,#424d38,
-|2: 0-1 #ffffff,#777953, 2-58 #d5d8b8,#343b2e, 59-99 d,#343b2e,
-|3: 0-0 d,#858a62, 1-1 d,#100e0b, 2-6 #6a6456,#100e0b, 7-12 #f3f2cc,#100e0b, 13-99 d,#100e0b,
-|4: 0-0 d,#858a62, 1-1 d,#100e0b, 2-6 #6a6456,#100e0b, 7-12 #f3f2cc,#100e0b, 13-99 d,#100e0b,
-|5: 0-0 d,#858a62, 1-1 d,#100e0b, 2-6 #6a6456,#100e0b, 7-12 #f3f2cc,#100e0b, 13-99 d,#100e0b,
-|6: 0-0 d,#858a62, 1-1 d,#100e0b, 2-6 #6a6456,#100e0b, 7-12 #f3f2cc,#100e0b, 13-99 d,#100e0b,
-|7: 0-0 d,#201d17, 1-1 d,#100e0b, 2-6 #6a6456,#100e0b, 7-12 #f3f2cc,#100e0b, 13-99 d,#100e0b,
-|8: 0-0 d,#201d17, 1-1 d,#100e0b, 2-6 #6a6456,#100e0b, 7-12 #f3f2cc,#100e0b, 13-99 d,#100e0b,
-|9: 0-0 d,#201d17, 1-1 d,#100e0b, 2-6 #6a6456,#100e0b, 7-12 #f3f2cc,#100e0b, 13-99 d,#100e0b,
-|10: 0-0 d,#201d17, 1-1 d,#100e0b, 2-6 #6a6456,#100e0b, 7-12 #f3f2cc,#100e0b, 13-99 d,#100e0b,
-|11: 0-0 d,#201d17, 1-1 d,#100e0b, 2-6 #6a6456,#100e0b, 7-12 #f3f2cc,#100e0b, 13-99 d,#100e0b,
-|12: 0-0 d,#201d17, 1-1 d,#100e0b, 2-6 #6a6456,#100e0b, 7-13 #f3f2cc,#100e0b, 14-99 d,#100e0b,
-|13: 0-0 d,#201d17, 1-1 d,#100e0b, 2-6 #6a6456,#100e0b, 7-13 #f3f2cc,#100e0b, 14-99 d,#100e0b,
-|14: 0-0 d,#201d17, 1-1 d,#100e0b, 2-6 #6a6456,#100e0b, 7-13 #f3f2cc,#100e0b, 14-99 d,#100e0b,
-|15: 0-0 d,#201d17, 1-1 d,#100e0b, 2-6 #6a6456,#100e0b, 7-13 #f3f2cc,#100e0b, 14-99 d,#100e0b,
-|16: 0-0 d,#201d17, 1-1 d,#100e0b, 2-6 #6a6456,#100e0b, 7-13 #f3f2cc,#100e0b, 14-99 d,#100e0b,
-|17: 0-1 #000000,#cfba8b, 2-60 #e1e4c4,#424d38, 61-99 d,#424d38,
-|18: 0-0 d,#858a62, 1-1 d,#100e0b, 2-6 #6a6456,#100e0b, 7-16 #f3f2cc,#100e0b, 17-99 d,#100e0b,
-|19: 0-0 d,#201d17, 1-1 d,#100e0b, 2-6 #6a6456,#100e0b, 7-15 #f3f2cc,#100e0b, 16-99 d,#100e0b,
-|20: 0-0 d,#201d17, 1-1 d,#100e0b, 2-6 #6a6456,#100e0b, 7-17 #f3f2cc,#100e0b, 18-99 d,#100e0b,
-|21: 0-0 d,#201d17, 1-1 d,#100e0b, 2-6 #6a6456,#100e0b, 7-20 #f3f2cc,#100e0b, 21-99 d,#100e0b,
-|22: 0-0 d,#201d17, 1-1 d,#100e0b, 2-6 #6a6456,#100e0b, 7-19 #f3f2cc,#100e0b, 20-99 d,#100e0b,
-|23: 0-0 d,#201d17, 1-1 d,#100e0b, 2-6 #6a6456,#100e0b, 7-17 #f3f2cc,#100e0b, 18-99 d,#100e0b,
-|24: 0-0 d,#201d17, 1-1 d,#100e0b, 2-6 #6a6456,#100e0b, 7-18 #f3f2cc,#100e0b, 19-99 d,#100e0b,
-|25: 0-0 d,#201d17, 1-1 d,#100e0b, 2-6 #6a6456,#100e0b, 7-20 #f3f2cc,#100e0b, 21-99 d,#100e0b,
-|26: 0-0 d,#201d17, 1-1 d,#100e0b, 2-6 #6a6456,#100e0b, 7-20 #f3f2cc,#100e0b, 21-99 d,#100e0b,
-|27: 0-0 d,#201d17, 1-1 d,#100e0b, 2-6 #726c5e,#100e0b,b 7-19 #f3f2cc,#100e0b, 20-99 d,#100e0b,
-|28: 0-0 d,#201d17, 1-1 d,#100e0b, 2-6 #6a6456,#100e0b, 7-16 #f3f2cc,#100e0b, 17-99 d,#100e0b,
-|29: 0-0 d,#201d17, 1-1 d,#100e0b, 2-6 #6a6456,#100e0b, 7-23 #f3f2cc,#100e0b, 24-99 d,#100e0b,
-|30: 0-0 d,#201d17, 1-1 d,#100e0b, 2-6 #6a6456,#100e0b, 7-22 #f3f2cc,#100e0b, 23-99 d,#100e0b,
+|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,
+|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,
+|6: 0-0 d,#888e5e, 1-4 d,#100e0b, 5-6 #6a6456,#100e0b, 7-99 #f3f2cc,#100e0b,
+|7: 0-0 d,#201d17, 1-4 d,#100e0b, 5-6 #6a6456,#100e0b, 7-99 #f3f2cc,#100e0b,
+|8: 0-0 d,#201d17, 1-4 d,#100e0b, 5-6 #6a6456,#100e0b, 7-99 #f3f2cc,#100e0b,
+|9: 0-0 d,#201d17, 1-4 d,#100e0b, 5-6 #6a6456,#100e0b, 7-99 #f3f2cc,#100e0b,
+|10: 0-0 d,#201d17, 1-4 d,#100e0b, 5-6 #6a6456,#100e0b, 7-99 #f3f2cc,#100e0b,
+|11: 0-0 d,#201d17, 1-4 d,#100e0b, 5-6 #6a6456,#100e0b, 7-99 #f3f2cc,#100e0b,
+|12: 0-0 d,#201d17, 1-3 d,#100e0b, 4-6 #6a6456,#100e0b, 7-99 #f3f2cc,#100e0b,
+|13: 0-0 d,#201d17, 1-3 d,#100e0b, 4-6 #6a6456,#100e0b, 7-99 #f3f2cc,#100e0b,
+|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,
+|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,
+|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,
+|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
@@ -350,38 +343,39 @@
|29: 15 Theme forge_soft
|30: 16 Theme orchard_black
== style step-clay grid=100x31
-|0: 0-70 #d7d6b6,#343f36, 71-99 d,#343f36,
-|1: 0-24 #e3e2c2,#424f40, 25-99 d,#424f40,
-|2: 0-1 #ffffff,#677752, 2-58 #d7d6b6,#343f36, 59-99 d,#343f36,
-|3: 0-0 d,#8a906b, 1-1 d,#10100e, 2-6 #696455,#10100e, 7-12 #f3e5bc,#10100e, 13-99 d,#10100e,
-|4: 0-0 d,#8a906b, 1-1 d,#10100e, 2-6 #696455,#10100e, 7-12 #f3e5bc,#10100e, 13-99 d,#10100e,
-|5: 0-0 d,#8a906b, 1-1 d,#10100e, 2-6 #696455,#10100e, 7-12 #f3e5bc,#10100e, 13-99 d,#10100e,
-|6: 0-0 d,#8a906b, 1-1 d,#10100e, 2-6 #696455,#10100e, 7-12 #f3e5bc,#10100e, 13-99 d,#10100e,
-|7: 0-0 d,#222119, 1-1 d,#10100e, 2-6 #696455,#10100e, 7-12 #f3e5bc,#10100e, 13-99 d,#10100e,
-|8: 0-0 d,#222119, 1-1 d,#10100e, 2-6 #696455,#10100e, 7-12 #f3e5bc,#10100e, 13-99 d,#10100e,
-|9: 0-0 d,#222119, 1-1 d,#10100e, 2-6 #696455,#10100e, 7-12 #f3e5bc,#10100e, 13-99 d,#10100e,
-|10: 0-0 d,#222119, 1-1 d,#10100e, 2-6 #696455,#10100e, 7-12 #f3e5bc,#10100e, 13-99 d,#10100e,
-|11: 0-0 d,#222119, 1-1 d,#10100e, 2-6 #696455,#10100e, 7-12 #f3e5bc,#10100e, 13-99 d,#10100e,
-|12: 0-0 d,#222119, 1-1 d,#10100e, 2-6 #696455,#10100e, 7-13 #f3e5bc,#10100e, 14-99 d,#10100e,
-|13: 0-0 d,#222119, 1-1 d,#10100e, 2-6 #696455,#10100e, 7-13 #f3e5bc,#10100e, 14-99 d,#10100e,
-|14: 0-0 d,#222119, 1-1 d,#10100e, 2-6 #696455,#10100e, 7-13 #f3e5bc,#10100e, 14-99 d,#10100e,
-|15: 0-0 d,#222119, 1-1 d,#10100e, 2-6 #696455,#10100e, 7-13 #f3e5bc,#10100e, 14-99 d,#10100e,
-|16: 0-0 d,#222119, 1-1 d,#10100e, 2-6 #696455,#10100e, 7-13 #f3e5bc,#10100e, 14-99 d,#10100e,
-|17: 0-1 #000000,#8ec07c, 2-60 #e3e2c2,#424f40, 61-99 d,#424f40,
-|18: 0-0 d,#8a906b, 1-1 d,#10100e, 2-6 #696455,#10100e, 7-15 #f3e5bc,#10100e, 16-99 d,#10100e,
-|19: 0-0 d,#222119, 1-1 d,#10100e, 2-6 #696455,#10100e, 7-17 #f3e5bc,#10100e, 18-99 d,#10100e,
-|20: 0-0 d,#222119, 1-1 d,#10100e, 2-6 #696455,#10100e, 7-20 #f3e5bc,#10100e, 21-99 d,#10100e,
-|21: 0-0 d,#222119, 1-1 d,#10100e, 2-6 #696455,#10100e, 7-19 #f3e5bc,#10100e, 20-99 d,#10100e,
-|22: 0-0 d,#222119, 1-1 d,#10100e, 2-6 #696455,#10100e, 7-17 #f3e5bc,#10100e, 18-99 d,#10100e,
-|23: 0-0 d,#222119, 1-1 d,#10100e, 2-6 #696455,#10100e, 7-18 #f3e5bc,#10100e, 19-99 d,#10100e,
-|24: 0-0 d,#222119, 1-1 d,#10100e, 2-6 #696455,#10100e, 7-20 #f3e5bc,#10100e, 21-99 d,#10100e,
-|25: 0-0 d,#222119, 1-1 d,#10100e, 2-6 #696455,#10100e, 7-20 #f3e5bc,#10100e, 21-99 d,#10100e,
-|26: 0-0 d,#222119, 1-1 d,#10100e, 2-6 #696455,#10100e, 7-19 #f3e5bc,#10100e, 20-99 d,#10100e,
-|27: 0-0 d,#222119, 1-1 d,#10100e, 2-6 #716c5d,#10100e,b 7-16 #f3e5bc,#10100e, 17-99 d,#10100e,
-|28: 0-0 d,#222119, 1-1 d,#10100e, 2-6 #696455,#10100e, 7-23 #f3e5bc,#10100e, 24-99 d,#10100e,
-|29: 0-0 d,#222119, 1-1 d,#10100e, 2-6 #696455,#10100e, 7-22 #f3e5bc,#10100e, 23-99 d,#10100e,
-|30: 0-0 d,#222119, 1-1 d,#10100e, 2-6 #696455,#10100e, 7-25 #f3e5bc,#10100e, 26-99 d,#10100e,
+|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,
+|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,
+|6: 0-0 d,#8c9467, 1-4 d,#10100e, 5-6 #696455,#10100e, 7-99 #f3e5bc,#10100e,
+|7: 0-0 d,#222119, 1-4 d,#10100e, 5-6 #696455,#10100e, 7-99 #f3e5bc,#10100e,
+|8: 0-0 d,#222119, 1-4 d,#10100e, 5-6 #696455,#10100e, 7-99 #f3e5bc,#10100e,
+|9: 0-0 d,#222119, 1-4 d,#10100e, 5-6 #696455,#10100e, 7-99 #f3e5bc,#10100e,
+|10: 0-0 d,#222119, 1-4 d,#10100e, 5-6 #696455,#10100e, 7-99 #f3e5bc,#10100e,
+|11: 0-0 d,#222119, 1-4 d,#10100e, 5-6 #696455,#10100e, 7-99 #f3e5bc,#10100e,
+|12: 0-0 d,#222119, 1-3 d,#10100e, 4-6 #696455,#10100e, 7-99 #f3e5bc,#10100e,
+|13: 0-0 d,#222119, 1-3 d,#10100e, 4-6 #696455,#10100e, 7-99 #f3e5bc,#10100e,
+|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,
+|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,
+|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,
+|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
@@ -394,40 +388,41 @@
|27: 14 Theme forge_black
|28: 15 Theme forge_soft
|29: 16 Theme orchard_black
-|30: 17
+|30: 17 Theme acme
== style step-forge-black grid=100x31
-|0: 0-70 #c5c9d2,#22252b, 71-99 d,#22252b,
-|1: 0-24 #d1d5de,#2d3440, 25-99 d,#2d3440,
-|2: 0-1 #ffffff,#596577, 2-58 #c5c9d2,#22252b, 59-99 d,#22252b,
-|3: 0-0 d,#738092, 1-1 d,#000000, 2-6 #62656c,#000000, 7-12 #f6f6f6,#000000, 13-99 d,#000000,
-|4: 0-0 d,#738092, 1-1 d,#000000, 2-6 #62656c,#000000, 7-12 #f6f6f6,#000000, 13-99 d,#000000,
-|5: 0-0 d,#738092, 1-1 d,#000000, 2-6 #62656c,#000000, 7-12 #f6f6f6,#000000, 13-99 d,#000000,
-|6: 0-0 d,#738092, 1-1 d,#000000, 2-6 #62656c,#000000, 7-12 #f6f6f6,#000000, 13-99 d,#000000,
-|7: 0-0 d,#14161a, 1-1 d,#000000, 2-6 #62656c,#000000, 7-12 #f6f6f6,#000000, 13-99 d,#000000,
-|8: 0-0 d,#14161a, 1-1 d,#000000, 2-6 #62656c,#000000, 7-12 #f6f6f6,#000000, 13-99 d,#000000,
-|9: 0-0 d,#14161a, 1-1 d,#000000, 2-6 #62656c,#000000, 7-12 #f6f6f6,#000000, 13-99 d,#000000,
-|10: 0-0 d,#14161a, 1-1 d,#000000, 2-6 #62656c,#000000, 7-12 #f6f6f6,#000000, 13-99 d,#000000,
-|11: 0-0 d,#14161a, 1-1 d,#000000, 2-6 #62656c,#000000, 7-12 #f6f6f6,#000000, 13-99 d,#000000,
-|12: 0-0 d,#14161a, 1-1 d,#000000, 2-6 #62656c,#000000, 7-13 #f6f6f6,#000000, 14-99 d,#000000,
-|13: 0-0 d,#14161a, 1-1 d,#000000, 2-6 #62656c,#000000, 7-13 #f6f6f6,#000000, 14-99 d,#000000,
-|14: 0-0 d,#14161a, 1-1 d,#000000, 2-6 #62656c,#000000, 7-13 #f6f6f6,#000000, 14-99 d,#000000,
-|15: 0-0 d,#14161a, 1-1 d,#000000, 2-6 #62656c,#000000, 7-13 #f6f6f6,#000000, 14-99 d,#000000,
-|16: 0-0 d,#14161a, 1-1 d,#000000, 2-6 #62656c,#000000, 7-13 #f6f6f6,#000000, 14-99 d,#000000,
-|17: 0-1 #000000,#a5c4ee, 2-60 #d1d5de,#2d3440, 61-99 d,#2d3440,
-|18: 0-0 d,#738092, 1-1 d,#000000, 2-6 #62656c,#000000, 7-17 #f6f6f6,#000000, 18-99 d,#000000,
-|19: 0-0 d,#14161a, 1-1 d,#000000, 2-6 #62656c,#000000, 7-20 #f6f6f6,#000000, 21-99 d,#000000,
-|20: 0-0 d,#14161a, 1-1 d,#000000, 2-6 #62656c,#000000, 7-19 #f6f6f6,#000000, 20-99 d,#000000,
-|21: 0-0 d,#14161a, 1-1 d,#000000, 2-6 #62656c,#000000, 7-17 #f6f6f6,#000000, 18-99 d,#000000,
-|22: 0-0 d,#14161a, 1-1 d,#000000, 2-6 #62656c,#000000, 7-18 #f6f6f6,#000000, 19-99 d,#000000,
-|23: 0-0 d,#14161a, 1-1 d,#000000, 2-6 #62656c,#000000, 7-20 #f6f6f6,#000000, 21-99 d,#000000,
-|24: 0-0 d,#14161a, 1-1 d,#000000, 2-6 #62656c,#000000, 7-20 #f6f6f6,#000000, 21-99 d,#000000,
-|25: 0-0 d,#14161a, 1-1 d,#000000, 2-6 #62656c,#000000, 7-19 #f6f6f6,#000000, 20-99 d,#000000,
-|26: 0-0 d,#14161a, 1-1 d,#000000, 2-6 #62656c,#000000, 7-16 #f6f6f6,#000000, 17-99 d,#000000,
-|27: 0-0 d,#14161a, 1-1 d,#000000, 2-6 #6a6d74,#000000,b 7-23 #f6f6f6,#000000, 24-99 d,#000000,
-|28: 0-0 d,#14161a, 1-1 d,#000000, 2-6 #62656c,#000000, 7-22 #f6f6f6,#000000, 23-99 d,#000000,
-|29: 0-0 d,#14161a, 1-1 d,#000000, 2-6 #62656c,#000000, 7-25 #f6f6f6,#000000, 26-99 d,#000000,
-|30: 0-0 d,#14161a, 1-1 d,#000000, 2-6 #62656c,#000000, 7-99 d,#000000,
+|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,
+|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,
+|6: 0-0 d,#708095, 1-4 d,#000000, 5-6 #62656c,#000000, 7-99 #f6f6f6,#000000,
+|7: 0-0 d,#14161a, 1-4 d,#000000, 5-6 #62656c,#000000, 7-99 #f6f6f6,#000000,
+|8: 0-0 d,#14161a, 1-4 d,#000000, 5-6 #62656c,#000000, 7-99 #f6f6f6,#000000,
+|9: 0-0 d,#14161a, 1-4 d,#000000, 5-6 #62656c,#000000, 7-99 #f6f6f6,#000000,
+|10: 0-0 d,#14161a, 1-4 d,#000000, 5-6 #62656c,#000000, 7-99 #f6f6f6,#000000,
+|11: 0-0 d,#14161a, 1-4 d,#000000, 5-6 #62656c,#000000, 7-99 #f6f6f6,#000000,
+|12: 0-0 d,#14161a, 1-3 d,#000000, 4-6 #62656c,#000000, 7-99 #f6f6f6,#000000,
+|13: 0-0 d,#14161a, 1-3 d,#000000, 4-6 #62656c,#000000, 7-99 #f6f6f6,#000000,
+|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,
+|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,
+|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,
+|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
@@ -439,41 +434,42 @@
|26: 14 Theme forge_black
|27: 15 Theme forge_soft
|28: 16 Theme orchard_black
-|29: 17
-|30: 18 # Legacy and imported themes
+|29: 17 Theme acme
+|30: 18 Theme lapis
== style step-forge-soft grid=100x31
-|0: 0-70 #c5c9d2,#2a2d34, 71-99 d,#2a2d34,
-|1: 0-24 #d1d5de,#373e49, 25-99 d,#373e49,
-|2: 0-1 #ffffff,#596577, 2-58 #c5c9d2,#2a2d34, 59-99 d,#2a2d34,
-|3: 0-0 d,#738092, 1-1 d,#35383e, 2-6 #868991,#35383e, 7-12 #bfc3cc,#35383e, 13-99 d,#35383e,
-|4: 0-0 d,#738092, 1-1 d,#35383e, 2-6 #868991,#35383e, 7-12 #bfc3cc,#35383e, 13-99 d,#35383e,
-|5: 0-0 d,#738092, 1-1 d,#35383e, 2-6 #868991,#35383e, 7-12 #bfc3cc,#35383e, 13-99 d,#35383e,
-|6: 0-0 d,#738092, 1-1 d,#35383e, 2-6 #868991,#35383e, 7-12 #bfc3cc,#35383e, 13-99 d,#35383e,
-|7: 0-0 d,#3d4047, 1-1 d,#35383e, 2-6 #868991,#35383e, 7-12 #bfc3cc,#35383e, 13-99 d,#35383e,
-|8: 0-0 d,#3d4047, 1-1 d,#35383e, 2-6 #868991,#35383e, 7-12 #bfc3cc,#35383e, 13-99 d,#35383e,
-|9: 0-0 d,#3d4047, 1-1 d,#35383e, 2-6 #868991,#35383e, 7-12 #bfc3cc,#35383e, 13-99 d,#35383e,
-|10: 0-0 d,#3d4047, 1-1 d,#35383e, 2-6 #868991,#35383e, 7-12 #bfc3cc,#35383e, 13-99 d,#35383e,
-|11: 0-0 d,#3d4047, 1-1 d,#35383e, 2-6 #868991,#35383e, 7-12 #bfc3cc,#35383e, 13-99 d,#35383e,
-|12: 0-0 d,#3d4047, 1-1 d,#35383e, 2-6 #868991,#35383e, 7-13 #bfc3cc,#35383e, 14-99 d,#35383e,
-|13: 0-0 d,#3d4047, 1-1 d,#35383e, 2-6 #868991,#35383e, 7-13 #bfc3cc,#35383e, 14-99 d,#35383e,
-|14: 0-0 d,#3d4047, 1-1 d,#35383e, 2-6 #868991,#35383e, 7-13 #bfc3cc,#35383e, 14-99 d,#35383e,
-|15: 0-0 d,#3d4047, 1-1 d,#35383e, 2-6 #868991,#35383e, 7-13 #bfc3cc,#35383e, 14-99 d,#35383e,
-|16: 0-0 d,#3d4047, 1-1 d,#35383e, 2-6 #868991,#35383e, 7-13 #bfc3cc,#35383e, 14-99 d,#35383e,
-|17: 0-1 #000000,#a5c4ee, 2-60 #d1d5de,#373e49, 61-99 d,#373e49,
-|18: 0-0 d,#738092, 1-1 d,#35383e, 2-6 #868991,#35383e, 7-20 #bfc3cc,#35383e, 21-99 d,#35383e,
-|19: 0-0 d,#3d4047, 1-1 d,#35383e, 2-6 #868991,#35383e, 7-19 #bfc3cc,#35383e, 20-99 d,#35383e,
-|20: 0-0 d,#3d4047, 1-1 d,#35383e, 2-6 #868991,#35383e, 7-17 #bfc3cc,#35383e, 18-99 d,#35383e,
-|21: 0-0 d,#3d4047, 1-1 d,#35383e, 2-6 #868991,#35383e, 7-18 #bfc3cc,#35383e, 19-99 d,#35383e,
-|22: 0-0 d,#3d4047, 1-1 d,#35383e, 2-6 #868991,#35383e, 7-20 #bfc3cc,#35383e, 21-99 d,#35383e,
-|23: 0-0 d,#3d4047, 1-1 d,#35383e, 2-6 #868991,#35383e, 7-20 #bfc3cc,#35383e, 21-99 d,#35383e,
-|24: 0-0 d,#3d4047, 1-1 d,#35383e, 2-6 #868991,#35383e, 7-19 #bfc3cc,#35383e, 20-99 d,#35383e,
-|25: 0-0 d,#3d4047, 1-1 d,#35383e, 2-6 #868991,#35383e, 7-16 #bfc3cc,#35383e, 17-99 d,#35383e,
-|26: 0-0 d,#3d4047, 1-1 d,#35383e, 2-6 #868991,#35383e, 7-23 #bfc3cc,#35383e, 24-99 d,#35383e,
-|27: 0-0 d,#3d4047, 1-1 d,#35383e, 2-6 #8e9199,#35383e,b 7-22 #bfc3cc,#35383e, 23-99 d,#35383e,
-|28: 0-0 d,#3d4047, 1-1 d,#35383e, 2-6 #868991,#35383e, 7-25 #bfc3cc,#35383e, 26-99 d,#35383e,
-|29: 0-0 d,#3d4047, 1-1 d,#35383e, 2-6 #868991,#35383e, 7-99 d,#35383e,
-|30: 0-0 d,#3d4047, 1-1 d,#35383e, 2-6 #868991,#35383e, 7-34 #bfc3cc,#35383e, 35-99 d,#35383e,
+|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,
+|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,
+|6: 0-0 d,#708095, 1-4 d,#35383e, 5-6 #868991,#35383e, 7-99 #bfc3cc,#35383e,
+|7: 0-0 d,#3d4047, 1-4 d,#35383e, 5-6 #868991,#35383e, 7-99 #bfc3cc,#35383e,
+|8: 0-0 d,#3d4047, 1-4 d,#35383e, 5-6 #868991,#35383e, 7-99 #bfc3cc,#35383e,
+|9: 0-0 d,#3d4047, 1-4 d,#35383e, 5-6 #868991,#35383e, 7-99 #bfc3cc,#35383e,
+|10: 0-0 d,#3d4047, 1-4 d,#35383e, 5-6 #868991,#35383e, 7-99 #bfc3cc,#35383e,
+|11: 0-0 d,#3d4047, 1-4 d,#35383e, 5-6 #868991,#35383e, 7-99 #bfc3cc,#35383e,
+|12: 0-0 d,#3d4047, 1-3 d,#35383e, 4-6 #868991,#35383e, 7-99 #bfc3cc,#35383e,
+|13: 0-0 d,#3d4047, 1-3 d,#35383e, 4-6 #868991,#35383e, 7-99 #bfc3cc,#35383e,
+|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,
+|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,
+|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,
+|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
@@ -484,42 +480,137 @@
|25: 14 Theme forge_black
|26: 15 Theme forge_soft
|27: 16 Theme orchard_black
-|28: 17
-|29: 18 # Legacy and imported themes
-|30: 19 Theme helix
+|28: 17 Theme acme
+|29: 18 Theme lapis
+|30: 19 Theme lapis_plain
== style step-orchard-black grid=100x31
-|0: 0-70 #b2c3b8,#1d2824, 71-99 d,#1d2824,
-|1: 0-24 #becfc4,#26362d, 25-99 d,#26362d,
-|2: 0-1 #ffffff,#4c6356, 2-58 #b2c3b8,#1d2824, 59-99 d,#1d2824,
-|3: 0-0 d,#637f6a, 1-1 d,#000000, 2-6 #59675c,#000000, 7-12 #f2f8ef,#000000, 13-99 d,#000000,
-|4: 0-0 d,#637f6a, 1-1 d,#000000, 2-6 #59675c,#000000, 7-12 #f2f8ef,#000000, 13-99 d,#000000,
-|5: 0-0 d,#637f6a, 1-1 d,#000000, 2-6 #59675c,#000000, 7-12 #f2f8ef,#000000, 13-99 d,#000000,
-|6: 0-0 d,#637f6a, 1-1 d,#000000, 2-6 #59675c,#000000, 7-12 #f2f8ef,#000000, 13-99 d,#000000,
-|7: 0-0 d,#111813, 1-1 d,#000000, 2-6 #59675c,#000000, 7-12 #f2f8ef,#000000, 13-99 d,#000000,
-|8: 0-0 d,#111813, 1-1 d,#000000, 2-6 #59675c,#000000, 7-12 #f2f8ef,#000000, 13-99 d,#000000,
-|9: 0-0 d,#111813, 1-1 d,#000000, 2-6 #59675c,#000000, 7-12 #f2f8ef,#000000, 13-99 d,#000000,
-|10: 0-0 d,#111813, 1-1 d,#000000, 2-6 #59675c,#000000, 7-12 #f2f8ef,#000000, 13-99 d,#000000,
-|11: 0-0 d,#111813, 1-1 d,#000000, 2-6 #59675c,#000000, 7-12 #f2f8ef,#000000, 13-99 d,#000000,
-|12: 0-0 d,#111813, 1-1 d,#000000, 2-6 #59675c,#000000, 7-13 #f2f8ef,#000000, 14-99 d,#000000,
-|13: 0-0 d,#111813, 1-1 d,#000000, 2-6 #59675c,#000000, 7-13 #f2f8ef,#000000, 14-99 d,#000000,
-|14: 0-0 d,#111813, 1-1 d,#000000, 2-6 #59675c,#000000, 7-13 #f2f8ef,#000000, 14-99 d,#000000,
-|15: 0-0 d,#111813, 1-1 d,#000000, 2-6 #59675c,#000000, 7-13 #f2f8ef,#000000, 14-99 d,#000000,
-|16: 0-0 d,#111813, 1-1 d,#000000, 2-6 #59675c,#000000, 7-13 #f2f8ef,#000000, 14-99 d,#000000,
-|17: 0-1 #000000,#adcc91, 2-60 #becfc4,#26362d, 61-99 d,#26362d,
-|18: 0-0 d,#637f6a, 1-1 d,#000000, 2-6 #59675c,#000000, 7-19 #f2f8ef,#000000, 20-99 d,#000000,
-|19: 0-0 d,#111813, 1-1 d,#000000, 2-6 #59675c,#000000, 7-17 #f2f8ef,#000000, 18-99 d,#000000,
-|20: 0-0 d,#111813, 1-1 d,#000000, 2-6 #59675c,#000000, 7-18 #f2f8ef,#000000, 19-99 d,#000000,
-|21: 0-0 d,#111813, 1-1 d,#000000, 2-6 #59675c,#000000, 7-20 #f2f8ef,#000000, 21-99 d,#000000,
-|22: 0-0 d,#111813, 1-1 d,#000000, 2-6 #59675c,#000000, 7-20 #f2f8ef,#000000, 21-99 d,#000000,
-|23: 0-0 d,#111813, 1-1 d,#000000, 2-6 #59675c,#000000, 7-19 #f2f8ef,#000000, 20-99 d,#000000,
-|24: 0-0 d,#111813, 1-1 d,#000000, 2-6 #59675c,#000000, 7-16 #f2f8ef,#000000, 17-99 d,#000000,
-|25: 0-0 d,#111813, 1-1 d,#000000, 2-6 #59675c,#000000, 7-23 #f2f8ef,#000000, 24-99 d,#000000,
-|26: 0-0 d,#111813, 1-1 d,#000000, 2-6 #59675c,#000000, 7-22 #f2f8ef,#000000, 23-99 d,#000000,
-|27: 0-0 d,#111813, 1-1 d,#000000, 2-6 #616f64,#000000,b 7-25 #f2f8ef,#000000, 26-99 d,#000000,
-|28: 0-0 d,#111813, 1-1 d,#000000, 2-6 #59675c,#000000, 7-99 d,#000000,
-|29: 0-0 d,#111813, 1-1 d,#000000, 2-6 #59675c,#000000, 7-34 #f2f8ef,#000000, 35-99 d,#000000,
-|30: 0-0 d,#111813, 1-1 d,#000000, 2-6 #59675c,#000000, 7-17 #f2f8ef,#000000, 18-99 d,#000000,
-== snap step-helix grid=100x31 cursor=7,27
+|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,
+|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,
+|6: 0-0 d,#608269, 1-4 d,#000000, 5-6 #59675c,#000000, 7-99 #f2f8ef,#000000,
+|7: 0-0 d,#111813, 1-4 d,#000000, 5-6 #59675c,#000000, 7-99 #f2f8ef,#000000,
+|8: 0-0 d,#111813, 1-4 d,#000000, 5-6 #59675c,#000000, 7-99 #f2f8ef,#000000,
+|9: 0-0 d,#111813, 1-4 d,#000000, 5-6 #59675c,#000000, 7-99 #f2f8ef,#000000,
+|10: 0-0 d,#111813, 1-4 d,#000000, 5-6 #59675c,#000000, 7-99 #f2f8ef,#000000,
+|11: 0-0 d,#111813, 1-4 d,#000000, 5-6 #59675c,#000000, 7-99 #f2f8ef,#000000,
+|12: 0-0 d,#111813, 1-3 d,#000000, 4-6 #59675c,#000000, 7-99 #f2f8ef,#000000,
+|13: 0-0 d,#111813, 1-3 d,#000000, 4-6 #59675c,#000000, 7-99 #f2f8ef,#000000,
+|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,
+|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,
+|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,
+|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-6 #59675c,#000000, 7-99 #f2f8ef,#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 Theme lapis_plain
+|30: 20
+== 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,
+|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,
+|6: 0-4 d,#ffffea, 5-6 #999980,#ffffea, 7-99 #000000,#ffffea,
+|7: 0-0 d,#99994c, 1-4 d,#ffffea, 5-6 #999980,#ffffea, 7-99 #000000,#ffffea,
+|8: 0-0 d,#99994c, 1-4 d,#ffffea, 5-6 #999980,#ffffea, 7-99 #000000,#ffffea,
+|9: 0-0 d,#99994c, 1-4 d,#ffffea, 5-6 #999980,#ffffea, 7-99 #000000,#ffffea,
+|10: 0-0 d,#99994c, 1-4 d,#ffffea, 5-6 #999980,#ffffea, 7-99 #000000,#ffffea,
+|11: 0-0 d,#99994c, 1-4 d,#ffffea, 5-6 #999980,#ffffea, 7-99 #000000,#ffffea,
+|12: 0-0 d,#99994c, 1-3 d,#ffffea, 4-6 #999980,#ffffea, 7-99 #000000,#ffffea,
+|13: 0-0 d,#99994c, 1-3 d,#ffffea, 4-6 #999980,#ffffea, 7-99 #000000,#ffffea,
+|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,
+|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,
+|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-6 #999980,#ffffea, 7-99 #000000,#ffffea,
+|30: 0-0 d,#99994c, 1-3 d,#ffffea, 4-99 #999980,#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 Theme lapis_plain
+|29: 20
+|30: 21 # Visual Studio Code
+== 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,
+|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,
+|6: 0-0 d,#e8c46a, 1-4 d,#0a1030, 5-6 #5a6aa8,#0a1030, 7-99 #eee6d2,#0a1030,
+|7: 0-0 d,#050a24, 1-4 d,#0a1030, 5-6 #5a6aa8,#0a1030, 7-99 #eee6d2,#0a1030,
+|8: 0-0 d,#050a24, 1-4 d,#0a1030, 5-6 #5a6aa8,#0a1030, 7-99 #eee6d2,#0a1030,
+|9: 0-0 d,#050a24, 1-4 d,#0a1030, 5-6 #5a6aa8,#0a1030, 7-99 #eee6d2,#0a1030,
+|10: 0-0 d,#050a24, 1-4 d,#0a1030, 5-6 #5a6aa8,#0a1030, 7-99 #eee6d2,#0a1030,
+|11: 0-0 d,#050a24, 1-4 d,#0a1030, 5-6 #5a6aa8,#0a1030, 7-99 #eee6d2,#0a1030,
+|12: 0-0 d,#050a24, 1-3 d,#0a1030, 4-6 #5a6aa8,#0a1030, 7-99 #eee6d2,#0a1030,
+|13: 0-0 d,#050a24, 1-3 d,#0a1030, 4-6 #5a6aa8,#0a1030, 7-99 #eee6d2,#0a1030,
+|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,
+|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,
+|22: 0-0 d,#050a24, 1-3 d,#0a1030, 4-6 #5a6aa8,#0a1030, 7-99 #eee6d2,#0a1030,
+|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-6 #5a6aa8,#0a1030, 7-99 #eee6d2,#0a1030,
+|29: 0-0 d,#050a24, 1-3 d,#0a1030, 4-99 #5a6aa8,#0a1030,
+|30: 0-0 d,#050a24, 1-3 d,#0a1030, 4-6 #5a6aa8,#0a1030, 7-99 #eee6d2,#0a1030,
+== snap step-lapis-plain grid=100x31 cursor=7,27
+|17: 9 Theme lagoon Theme
|18: 10 Theme solarium
|19: 11 Theme spectrum
|20: 12 Theme harvest
@@ -527,230 +618,160 @@
|22: 14 Theme forge_black
|23: 15 Theme forge_soft
|24: 16 Theme orchard_black
-|25: 17
-|26: 18 # Legacy and imported themes
-|27: 19 Theme helix
-|28: 20 Theme dark
-|29: 21 Theme acme
-|30: 22 Theme acid
-== style step-helix grid=100x31
-|0: 0-70 #949494,#121212, 71-99 d,#121212,
-|1: 0-24 #949494,#121212, 25-99 d,#121212,
-|2: 0-1 #ffffff,#262626, 2-58 #949494,#121212, 59-99 d,#121212,
-|3: 0-0 d,#444444, 1-1 d,#080808, 2-6 #626262,#080808, 7-12 #bdbdbd,#080808, 13-99 d,#080808,
-|4: 0-0 d,#444444, 1-1 d,#080808, 2-6 #626262,#080808, 7-12 #bdbdbd,#080808, 13-99 d,#080808,
-|5: 0-0 d,#444444, 1-1 d,#080808, 2-6 #626262,#080808, 7-12 #bdbdbd,#080808, 13-99 d,#080808,
-|6: 0-0 d,#444444, 1-1 d,#080808, 2-6 #626262,#080808, 7-12 #bdbdbd,#080808, 13-99 d,#080808,
-|7: 0-0 d,#121212, 1-1 d,#080808, 2-6 #626262,#080808, 7-12 #bdbdbd,#080808, 13-99 d,#080808,
-|8: 0-0 d,#121212, 1-1 d,#080808, 2-6 #626262,#080808, 7-12 #bdbdbd,#080808, 13-99 d,#080808,
-|9: 0-0 d,#121212, 1-1 d,#080808, 2-6 #626262,#080808, 7-12 #bdbdbd,#080808, 13-99 d,#080808,
-|10: 0-0 d,#121212, 1-1 d,#080808, 2-6 #626262,#080808, 7-12 #bdbdbd,#080808, 13-99 d,#080808,
-|11: 0-0 d,#121212, 1-1 d,#080808, 2-6 #626262,#080808, 7-12 #bdbdbd,#080808, 13-99 d,#080808,
-|12: 0-0 d,#121212, 1-1 d,#080808, 2-6 #626262,#080808, 7-13 #bdbdbd,#080808, 14-99 d,#080808,
-|13: 0-0 d,#121212, 1-1 d,#080808, 2-6 #626262,#080808, 7-13 #bdbdbd,#080808, 14-99 d,#080808,
-|14: 0-0 d,#121212, 1-1 d,#080808, 2-6 #626262,#080808, 7-13 #bdbdbd,#080808, 14-99 d,#080808,
-|15: 0-0 d,#121212, 1-1 d,#080808, 2-6 #626262,#080808, 7-13 #bdbdbd,#080808, 14-99 d,#080808,
-|16: 0-0 d,#121212, 1-1 d,#080808, 2-6 #626262,#080808, 7-13 #bdbdbd,#080808, 14-99 d,#080808,
-|17: 0-1 #ffffff,#626262, 2-60 #949494,#121212, 61-99 d,#121212,
-|18: 0-0 d,#444444, 1-1 d,#080808, 2-6 #626262,#080808, 7-20 #bdbdbd,#080808, 21-99 d,#080808,
-|19: 0-0 d,#121212, 1-1 d,#080808, 2-6 #626262,#080808, 7-20 #bdbdbd,#080808, 21-99 d,#080808,
-|20: 0-0 d,#121212, 1-1 d,#080808, 2-6 #626262,#080808, 7-19 #bdbdbd,#080808, 20-99 d,#080808,
-|21: 0-0 d,#121212, 1-1 d,#080808, 2-6 #626262,#080808, 7-16 #bdbdbd,#080808, 17-99 d,#080808,
-|22: 0-0 d,#121212, 1-1 d,#080808, 2-6 #626262,#080808, 7-23 #bdbdbd,#080808, 24-99 d,#080808,
-|23: 0-0 d,#121212, 1-1 d,#080808, 2-6 #626262,#080808, 7-22 #bdbdbd,#080808, 23-99 d,#080808,
-|24: 0-0 d,#121212, 1-1 d,#080808, 2-6 #626262,#080808, 7-25 #bdbdbd,#080808, 26-99 d,#080808,
-|25: 0-0 d,#121212, 1-1 d,#080808, 2-6 #626262,#080808, 7-99 d,#080808,
-|26: 0-0 d,#121212, 1-1 d,#080808, 2-6 #626262,#080808, 7-34 #bdbdbd,#080808, 35-99 d,#080808,
-|27: 0-0 d,#121212, 1-1 d,#080808, 2-6 #626262,#080808,b 7-17 #bdbdbd,#080808, 18-99 d,#080808,
-|28: 0-0 d,#121212, 1-1 d,#080808, 2-6 #626262,#080808, 7-16 #bdbdbd,#080808, 17-99 d,#080808,
-|29: 0-0 d,#121212, 1-1 d,#080808, 2-6 #626262,#080808, 7-16 #bdbdbd,#080808, 17-99 d,#080808,
-|30: 0-0 d,#121212, 1-1 d,#080808, 2-6 #626262,#080808, 7-16 #bdbdbd,#080808, 17-99 d,#080808,
-== snap step-dark grid=100x31 cursor=7,27
-|18: 11 Theme spectrum
-|19: 12 Theme harvest
-|20: 13 Theme clay
-|21: 14 Theme forge_black
-|22: 15 Theme forge_soft
-|23: 16 Theme orchard_black
-|24: 17
-|25: 18 # Legacy and imported themes
-|26: 19 Theme helix
-|27: 20 Theme dark
-|28: 21 Theme acme
-|29: 22 Theme acid
-|30: 23 Theme acme_helix
-== style step-dark grid=100x31
-|0: 0-70 #969696,#2c2a3e, 71-99 d,#2c2a3e,
-|1: 0-24 #969696,#2c2a3e, 25-99 d,#2c2a3e,
-|2: 0-1 #ffffff,#383c54, 2-58 #969696,#2c2a3e, 59-99 d,#2c2a3e,
-|3: 0-0 d,#525252, 1-1 d,d, 2-6 #5a5a5a,d, 7-99 d,d,
-|4: 0-0 d,#525252, 1-1 d,d, 2-6 #5a5a5a,d, 7-99 d,d,
-|5: 0-0 d,#525252, 1-1 d,d, 2-6 #5a5a5a,d, 7-99 d,d,
-|6: 0-0 d,#525252, 1-1 d,d, 2-6 #5a5a5a,d, 7-99 d,d,
-|7: 0-0 d,#2a2a2a, 1-1 d,d, 2-6 #5a5a5a,d, 7-99 d,d,
-|8: 0-0 d,#2a2a2a, 1-1 d,d, 2-6 #5a5a5a,d, 7-99 d,d,
-|9: 0-0 d,#2a2a2a, 1-1 d,d, 2-6 #5a5a5a,d, 7-99 d,d,
-|10: 0-0 d,#2a2a2a, 1-1 d,d, 2-6 #5a5a5a,d, 7-99 d,d,
-|11: 0-0 d,#2a2a2a, 1-1 d,d, 2-6 #5a5a5a,d, 7-99 d,d,
-|12: 0-0 d,#2a2a2a, 1-1 d,d, 2-6 #5a5a5a,d, 7-99 d,d,
-|13: 0-0 d,#2a2a2a, 1-1 d,d, 2-6 #5a5a5a,d, 7-99 d,d,
-|14: 0-0 d,#2a2a2a, 1-1 d,d, 2-6 #5a5a5a,d, 7-99 d,d,
-|15: 0-0 d,#2a2a2a, 1-1 d,d, 2-6 #5a5a5a,d, 7-99 d,d,
-|16: 0-0 d,#2a2a2a, 1-1 d,d, 2-6 #5a5a5a,d, 7-99 d,d,
-|17: 0-1 #ffffff,#6e4fd0, 2-60 #969696,#2c2a3e, 61-99 d,#2c2a3e,
-|18: 0-0 d,#525252, 1-1 d,d, 2-6 #5a5a5a,d, 7-99 d,d,
-|19: 0-0 d,#2a2a2a, 1-1 d,d, 2-6 #5a5a5a,d, 7-99 d,d,
-|20: 0-0 d,#2a2a2a, 1-1 d,d, 2-6 #5a5a5a,d, 7-99 d,d,
-|21: 0-0 d,#2a2a2a, 1-1 d,d, 2-6 #5a5a5a,d, 7-99 d,d,
-|22: 0-0 d,#2a2a2a, 1-1 d,d, 2-6 #5a5a5a,d, 7-99 d,d,
-|23: 0-0 d,#2a2a2a, 1-1 d,d, 2-6 #5a5a5a,d, 7-99 d,d,
-|24: 0-0 d,#2a2a2a, 1-1 d,d, 2-6 #5a5a5a,d, 7-99 d,d,
-|25: 0-0 d,#2a2a2a, 1-1 d,d, 2-6 #5a5a5a,d, 7-99 d,d,
-|26: 0-0 d,#2a2a2a, 1-1 d,d, 2-6 #5a5a5a,d, 7-99 d,d,
-|27: 0-0 d,#2a2a2a, 1-1 d,d, 2-6 #5a5a5a,d,b 7-99 d,d,
-|28: 0-0 d,#2a2a2a, 1-1 d,d, 2-6 #5a5a5a,d, 7-99 d,d,
-|29: 0-0 d,#2a2a2a, 1-1 d,d, 2-6 #5a5a5a,d, 7-99 d,d,
-|30: 0-0 d,#2a2a2a, 1-1 d,d, 2-6 #5a5a5a,d, 7-99 d,d,
-== snap step-acme grid=100x31 cursor=7,27
-|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
-|24: 18 # Legacy and imported themes
-|25: 19 Theme helix
-|26: 20 Theme dark
-|27: 21 Theme acme
-|28: 22 Theme acid
-|29: 23 Theme acme_helix
-|30: 24 Theme adwaita_dark
-== style step-acme grid=100x31
-|0: 0-70 #000000,#eaffff, 71-99 d,#eaffff,
-|1: 0-24 #000000,#eaffff, 25-99 d,#eaffff,
-|2: 0-1 #ffffff,#383c54, 2-58 #000000,#eaffff, 59-99 d,#eaffff,
-|3: 0-1 d,#ffffea, 2-6 #999980,#ffffea, 7-12 #000000,#ffffea, 13-99 d,#ffffea,
-|4: 0-1 d,#ffffea, 2-6 #999980,#ffffea, 7-12 #000000,#ffffea, 13-99 d,#ffffea,
-|5: 0-1 d,#ffffea, 2-6 #999980,#ffffea, 7-12 #000000,#ffffea, 13-99 d,#ffffea,
-|6: 0-1 d,#ffffea, 2-6 #999980,#ffffea, 7-12 #000000,#ffffea, 13-99 d,#ffffea,
-|7: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-12 #000000,#ffffea, 13-99 d,#ffffea,
-|8: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-12 #000000,#ffffea, 13-99 d,#ffffea,
-|9: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-12 #000000,#ffffea, 13-99 d,#ffffea,
-|10: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-12 #000000,#ffffea, 13-99 d,#ffffea,
-|11: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-12 #000000,#ffffea, 13-99 d,#ffffea,
-|12: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-13 #000000,#ffffea, 14-99 d,#ffffea,
-|13: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-13 #000000,#ffffea, 14-99 d,#ffffea,
-|14: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-13 #000000,#ffffea, 14-99 d,#ffffea,
-|15: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-13 #000000,#ffffea, 14-99 d,#ffffea,
-|16: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-13 #000000,#ffffea, 14-99 d,#ffffea,
-|17: 0-1 #ffffff,#6e4fd0, 2-60 #000000,#eaffff, 61-99 d,#eaffff,
-|18: 0-1 d,#ffffea, 2-6 #999980,#ffffea, 7-19 #000000,#ffffea, 20-99 d,#ffffea,
-|19: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-16 #000000,#ffffea, 17-99 d,#ffffea,
-|20: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-23 #000000,#ffffea, 24-99 d,#ffffea,
-|21: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-22 #000000,#ffffea, 23-99 d,#ffffea,
-|22: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-25 #000000,#ffffea, 26-99 d,#ffffea,
-|23: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-99 d,#ffffea,
-|24: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-34 #000000,#ffffea, 35-99 d,#ffffea,
-|25: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-17 #000000,#ffffea, 18-99 d,#ffffea,
-|26: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-16 #000000,#ffffea, 17-99 d,#ffffea,
-|27: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea,b 7-16 #000000,#ffffea, 17-99 d,#ffffea,
-|28: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-16 #000000,#ffffea, 17-99 d,#ffffea,
-|29: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-22 #000000,#ffffea, 23-99 d,#ffffea,
-|30: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-24 #000000,#ffffea, 25-99 d,#ffffea,
-== snap step-generated grid=100x31 cursor=7,27
+|25: 17 Theme acme
+|26: 18 Theme lapis
+|27: 19 Theme lapis_plain
+|28: 20
+|29: 21 # Visual Studio Code
+|30: 22 Theme dark_plus
+== style step-lapis-plain grid=100x31
+|18: 0-0 d,#050a24, 1-3 d,#0a1030, 4-6 #5a6aa8,#0a1030, 7-99 #eee6d2,#0a1030,
+|28: 0-0 d,#050a24, 1-3 d,#0a1030, 4-99 #5a6aa8,#0a1030,
+|29: 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: 12 Theme harvest Theme
|18: 13 Theme clay
|19: 14 Theme forge_black
|20: 15 Theme forge_soft
|21: 16 Theme orchard_black
-|22: 17
-|23: 18 # Legacy and imported themes
-|24: 19 Theme helix
-|25: 20 Theme dark
-|26: 21 Theme acme
-|27: 22 Theme acid
-|28: 23 Theme acme_helix
-|29: 24 Theme adwaita_dark
-|30: 25 Theme adwaita_light
-== style step-generated grid=100x31
-|0: 0-70 #e0e0e0,#1e262e, 71-99 d,#1e262e,
-|1: 0-24 #e0e0e0,#1e262e, 25-99 d,#1e262e,
-|2: 0-1 #ffffff,#303840, 2-58 #e0e0e0,#1e262e, 59-99 d,#1e262e,
-|3: 0-0 d,#303840, 1-1 d,#161e26, 2-6 #303840,#161e26, 7-12 #e0e0e0,#161e26, 13-99 d,#161e26,
-|4: 0-0 d,#303840, 1-1 d,#161e26, 2-6 #303840,#161e26, 7-12 #e0e0e0,#161e26, 13-99 d,#161e26,
-|5: 0-0 d,#303840, 1-1 d,#161e26, 2-6 #303840,#161e26, 7-12 #e0e0e0,#161e26, 13-99 d,#161e26,
-|6: 0-0 d,#303840, 1-1 d,#161e26, 2-6 #303840,#161e26, 7-12 #e0e0e0,#161e26, 13-99 d,#161e26,
-|7: 0-0 d,#1e262e, 1-1 d,#161e26, 2-6 #303840,#161e26, 7-12 #e0e0e0,#161e26, 13-99 d,#161e26,
-|8: 0-0 d,#1e262e, 1-1 d,#161e26, 2-6 #303840,#161e26, 7-12 #e0e0e0,#161e26, 13-99 d,#161e26,
-|9: 0-0 d,#1e262e, 1-1 d,#161e26, 2-6 #303840,#161e26, 7-12 #e0e0e0,#161e26, 13-99 d,#161e26,
-|10: 0-0 d,#1e262e, 1-1 d,#161e26, 2-6 #303840,#161e26, 7-12 #e0e0e0,#161e26, 13-99 d,#161e26,
-|11: 0-0 d,#1e262e, 1-1 d,#161e26, 2-6 #303840,#161e26, 7-12 #e0e0e0,#161e26, 13-99 d,#161e26,
-|12: 0-0 d,#1e262e, 1-1 d,#161e26, 2-6 #303840,#161e26, 7-13 #e0e0e0,#161e26, 14-99 d,#161e26,
-|13: 0-0 d,#1e262e, 1-1 d,#161e26, 2-6 #303840,#161e26, 7-13 #e0e0e0,#161e26, 14-99 d,#161e26,
-|14: 0-0 d,#1e262e, 1-1 d,#161e26, 2-6 #303840,#161e26, 7-13 #e0e0e0,#161e26, 14-99 d,#161e26,
-|15: 0-0 d,#1e262e, 1-1 d,#161e26, 2-6 #303840,#161e26, 7-13 #e0e0e0,#161e26, 14-99 d,#161e26,
-|16: 0-0 d,#1e262e, 1-1 d,#161e26, 2-6 #303840,#161e26, 7-13 #e0e0e0,#161e26, 14-99 d,#161e26,
-|17: 0-1 #000000,#ffa060, 2-60 #e0e0e0,#1e262e, 61-99 d,#1e262e,
-|18: 0-0 d,#303840, 1-1 d,#161e26, 2-6 #303840,#161e26, 7-16 #e0e0e0,#161e26, 17-99 d,#161e26,
-|19: 0-0 d,#1e262e, 1-1 d,#161e26, 2-6 #303840,#161e26, 7-23 #e0e0e0,#161e26, 24-99 d,#161e26,
-|20: 0-0 d,#1e262e, 1-1 d,#161e26, 2-6 #303840,#161e26, 7-22 #e0e0e0,#161e26, 23-99 d,#161e26,
-|21: 0-0 d,#1e262e, 1-1 d,#161e26, 2-6 #303840,#161e26, 7-25 #e0e0e0,#161e26, 26-99 d,#161e26,
-|22: 0-0 d,#1e262e, 1-1 d,#161e26, 2-6 #303840,#161e26, 7-99 d,#161e26,
-|23: 0-0 d,#1e262e, 1-1 d,#161e26, 2-6 #303840,#161e26, 7-34 #e0e0e0,#161e26, 35-99 d,#161e26,
-|24: 0-0 d,#1e262e, 1-1 d,#161e26, 2-6 #303840,#161e26, 7-17 #e0e0e0,#161e26, 18-99 d,#161e26,
-|25: 0-0 d,#1e262e, 1-1 d,#161e26, 2-6 #303840,#161e26, 7-16 #e0e0e0,#161e26, 17-99 d,#161e26,
-|26: 0-0 d,#1e262e, 1-1 d,#161e26, 2-6 #303840,#161e26, 7-16 #e0e0e0,#161e26, 17-99 d,#161e26,
-|27: 0-0 d,#1e262e, 1-1 d,#161e26, 2-6 #303840,#161e26,b 7-16 #e0e0e0,#161e26, 17-99 d,#161e26,
-|28: 0-0 d,#1e262e, 1-1 d,#161e26, 2-6 #303840,#161e26, 7-22 #e0e0e0,#161e26, 23-99 d,#161e26,
-|29: 0-0 d,#1e262e, 1-1 d,#161e26, 2-6 #303840,#161e26, 7-24 #e0e0e0,#161e26, 25-99 d,#161e26,
-|30: 0-0 d,#1e262e, 1-1 d,#161e26, 2-6 #303840,#161e26, 7-25 #e0e0e0,#161e26, 26-99 d,#161e26,
-== snap step-back grid=100x31 cursor=7,26
+|22: 17 Theme acme
+|23: 18 Theme lapis
+|24: 19 Theme lapis_plain
+|25: 20
+|26: 21 # Visual Studio Code
+|27: 22 Theme dark_plus
+|28: 23
+|29: 24 # Solarized
+|30: 25 Theme solarized_dark
+== style step-dark-plus grid=100x31
+|0: 0-1 d,#3c3c3c, 2-99 #a7a7a7,#3c3c3c,
+|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,
+|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,
+|6: 0-0 d,#424242, 1-4 d,#1e1e1e, 5-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
+|7: 0-4 d,#1e1e1e, 5-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
+|8: 0-4 d,#1e1e1e, 5-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
+|9: 0-4 d,#1e1e1e, 5-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
+|10: 0-4 d,#1e1e1e, 5-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
+|11: 0-4 d,#1e1e1e, 5-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
+|12: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
+|13: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
+|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,
+|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,
+|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: 15 Theme forge_soft Theme
+|18: 16 Theme orchard_black
+|19: 17 Theme acme
+|20: 18 Theme lapis
+|21: 19 Theme lapis_plain
+|22: 20
+|23: 21 # Visual Studio Code
+|24: 22 Theme dark_plus
+|25: 23
+|26: 24 # Solarized
+|27: 25 Theme solarized_dark
+|28: 26 Theme solarized_light
+|29: 27
+|30: 28 # Dracula
+== 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,
+|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,
+|6: 0-0 d,#839496, 1-4 d,#002b36, 5-6 #586e75,#002b36, 7-99 #839496,#002b36,
+|7: 0-0 d,#eee8d5, 1-4 d,#002b36, 5-6 #586e75,#002b36, 7-99 #839496,#002b36,
+|8: 0-0 d,#eee8d5, 1-4 d,#002b36, 5-6 #586e75,#002b36, 7-99 #839496,#002b36,
+|9: 0-0 d,#eee8d5, 1-4 d,#002b36, 5-6 #586e75,#002b36, 7-99 #839496,#002b36,
+|10: 0-0 d,#eee8d5, 1-4 d,#002b36, 5-6 #586e75,#002b36, 7-99 #839496,#002b36,
+|11: 0-0 d,#eee8d5, 1-4 d,#002b36, 5-6 #586e75,#002b36, 7-99 #839496,#002b36,
+|12: 0-0 d,#eee8d5, 1-3 d,#002b36, 4-6 #586e75,#002b36, 7-99 #839496,#002b36,
+|13: 0-0 d,#eee8d5, 1-3 d,#002b36, 4-6 #586e75,#002b36, 7-99 #839496,#002b36,
+|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,
+|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,
+|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
== style step-back grid=100x31
-|0: 0-70 #000000,#eaffff, 71-99 d,#eaffff,
-|1: 0-24 #000000,#eaffff, 25-99 d,#eaffff,
-|2: 0-1 #ffffff,#383c54, 2-58 #000000,#eaffff, 59-99 d,#eaffff,
-|3: 0-1 d,#ffffea, 2-6 #999980,#ffffea, 7-12 #000000,#ffffea, 13-99 d,#ffffea,
-|4: 0-1 d,#ffffea, 2-6 #999980,#ffffea, 7-12 #000000,#ffffea, 13-99 d,#ffffea,
-|5: 0-1 d,#ffffea, 2-6 #999980,#ffffea, 7-12 #000000,#ffffea, 13-99 d,#ffffea,
-|6: 0-1 d,#ffffea, 2-6 #999980,#ffffea, 7-12 #000000,#ffffea, 13-99 d,#ffffea,
-|7: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-12 #000000,#ffffea, 13-99 d,#ffffea,
-|8: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-12 #000000,#ffffea, 13-99 d,#ffffea,
-|9: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-12 #000000,#ffffea, 13-99 d,#ffffea,
-|10: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-12 #000000,#ffffea, 13-99 d,#ffffea,
-|11: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-12 #000000,#ffffea, 13-99 d,#ffffea,
-|12: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-13 #000000,#ffffea, 14-99 d,#ffffea,
-|13: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-13 #000000,#ffffea, 14-99 d,#ffffea,
-|14: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-13 #000000,#ffffea, 14-99 d,#ffffea,
-|15: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-13 #000000,#ffffea, 14-99 d,#ffffea,
-|16: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-13 #000000,#ffffea, 14-99 d,#ffffea,
-|17: 0-1 #ffffff,#6e4fd0, 2-60 #000000,#eaffff, 61-99 d,#eaffff,
-|18: 0-1 d,#ffffea, 2-6 #999980,#ffffea, 7-16 #000000,#ffffea, 17-99 d,#ffffea,
-|19: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-23 #000000,#ffffea, 24-99 d,#ffffea,
-|20: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-22 #000000,#ffffea, 23-99 d,#ffffea,
-|21: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-25 #000000,#ffffea, 26-99 d,#ffffea,
-|22: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-99 d,#ffffea,
-|23: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-34 #000000,#ffffea, 35-99 d,#ffffea,
-|24: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-17 #000000,#ffffea, 18-99 d,#ffffea,
-|25: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-16 #000000,#ffffea, 17-99 d,#ffffea,
-|26: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea,b 7-16 #000000,#ffffea, 17-99 d,#ffffea,
-|27: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-16 #000000,#ffffea, 17-99 d,#ffffea,
-|28: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-22 #000000,#ffffea, 23-99 d,#ffffea,
-|29: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-24 #000000,#ffffea, 25-99 d,#ffffea,
-|30: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-25 #000000,#ffffea, 26-99 d,#ffffea,
+|0: 0-1 d,#3c3c3c, 2-99 #a7a7a7,#3c3c3c,
+|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,
+|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,
+|6: 0-0 d,#424242, 1-4 d,#1e1e1e, 5-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
+|7: 0-4 d,#1e1e1e, 5-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
+|8: 0-4 d,#1e1e1e, 5-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
+|9: 0-4 d,#1e1e1e, 5-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
+|10: 0-4 d,#1e1e1e, 5-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
+|11: 0-4 d,#1e1e1e, 5-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
+|12: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
+|13: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
+|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,
+|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,
+|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
-|18: 235 Theme wolf_alabaster_dark_bg
-|19: 236 Theme wolf_alabaster_dark_mono
-|20: 237 Theme wolf_alabaster_light
-|21: 238 Theme wolf_alabaster_light_bg
-|22: 239 Theme wolf_alabaster_light_mono
-|23: 240 Theme yellowed
-|24: 241 Theme yo
-|25: 242 Theme yo_berry
-|26: 243 Theme yo_light
-|27: 244 Theme zed_onedark
-|28: 245 Theme zed_onelight
-|29: 246 Theme zenburn
-|30: 247
+|17: 305 Theme wolf_alabaster_dark
+|18: 306 Theme wolf_alabaster_dark_bg
+|19: 307 Theme wolf_alabaster_dark_mono
+|20: 308 Theme wolf_alabaster_light
+|21: 309 Theme wolf_alabaster_light_bg
+|22: 310 Theme wolf_alabaster_light_mono
+|23: 311 Theme yellowed
+|24: 312 Theme yo
+|25: 313 Theme yo_berry
+|26: 314 Theme yo_light
+|27: 315 Theme zed_onedark
+|28: 316 Theme zed_onelight
+|29: 317 Theme zenburn
+|30: 318
== snap picked grid=100x31 cursor=7,3
+|16: 14 line 14
|17: 15 line 15
|18: 16 line 16
|19: 17 line 17
@@ -766,29 +787,24 @@
|29: 27 line 27
|30: 28 line 28
== style picked grid=100x31
-|2: 0-1 #ffffff,#6e4fd0, 2-58 #000000,#eaffff, 59-99 d,#eaffff,
-|3: 0-1 d,#ffffea, 2-6 #999980,#ffffea,b 7-12 #000000,#ffffea, 13-99 d,#ffffea,
-|7: 0-1 d,#ffffea, 2-6 #999980,#ffffea, 7-12 #000000,#ffffea, 13-99 d,#ffffea,
-|8: 0-1 d,#ffffea, 2-6 #999980,#ffffea, 7-12 #000000,#ffffea, 13-99 d,#ffffea,
-|9: 0-1 d,#ffffea, 2-6 #999980,#ffffea, 7-12 #000000,#ffffea, 13-99 d,#ffffea,
-|10: 0-1 d,#ffffea, 2-6 #999980,#ffffea, 7-12 #000000,#ffffea, 13-99 d,#ffffea,
-|11: 0-1 d,#ffffea, 2-6 #999980,#ffffea, 7-12 #000000,#ffffea, 13-99 d,#ffffea,
-|12: 0-1 d,#ffffea, 2-6 #999980,#ffffea, 7-13 #000000,#ffffea, 14-99 d,#ffffea,
-|13: 0-1 d,#ffffea, 2-6 #999980,#ffffea, 7-13 #000000,#ffffea, 14-99 d,#ffffea,
-|14: 0-1 d,#ffffea, 2-6 #999980,#ffffea, 7-13 #000000,#ffffea, 14-99 d,#ffffea,
-|15: 0-1 d,#ffffea, 2-6 #999980,#ffffea, 7-13 #000000,#ffffea, 14-99 d,#ffffea,
-|16: 0-1 d,#ffffea, 2-6 #999980,#ffffea, 7-13 #000000,#ffffea, 14-99 d,#ffffea,
-|17: 0-1 d,#ffffea, 2-6 #999980,#ffffea, 7-13 #000000,#ffffea, 14-99 d,#ffffea,
-|18: 0-1 d,#ffffea, 2-6 #999980,#ffffea, 7-13 #000000,#ffffea, 14-99 d,#ffffea,
-|19: 0-1 d,#ffffea, 2-6 #999980,#ffffea, 7-13 #000000,#ffffea, 14-99 d,#ffffea,
-|20: 0-1 d,#ffffea, 2-6 #999980,#ffffea, 7-13 #000000,#ffffea, 14-99 d,#ffffea,
-|21: 0-1 d,#ffffea, 2-6 #999980,#ffffea, 7-13 #000000,#ffffea, 14-99 d,#ffffea,
-|22: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-13 #000000,#ffffea, 14-99 d,#ffffea,
-|23: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-13 #000000,#ffffea, 14-99 d,#ffffea,
-|24: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-13 #000000,#ffffea, 14-99 d,#ffffea,
-|25: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-13 #000000,#ffffea, 14-99 d,#ffffea,
-|26: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-13 #000000,#ffffea, 14-99 d,#ffffea,
-|27: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-13 #000000,#ffffea, 14-99 d,#ffffea,
-|28: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-13 #000000,#ffffea, 14-99 d,#ffffea,
-|29: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-13 #000000,#ffffea, 14-99 d,#ffffea,
-|30: 0-0 d,#99994c, 1-1 d,#ffffea, 2-6 #999980,#ffffea, 7-13 #000000,#ffffea, 14-99 d,#ffffea,
+|2: 0-1 d,#007fd4, 2-31 #ffffff,#1e1e1e, 32-37 #cbe5fc,#1e1e1e, 38-99 #ffffff,#1e1e1e,
+|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,
+|9: 0-0 d,#424242, 1-4 d,#1e1e1e, 5-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
+|10: 0-0 d,#424242, 1-4 d,#1e1e1e, 5-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
+|11: 0-0 d,#424242, 1-4 d,#1e1e1e, 5-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
+|12: 0-0 d,#424242, 1-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
+|13: 0-0 d,#424242, 1-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e,
+|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,
+|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,
diff --git a/test/snapshots/themesel.snap b/test/snapshots/themesel.snap
index 04a95d23..4c4d2baa 100644
--- a/test/snapshots/themesel.snap
+++ b/test/snapshots/themesel.snap
@@ -1,7 +1,7 @@
# RULE: a results buffer is a list of things you can RUN, and its traits say
# what a ROW IS. Every list before this one held LOCATIONS — a row with a
# `path:LINE:COL` word inside it — so n/N select that word and Enter Looks it.
-# `SPC t t` (ThemeSel) opens the first one whose rows are COMMANDS: `Theme
+# `SPC t t` (Themes) opens the first one whose rows are COMMANDS: `Theme
# <name>`, exactly the line you would type, with no path in it to pick out, so
# n/N select the WHOLE ROW. One motion, two grains, and the same split either
# way — the step only SELECTS, and Tab (Exec, or the middle button, which is
@@ -10,9 +10,10 @@
# running it and stopping. There is still no preview state, nothing to confirm
# and nothing to cancel: the row you ran is the theme you have.
#
-# Both halves of the ring are in the buffer: the fifteen native themes come
-# first, then the retained helix, dark and acme, then everything exported from
-# the vendored helix .toml and zed .json files, sorted. The colors below are
+# The whole ring is in the buffer, in sections: the fifteen native themes,
+# acme, lapis and lapis_plain, the faithful ports a family at a time, the legacy helix and
+# dark, then everything exported from the vendored helix .toml and zed .json
+# files, sorted. The colors below are
# read with snapstyle, so this proves the generated themes are real data and
# not just names in a list.
lines t.txt 40
@@ -30,101 +31,107 @@ snap list
# n selects row 1 whole and Tab runs it: `Theme orchard`, which is already the
# boot theme, so only the selection moves. That is the honest first step — an
# idempotent command has to be safe to run.
-key n
+key space j n
key tab
stable 700 15000
snap step-orchard
snapstyle step-orchard
# ...and now the theme really does change under the cursor, one row at a time
-key n
+key space j n
key tab
stable 700 15000
snap step-dusk
snapstyle step-dusk
# Selection alone can skip rows without previewing or applying their themes.
# Four steps reach atelier, the Acme homage; Tab then applies it.
-key n
-key n
-key n
-key n
+key space j n
+key space j n
+key space j n
+key space j n
key tab
stable 700 15000
snap step-atelier
snapstyle step-atelier
-key n
+key space j n
key tab
stable 700 15000
snap step-forge
snapstyle step-forge
-key n
+key space j n
key tab
stable 700 15000
snap step-lagoon
snapstyle step-lagoon
-key n
+key space j n
key tab
stable 700 15000
snap step-solarium
snapstyle step-solarium
-key n
+key space j n
key tab
stable 700 15000
snap step-spectrum
snapstyle step-spectrum
-key n
+key space j n
key tab
stable 700 15000
snap step-harvest
snapstyle step-harvest
-key n
+key space j n
key tab
stable 700 15000
snap step-clay
snapstyle step-clay
-# The three native contrast variants precede the legacy section. Its heading
+# The three native contrast variants precede acme, lapis and lapis_plain, and then the first
+# ported family's section. Its heading
# and blank separator are not stops in the n/N command walk.
-key n
+key space j n
key tab
stable 700 15000
snap step-forge-black
snapstyle step-forge-black
-key n
+key space j n
key tab
stable 700 15000
snap step-forge-soft
snapstyle step-forge-soft
-key n
+key space j n
key tab
stable 700 15000
snap step-orchard-black
snapstyle step-orchard-black
-key n
+key space j n
key tab
stable 700 15000
-snap step-helix
-snapstyle step-helix
-key n
+snap step-acme
+snapstyle step-acme
+key space j n
key tab
stable 700 15000
-snap step-dark
-snapstyle step-dark
-key n
+snap step-lapis
+snapstyle step-lapis
+key space j n
key tab
stable 700 15000
-snap step-acme
-snapstyle step-acme
-# past the curated eighteen and into the generated half, which is sorted by name
-# — so the next command is whatever sorts first, not whatever was
-# vendored first. That is the point of sorting: the ring is the same everywhere
-# whatever order the directory read handed the files over in.
-key n
+snap step-lapis-plain
+snapstyle step-lapis-plain
+key space j n
+key tab
+stable 700 15000
+snap step-dark-plus
+snapstyle step-dark-plus
+# across the Visual Studio Code section into Solarized: a section heading and
+# its blank line are skipped like the first. (The imported half, past the
+# legacy section, is sorted by name, so the ring is the same everywhere
+# whatever order the directory read handed the files over in.)
+key space j n
key tab
stable 700 15000
-snap step-generated
-snapstyle step-generated
+snap step-solarized-dark
+snapstyle step-solarized-dark
# N walks back the same way — it is the exact inverse of n — and the Tab after
# it runs the row it lands on, so the theme rewinds too
-key N
+key space j p
key tab
stable 700 15000
snap step-back
diff --git a/test/snapshots/tinywin.golden b/test/snapshots/tinywin.golden
deleted file mode 100644
index dcbc63d8..00000000
--- a/test/snapshots/tinywin.golden
+++ /dev/null
@@ -1,40 +0,0 @@
-== snap stacked grid=100x31 cursor=4,15
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-|$ /tmp/pardes-snap/tinywin/cwd Save Tty Del Togglettymode Filter Collapse
-| $
-| /tmp/pardes-snap/tinywin/cwd Save Tty Del Togglettymode Filter Collapse
-| ls
-|
-| /tmp/pardes-snap/tinywin/cwd Save Tty Del Togglettymode Filter Collapse
-| ls
-|
-| /tmp/pardes-snap/tinywin/cwd Save Tty Del Togglettymode Filter Collapse
-| ls
-|
-| /tmp/pardes-snap/tinywin/cwd Save Tty Del Togglettymode Filter Collapse
-| ls
-== snap shrunk grid=60x4 cursor=59,3
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor
-|New Tty Find Grep Joincol
-|$ /tmp/pardes-snap/tinywin/cwd Save Tty Del Togglettymode Fi
-| /tmp/pardes-snap/tinywin/cwd Save Tty Del Togglettymode Fi
-== snap columns grid=100x31 cursor=95,3
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep JoincolNew Tty Find New Tty Find
-|$ /tmp/pardes-snap/tinywin/cwd Save Tty Del Toggle /tmp/pardes-snap/tinywi /tmp/pardes /tmp/parde
-| $ 1 1 1
-| /tmp/pardes-snap/tinywin/cwd Save Tty Del Toggle
-| ls
-|
-| /tmp/pardes-snap/tinywin/cwd Save Tty Del Toggle
-| ls
-|
-| /tmp/pardes-snap/tinywin/cwd Save Tty Del Toggle
-| ls
-|
-| /tmp/pardes-snap/tinywin/cwd Save Tty Del Toggle
-| ls
-== snap narrow grid=4x31 cursor=3,30
-|Newc
-|NeNN
diff --git a/test/snapshots/tinywin.snap b/test/snapshots/tinywin.snap
deleted file mode 100644
index 3d22d583..00000000
--- a/test/snapshots/tinywin.snap
+++ /dev/null
@@ -1,31 +0,0 @@
-# Shrinking the window past "one row per pane" used to panic: computeGeom gave
-# every pane in a column at least one row, so `y` walked off the bottom and
-# renderPane got a rect outside the surface (assert). Panes that no longer fit
-# now get h = 0 and simply do not render until the window grows back.
-start 31 100
-wait 8000 $
-key a-n
-stable 400 8000
-key a-n
-stable 400 8000
-key a-n
-stable 400 8000
-key a-n
-stable 700 15000
-snap stacked
-resize 4 60
-stable 700 10000
-snap shrunk
-# ...and the same sideways: more columns than the window is wide
-resize 31 100
-stable 700 10000
-key space c n
-stable 600 8000
-key space c n
-stable 600 8000
-key space c n
-stable 700 15000
-snap columns
-resize 31 4
-stable 700 10000
-snap narrow
diff --git a/test/snapshots/topbarexec.golden b/test/snapshots/topbarexec.golden
index bb0be27b..6149dc4b 100644
--- a/test/snapshots/topbarexec.golden
+++ b/test/snapshots/topbarexec.golden
@@ -1,7 +1,8 @@
-== snap selected grid=90x21 cursor=14,4
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/topbarexec/cwd Save Tty De /tmp/pardes-snap/topbarexec/cwd Save Tty De
+== snap selected grid=90x21 cursor=14,5
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/topbarexec/cwd Tty+bash Sa /tmp/pardes-snap/topbarexec/cwd Tty+bash Sa
+| ve Mode Filter Collapse Del ve Mode Filter Collapse Del
| ls ls
| zmarkfile.txt zmarkfile.txt
|
@@ -10,30 +11,38 @@
|
|
|
-|
-| /tmp/pardes-snap/topbarexec/cwd Save Tty De
+| /tmp/pardes-snap/topbarexec/cwd Tty+bash Sa
+| ve Mode Filter Collapse Del
| ls
| zmarkfile.txt
-== snap noarg-runs grid=90x21 cursor=14,4
-|1: New Tty Find Grep Joincol New Tty╭────────────────────────────────────╮
-|2: /tmp/pardes-snap/topbarexec/cwd Save Tty De /tmp/│pardes resizes=1 │
-|3: ls ls │theme orchard │
-|4: zmarkfile.txt zmark│font default │
-|5: │terms 3 cols 2 │
-|6: │active #0 43x9 │
-|7: │scroll 0/9 │
+== snap noarg-runs grid=90x21 cursor=14,5
+|1: New Tty Find Grep Joincol Delcol New T╭────────────────────────────────────╮
+|2: /tmp/pardes-snap/topbarexec/cwd Tty+bash Sa /tmp/│pardes resizes=1 │
+|3: ve Mode Filter Collapse Del ve Mo│theme orchard │
+|4: ls Debug ls │font default │
+|5: zmarkfile.txt zmark│terms 3 cols 2 │
+|6: │active #0 43x8 │
+|7: │scroll 0/8 │
|8: │pinch 1.0000 │
|9: │tscroll 0.0000 │
-|10: ╰────────────────────────────────────╯
+|10: │frame virtual clock │
+|11: │ │
+|12: /tmp/pardes-snap/topbarexec/cwd Tty+bash Sa │ │
+|13: ve Mode Filter Collapse Del ╰────────────────────────────────────╯
== snap arg-still-spliced grid=90x21 cursor=14,4
-|1: New Tty Find Grep Joincol New Tty Find Grep Joincol
-|2: /tmp/pardes-snap/topbarexec/cwd Save Tty De /tmp/pardes-snap/topbarexec/cwd Save Tty De
-|3: ls ls
-|4: zmarkfile.txt zmarkfile.txt
-|5:
-|6:
-|7:
-|8:
-|9:
-|10: /tmp/pardes-snap/topbarexec/cwd/+Search Sav
-|11: 1 zmarkfile.txt
+|1: New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+|2: /tmp/pardes-snap/topbarexec/cwd Tty+bash Sa /tmp/pardes-snap/topbarexec/cwd Tty+bash Sa
+|3: ve Mode Filter Collapse Del ve Mode Filter Collapse Del
+|4: zmarkfile.txt Find ls
+|5: zmarkfile.txt
+|6: +Search 1/1 Del
+|7: Find zmarkfile.txt
+|8: zmarkfile.txt
+|9: /tmp/pardes-snap/topbarexec/cwd/zmarkfile.t
+|10: xt Del
+|11: 1 hay ZQNEEDLE stack
+|12:
+|13: /tmp/pardes-snap/topbarexec/cwd Tty+bash Sa
+|14: ve Mode Filter Collapse Del
+|15: ls
+|16: zmarkfile.txt
diff --git a/test/snapshots/topbarexec.snap b/test/snapshots/topbarexec.snap
index f5f09a08..81581b9d 100644
--- a/test/snapshots/topbarexec.snap
+++ b/test/snapshots/topbarexec.snap
@@ -4,8 +4,8 @@
# selection at all.
#
# But a selection is only an argument to a builtin that has somewhere to put
-# one. `Kill`, `Debug`, `NextColor` and the rest match their name WHOLE — that
-# is what makes `Kill foo` a shell command and not Kill — so splicing a sweep
+# one. `Exit`, `Debug`, `NextColor` and the rest match their name WHOLE — that
+# is what makes `Exit foo` a shell command and not Exit — so splicing a sweep
# onto them produced a name matching no builtin, which fell out of the builtin
# parser and into a SHELL, as a command nobody typed (`bash: Debug: command
# not found`). It only ever bit you with a terminal open, because that is
@@ -19,9 +19,9 @@ wait 8000 zmarkfile.txt
stable 700 20000
# sweep `zmarkfile.txt` out of the shell's own greeting: an ordinary left drag,
# and the kind of stale highlight that is simply lying around in real use
-press left 3 5
-drag left 15 5
-release left 15 5
+press left 3 6
+drag left 15 6
+release left 15 6
stable 700 15000
snap selected
# Debug takes NO argument. Middle-clicked with that sweep live it must open the
diff --git a/test/snapshots/tty.golden b/test/snapshots/tty.golden
index fa8144ef..3bf73281 100644
--- a/test/snapshots/tty.golden
+++ b/test/snapshots/tty.golden
@@ -1,7 +1,8 @@
-== snap tty-on grid=100x31 cursor=4,5
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-|$ /tmp/pardes-snap/tty/cwd Save Tty Del Togglettym /tmp/pardes-snap/tty/cwd Save Tty Del Togglettym
+== snap tty-on grid=100x31 cursor=4,6
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+|$ /tmp/pardes-snap/tty/cwd Tty+bash Save Mode Filt /tmp/pardes-snap/tty/cwd Tty+bash Save Mode Filt
+| er Collapse Del er Collapse Del
| $ ls ls
| m.txt m.txt
| $
@@ -15,27 +16,27 @@
|
|
|
-|
-| /tmp/pardes-snap/tty/cwd Save Tty Del Togglettym
+| /tmp/pardes-snap/tty/cwd Tty+bash Save Mode Filt
+| er Collapse Del
| ls
| m.txt
-== snap tty-echo grid=100x31 cursor=4,7
-|5: $ echo SNAP''OK
-|6: SNAPOK
-|7: $
-== snap tty-off grid=100x31 cursor=4,7
-|2: /tmp/pardes-snap/tty/cwd Save Tty Del Togglettym /tmp/pardes-snap/tty/cwd Save Tty Del Togglettym
-|3: ls ls
-|5: echo SNAP''OK
-|7:
-== snap shift-esc-on grid=100x31 cursor=4,7
-|2: $ /tmp/pardes-snap/tty/cwd Save Tty Del Togglettym /tmp/pardes-snap/tty/cwd Save Tty Del Togglettym
-|3: $ ls ls
-|5: $ echo SNAP''OK
-|7: $
-== snap shift-esc-nodoc grid=100x31 cursor=4,7
-== snap ctrl-b-off grid=100x31 cursor=4,7
-|2: /tmp/pardes-snap/tty/cwd Save Tty Del Togglettym /tmp/pardes-snap/tty/cwd Save Tty Del Togglettym
-|3: ls ls
-|5: echo SNAP''OK
-|7:
+== snap tty-echo grid=100x31 cursor=4,8
+|6: $ echo SNAP''OK
+|7: SNAPOK
+|8: $
+== snap tty-off grid=100x31 cursor=4,8
+|2: /tmp/pardes-snap/tty/cwd Tty+bash Save Mode Filt /tmp/pardes-snap/tty/cwd Tty+bash Save Mode Filt
+|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 Tty+bash Save Mode Filt
+|19: $ ls
+|21: $
+== snap ctrl-b-off grid=100x31 cursor=4,21
+|17: /tmp/pardes-snap/tty/cwd Tty+bash Save Mode Filt
+|19: ls
+|21:
diff --git a/test/snapshots/tty.snap b/test/snapshots/tty.snap
index 6ce0d5ba..48fffbd1 100644
--- a/test/snapshots/tty.snap
+++ b/test/snapshots/tty.snap
@@ -1,11 +1,8 @@
-# tty mode round-trip: Ctrl-b in, run a command, Ctrl-b out. Shift-Esc (CSI
-# 27;2u — needs a host that reports modifiers on Escape) also gets you IN; a
-# PLAIN Esc does not, it still goes to the shell.
-#
-# Getting OUT is Ctrl-b alone. Shift-Esc in tty is what Escape is in normal
-# mode instead — Last, the pane you were in before this one — leaving this pane
-# in tty so coming back lands in the program you left. The hop itself is
-# covered by a unit test in pardes.zig.
+# tty mode round-trip: Ctrl-b in, run a command, Ctrl-b out. Ctrl-b is the one
+# switch between raw and normal. Shift-Esc (CSI 27;2u — needs a host that
+# reports modifiers on Escape) never switches: in every mode it is what Escape
+# is in normal mode — Last, the pane you were in before this one — and a raw
+# terminal stays raw. The hop itself is covered by a unit test in pardes.zig.
file m.txt marker
start 31 100 -n 3
wait 8000 m.txt
@@ -21,16 +18,14 @@ snap tty-echo
key c-b
stable 600 8000
snap tty-off
-# Shift-Esc: in, the same as Ctrl-b...
+# Shift-Esc from normal: never into raw; it backs out to the previous pane.
send \e[27;2u
stable 600 8000
-snap shift-esc-on
-# ...but not out. With no doc pane to hop to it changes nothing: still tty,
-# prompts still shown, same pane focused.
-send \e[27;2u
+snap shift-esc-normal
+# Ctrl-b is the switch: into raw, and out again.
+key c-b
stable 600 8000
-snap shift-esc-nodoc
-# Ctrl-b still leaves tty in place, which is now the only thing that does.
+snap ctrl-b-on
key c-b
stable 600 8000
snap ctrl-b-off
diff --git a/test/snapshots/ttyclick.golden b/test/snapshots/ttyclick.golden
index c32fa2e7..afa0a41b 100644
--- a/test/snapshots/ttyclick.golden
+++ b/test/snapshots/ttyclick.golden
@@ -1,7 +1,8 @@
-== snap tty-bodyclick grid=100x31 cursor=4,5
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-|$ /tmp/pardes-snap/ttyclick/cwd Save Tty Del Toggl /tmp/pardes-snap/ttyclick/cwd Save Tty Del Toggl
+== snap tty-bodyclick grid=100x31 cursor=4,6
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+|$ /tmp/pardes-snap/ttyclick/cwd Tty+bash Save Mode /tmp/pardes-snap/ttyclick/cwd Tty+bash Save Mode
+| Filter Collapse Del Filter Collapse Del
| $ ls ls
| probe.txt probe.txt
| $
@@ -15,17 +16,13 @@
|
|
|
-|
-| /tmp/pardes-snap/ttyclick/cwd Save Tty Del Toggl
+| /tmp/pardes-snap/ttyclick/cwd Tty+bash Save Mode
+| Filter Collapse Del
| ls
| probe.txt
-== snap tty-tagedit grid=100x31 cursor=37,2
-|3: ls ls
-|5:
-== snap tty-tagexit grid=100x31 cursor=4,5
-|3: $ ls ls
-|5: $
+== snap tty-tagedit grid=100x31 cursor=32,2
+== snap tty-tagexit grid=100x31 cursor=4,6
== snap ins-bodyclick grid=100x31 cursor=11,4
-|2: ^ /tmp/pardes-snap/ttyclick/cwd Save Tty Del Toggl /tmp/pardes-snap/ttyclick/cwd Save Tty Del Toggl
-|3: ls ls
-|5:
+|2: ^ /tmp/pardes-snap/ttyclick/cwd Tty+bash Save Mode /tmp/pardes-snap/ttyclick/cwd Tty+bash Save Mode
+|4: ls ls
+|6:
diff --git a/test/snapshots/ttyclick.snap b/test/snapshots/ttyclick.snap
index 89ed5300..c125a231 100644
--- a/test/snapshots/ttyclick.snap
+++ b/test/snapshots/ttyclick.snap
@@ -1,7 +1,7 @@
# clicks in a shell pane never change its mode: a body click in raw tty
-# keeps tty (before: the press dropped it to normal), a tag-edit round trip
-# restores the mode it hijacked, and an insert-mode body click re-pins the
-# cursor but stays insert. File panes keep the old behavior (click -> normal).
+# keeps tty (before: the press dropped it to normal), a round trip through the
+# tag leaves it alone (the tag has a mode of its own), and an insert-mode body
+# click re-pins the cursor but stays insert. File panes keep the old behavior (click -> normal).
# The mode is the character in each pane's layout box: `•` normal, `^` insert,
# `$` tty.
file probe.txt marker
@@ -15,14 +15,16 @@ press left 10 5
release left 10 5
stable 400 5000
snap tty-bodyclick
-# tag edit from tty: the box still reads `$` while the tag is being edited (the
-# body mode is PARKED, which is the invariant), and Esc hands it back — a bug
-# that lost it would show `•` in one snap or the other
+# tag edit from tty: the box still reads `$` while the tag is typed into (the
+# tag's mode is its own), and Esc then `:` hands the keyboard back — a bug
+# that lost the body's mode would show `•` in one snap or the other
press left @Tty 3
release left @Tty 3
stable 400 5000
snap tty-tagedit
key esc
+settle 100
+key :
stable 400 5000
snap tty-tagexit
# out of tty, into insert: a body click moves the cursor but keeps INS
diff --git a/test/snapshots/ttyedit.golden b/test/snapshots/ttyedit.golden
index ad0cddc0..9f788c23 100644
--- a/test/snapshots/ttyedit.golden
+++ b/test/snapshots/ttyedit.golden
@@ -1,7 +1,8 @@
-== snap before grid=100x31 cursor=7,7
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/ttyedit/cwd Save Tty Del Toggle /tmp/pardes-snap/ttyedit/cwd Save Tty Del Toggle
+== snap before grid=100x31 cursor=7,8
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/ttyedit/cwd Tty+bash Save Mode /tmp/pardes-snap/ttyedit/cwd Tty+bash Save Mode
+| Filter Collapse Del Filter Collapse Del
| ls ls
| words.txt words.txt
| printf 'one two three\nfour five six\nseven ei
@@ -15,28 +16,30 @@
|
|
|
-|
-| /tmp/pardes-snap/ttyedit/cwd Save Tty Del Toggle
+| /tmp/pardes-snap/ttyedit/cwd Tty+bash Save Mode
+| Filter Collapse Del
| ls
| words.txt
-== snap split grid=100x31 cursor=2,8
-|2: ^ /tmp/pardes-snap/ttyedit/cwd Save Tty Del Toggle /tmp/pardes-snap/ttyedit/cwd Save Tty Del Toggle
-|7: one t
-|8: wo three
-|9: four five six
-|10: seven eight nine
-== snap opened grid=100x31 cursor=6,9
-|2: /tmp/pardes-snap/ttyedit/cwd Save Tty Del Toggle /tmp/pardes-snap/ttyedit/cwd Save Tty Del Toggle
-|9: OPEN
+== snap split grid=100x31 cursor=2,9
+|2: ^ /tmp/pardes-snap/ttyedit/cwd Tty+bash Save Mode /tmp/pardes-snap/ttyedit/cwd Tty+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
+== snap opened grid=100x31 cursor=6,10
+|2: /tmp/pardes-snap/ttyedit/cwd Tty+bash Save Mode /tmp/pardes-snap/ttyedit/cwd Tty+bash Save Mode
+|4: ls ls
+|10: OPEN
+|11: four five six
+|12: seven eight nine
+== snap joined grid=100x31 cursor=10,9
+|9: wo threeOPEN
|10: four five six
|11: seven eight nine
-== snap joined grid=100x31 cursor=10,8
-|8: wo threeOPEN
+|12:
+== snap undone grid=100x31 cursor=7,8
+|8: one two three
|9: four five six
|10: seven eight nine
|11:
-== snap undone grid=100x31 cursor=7,7
-|7: one two three
-|8: four five six
-|9: seven eight nine
-|10:
diff --git a/test/snapshots/ttyedit.snap b/test/snapshots/ttyedit.snap
index c453d230..6ee3ca03 100644
--- a/test/snapshots/ttyedit.snap
+++ b/test/snapshots/ttyedit.snap
@@ -17,8 +17,8 @@ stable 700 10000
key c-b
stable 600 8000
# click into the middle of the first output row
-press left 8 8
-release left 8 8
+press left 8 9
+release left 8 9
stable 400 5000
snap before
# Enter splits the row there: "one t" stays, "wo three" becomes a real line
diff --git a/test/snapshots/ttyfollow.golden b/test/snapshots/ttyfollow.golden
index 1b6a9fd0..4e431a7b 100644
--- a/test/snapshots/ttyfollow.golden
+++ b/test/snapshots/ttyfollow.golden
@@ -1,10 +1,10 @@
== snap held-pre grid=100x31 cursor=4,16
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/ttyfollow/cwd Save Tty Del Togg /tmp/pardes-snap/ttyfollow/cwd Save Tty Del Togg
-| 185 ls
-| 186 s.txt
-| 187
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/ttyfollow/cwd Tty+bash Save Mod /tmp/pardes-snap/ttyfollow/cwd Tty+bash Save Mod
+| e Filter Collapse Del e Filter Collapse Del
+| 186 ls
+| 187 s.txt
| 188
| 189
| 190
@@ -16,29 +16,29 @@
| 196
| 197
| 198
-| /tmp/pardes-snap/ttyfollow/cwd Save Tty Del Togg
+| /tmp/pardes-snap/ttyfollow/cwd Tty+bash Save Mod
+| e Filter Collapse Del
| ls
| s.txt
-== snap held-post grid=100x31 cursor=54,8
-|2: /tmp/pardes-snap/ttyfollow/cwd Save Tty Del Togg$ /tmp/pardes-snap/ttyfollow/cwd Save Tty Del Togg
-|3: 185 $ ls
-|5: 187 $ touch go; until test -f done1; do sleep 0.05;
-|6: 188 done; echo SYN''CED
-|7: 189 SYNCED
-|8: 190 $
+== snap held-post grid=100x31 cursor=54,9
+|2: /tmp/pardes-snap/ttyfollow/cwd Tty+bash Save Mod$ /tmp/pardes-snap/ttyfollow/cwd Tty+bash Save Mod
+|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
-|2: $ /tmp/pardes-snap/ttyfollow/cwd Save Tty Del Togg$ /tmp/pardes-snap/ttyfollow/cwd Save Tty Del Togg
-|3: 288 $ ls
-|4: 289 s.txt
-|5: 290 $ touch go; until test -f done1; do sleep 0.05;
-|6: 291 done; echo SYN''CED
-|7: 292 SYNCED
-|8: 293 $
-|9: 294
-|10: 295
-|11: 296
-|12: 297
-|13: 298
-|14: 299
-|15: 300
+|2: $ /tmp/pardes-snap/ttyfollow/cwd Tty+bash Save Mod$ /tmp/pardes-snap/ttyfollow/cwd Tty+bash Save Mod
+|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: $
diff --git a/test/snapshots/ttyhelp.golden b/test/snapshots/ttyhelp.golden
index 1c16852f..4dd7fd24 100644
--- a/test/snapshots/ttyhelp.golden
+++ b/test/snapshots/ttyhelp.golden
@@ -1,34 +1,44 @@
== snap boot grid=100x31 cursor=4,3
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-|$ /tmp/pardes-snap/ttyhelp/cwd Save Tty Del Togglettymode Filter Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+|$ /tmp/pardes-snap/ttyhelp/cwd Tty+bash Save Mode Filter Collapse Del
| $
-== snap helped grid=100x31 cursor=7,5
-|4: /tmp/pardes-snap/ttyhelp/cwd/+Help Save Tty Del Collapse
-|5: 1 pardes builtins, and how to run each:
-|6: 2 SPC and its keys, a chord, a button, the
-|7: 3 topbar - or the name, executed anywhere.
-|8: 4
-|9: 5 SPC ? Help topbar
-|10: 6 SPC P ClipPasteBefore
-|11: 7 SPC R ClipReplace
-|12: 8 SPC Y ClipYankMain
-|13: 9 SPC a a PanelAscii
-|14: 10 SPC a c PanelCurtain
-|15: 11 SPC a d PanelDissolve
-|16: 12 SPC a e PanelEdges
-|17: 13 SPC a f PanelFall
-|18: 14 SPC a r PanelScramble
-|19: 15 SPC a s PanelSlide
-|20: 16 SPC a t PanelType
-|21: 17 SPC a v PanelVertical
-|22: 18 SPC a w PanelWave
-|23: 19 SPC a z PanelZoom
-|24: 20 SPC c d Delcol
-|25: 21 SPC c j Joincol topbar
-|26: 22 SPC c n Newcol topbar
-|27: 23 SPC d Del
-|28: 24 SPC f c Config
-|29: 25 SPC f f Find topbar
-|30: 26 SPC f g Grep topbar
-== snap leaderworks grid=100x31 cursor=7,5
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/ttyhelp/cwd/+New Save Tty Collapse Del
+| 1
+== snap helped grid=100x31 cursor=7,6
+|3: $ Help
+|5: /tmp/pardes-snap/ttyhelp/cwd/+Help Save Tty Collapse Del
+|6: 1 pardes builtins, and how to run each:
+|7: 2 SPC and its keys, a chord, a button, the
+|8: 3 topbar - or the name, executed anywhere.
+|9: 4
+|10: 5 SPC ? Help topbar
+|11: 6 SPC P ClipPasteBefore
+|12: 7 SPC R ClipReplace
+|13: 8 SPC Y ClipYankMain
+|14: 9 SPC a a PanelAscii
+|15: 10 SPC a c PanelCurtain
+|16: 11 SPC a d PanelDissolve
+|17: 12 SPC a e PanelEdges
+|18: 13 SPC a f PanelFall
+|19: 14 SPC a r PanelScramble
+|20: 15 SPC a s PanelSlide
+== snap leaderworks grid=100x31 cursor=7,6
+|3: $
diff --git a/test/snapshots/ttyhelp.snap b/test/snapshots/ttyhelp.snap
index e5f77a68..24399848 100644
--- a/test/snapshots/ttyhelp.snap
+++ b/test/snapshots/ttyhelp.snap
@@ -16,6 +16,9 @@ key c-b
stable 600 10000
key space
key ?
-wait 10000 SPC c n
+# The bare-tty boot now opens an empty pane under the shell, so the index is
+# half as tall and `SPC c n` is below its fold: wait on a row that is on
+# screen. What the leader route produced is the snapshot below, not this.
+wait 10000 SPC a a PanelAscii
stable 700 15000
snap leaderworks
diff --git a/test/snapshots/ttylook.golden b/test/snapshots/ttylook.golden
index 6b29e089..851e03d7 100644
--- a/test/snapshots/ttylook.golden
+++ b/test/snapshots/ttylook.golden
@@ -1,7 +1,8 @@
-== snap tok1 grid=120x31 cursor=2,4
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/ttylook/cwd Save Tty Del Togglettymode Fi /tmp/pardes-snap/ttylook/cwd Save Tty Del Togglettymode Fi
+== snap tok1 grid=120x31 cursor=2,5
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/ttylook/cwd Tty+bash Save Mode Filter Col /tmp/pardes-snap/ttylook/cwd Tty+bash Save Mode Filter Col
+| lapse Del lapse Del
| ls ls
| big.txt plain.txt sub big.txt plain.txt sub
|
@@ -15,58 +16,56 @@
|
|
|
-|
-| /tmp/pardes-snap/ttylook/cwd Save Tty Del Togglettymode Fi
+| /tmp/pardes-snap/ttylook/cwd Tty+bash Save Mode Filter Col
+| lapse Del
| ls
| big.txt plain.txt sub
== style tok1 grid=120x31
-|0: 0-70 #b2c3b8,#1d2824, 71-119 d,#1d2824,
-|1: 0-24 #becfc4,#26362d, 25-59 d,#26362d, 60-84 #b2c3b8,#1d2824, 85-119 d,#1d2824,
-|2: 0-1 #000000,#adcc91, 2-59 #becfc4,#26362d, 60-61 #ffffff,#4c6356, 62-119 #b2c3b8,#1d2824,
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|4: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-8 #f5f7ee,#405d4b, 9-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|5: 0-0 d,#637f6a, 1-59 d,#0d1410, 60-60 d,#637f6a, 61-119 d,#0d1410,
-|6: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|7: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|8: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|9: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|10: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|11: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|12: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|13: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|14: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|15: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|16: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|17: 0-1 #ffffff,#4c6356, 2-59 #b2c3b8,#1d2824, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|18: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|19: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|20: 0-0 d,#637f6a, 1-59 d,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|21: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|22: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|23: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|24: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|25: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|26: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|27: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|28: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|29: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-|30: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 d,#637f6a, 61-61 d,#0d1410, 62-119 #e5eee5,#0d1410,
-== snap tok2 grid=120x31 cursor=11,4
-== snap tokback grid=120x31 cursor=2,4
-== snap insert grid=120x31 cursor=4,4
-|4: nnbig.txt plain.txt sub big.txt plain.txt sub
-== snap tok3 grid=120x31 cursor=22,4
-|4: big.txt plain.txt sub big.txt plain.txt sub
-== snap diropen grid=120x31 cursor=4,8
-|6: /tmp/pardes-snap/ttylook/cwd/sub Save Tty Del Togglettymod
-|7: ls
-== snap noop grid=120x31 cursor=2,4
-== snap fileopen grid=120x31 cursor=7,10
-|9: /tmp/pardes-snap/ttylook/cwd/big.txt Save Tty Del Collapse
-|10: 1 line 1
-|11: 2 line 2
-|12: 3 line 3
-|13: 4 line 4
-|14: 5 line 5
-|15: 6 line 6
-|16: 7 line 7
+|0: 0-1 d,#1d2824, 2-119 #b2c3b8,#1d2824,
+|1: 0-1 d,#887455, 2-59 #becfc4,#314738, 60-61 #becfc4,#887455, 62-119 #b2c3b8,#1d2824,
+|2: 0-1 d,#add38a, 2-30 #becfc4,#314738, 31-39 #dfbce5,#314738, 40-59 #becfc4,#314738, 60-61 #becfc4,#496656, 62-90 #b2c3b8,#1d2824, 91-99 #d3b0d9,#1d2824, 100-119 #b2c3b8,#1d2824,
+|3: 0-1 d,#314738, 2-59 #becfc4,#314738, 60-61 #becfc4,#1d2824, 62-119 #b2c3b8,#1d2824,
+|4: 0-0 d,#608269, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410,
+|5: 0-0 d,#608269, 1-1 d,#0d1410, 2-8 #f5f7ee,#3c614a, 9-10 #f5f7ee,#0d1410, 11-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410,
+|6: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|7: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|8: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|9: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|10: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|11: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|12: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|13: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|14: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|15: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|16: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|17: 0-1 d,#496656, 2-30 #b2c3b8,#1d2824, 31-39 #d3b0d9,#1d2824, 40-59 #b2c3b8,#1d2824, 60-60 #b2c3b8,#608269, 61-119 #b2c3b8,#0d1410,
+|18: 0-1 d,#1d2824, 2-59 #b2c3b8,#1d2824, 60-60 #b2c3b8,#608269, 61-119 #b2c3b8,#0d1410,
+|19: 0-0 d,#608269, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410,
+|20: 0-0 d,#608269, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410,
+|21: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|22: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|23: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|24: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|25: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|26: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|27: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|28: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|29: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+|30: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410,
+== snap tok2 grid=120x31 cursor=11,5
+== snap tokback grid=120x31 cursor=2,5
+== snap insert grid=120x31 cursor=4,5
+|5: nnbig.txt plain.txt sub big.txt plain.txt sub
+== snap tok3 grid=120x31 cursor=22,5
+|5: big.txt plain.txt sub big.txt plain.txt sub
+== snap diropen grid=120x31 cursor=4,10
+|7: /tmp/pardes-snap/ttylook/cwd/sub Tty+bash Save Mode Filter
+|8: Collapse Del
+|9: ls
+== snap noop grid=120x31 cursor=2,5
+== snap fileopen grid=120x31 cursor=3,4
+|22: /tmp/pardes-snap/ttylook/cwd/+Search Save Tty Collapse Loc
+|23: ationsConfig Del
+|24: 1 @p1:1:1-2
+|25: 2 ls
+|26: 3
diff --git a/test/snapshots/ttylook.snap b/test/snapshots/ttylook.snap
index 5b82bd89..62760ae6 100644
--- a/test/snapshots/ttylook.snap
+++ b/test/snapshots/ttylook.snap
@@ -9,21 +9,24 @@
lines big.txt 40
file plain.txt just text
dirmk sub
+# a directory looked at opens a terminal there (DirLook terminal), as this
+# script was written for; DirLook pane, the default, is dirpane.snap's
+config DirLook terminal
start 31 120 -n 3
wait 8000 big.txt
stable 700 20000
# first n: cursor sits at the shell prompt below the output — wrap lands on
# the ls row's first token, big.txt; nothing opens
-key n
+key space j n
stable 400 5000
snap tok1
snapstyle tok1
# same row, next token: plain.txt
-key n
+key space j n
stable 400 5000
snap tok2
# N steps back to big.txt
-key N
+key space j p
stable 400 5000
snap tokback
# insert-mode n still types (a run splice), no stepping; undo it
@@ -36,9 +39,9 @@ snap insert
key u
stable 400 5000
# resume the walk from big.txt's start: plain.txt, then sub
-key n
+key space j n
stable 400 5000
-key n
+key space j n
stable 400 5000
snap tok3
# Return looks the selected dir: a shell opens below in sub and ls's it
@@ -49,7 +52,7 @@ snap diropen
# spined on the panes that have LOOKED, so the step leaves this shell for the
# one it was looked out of. That pane's cursor is on its last token (`sub`),
# so the walk runs off the end and comes round to its first — big.txt.
-key n
+key space j n
stable 400 5000
snap noop
# back in the first pane, Enter with the cursor ON a token looks it (no
diff --git a/test/snapshots/ttyonly.golden b/test/snapshots/ttyonly.golden
index 64c956d5..2012f440 100644
--- a/test/snapshots/ttyonly.golden
+++ b/test/snapshots/ttyonly.golden
@@ -1,39 +1,56 @@
== snap ttyonly grid=100x31 cursor=4,5
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-|$ /tmp/pardes-snap/ttyonly/cwd Save Tty Del Togglettymode Filter Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+|$ /tmp/pardes-snap/ttyonly/cwd Tty+bash Save Mode Filter Collapse Del
| $ echo TTY''ONLY
| TTYONLY
| $
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/ttyonly/cwd/+New Save Tty Collapse Del
+| 1
== style ttyonly grid=100x31
-|0: 0-70 #b2c3b8,#1d2824, 71-99 d,#1d2824,
-|1: 0-24 #becfc4,#26362d, 25-99 d,#26362d,
-|2: 0-1 #000000,#adcc91, 2-72 #becfc4,#26362d, 73-99 d,#26362d,
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|4: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|5: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|6: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|7: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|8: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|9: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|10: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|11: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|12: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|13: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|14: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|15: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|16: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|17: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|18: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|19: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|20: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|21: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|22: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|23: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|24: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|25: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|26: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|27: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|28: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|29: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
-|30: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
+|0: 0-1 d,#1d2824, 2-99 #b2c3b8,#1d2824,
+|1: 0-1 d,#887455, 2-99 #becfc4,#314738,
+|2: 0-1 #000000,#add38a, 2-30 #becfc4,#314738, 31-39 #dfbce5,#314738, 40-99 #becfc4,#314738,
+|3: 0-0 d,#608269, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
+|4: 0-0 d,#608269, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
+|5: 0-0 d,#608269, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410,
+|6: 0-0 d,#608269, 1-99 d,#0d1410,
+|7: 0-0 d,#608269, 1-99 d,#0d1410,
+|8: 0-0 d,#608269, 1-99 d,#0d1410,
+|9: 0-0 d,#608269, 1-99 d,#0d1410,
+|10: 0-0 d,#608269, 1-99 d,#0d1410,
+|11: 0-0 d,#608269, 1-99 d,#0d1410,
+|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-0 d,#608269, 1-99 d,#0d1410,
+|17: 0-0 d,#608269, 1-99 d,#0d1410,
+|18: 0-0 d,#608269, 1-99 d,#0d1410,
+|19: 0-0 d,#608269, 1-99 d,#0d1410,
+|20: 0-0 d,#608269, 1-99 d,#0d1410,
+|21: 0-1 d,#496656, 2-30 #b2c3b8,#1d2824, 31-35 #d3b0d9,#1d2824, 36-99 #b2c3b8,#1d2824,
+|22: 0-0 d,#608269, 1-4 d,#0d1410, 5-99 #59675c,#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-0 d,#608269, 1-99 d,#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,
diff --git a/test/snapshots/ttypaste.golden b/test/snapshots/ttypaste.golden
index 3a2f629a..3eb3dd38 100644
--- a/test/snapshots/ttypaste.golden
+++ b/test/snapshots/ttypaste.golden
@@ -1,7 +1,8 @@
-== snap bracketed-paste-reached-the-shell grid=100x31 cursor=18,5
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-|$ /tmp/pardes-snap/ttypaste/cwd Save Tty Del Toggl /tmp/pardes-snap/ttypaste/cwd Save Tty Del Toggl
+== snap bracketed-paste-reached-the-shell grid=100x31 cursor=18,6
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+|$ /tmp/pardes-snap/ttypaste/cwd Tty+bash Save Mode /tmp/pardes-snap/ttypaste/cwd Tty+bash Save Mode
+| Filter Collapse Del Filter Collapse Del
| $ ls ls
| src.txt src.txt
| $ echo BRACKETED
@@ -15,8 +16,8 @@
|
|
|
-|
-| /tmp/pardes-snap/ttypaste/cwd Save Tty Del Toggl
+| /tmp/pardes-snap/ttypaste/cwd Tty+bash Save Mode
+| Filter Collapse Del
| ls
| src.txt
-== snap ctrl-v-with-empty-register-is-inert grid=100x31 cursor=18,5
+== 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 733cd776..fafe4029 100644
--- a/test/snapshots/ttyprompt.golden
+++ b/test/snapshots/ttyprompt.golden
@@ -1,7 +1,8 @@
-== snap greeted grid=100x31 cursor=4,5
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/ttyprompt/cwd Save Tty Del Togg /tmp/pardes-snap/ttyprompt/cwd Save Tty Del Togg
+== snap greeted grid=100x31 cursor=4,6
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/ttyprompt/cwd Tty+bash Save Mod /tmp/pardes-snap/ttyprompt/cwd Tty+bash Save Mod
+| e Filter Collapse Del e Filter Collapse Del
| ls ls
| probe.txt probe.txt
|
@@ -15,15 +16,15 @@
|
|
|
-|
-| /tmp/pardes-snap/ttyprompt/cwd Save Tty Del Togg
+| /tmp/pardes-snap/ttyprompt/cwd Tty+bash Save Mod
+| e Filter Collapse Del
| ls
| probe.txt
-== snap in-tty grid=100x31 cursor=17,5
-|2: $ /tmp/pardes-snap/ttyprompt/cwd Save Tty Del Togg /tmp/pardes-snap/ttyprompt/cwd Save Tty Del Togg
-|3: $ ls ls
-|5: $ echo ABCDEFGH
-== snap out-of-tty grid=100x31 cursor=17,5
-|2: /tmp/pardes-snap/ttyprompt/cwd Save Tty Del Togg /tmp/pardes-snap/ttyprompt/cwd Save Tty Del Togg
-|3: ls ls
-|5: echo ABCDEFGH
+== snap in-tty grid=100x31 cursor=17,6
+|2: $ /tmp/pardes-snap/ttyprompt/cwd Tty+bash Save Mod /tmp/pardes-snap/ttyprompt/cwd Tty+bash Save Mod
+|4: $ ls ls
+|6: $ echo ABCDEFGH
+== snap out-of-tty grid=100x31 cursor=17,6
+|2: /tmp/pardes-snap/ttyprompt/cwd Tty+bash Save Mod /tmp/pardes-snap/ttyprompt/cwd Tty+bash Save Mod
+|4: ls ls
+|6: echo ABCDEFGH
diff --git a/test/snapshots/ttytaken.golden b/test/snapshots/ttytaken.golden
index e50c1f8c..d8f4d0ca 100644
--- a/test/snapshots/ttytaken.golden
+++ b/test/snapshots/ttytaken.golden
@@ -1,45 +1,58 @@
-== snap opened grid=210x31 cursor=7,3
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/ttytaken/cwd/cmd.txt Save Tty Del Collapse /tmp/pardes-snap/ttytaken/cwd Save Tty Del Togglettymode Filter Collapse
-| 1 echo TAKEN''ONE ls
-| 2 echo TAKEN''TWO big.txt cmd.txt
-== snap at-prompt grid=210x31 cursor=7,3
-|5: echo TAKEN''ONE
-|6: TAKENONE
-== snap paging grid=210x31 cursor=114,30
-|2: /tmp/pardes-snap/ttytaken/cwd/cmd.txt Save Tty Del Collapse $ /tmp/pardes-snap/ttytaken/cwd Save Tty Del Togglettymode Filter Collapse
-|3: 1 echo TAKEN''ONE line 1
-|4: 2 echo TAKEN''TWO line 2
-|5: line 3
-|6: line 4
-|7: line 5
-|8: line 6
-|9: line 7
-|10: line 8
-|11: line 9
-|12: line 10
-|13: line 11
-|14: line 12
-|15: line 13
-|16: line 14
-|17: line 15
-|18: line 16
-|19: line 17
-|20: line 18
-|21: line 19
-|22: line 20
-|23: line 21
-|24: line 22
-|25: line 23
-|26: line 24
-|27: line 25
-|28: line 26
-|29: line 27
-|30: big.txt
-== snap spawned grid=210x31 cursor=108,26
-|26: :
-|27: /tmp/pardes-snap/ttytaken/cwd Save Tty Del Togglettymode Filter Collapse
-|28: echo TAKEN''TWO
-|29: TAKENTWO
+== snap opened grid=210x31 cursor=4,5
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/ttytaken/cwd Tty+bash Save Mode Filter Collapse Del
+| ls
+| big.txt
+== snap at-prompt grid=210x31 cursor=4,5
+|2: /tmp/pardes-snap/ttytaken/cwd Tty+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
+|3: line 1
+|4: line 2
+|5: line 3
+|6: line 4
+|7: line 5
+|8: line 6
+|9: line 7
+|10: line 8
+|11: line 9
+|12: line 10
+|13: line 11
+|14: line 12
+|15: line 13
+|16: line 14
+|17: line 15
+|18: line 16
+|19: line 17
+|20: line 18
+|21: line 19
+|22: line 20
+|23: line 21
+|24: line 22
+|25: line 23
+|26: line 24
+|27: line 25
+|28: line 26
+|29: line 27
+|30: big.txt
+== snap spawned grid=210x31 cursor=108,2
+|2: /tmp/pardes-snap/ttytaken/cwd Tty+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
+|21:
+|22:
+|23:
+|24:
+|25:
+|26:
+|27:
+|28:
+|29:
|30:
diff --git a/test/snapshots/ttytaken.snap b/test/snapshots/ttytaken.snap
index 47554876..a6ccb632 100644
--- a/test/snapshots/ttytaken.snap
+++ b/test/snapshots/ttytaken.snap
@@ -1,43 +1,50 @@
-# Process monitoring, end to end. A pane whose tty is held by a full-screen
-# program is not somewhere a command line may be typed: the SAME middle-drag
-# Exec goes into the shell while it sits at its prompt, and into a NEW shell
-# beside it once `less` owns the terminal — where it runs, instead of becoming
-# keystrokes the pager would eat. Nothing about the pager's screen changes.
-file cmd.txt echo TAKEN''ONE\necho TAKEN''TWO
+# Process monitoring, end to end. A terminal whose tty is held by a
+# full-screen program is not somewhere a command line may be typed: the SAME
+# Exec from that terminal goes into its shell while it sits at its prompt,
+# and into a command pane of its own once `less` owns the terminal -- where
+# it runs, instead of becoming keystrokes the pager would eat. Nothing about
+# the pager's screen changes. (From any pane but a terminal, an Exec always
+# runs as a command pane: exec.snap and cmdword.snap.)
lines big.txt 40
start 31 210 -n 1
-wait 8000 cmd.txt
-stable 700 20000
-# open the command file by looking its name in the greeting `ls`
-press right 14 5
-release right 14 5
-wait 10000 echo TAKEN
+wait 8000 big.txt
stable 700 20000
snap opened
-# at the prompt: the drag runs in the shell that is already on this directory
-press middle 8 4
-drag middle 22 4
-release middle 22 4
+# at the prompt: a command word in the terminal's own tag, executed, is
+# typed into its shell. `:` opens the tag, `A` appends, and the execute key
+# runs the word under the cursor.
+key :
+key A
+key space
+text @`echo TAKEN''ONE`
+key esc
+settle 100
+key h
+key tab
wait 10000 TAKENONE
stable 700 20000
snap at-prompt
-# ...and now a pager owns that terminal. Ctrl-b is raw tty (config.tty_toggle),
-# which is how a script types AT the shell instead of into the pane's own edit
-# buffer — the same way exec.snap runs a command line.
-press left 150 9
-release left 150 9
-stable 400 5000
+# ...and now a pager owns that terminal. Ctrl-b is raw tty
+# (config.tty_toggle), which is how a script types AT the shell instead of
+# into the pane's own edit buffer.
key c-b
stable 400 5000
text env LESS= less big.txt
key enter
wait 10000 line 1
stable 700 20000
+key c-b
+stable 400 5000
snap paging
-# the same gesture on the second line: a new shell, not `less` keystrokes
-press middle 8 5
-drag middle 22 5
-release middle 22 5
+# the same gesture from that terminal: a command pane, not `less` keystrokes
+key :
+key A
+key space
+text @`echo TAKEN''TWO`
+key esc
+settle 100
+key h
+key tab
wait 10000 TAKENTWO
stable 700 20000
snap spawned
diff --git a/test/snapshots/tutor.golden b/test/snapshots/tutor.golden
index afea38e9..cb5bdfc1 100644
--- a/test/snapshots/tutor.golden
+++ b/test/snapshots/tutor.golden
@@ -1,20 +1,20 @@
== snap tutor grid=150x31 cursor=7,6
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/tutor/cwd Save Tty Del Togglettymode Filter Collapse /tmp/pardes-snap/tutor/cwd Save Tty Del Togglettymode Filter Collapse
-| ls ls
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/tutor/cwd Tty+bash Save Mode Filter Collapse Del /tmp/pardes-snap/tutor/cwd Tty+bash Save Mode Filter Collapse Del
+| ls Tutor ls
|
-| /Tutor Save Tty Del Collapse
+| /tmp/pardes-snap/tutor/cwd/+Tutor Save Tty Collapse Del
| 1
| 2 PARDES TUTOR
-| 3 tmux + vi + acme, from scratch.
-| 4
-| 5 The model is acme's: EVERYTHING is text, editable and execu↩
-| table
-| 6 the same way. Modal editing (helix-style) lives on top of t↩
-| hat.
-| 7 Press j until you reach the introduction.
-| 8
+| 3
+| 4 This pane is +Tutor, a copy: edit it freely; there is no need to
+| 5 Save it (a bare Save asks for a path to write a copy to).
+| 6 `Del` in its tag closes it; once you have edited it, `Del` refuses
+| 7 once and the second `Del` discards. `Tutor` or SPC h t opens a
+| 8 fresh copy.
| 9
-| /tmp/pardes-snap/tutor/cwd Save Tty Del Togglettymode Filter Collapse
+| 10 The guide (docs/typ/guide.typ) explains; this is the hands-on part↩
+| .
+| /tmp/pardes-snap/tutor/cwd Tty+bash Save Mode Filter Collapse Del
| ls
diff --git a/test/snapshots/wheeldrift.golden b/test/snapshots/wheeldrift.golden
index e5237fa9..d45397ca 100644
--- a/test/snapshots/wheeldrift.golden
+++ b/test/snapshots/wheeldrift.golden
@@ -1,8 +1,8 @@
== snap home grid=70x17 cursor=7,3
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kil
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/wheeldrift/cwd/drift.txt Save Tty Del Collapse
-| 1 line 1_0123456789_abcdefghij_ZEND
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Deb
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/wheeldrift/cwd/drift.txt Save Tty Collapse Del
+| 1 line 1_0123456789_abcdefghij_ZEND Wrap
| 2 line 2_0123456789_abcdefghij_ZEND
| 3 line 3_0123456789_abcdefghij_ZEND
| 4 line 4_0123456789_abcdefghij_ZEND
diff --git a/test/snapshots/winch.golden b/test/snapshots/winch.golden
index 6fc444d6..9c527571 100644
--- a/test/snapshots/winch.golden
+++ b/test/snapshots/winch.golden
@@ -1,7 +1,8 @@
-== snap storm grid=100x31 cursor=4,7
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-|$ /tmp/pardes-snap/winch/cwd Save Tty Del Togglett /tmp/pardes-snap/winch/cwd Save Tty Del Togglett
+== snap storm grid=100x31 cursor=4,8
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+|$ /tmp/pardes-snap/winch/cwd Tty+bash Save Mode Fi /tmp/pardes-snap/winch/cwd Tty+bash Save Mode Fi
+| lter Collapse Del lter Collapse Del
| $ ls ls
| $ for i in $(seq 600); do kill -WINCH $PPID; don
| e; echo SUR''VIVED
@@ -15,13 +16,14 @@
|
|
|
-|
-| /tmp/pardes-snap/winch/cwd Save Tty Del Togglett
+| /tmp/pardes-snap/winch/cwd Tty+bash Save Mode Fi
+| lter Collapse Del
| ls
-== snap resized grid=106x35 cursor=4,7
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-|$ /tmp/pardes-snap/winch/cwd Save Tty Del Togglettymo /tmp/pardes-snap/winch/cwd Save Tty Del Togglettymo
+== snap resized grid=106x35 cursor=4,8
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+|$ /tmp/pardes-snap/winch/cwd Tty+bash Save Mode Filte /tmp/pardes-snap/winch/cwd Tty+bash Save Mode Filte
+| r Collapse Del r Collapse Del
| $ ls ls
| $ for i in $(seq 600); do kill -WINCH $PPID; done;
| echo SUR''VIVED
@@ -37,6 +39,6 @@
|
|
|
-|
-| /tmp/pardes-snap/winch/cwd Save Tty Del Togglettymo
+| /tmp/pardes-snap/winch/cwd Tty+bash Save Mode Filte
+| r Collapse Del
| ls
diff --git a/test/snapshots/windownav.golden b/test/snapshots/windownav.golden
index c2d385cb..fa3054af 100644
--- a/test/snapshots/windownav.golden
+++ b/test/snapshots/windownav.golden
@@ -1,21 +1,31 @@
-== snap start grid=100x31 cursor=7,3
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol New Tty Find Grep Joincol
-| /tmp/pardes-snap/windownav/cwd/w.txt Save Tty De /tmp/pardes-snap/windownav/cwd Save Tty Del Togg
+== snap start grid=100x31 cursor=7,4
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/windownav/cwd/w.txt Save Tty Co /tmp/pardes-snap/windownav/cwd Tty+bash Save Mod
+| llapse Del e Filter Collapse Del
| 1 alpha ls
| 2 beta w.txt
| 3 gamma
-== snap to-term grid=100x31 cursor=54,5
-== snap back-to-file grid=100x31 cursor=7,3
-== snap esc-to-term grid=100x31 cursor=54,5
-== snap esc-back-to-file grid=100x31 cursor=7,3
-== snap altn grid=100x31 cursor=4,20
-|17: /tmp/pardes-snap/windownav/cwd Save Tty Del Togg
-|18: ls
-|19: w.txt
-== snap up grid=100x31 cursor=7,3
-== snap right grid=100x31 cursor=54,5
-== snap left grid=100x31 cursor=7,3
-== snap down grid=100x31 cursor=4,20
-== snap toggle-doc grid=100x31 cursor=7,3
-== snap toggle-back grid=100x31 cursor=4,20
+== snap to-term grid=100x31 cursor=54,6
+|4: 1 alpha Last ls
+== snap back-to-file grid=100x31 cursor=7,4
+|4: 1 alpha ls Last
+== snap esc-to-term grid=100x31 cursor=54,6
+|4: 1 alpha Last ls
+== snap esc-back-to-file grid=100x31 cursor=7,4
+|4: 1 alpha ls Last
+== snap altn grid=100x31 cursor=4,11
+|4: 1 alpha ls
+|7: /tmp/pardes-snap/windownav/cwd Tty+bash Save Mod
+|8: e Filter Collapse Del
+|9: ls
+|10: w.txt
+== snap up grid=100x31 cursor=7,4
+== snap right grid=100x31 cursor=54,6
+== snap left grid=100x31 cursor=7,4
+== snap down grid=100x31 cursor=4,11
+== snap toggle-doc grid=100x31 cursor=7,4
+|9: ls Last
+== snap toggle-back grid=100x31 cursor=4,11
+|4: 1 alpha Last ls
+|9: ls
diff --git a/test/snapshots/windownav.snap b/test/snapshots/windownav.snap
index 66509e11..d929bb6f 100644
--- a/test/snapshots/windownav.snap
+++ b/test/snapshots/windownav.snap
@@ -1,6 +1,7 @@
# RULE: moving focus is a BUILTIN like any other, so there is ONE
-# implementation and every route reaches it. SPC w h/j/k/l run Left/Down/Up/
-# Right — the geometric focusDir the Ctrl-w prefix also runs — and SPC j j
+# implementation and every route reaches it. SPC w (as Ctrl-w) is window mode:
+# h/j/k/l move an outline by the same geometric nearest pane Left/Down/Up/Right
+# use and Enter focuses it — and SPC j j
# plus body-normal Esc run Last, the hop to the pane you were in BEFORE this
# one, whichever kind it was. It reads the focus history the core already keeps
# to hand focus back when a pane closes, and going somewhere is itself recorded,
@@ -14,13 +15,13 @@ wait 8000 w.txt
stable 700 20000
# A FILE boots alone now, so the terminal every hop below needs is opened here:
# Alt-n opens it and focuses it, Alt-c puts it in a column of its own on the
-# right, SPC w h comes straight back — which also puts the shell on the stack,
+# right, SPC w h Enter comes straight back — which also puts the shell on the stack,
# and Last only ever names a pane that is on it. (`New`/`Newcol` open an empty
# +New scratch now, not a shell.)
key a-n
key a-c
stable 700 15000
-key space w h
+key space w h enter
stable 400 5000
# left column = the file, right column = that shell; the file has focus
snap start
@@ -46,23 +47,23 @@ snap esc-back-to-file
key a-n
stable 700 15000
snap altn
-# SPC w k: up out of that new shell into the file above it
-key space w k
+# SPC w k Enter: up out of that new shell into the file above it
+key space w k enter
stable 400 5000
snap up
-# SPC w l: right, into the launch shell
-key space w l
+# SPC w l Enter: right, into the launch shell
+key space w l enter
stable 400 5000
snap right
-# SPC w h: left, back into the file column
-key space w h
+# SPC w h Enter: left, back into the file column
+key space w h enter
stable 400 5000
snap left
-# SPC w j: down, into the shell under the file
-key space w j
+# SPC w j Enter: down, into the shell under the file
+key space w j enter
stable 400 5000
snap down
-# SPC j j from a terminal: the file, which is where SPC w h left off
+# SPC j j from a terminal: the file, which is where SPC w h Enter left off
key space j j
stable 400 5000
snap toggle-doc
diff --git a/test/snapshots/windowops.golden b/test/snapshots/windowops.golden
index 4fd4b165..3e1f0d0a 100644
--- a/test/snapshots/windowops.golden
+++ b/test/snapshots/windowops.golden
@@ -1,72 +1,32 @@
-== snap hover-v grid=100x31 cursor=4,5
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol ╎New Tty Find Grep Joincol
-| /tmp/pardes-snap/windowops/cwd Save Tty Del Tog╎ /tmp/pardes-snap/windowops/cwd Save Tty Del Togg
-| ls ╎ ls
-| w.txt ╎ w.txt
-| ╎
-| ╎
-| ╎
-| ╎
-| ╎
-| ╎
-| ╎
-| ╎
-| ╎
-| ╎
-| ╎
-| ╎
-| /tmp/pardes-snap/windowops/cwd Save Tty Del Tog╎
-| ls ╎
-| w.txt ╎
-| ╎
-| ╎
-| ╎
-| ╎
-| ╎
-| ╎
-| ╎
-| ╎
-| ╎
-| ╎
-| ╎
-== snap hover-h grid=100x31 cursor=4,5
-|1: New Tty Find Grep Joincol New Tty Find Grep Joincol
-|2: /tmp/pardes-snap/windowops/cwd Save Tty Del Togg /tmp/pardes-snap/windowops/cwd Save Tty Del Togg
-|3: ls ls
-|4: w.txt w.txt
-|5:
-|6:
-|7:
-|8:
-|9:
-|10:
-|11:
-|12:
-|13:
-|14:
-|15:
-|16:
-|17: /tmp/pardes-snap/windowops/cwd Save Tty Del Togg
-|18: ls
-|19: w.txt
-|20:
-|21:
-|22:
-|23:
-|24:
-|25:
-|26:
-|27:
-|28:
-|29:
-|30:
-== snap border-drag grid=100x31 cursor=4,5
-|1: New Tty Find Grep Joincol ╎ New Tty Find Grep Joincol
-|2: /tmp/pardes-snap/windowops/cwd Save T╎y Del Togg /tmp/pardes-snap/windowops/cwd Save Tty Del Togg
-|3: ls ╎ ls
-|4: w.txt ╎ w.txt
-|5: ╎
+== snap hover-v grid=100x31 cursor=4,6
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/windowops/cwd Tty+bash Save Mod /tmp/pardes-snap/windowops/cwd Tty+bash Save Mod
+| e Filter Collapse Del e Filter Collapse Del
+| ls ls
+| w.txt w.txt
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /tmp/pardes-snap/windowops/cwd Tty+bash Save Mod
+| e Filter Collapse Del
+| ls
+| w.txt
+== snap hover-h grid=100x31 cursor=4,6
+== snap border-drag grid=100x31 cursor=4,6
+|1: New Tty Find Grep Joincol Delcol ╎ New Tty Find Grep Joincol Delcol
+|2: /tmp/pardes-snap/windowops/cwd Tty+ba╎h Save Mod /tmp/pardes-snap/windowops/cwd Tty+bash Save Mod
+|3: e Filter Collapse Del ╎ e Filter Collapse Del
+|4: ls ╎ ls
+|5: w.txt ╎ w.txt
|6: ╎
|7: ╎
|8: ╎
@@ -78,10 +38,10 @@
|14: ╎
|15: ╎
|16: ╎
-|17: /tmp/pardes-snap/windowops/cwd Save T╎y Del Togg
-|18: ls ╎
-|19: w.txt ╎
-|20: ╎
+|17: /tmp/pardes-snap/windowops/cwd Tty+ba╎h Save Mod
+|18: e Filter Collapse Del ╎
+|19: ls ╎
+|20: w.txt ╎
|21: ╎
|22: ╎
|23: ╎
@@ -92,33 +52,27 @@
|28: ╎
|29: ╎
|30: ╎
-== snap border-done grid=100x31 cursor=4,5
-|1: New Tty Find Grep Joincol ╎New Tty Find Grep Joincol
-|2: /tmp/pardes-snap/windowops/cwd Save T╎ /tmp/pardes-snap/windowops/cwd Save Tty Del Togglettymode
-|3: ls ╎ ls
-|4: w.txt ╎ w.txt
-|17: /tmp/pardes-snap/windowops/cwd Save T╎
-== snap hborder-done grid=100x31 cursor=4,5
-|1: New Tty Find Grep Joincol New Tty Find Grep Joincol
-|2: /tmp/pardes-snap/windowops/cwd Save Tt /tmp/pardes-snap/windowops/cwd Save Tty Del Togglettymode
-|3: ls ls
-|4: w.txt w.txt
-|5:
+== snap border-done grid=100x31 cursor=4,6
+|1: New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+|2: /tmp/pardes-snap/windowops/cwd Tty+bas /tmp/pardes-snap/windowops/cwd Tty+bash Save Mode Filter C
+|3: h Save Mode Filter Collapse Del ollapse Del
+|4: ls ls
+|5: w.txt w.txt
|6:
|7:
|8:
|9:
|10:
|11:
-|12: ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
-|13: /tmp/pardes-snap/windowops/cwd Save Tt
-|14: ls
-|15: w.txt
+|12:
+|13:
+|14:
+|15:
|16:
-|17:
-|18:
-|19:
-|20:
+|17: /tmp/pardes-snap/windowops/cwd Tty+bas
+|18: h Save Mode Filter Collapse Del
+|19: ls
+|20: w.txt
|21:
|22:
|23:
@@ -129,65 +83,80 @@
|28:
|29:
|30:
-== snap move-preview grid=100x31 cursor=4,16
-|12:
-== snap moved grid=100x31 cursor=4,16
-== snap altn grid=100x31 cursor=4,20
-|17: /tmp/pardes-snap/windowops/cwd Save Tt
-|18: ls
-|19: w.txt
-== snap focus-right grid=100x31 cursor=44,5
-== snap debug-on grid=100x31 cursor=44,5
-|1: New Tty Find Grep Joincol New Tty Find Grep Join╭────────────────────────────────────╮
-|2: /tmp/pardes-snap/windowops/cwd Save Tt /tmp/pardes-snap/win│pardes resizes=1 │
-|3: ls ls │theme orchard │
-|4: w.txt w.txt │font default │
-|5: │terms 4 cols 2 │
-|6: │active #2 58x28 │
-|7: │scroll 0/28 │
+== snap hborder-done grid=100x31 cursor=4,6
+|13: /tmp/pardes-snap/windowops/cwd Tty+bas
+|14: h Save Mode Filter Collapse Del
+|15: ls
+|16: w.txt
+|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
+|18: /tmp/pardes-snap/windowops/cwd Tty+bas
+|19: h Save Mode Filter Collapse Del
+|20: ls
+|21: w.txt
+== snap focus-right grid=100x31 cursor=44,6
+== snap debug-on grid=100x31 cursor=44,6
+|1: New Tty Find Grep Joincol Delcol New Tty Find Grep Jo╭────────────────────────────────────╮
+|2: /tmp/pardes-snap/windowops/cwd Tty+bas /tmp/pardes-snap/win│pardes resizes=1 │
+|3: h Save Mode Filter Collapse Del ollapse Del │theme orchard │
+|4: ls ls │font default │
+|5: w.txt w.txt │terms 4 cols 2 │
+|6: │active #2 58x27 │
+|7: │scroll 0/27 │
|8: │pinch 1.0000 │
|9: │tscroll 0.0000 │
-|10: ╰────────────────────────────────────╯
+|10: │frame virtual clock │
+|11: │ │
+|12: │ │
+|13: /tmp/pardes-snap/windowops/cwd Tty+bas ╰────────────────────────────────────╯
== style debug-on grid=100x31
-|0: 0-60 #b2c3b8,#1d2824, 61-65 #f5f7ee,#405d4b, 66-70 #b2c3b8,#1d2824, 71-99 d,#1d2824,
-|1: 0-24 #b2c3b8,#1d2824, 25-39 d,#1d2824, 40-61 #becfc4,#26362d, 62-99 d,d,
-|2: 0-1 #ffffff,#4c6356, 2-39 #b2c3b8,#1d2824, 40-41 #000000,#adcc91, 42-61 #becfc4,#26362d, 62-62 d,d, 63-79 #b2c3b8,d, 80-98 d,#152019, 99-99 d,d,
-|3: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-39 #e5eee5,#0d1410, 40-40 d,#637f6a, 41-41 d,#0d1410, 42-61 #e5eee5,#0d1410, 62-62 d,d, 63-76 #b2c3b8,d, 77-98 d,#152019, 99-99 d,d,
-|4: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-39 #e5eee5,#0d1410, 40-40 d,#637f6a, 41-41 d,#0d1410, 42-61 #e5eee5,#0d1410, 62-62 d,d, 63-76 #b2c3b8,d, 77-98 d,#152019, 99-99 d,d,
-|5: 0-0 d,#637f6a, 1-39 d,#0d1410, 40-40 d,#637f6a, 41-61 d,#0d1410, 62-62 d,d, 63-77 #b2c3b8,d, 78-98 d,#152019, 99-99 d,d,
-|6: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-39 #e5eee5,#0d1410, 40-40 d,#637f6a, 41-41 d,#0d1410, 42-61 #e5eee5,#0d1410, 62-62 d,d, 63-78 #b2c3b8,d, 79-98 d,#152019, 99-99 d,d,
-|7: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-39 #e5eee5,#0d1410, 40-40 d,#637f6a, 41-41 d,#0d1410, 42-61 #e5eee5,#0d1410, 62-62 d,d, 63-73 #b2c3b8,d, 74-98 d,#152019, 99-99 d,d,
-|8: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-39 #e5eee5,#0d1410, 40-40 d,#637f6a, 41-41 d,#0d1410, 42-61 #e5eee5,#0d1410, 62-62 d,d, 63-75 #b2c3b8,d, 76-98 d,#152019, 99-99 d,d,
-|9: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-39 #e5eee5,#0d1410, 40-40 d,#637f6a, 41-41 d,#0d1410, 42-61 #e5eee5,#0d1410, 62-62 d,d, 63-77 #b2c3b8,d, 78-98 d,#152019, 99-99 d,d,
-|10: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-39 #e5eee5,#0d1410, 40-40 d,#637f6a, 41-41 d,#0d1410, 42-61 #e5eee5,#0d1410, 62-99 d,d,
-|11: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-39 #e5eee5,#0d1410, 40-40 d,#637f6a, 41-41 d,#0d1410, 42-99 #e5eee5,#0d1410,
-|12: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-39 #e5eee5,#0d1410, 40-40 d,#637f6a, 41-41 d,#0d1410, 42-99 #e5eee5,#0d1410,
-|13: 0-1 #ffffff,#4c6356, 2-39 #b2c3b8,#1d2824, 40-40 d,#637f6a, 41-41 d,#0d1410, 42-99 #e5eee5,#0d1410,
-|14: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-39 #e5eee5,#0d1410, 40-40 d,#637f6a, 41-41 d,#0d1410, 42-99 #e5eee5,#0d1410,
-|15: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-39 #e5eee5,#0d1410, 40-40 d,#637f6a, 41-41 d,#0d1410, 42-99 #e5eee5,#0d1410,
-|16: 0-0 d,#637f6a, 1-39 d,#0d1410, 40-40 d,#637f6a, 41-41 d,#0d1410, 42-99 #e5eee5,#0d1410,
-|17: 0-1 #ffffff,#4c6356, 2-39 #b2c3b8,#1d2824, 40-40 d,#637f6a, 41-41 d,#0d1410, 42-99 #e5eee5,#0d1410,
-|18: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-39 #e5eee5,#0d1410, 40-40 d,#637f6a, 41-41 d,#0d1410, 42-99 #e5eee5,#0d1410,
-|19: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-39 #e5eee5,#0d1410, 40-40 d,#637f6a, 41-41 d,#0d1410, 42-99 #e5eee5,#0d1410,
-|20: 0-0 d,#637f6a, 1-39 d,#0d1410, 40-40 d,#637f6a, 41-41 d,#0d1410, 42-99 #e5eee5,#0d1410,
-|21: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-39 #e5eee5,#0d1410, 40-40 d,#637f6a, 41-41 d,#0d1410, 42-99 #e5eee5,#0d1410,
-|22: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-39 #e5eee5,#0d1410, 40-40 d,#637f6a, 41-41 d,#0d1410, 42-99 #e5eee5,#0d1410,
-|23: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-39 #e5eee5,#0d1410, 40-40 d,#637f6a, 41-41 d,#0d1410, 42-99 #e5eee5,#0d1410,
-|24: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-39 #e5eee5,#0d1410, 40-40 d,#637f6a, 41-41 d,#0d1410, 42-99 #e5eee5,#0d1410,
-|25: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-39 #e5eee5,#0d1410, 40-40 d,#637f6a, 41-41 d,#0d1410, 42-99 #e5eee5,#0d1410,
-|26: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-39 #e5eee5,#0d1410, 40-40 d,#637f6a, 41-41 d,#0d1410, 42-99 #e5eee5,#0d1410,
-|27: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-39 #e5eee5,#0d1410, 40-40 d,#637f6a, 41-41 d,#0d1410, 42-99 #e5eee5,#0d1410,
-|28: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-39 #e5eee5,#0d1410, 40-40 d,#637f6a, 41-41 d,#0d1410, 42-99 #e5eee5,#0d1410,
-|29: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-39 #e5eee5,#0d1410, 40-40 d,#637f6a, 41-41 d,#0d1410, 42-99 #e5eee5,#0d1410,
-|30: 0-0 d,#637f6a, 1-1 d,#0d1410, 2-39 #e5eee5,#0d1410, 40-40 d,#637f6a, 41-41 d,#0d1410, 42-99 #e5eee5,#0d1410,
-== snap debug-off grid=100x31 cursor=44,5
-|1: New Tty Find Grep Joincol New Tty Find Grep Joincol
-|2: /tmp/pardes-snap/windowops/cwd Save Tt /tmp/pardes-snap/windowops/cwd Save Tty Del Togglettymode
-|3: ls ls
-|4: w.txt w.txt
-|5:
+|0: 0-1 d,#1d2824, 2-66 #b2c3b8,#1d2824, 67-71 #f5f7ee,#3c614a, 72-72 #f5f7ee,#1d2824, 73-99 #b2c3b8,#1d2824,
+|1: 0-1 d,#887455, 2-39 #b2c3b8,#1d2824, 40-41 #b2c3b8,#887455, 42-61 #becfc4,#314738, 62-99 d,d,
+|2: 0-1 d,#496656, 2-32 #b2c3b8,#1d2824, 33-39 #d3b0d9,#1d2824, 40-41 #d3b0d9,#add38a, 42-61 #becfc4,#314738, 62-62 d,d, 63-79 #b2c3b8,d, 80-98 #b2c3b8,#152019, 99-99 d,d,
+|3: 0-1 d,#1d2824, 2-3 #d3b0d9,#1d2824, 4-39 #b2c3b8,#1d2824, 40-41 #b2c3b8,#314738, 42-61 #becfc4,#314738, 62-62 d,d, 63-76 #b2c3b8,d, 77-98 #b2c3b8,#152019, 99-99 d,d,
+|4: 0-0 d,#608269, 1-1 d,#0d1410, 2-39 #e5eee5,#0d1410, 40-40 #e5eee5,#608269, 41-61 #e5eee5,#0d1410, 62-62 d,d, 63-76 #b2c3b8,d, 77-98 #b2c3b8,#152019, 99-99 d,d,
+|5: 0-0 d,#608269, 1-1 d,#0d1410, 2-39 #e5eee5,#0d1410, 40-40 #e5eee5,#608269, 41-61 #e5eee5,#0d1410, 62-62 d,d, 63-77 #b2c3b8,d, 78-98 #b2c3b8,#152019, 99-99 d,d,
+|6: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-61 d,#0d1410, 62-62 d,d, 63-78 #b2c3b8,d, 79-98 #b2c3b8,#152019, 99-99 d,d,
+|7: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-61 d,#0d1410, 62-62 d,d, 63-73 #b2c3b8,d, 74-98 #b2c3b8,#152019, 99-99 d,d,
+|8: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-61 d,#0d1410, 62-62 d,d, 63-75 #b2c3b8,d, 76-98 #b2c3b8,#152019, 99-99 d,d,
+|9: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-61 d,#0d1410, 62-62 d,d, 63-77 #b2c3b8,d, 78-98 #b2c3b8,#152019, 99-99 d,d,
+|10: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-61 d,#0d1410, 62-62 d,d, 63-82 #b2c3b8,d, 83-98 #b2c3b8,#152019, 99-99 d,d,
+|11: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-61 d,#0d1410, 62-62 d,d, 63-98 d,#152019, 99-99 d,d,
+|12: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-61 d,#0d1410, 62-62 d,d, 63-98 d,#152019, 99-99 d,d,
+|13: 0-1 d,#496656, 2-32 #b2c3b8,#1d2824, 33-39 #d3b0d9,#1d2824, 40-40 #d3b0d9,#608269, 41-61 #d3b0d9,#0d1410, 62-99 d,d,
+|14: 0-1 d,#1d2824, 2-3 #d3b0d9,#1d2824, 4-39 #b2c3b8,#1d2824, 40-40 #b2c3b8,#608269, 41-99 #b2c3b8,#0d1410,
+|15: 0-0 d,#608269, 1-1 d,#0d1410, 2-39 #e5eee5,#0d1410, 40-40 #e5eee5,#608269, 41-99 #e5eee5,#0d1410,
+|16: 0-0 d,#608269, 1-1 d,#0d1410, 2-39 #e5eee5,#0d1410, 40-40 #e5eee5,#608269, 41-99 #e5eee5,#0d1410,
+|17: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410,
+|18: 0-1 d,#496656, 2-32 #b2c3b8,#1d2824, 33-39 #d3b0d9,#1d2824, 40-40 #d3b0d9,#608269, 41-99 #d3b0d9,#0d1410,
+|19: 0-1 d,#1d2824, 2-3 #d3b0d9,#1d2824, 4-39 #b2c3b8,#1d2824, 40-40 #b2c3b8,#608269, 41-99 #b2c3b8,#0d1410,
+|20: 0-0 d,#608269, 1-1 d,#0d1410, 2-39 #e5eee5,#0d1410, 40-40 #e5eee5,#608269, 41-99 #e5eee5,#0d1410,
+|21: 0-0 d,#608269, 1-1 d,#0d1410, 2-39 #e5eee5,#0d1410, 40-40 #e5eee5,#608269, 41-99 #e5eee5,#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,
+|24: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410,
+|25: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410,
+|26: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410,
+|27: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410,
+|28: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410,
+|29: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410,
+|30: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410,
+== snap debug-off grid=100x31 cursor=44,6
+|1: New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol
+|2: /tmp/pardes-snap/windowops/cwd Tty+bas /tmp/pardes-snap/windowops/cwd Tty+bash Save Mode Filter C
+|3: h Save Mode Filter Collapse Del ollapse Del
+|4: ls ls Debug
+|5: w.txt w.txt
|6:
|7:
|8:
|9:
|10:
+|11:
+|12:
+|13: /tmp/pardes-snap/windowops/cwd Tty+bas
diff --git a/test/snapshots/windowops.snap b/test/snapshots/windowops.snap
index 32d8c83b..7eb82148 100644
--- a/test/snapshots/windowops.snap
+++ b/test/snapshots/windowops.snap
@@ -1,13 +1,13 @@
-# hover resize hints, border drags, move drag, Alt-n, Ctrl-w focus (routed through the Right builtin), Debug box
+# hover (no hints), border drags, grip resize, move drag, Alt-n, Ctrl-w focus (window mode), Debug box
file w.txt x
start 31 100 -n 3
wait 8000 w.txt
stable 700 20000
-# hover over the left column's last col: vertical dash hint
+# hover over the left column's last col: no hint, columns resize by their grips
motion 50 10
stable 400 5000
snap hover-v
-# hover over the top-left pane's last row: horizontal dash hint
+# hover over the top-left pane's last row: no hint, a row of text is no handle
motion 20 16
stable 400 5000
snap hover-h
@@ -19,10 +19,11 @@ snap border-drag
release left 40 11
stable 500 8000
snap border-done
-# drag the horizontal border up 4 rows (pane 0's new last row)
-press left 20 17
-drag left 20 13
-release left 20 13
+# resize the left pair by the lower pane's grip, 4 rows up (a terminal has no
+# rule between panes; pane 0's last row is now 13)
+press left 1 18
+drag left 1 14
+release left 1 14
stable 500 8000
snap hborder-done
# move pane 1 (its gutter box) into the right column
@@ -37,10 +38,10 @@ snap moved
key a-n
stable 700 15000
snap altn
-# Ctrl-w l: focus right, into the pane just moved to the right column. The
-# prefix runs the SAME Right builtin `SPC w l` runs (windownav covers the
-# leader side); `h` from here would have nothing to its left to prove.
-key c-w l
+# Ctrl-w l Enter: window mode, the outline right, into the pane just moved to
+# the right column, and Enter focuses it (windownav covers the leader side,
+# SPC w); `h` from here would have nothing to its left to prove.
+key c-w l enter
stable 400 5000
snap focus-right
# Debug overlay on (topbar middle-click on Debug), then off
diff --git a/test/snapshots/wrap.golden b/test/snapshots/wrap.golden
index 813d7a44..98ebdb9c 100644
--- a/test/snapshots/wrap.golden
+++ b/test/snapshots/wrap.golden
@@ -1,7 +1,8 @@
-== snap on-narrow grid=48x15 cursor=7,3
-|Newcol Joincol Find Grep Help Changelog Tutor Du
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/wrap/cwd/long.txt Save Tty De
+== snap on-narrow grid=48x15 cursor=7,4
+| Newcol Joincol Find Grep Help Changelog Tutor
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/wrap/cwd/long.txt Save Tty Co
+| llapse Del
| 1 0---------1---------2---------3---------↩
| 4---------5---------6---------7---------↩
| 8---------9---------A---------B---------↩
@@ -11,33 +12,32 @@
| 3 third line
| 4
== snap clicked grid=48x15 cursor=17,4
-== snap logical-j grid=48x15 cursor=18,8
-== snap visual-gj grid=48x15 cursor=10,4
-== snap visual-gj-again grid=48x15 cursor=10,5
-== snap visual-gk grid=48x15 cursor=10,4
-== snap visual-count-gj grid=48x15 cursor=10,6
-== snap off grid=48x15 cursor=10,6
-|3: 1 0---------1---------2---------3---------4
-|4: 2 second line
-|5: 3 third line
-|6: 4
-|7:
+== snap logical-j grid=48x15 cursor=17,9
+== snap visual-gj grid=48x15 cursor=10,5
+== 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=10,7
+|4: 1 0---------1---------2---------3---- Wrap
+|5: 2 second line
+|6: 3 third line
+|7: 4
|8:
|9:
|10:
-== snap on-again grid=48x15 cursor=10,6
-|3: 1 0---------1---------2---------3---------↩
-|4: 4---------5---------6---------7---------↩
-|5: 8---------9---------A---------B---------↩
-|6: C---------D---------E---------F---------↩
-|7: G---------H---------I---------J---------
-|8: 2 second line
-|9: 3 third line
-|10: 4
+|11:
+== snap on-again grid=48x15 cursor=10,7
+|5: 4---------5---------6---------7---------↩
+|6: 8---------9---------A---------B---------↩
+|7: C---------D---------E---------F---------↩
+|8: G---------H---------I---------J---------
+|9: 2 second line
+|10: 3 third line
+|11: 4
== snap on-wide grid=128x15 cursor=7,3
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/wrap/cwd/long.txt Save Tty Del Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| /tmp/pardes-snap/wrap/cwd/long.txt Save Tty Collapse 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
diff --git a/test/snapshots/yankpaste.golden b/test/snapshots/yankpaste.golden
index c3b01b80..debc3b97 100644
--- a/test/snapshots/yankpaste.golden
+++ b/test/snapshots/yankpaste.golden
@@ -1,7 +1,7 @@
== snap linewise-below grid=100x31 cursor=13,6
-|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill
-|New Tty Find Grep Joincol
-| /tmp/pardes-snap/yankpaste/cwd/f.txt * Save Tty Del Collapse
+| Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit
+| New Tty Find Grep Joincol Delcol
+| */tmp/pardes-snap/yankpaste/cwd/f.txt Save Tty Collapse Del
| 1 line 1
| 2 line 2
| 3 line 3
diff --git a/test/tag_cleanup.py b/test/tag_cleanup.py
index 7b7d8bbf..ae0a0e66 100644
--- a/test/tag_cleanup.py
+++ b/test/tag_cleanup.py
@@ -36,7 +36,7 @@ def run(args):
before = set(panes(client))
execute(client, control, 'Tty')
tty = require(wait_for(lambda: next((s for s in panes(client) if s not in before), None)), 'terminal missing')
- client.write(f'/pane/{control}/ctl', b'exec Del\n') # owned command-only scratch
+ client.write(f'/pane/{control}/exec', b'Del\n') # owned command-only scratch
def tag_position():
frame = client.screen()
diff --git a/test/ui_review.py b/test/ui_review.py
index 2b6faa29..a1cdcdeb 100644
--- a/test/ui_review.py
+++ b/test/ui_review.py
@@ -43,7 +43,7 @@ def command(client, serial, text):
current = client.read(tag)
start = current.rfind(text.encode())
client.write(f'/pane/{serial}/event', f'Mx{start} {start + len(text.encode())}\n'.encode())
- client.write(f'/pane/{serial}/ctl', b'cleartag\n')
+ client.write(f'/pane/{serial}/tag', b'', truncate=True)
client.write(tag, before[tail_start:])
def new_output(client, before):
@@ -111,7 +111,7 @@ def run(args):
capture(client, root, '02-find', not args.tty)
if find_pane:
(root / 'find-results.txt').write_bytes(client.read(f'/pane/{find_pane}/body'))
- client.write(f'/pane/{find_pane}/ctl', b'exec Del\n')
+ client.write(f'/pane/{find_pane}/exec', b'Del\n')
before = panes(client)
command(client, source, 'Grep CrdsValueLabel')
grep_pane = require(wait_for(lambda: new_output(client, before)), 'Grep did not return results')
@@ -140,10 +140,10 @@ def run(args):
(root / 'symbols-results.txt').write_bytes(client.read(f'/pane/{symbols}/body'))
capture(client, root, '05-symbols', not args.tty)
if symbols:
- client.write(f'/pane/{symbols}/ctl', b'exec Del\n')
+ client.write(f'/pane/{symbols}/exec', b'Del\n')
offset = original.index(b'CrdsValue {')
client.write(f'/pane/{source}/addr', f'#{offset},#{offset}'.encode())
- client.write(f'/pane/{source}/ctl', b'dot=addr\nshow\n')
+ client.write(f'/pane/{source}/dot', client.read(f'/pane/{source}/addr'))
before = panes(client)
command(client, source, 'Hover')
hover = wait_for(lambda: new_output(client, before), args.lsp_wait)
@@ -154,7 +154,7 @@ def run(args):
# Look focuses the source without changing it; gd then travels through
# the host's real input parser, unlike tag builtin dispatch above.
line = original[:original.index(b'impl Sanitize for CrdsValue')].count(b'\n') + 1
- client.write(f'/pane/{source}/ctl', f'look {source_path}:{line}:19\n'.encode())
+ client.write(f'/pane/{source}/look', f'{source_path}:{line}:19\n'.encode())
os.write(terminal_handle['input_fd'], b'gd')
time.sleep(1)
capture(client, root, '07-definition', not args.tty)
@@ -166,7 +166,7 @@ def run(args):
report['lsp'] = info.decode()
capture(client, root, '08-lsp-info', not args.tty)
if lsp:
- client.write(f'/pane/{lsp}/ctl', b'exec Del\n')
+ client.write(f'/pane/{lsp}/exec', b'Del\n')
for theme in args.themes:
command(client, source, 'Theme ' + theme)
capture(client, root, 'theme-' + theme, not args.tty)
diff --git a/test/unit_profile.zig b/test/unit_profile.zig
index 59794df9..941efeb2 100644
--- a/test/unit_profile.zig
+++ b/test/unit_profile.zig
@@ -6,7 +6,7 @@ const Memory = struct { rss_after_bytes: ?usize = null, cumulative_peak_rss_byte
fn send(io: std.Io, file: std.Io.File, tag: Client.Tag, body: []const u8, deadline: std.Io.Timeout) !void {
var header: [8]u8 = undefined;
- std.mem.writeInt(u32, header[0..4], @intFromEnum(tag), .little);
+ std.mem.writeInt(u32, header[0..4], @backingInt(tag), .little);
std.mem.writeInt(u32, header[4..8], @intCast(body.len), .little);
for ([_][]const u8{ &header, body }) |part| {
var offset: usize = 0;
@@ -36,7 +36,7 @@ fn readAll(io: std.Io, file: std.Io.File, bytes: []u8, deadline: std.Io.Timeout)
fn receive(io: std.Io, file: std.Io.File, gpa: std.mem.Allocator, deadline: std.Io.Timeout) !struct { tag: Server.Tag, body: []u8 } {
var header: [8]u8 = undefined;
try readAll(io, file, &header, deadline);
- const tag: Server.Tag = @enumFromInt(std.mem.readInt(u32, header[0..4], .little));
+ const tag: Server.Tag = @fromBackingInt(@intCast(std.mem.readInt(u32, header[0..4], .little)));
const len = std.mem.readInt(u32, header[4..8], .little);
if (len > 16 * 1024 * 1024) return error.MessageTooLarge;
const bytes = try gpa.alloc(u8, len);
diff --git a/test/unit_profile_test.zig b/test/unit_profile_test.zig
index 721f1212..a4cdd09e 100644
--- a/test/unit_profile_test.zig
+++ b/test/unit_profile_test.zig
@@ -149,11 +149,8 @@ fn fixture(init: std.process.Init) !void {
var write_buffer: [1024]u8 = undefined;
var reader = std.Io.File.stdin().readerStreaming(io, &read_buffer);
var writer = std.Io.File.stdout().writerStreaming(io, &write_buffer);
- var server = try std.zig.Server.init(.{
- .in = &reader.interface,
- .out = &writer.interface,
- .zig_version = if (std.mem.eql(u8, mode, "version")) "wrong-version" else builtin.zig_version_string,
- });
+ var server: std.zig.Server = .{ .in = &reader.interface, .out = &writer.interface };
+ try server.serveStringMessage(.zig_version, if (std.mem.eql(u8, mode, "version")) "wrong-version" else builtin.zig_version_string);
while (true) {
const request = try server.receiveMessage();
switch (request.tag) {
diff --git a/test/v9fs.py b/test/v9fs.py
index 16916d0b..30efe9fb 100644
--- a/test/v9fs.py
+++ b/test/v9fs.py
@@ -43,8 +43,9 @@ def worker(mountpoint, socket, uid, gid, original_namespace):
assert not any(field.startswith(('shared:', 'master:')) for field in mounted[0].split()[6:])
tree = mountpoint
- assert {'os', 'index', 'pane', 'new', 'ctl', 'log', 'screen', 'README'} <= set(os.listdir(tree))
- assert 'self' not in os.listdir(tree)
+ assert {'os', 'index', 'pane', 'status', 'look', 'exec', 'log', 'screen', 'README'} <= set(os.listdir(tree))
+ assert 'self' not in os.listdir(tree) and 'new' not in os.listdir(tree)
+ assert 'new' not in os.listdir(tree / 'pane'), 'a listing would make a pane per stat'
# A direct connection provides independent evidence for VFS reads/writes.
with Client(socket) as client:
assert (tree / 'index').read_bytes() == client.read('/index')
@@ -52,14 +53,27 @@ def worker(mountpoint, socket, uid, gid, original_namespace):
before = client.read('/index')
subprocess.run(['ls', '-l', str(tree), str(tree / 'pane' / '1')], check=True, capture_output=True, timeout=5)
- subprocess.run(['find', str(tree / 'pane'), str(tree / 'new'), '-ls'], check=True, capture_output=True, timeout=5)
+ subprocess.run(['find', str(tree / 'pane'), '-ls'], check=True, capture_output=True, timeout=5)
assert (tree / 'README').read_bytes() == client.read('/README')
- assert (tree / 'new').stat().st_size == 0
assert client.read('/index') == before, 'browsing created panes'
- serial = int((tree / 'new').read_bytes().split()[0])
- another = int((tree / 'new').read_bytes().split()[0])
- assert serial != another, 'cached factory reused a pane'
- client.write(f'/pane/{another}/ctl', b'exec Del\n')
+ # Opening pane/new makes a pane and the read names it, so no trip
+ # through the index. Whether a repeated path reaches the server at all
+ # is the kernel's dentry cache's business, so the second pane comes
+ # over the wire, where the open is exact.
+ def serials():
+ return {int(row.split()[0]) for row in (tree / 'index').read_bytes().splitlines()}
+
+ def mkpane():
+ known = serials()
+ made = int((tree / 'pane' / 'new').read_bytes())
+ assert made not in known, 'the open of new made no pane'
+ return made
+
+ serial = mkpane()
+ another = int(client.read('/pane/new'))
+ assert serial != another, 'a second open of new reused a pane'
+ (tree / 'pane' / str(another)).rmdir()
+ assert another not in serials()
pane = tree / 'pane' / str(serial)
wire = f'/pane/{serial}'
assert str(serial) in os.listdir(tree / 'pane')
@@ -101,7 +115,7 @@ def worker(mountpoint, socket, uid, gid, original_namespace):
# Reading OS files through the exported tree does not recurse through
# the mount: the core still lives in the supervisor's namespace.
assert (mountpoint / 'os' / str(socket.parent).lstrip('/') / 'kernel.txt').read_bytes() == b'initial\n'
- write_existing(pane / 'ctl', b'exec Del\n')
+ (tree / 'pane' / str(serial)).rmdir()
assert serial not in [int(row.split()[0]) for row in (tree / 'index').read_bytes().splitlines()]
print('v9fs: namespace isolation, privilege drop, inherited mount, directory refresh, '
diff --git a/test/web_harness.mjs b/test/web_harness.mjs
index 90dd9a19..7fd58b86 100644
--- a/test/web_harness.mjs
+++ b/test/web_harness.mjs
@@ -17,7 +17,7 @@ async function main() {
const webDir = path.resolve(process.argv[2]);
const wasmBytes = await fs.readFile(path.join(webDir, "pardes.wasm"));
const module = await WebAssembly.compile(wasmBytes);
- const { DomRenderer, animationTicks, browserHost } = await import(pathToFileURL(path.join(webDir, "app.mjs")));
+ const { DomRenderer, browserHost } = await import(pathToFileURL(path.join(webDir, "app.mjs")));
assert.deepEqual(
[...new Set(WebAssembly.Module.imports(module).map((entry) => entry.module))],
["pardes"],
@@ -40,7 +40,7 @@ async function main() {
for (const name of [
"memory", "pardes_init", "pardes_frame", "pardes_frame_ptr", "pardes_key",
"pardes_mouse", "pardes_pointer_leave", "pardes_pointer_shape", "pardes_gui_tagline_font_percent",
- "pardes_paste", "pardes_tick", "pardes_animation_tick", "pardes_animating",
+ "pardes_paste", "pardes_tick",
"pardes_should_quit", "pardes_deinit",
]) assert.ok(wasm[name], `missing wasm export ${name}`);
@@ -85,46 +85,39 @@ async function main() {
"DOM did not use the build-time tagline percentage",
);
- for (const hz of [60, 120, 144]) {
- const clock = { last: null, lag: 0 };
- let ticks = 0;
- for (let frame = 0; frame <= hz; frame += 1) {
- ticks += animationTicks(clock, frame * 1000 / hz);
- }
- assert.equal(ticks, 60, `${hz} Hz rAF did not produce 60 core ticks per second`);
- }
- const stalled = { last: null, lag: 0 };
- assert.equal(animationTicks(stalled, 0), 0);
- assert.equal(animationTicks(stalled, 60_000), 4, "suspended tab catch-up was not bounded");
-
const firstCell = renderer.cells[0];
const second = draw();
assert.equal(renderer.cells[0], firstCell, "stable frames should reuse DOM nodes");
assert.equal(second.cells.length, 80 * 24);
- // A replay follows the terminal cursor at the bottom. Deliberately
- // over-scroll (the core clamps at row zero) so adding more source files does
- // not silently move the hard-coded build.zig click onto some later path.
+ // The embedded dump is test/web-snapshots/touch.dump.zon, a fixed source
+ // fixture (no live project paths). Over-scroll first (the core clamps at row
+ // zero) so the Look below always lands on the fixture's own first rows.
for (let tick = 0; tick < 128; tick += 1) wasm.pardes_mouse(3, 0, 5, 3, 0);
const listingTop = draw();
- assert.match(
- listingTop.cells.map((cell) => cell.text).join(""),
- /git ls-files --cached --others --exclude-standard.*build\.zig/,
- "working-tree source listing did not scroll to its first row",
+ const topLines = Array.from({ length: listingTop.rows }, (_, row) =>
+ listingTop.cells.slice(row * listingTop.cols, (row + 1) * listingTop.cols).map((cell) => cell.text).join(""));
+ assert.ok(
+ topLines.some((text) => /^\s*1 pub fn choose/.test(text)),
+ "fixture source did not scroll to its first row",
);
- wasm.pardes_mouse(2, 0, 5, 3, 0);
- wasm.pardes_mouse(2, 1, 5, 3, 0);
+ const link = "/virtual/pane/1/body";
+ const linkRow = topLines.findIndex((text) => text.includes(link));
+ assert.ok(linkRow >= 0, "fixture has no Look target");
+ const linkCol = topLines[linkRow].indexOf(link) + 5;
+ wasm.pardes_mouse(2, 0, linkCol, linkRow, 0);
+ wasm.pardes_mouse(2, 1, linkCol, linkRow, 0);
const looked = draw();
- assert.match(
- looked.cells.map((cell) => cell.text).join(""),
- /build\.zig\s+Save Tty Del/,
- "right-click LOOK did not open the embedded source",
+ const lookedText = looked.cells.map((cell) => cell.text).join("");
+ assert.ok(
+ lookedText.includes(`${link} `) && lookedText.split("pub fn choose").length - 1 >= 2,
+ "right-click LOOK did not open the reflected source body",
);
const sourceRows = Array.from({ length: looked.rows }, (_, row) =>
looked.cells.slice(row * looked.cols, (row + 1) * looked.cols));
const codeRows = sourceRows.filter((row) => row.map((cell) => cell.text).join("").match(/^\s*\d+\s/));
const codeColors = new Set(codeRows.flatMap((row) => row.slice(5).map((cell) => `${cell.fg}:${cell.attrs & 1}`)));
- assert.ok(codeColors.size >= 3, "Tree-sitter did not apply distinct syntax styles to build.zig");
+ assert.ok(codeColors.size >= 3, "Tree-sitter did not apply distinct syntax styles to the fixture");
assert.deepEqual(asked, [], "a plain replay asked the page for host IO");
wasm.pardes_resize(41, 13);
diff --git a/test/window_opacity.py b/test/window_opacity.py
index b9529373..0253e15c 100644
--- a/test/window_opacity.py
+++ b/test/window_opacity.py
@@ -60,21 +60,21 @@ def run(args):
pane = require(wait_for(lambda: next((serial for serial in panes(client)
if serial not in before), None)), builtin + ' output missing')
text = client.read(f'/pane/{pane}/body').decode()
- client.write(f'/pane/{pane}/ctl', b'exec Del\n')
+ client.write(f'/pane/{pane}/exec', b'Del\n')
return text
help_text = output('Help')
require('WindowOpacity' in help_text and 'FgOpacity' not in help_text,
'help did not replace FgOpacity with WindowOpacity')
- settings = output('Config')
+ settings = output('DumpConfig')
require('WindowOpacity: 100%\n' in settings and 'FgOpacity' not in settings,
- 'initial Config opacity not applied: ' + settings)
+ 'initial DumpConfig opacity not applied: ' + settings)
require('Wayland opacity: background-only transparent surface' in log.read_text(errors='replace'),
'background-only surface path not selected')
report['renderer_path'] = 'background-only transparent surface'
def wait_applied(percent):
- require(wait_for(lambda: f'WindowOpacity: {percent}%\n' in output('Config')),
+ require(wait_for(lambda: f'WindowOpacity: {percent}%\n' in output('DumpConfig')),
'opacity did not apply: ' + str(percent))
geometry = None
@@ -138,10 +138,10 @@ def run(args):
wait_applied(70)
require(samples() == baseline, 'opacity altered editor or terminal core RGB/text')
capture(70)
- settings = output('Config')
+ settings = output('DumpConfig')
require('WindowOpacity: 70%\n' in settings, '70% opacity not applied: ' + settings)
command(client, source, 'WindowOpacity 101')
- require('WindowOpacity: 70%\n' in output('Config'), 'invalid opacity changed state')
+ require('WindowOpacity: 70%\n' in output('DumpConfig'), 'invalid opacity changed state')
command(client, source, 'WindowOpacity 0')
wait_applied(0)
require(samples() == baseline, 'zero opacity altered editor or terminal core RGB/text')
@@ -207,7 +207,7 @@ def run(args):
log.read_text(errors='replace'))
require(all(int(value) == 0xffffffff for value in multipliers),
'whole-window alpha modifier would fade foreground text')
- require('WindowOpacity: 100%\n' in output('Config'), '100% opacity not restored')
+ require('WindowOpacity: 100%\n' in output('DumpConfig'), '100% opacity not restored')
require(source_path.read_bytes() == original == client.read(f'/pane/{source}/body'),
'source contents changed')
client.write(f'/pane/{terminal}/pty/data', b'exit\r')
diff --git a/test/yazi_preview.py b/test/yazi_preview.py
new file mode 100644
index 00000000..7fa02aa6
--- /dev/null
+++ b/test/yazi_preview.py
@@ -0,0 +1,145 @@
+#!/usr/bin/env python3
+"""yazi's image and PDF previews show in a terminal pane, and go with it.
+
+python3 -B test/yazi_preview.py <pardes-gui> <output dir> [--tty <pardes>]
+
+A hidden PARDES_TEST window runs yazi in a terminal pane on a directory
+holding a PNG and a PDF; its captures must show the picture's pixels in
+the preview column, then the PDF's page, then nothing once yazi quits.
+With --tty, the same yazi runs under a tty pardes nested in that pane: the
+tty passes the images on as kitty graphics, which the window draws.
+The captures are left in the output directory. Without yazi it skips.
+"""
+import argparse
+import os
+import shutil
+import struct
+import time
+import zlib
+from pathlib import Path
+
+from fs import session, new_pane, execute
+from ui_review import require, wait_for
+
+RED = (255, 0, 0)
+YELLOW = (255, 255, 0)
+WHITE = (255, 255, 255)
+
+
+def kind(r, g, b):
+ """Which of the three a pixel is, near enough: scaling blurs edges."""
+ if r > 230 and b < 40:
+ return RED if g < 40 else YELLOW if g > 230 else None
+ return WHITE if r > 245 and g > 245 and b > 245 else None
+
+
+def png(width, height):
+ """Red, with a yellow square in the middle."""
+ def pixel(x, y):
+ inside = width // 3 <= x < 2 * width // 3 and height // 3 <= y < 2 * height // 3
+ return bytes(YELLOW if inside else RED)
+ raw = b''.join(b'\0' + b''.join(pixel(x, y) for x in range(width)) for y in range(height))
+ def chunk(kind, data):
+ return struct.pack('>I', len(data)) + kind + data + struct.pack('>I', zlib.crc32(kind + data))
+ return (b'\x89PNG\r\n\x1a\n' + chunk(b'IHDR', struct.pack('>IIBBBBB', width, height, 8, 2, 0, 0, 0)) +
+ chunk(b'IDAT', zlib.compress(raw)) + chunk(b'IEND', b''))
+
+
+def frame(root):
+ """The latest capture, as (width, height, rgb bytes)."""
+ data = (root / 'latest.ppm').read_bytes()
+ parts = data.split(maxsplit=4)
+ width, height = int(parts[1]), int(parts[2])
+ pixels = parts[4]
+ return width, height, pixels[:width * height * 3]
+
+
+def count(root, colours):
+ """How many of every third pixel of every third row are each colour."""
+ try:
+ width, height, pixels = frame(root)
+ except (OSError, ValueError, IndexError):
+ return {c: 0 for c in colours}
+ found = {c: 0 for c in colours}
+ for y in range(0, height, 3):
+ row = pixels[y * width * 3:(y + 1) * width * 3]
+ for x in range(0, len(row) - 2, 9):
+ rgb = kind(row[x], row[x + 1], row[x + 2])
+ if rgb in found:
+ found[rgb] += 1
+ return found
+
+
+def save(root, label):
+ shutil.copyfile(root / 'latest.ppm', root / (label + '.ppm'))
+ print(label, flush=True)
+
+
+def panes(client):
+ rows = [row.split(maxsplit=5) for row in client.read('/index').decode().splitlines() if row.strip()]
+ return {int(row[0]): (row[5] if len(row) > 5 else '') for row in rows}
+
+
+def run(args):
+ if shutil.which('yazi') is None:
+ print('yazi is not installed: skipped')
+ return
+ root = args.output.resolve()
+ shutil.rmtree(root, ignore_errors=True)
+ root.mkdir(parents=True, mode=0o700)
+ (root / 'config/pardes').mkdir(parents=True)
+ (root / 'config/pardes/init').write_text('Shell /bin/sh\nTheme forge\nMessageLinger 0\n')
+ pictures = root / 'pictures'
+ pictures.mkdir()
+ (pictures / 'a.png').write_bytes(png(240, 160))
+ shutil.copyfile(Path(__file__).resolve().parent.parent / 'docs/design.pdf', pictures / 'b.pdf')
+ display = Path(os.environ.get('WAYLAND_DISPLAY', 'wayland-0'))
+ if not display.is_absolute():
+ display = Path(os.environ.get('XDG_RUNTIME_DIR', '/run/user/%d' % os.getuid())) / display
+ name = 'yazi-preview'
+ inherited = {'PARDES_TEST': '1', 'PARDES_TEST_COLS': '140', 'PARDES_TEST_ROWS': '40',
+ 'PARDES_TEST_CAPTURE_DIR': str(root), 'SDL_VIDEODRIVER': 'wayland',
+ 'WAYLAND_DISPLAY': str(display), 'XDG_CACHE_HOME': str(root / 'cache'),
+ 'XDG_DATA_HOME': str(root / 'data'), 'XDG_STATE_HOME': str(root / 'state')}
+ launch = ['-c', 'stty cols 140 rows 40; exec "$@"', name, str(args.binary.resolve()), '--9p=' + name]
+ with session('/bin/sh', root, name, socket_name=name, tty=True, launch=launch, inherited=inherited) as (client, _):
+ scratch = new_pane(client, b'')
+ before = panes(client)
+ execute(client, scratch, 'Tty')
+ term = require(wait_for(lambda: next((s for s in panes(client) if s not in before and
+ 'pty' in client.list(f'/pane/{s}')), None)), 'no terminal')
+ client.remove(f'/pane/{scratch}')
+ time.sleep(1)
+ save(root, '00-before')
+ type_in = lambda text: client.write(f'/pane/{term}/pty/data', text.encode())
+ if args.tty:
+ type_in(f'cd {pictures} && exec env -u PARDES_PID -u PARDES_9P {args.tty.resolve()} --nested\r')
+ time.sleep(4)
+ type_in(f'yazi\r')
+ else:
+ type_in(f'cd {pictures} && yazi\r')
+ # The picture, red and yellow, in the preview column.
+ shown = wait_for(lambda: (lambda c: c[RED] > 200 and c[YELLOW] > 50 and c)(count(root, [RED, YELLOW])), 30)
+ save(root, '01-png')
+ require(shown, f'the PNG preview never showed: {count(root, [RED, YELLOW])}')
+ # Down to the PDF: the picture goes, a white page comes.
+ type_in('j')
+ page = wait_for(lambda: (lambda c: c[RED] == 0 and c[WHITE] > 80 and c)(count(root, [RED, WHITE])), 30)
+ save(root, '02-pdf')
+ require(page, f'the PDF preview never replaced the picture: {count(root, [RED, WHITE])}')
+ # Back up, and out of yazi: nothing of either is left behind.
+ type_in('k')
+ require(wait_for(lambda: count(root, [RED])[RED] > 200, 30), 'the PNG did not come back')
+ type_in('q')
+ gone = wait_for(lambda: (lambda c: c[RED] == 0 and c[WHITE] < 20 and c)(count(root, [RED, WHITE])), 20)
+ save(root, '03-quit')
+ require(gone, f'images stayed after yazi quit: {count(root, [RED, WHITE])}')
+ print('yazi previews showed and went' + (' through a nested tty' if args.tty else ''))
+
+
+if __name__ == '__main__':
+ parser = argparse.ArgumentParser(description=__doc__)
+ parser.add_argument('binary', type=Path)
+ parser.add_argument('output', type=Path)
+ parser.add_argument('--tty', type=Path, help='a tty pardes to nest in the pane, yazi in it')
+ run(parser.parse_args())