diff options
| -rw-r--r-- | src/draw.zig | 26 | ||||
| -rw-r--r-- | src/mouse.zig | 161 | ||||
| -rw-r--r-- | src/pardes.zig | 2 | ||||
| -rw-r--r-- | test/snapshots/find.golden | 1 | ||||
| -rw-r--r-- | test/snapshots/headersweep-restored.golden | 49 | ||||
| -rw-r--r-- | test/snapshots/headersweep-restored.snap | 42 | ||||
| -rw-r--r-- | test/snapshots/headersweep.golden | 60 | ||||
| -rw-r--r-- | test/snapshots/headersweep.snap | 67 | ||||
| -rw-r--r-- | test/snapshots/restore.golden | 3 | ||||
| -rw-r--r-- | test/snapshots/theme.golden | 39 | ||||
| -rw-r--r-- | test/snapshots/topbarexec.golden | 4 | ||||
| -rw-r--r-- | test/snapshots/ttyhelp.golden | 2 | ||||
| -rw-r--r-- | test/snapshots/tutor.golden | 2 | ||||
| -rw-r--r-- | test/snapshots/windowops.golden | 2 |
14 files changed, 400 insertions, 60 deletions
diff --git a/src/draw.zig b/src/draw.zig index ad24153f..0ea0b35e 100644 --- a/src/draw.zig +++ b/src/draw.zig @@ -1109,8 +1109,9 @@ fn renderHeaderLayer(p: *Pardes, arena: std.mem.Allocator, layer: *pardes.Layer, // The word under the pointer, a Look or Exec target: on a header even // while it is edited, on a notice, and on the grid's copy of either // (joined from this); not on a column a carried column's pointer is - // aiming at a place over. - const hovered = p.pointer_inside and !(kind == .column and p.drag == .column_move); + // aiming at a place over; nor under a held middle or right sweep, + // which paints what it sweeps instead. + const hovered = p.pointer_inside and !(kind == .column and p.drag == .column_move) and p.header_sweep == null; if (hovered) { const tag_hit = p.pointer_tag_hit; const col: ?usize = if (tag_hit) |pointer| @@ -1141,6 +1142,27 @@ fn renderHeaderLayer(p: *Pardes, arena: std.mem.Allocator, layer: *pardes.Layer, const asking = if (p.panes[p.active]) |active| active.prompt != .none else false; if (!asking and t.cur_row == line + p.header_top and caret < columns) layer.cursor = .{ .x = @intCast(caret), .y = line, .bar = t.mode == .insert }; } + // A middle or right sweep held over this header, tinted by its + // button as a pane tag's is. + if (p.header_sweep) |sweep| if (sweep.column(p)) |column| { + const mine = switch (kind) { + .workspace => column == null, + .column => column == id, + .pane, .notice, .body => false, + }; + const swept = sweep.span(text.len); + const start = modal.lineStartOffset(text, index + top); + const end = start + shown.len; + if (mine and swept.lo < swept.hi and swept.hi > start and swept.lo < end) { + const button = @intFromEnum(sweep.button); + var col = panes.File.rawDisplayCol(shown, @max(swept.lo, start) - start) -| scroll; + const stop = panes.File.rawDisplayCol(shown, @min(swept.hi, end) - start) -| scroll; + while (col < stop and col < columns) : (col += 1) { + surface.at(@intCast(col), 0).style.bg = .{ .rgb = body_layer.buttonTints(p.theme())[button] }; + surface.at(@intCast(col), 0).style.fg = .{ .rgb = body_layer.buttonInks(p.theme())[button] }; + } + } + } else |_| {}; } } diff --git a/src/mouse.zig b/src/mouse.zig index cb0378de..2280020d 100644 --- a/src/mouse.zig +++ b/src/mouse.zig @@ -70,6 +70,84 @@ pub const Drag = union(enum) { } }; +/// A middle or right sweep over a column's tag or the workspace's, held as +/// a pane tag's is: painted in its button's tint while the button is down, +/// and run (or looked for) in that tag's context when it comes up. `anchor` +/// and `cur` are byte offsets into the header's text. +pub const HeaderSweep = struct { + /// The column's serial; null for the workspace's tag. + serial: ?u32, + button: Mouse.Button, + anchor: usize, + cur: usize, + + /// The column index the sweep is over, or null for the workspace's + /// tag; `error.Gone` once its column has been closed. + pub fn column(s: HeaderSweep, p: *const Pardes) error{Gone}!?usize { + const serial = s.serial orelse return null; + return layout.columnBySerial(p, serial) orelse error.Gone; + } + + /// The swept bytes, empty for a click that has not moved. + pub fn span(s: HeaderSweep, len: usize) struct { lo: usize, hi: usize } { + return .{ .lo = @min(s.anchor, s.cur, len), .hi = @min(@max(s.anchor, s.cur), len) }; + } +}; + +/// What a pointer at (mcol, mrow) is over in a column's tag, or the +/// workspace's for null: the header's text, the line, and the byte offset +/// in that text. `clamp` holds a held sweep to the header's rows and text, +/// as a pane tag's sweep stays on its tag. +fn headerPoint(p: *Pardes, column: ?usize, mcol: u16, mrow: u16, clamp: bool) ?struct { t: *panes.Text, text: []const u8, line: u16, at: usize } { + const t = if (column) |c| &p.col_tags[c] else &p.global_tag; + const x = if (column) |c| p.col_x[c] + TAG_TEXT_INSET else 0; + const focused = p.header_focus and p.header_column == column; + const text = edit.flatSurface(p, t) catch return null; + const base = if (column != null) p.topBarHeight() else 0; + const rows = if (column != null) p.columnBarHeight() else p.topBarHeight(); + const row: u16 = if (clamp) @min(mrow -| base, rows -| 1) else mrow -| base; + const top: usize = if (focused) p.header_top else 0; + const lines = modal.lineCount(text); + const line: u16 = if (clamp) @intCast(@min(row + top, lines -| 1)) else @intCast(row + top); + if (line > 0 and line >= lines) return null; + const bar = modal.lineSlice(text, line); + const scroll = if (focused) p.header_scroll else 0; + const kind: Layer.Kind = if (column != null) .column else .workspace; + const at = @min(bar.len, panes.File.rawAtDisplay(bar, (Layer.columnAt(p, kind, column orelse 0, p.pointer_tag_hit, clamp, row) orelse (mcol -| x)) + scroll)); + return .{ .t = t, .text = text, .line = line, .at = modal.lineStartOffset(text, line) + at }; +} + +/// A header sweep's button came up: a click runs the word under it, or the +/// header's selection when it is on that; a sweep runs what it swept. +fn headerSweepRun(p: *Pardes, sweep: HeaderSweep) void { + const column = sweep.column(p) catch return; + const t = if (column) |c| &p.col_tags[c] else &p.global_tag; + const text = edit.flatSurface(p, t) catch return; + const swept = sweep.span(text.len); + const selected = if (swept.lo < swept.hi) text[swept.lo..swept.hi] else click: { + const line = std.mem.count(u8, text[0..swept.lo], "\n"); + const start = modal.lineStartOffset(text, line); + const bar = modal.lineSlice(text, line); + const at = swept.lo - start; + const focused = p.header_focus and p.header_column == column; + const on = if (focused) tagline.headerSelection(t, text, line) else null; + break :click if (on) |sp| (if (at >= sp.lo and at < sp.hi) bar[sp.lo..sp.hi] else wordAtCol(bar, at)) else wordAtCol(bar, at); + }; + const word = p.scratch.allocator().dupe(u8, selected) catch return; + tagline.exitHeader(p); + // A column tag's command acts on that column, empty or not. + p.exec_column = column; + defer p.exec_column = null; + p.exec_header = true; + defer p.exec_header = false; + if (word.len == 0) return; + if (sweep.button == config.exec_button) { + const named = std.meta.stringToEnum(Builtin, word); + const held = if (named) |b| (if (builtins.registry.takesArg(b)) exec.heldSelection(p, p.active) else null) else exec.heldSelection(p, p.active); + _ = exec.execute(p, p.active, exec.withArg(p, word, held)); + } else exec.runBuiltin(p, config.look_cmd, p.active, "", word); +} + fn clampBorderCol(lx: u16, lw: u16, rw: u16, mcol: u16) u16 { const lo = lx + config.MINW; const hi = lx +| lw +| rw -| config.MINW; @@ -255,7 +333,7 @@ pub fn handleMouse(p: *Pardes, m: Mouse) void { const previous_tag_hit = p.pointer_tag_hit; p.pointer_tag_hit = if (m.tag_hit) |point| p.reprojectTagHit(point) else null; if (m.tag_hit != null and p.pointer_tag_hit == null and m.kind == .press) return; - if (m.tag_hit == null and (m.kind == .drag or m.kind == .release) and (p.drag == .select or p.header_drag)) { + if (m.tag_hit == null and (m.kind == .drag or m.kind == .release) and (p.drag == .select or p.header_drag or p.header_sweep != null)) { if (previous_tag_hit) |previous| { var continued = previous; continued.pixel_x = (@as(f32, @floatFromInt(raw_col)) + 0.5) * @as(f32, @floatFromInt(previous.metrics.body_w)); @@ -263,7 +341,7 @@ pub fn handleMouse(p: *Pardes, m: Mouse) void { p.pointer_tag_hit = continued; } } - if ((m.kind == .drag or m.kind == .release) and (p.drag == .select or p.header_drag)) { + if ((m.kind == .drag or m.kind == .release) and (p.drag == .select or p.header_drag or p.header_sweep != null)) { if (previous_tag_hit) |previous| if (p.pointer_tag_hit) |*current| { current.kind = previous.kind; current.id = previous.id; @@ -289,7 +367,13 @@ pub fn handleMouse(p: *Pardes, m: Mouse) void { p.raw_hover_intent = false; const mapped = p.presentation.pointer(p.screen_w, p.screen_h, raw_col, raw_row) orelse { look.cancelLookHover(p); - if (m.kind == .release) dragRelease(p, m.button); + if (m.kind == .release) { + if (p.header_sweep) |sweep| if (sweep.button == m.button) { + p.header_sweep = null; + return headerSweepRun(p, sweep); + }; + dragRelease(p, m.button); + } return; }; const mcol = mapped.col; @@ -309,6 +393,32 @@ pub fn handleMouse(p: *Pardes, m: Mouse) void { p.chord_arg = null; } } + if (p.header_sweep) |*sweep| { + if (m.kind == .press and switch (m.button) { + .left, .middle, .right => true, + else => false, + }) { + // acme 2-3 / 3-2: the other of execute and look cancels the + // sweep. The select button is inert: a header's command already + // takes the held selection as its argument, which is what a 2-1 + // chord would give it. + if (m.button != config.select_button) p.header_sweep = null; + return; + } + if (m.button == sweep.button and (m.kind == .drag or m.kind == .release)) { + const column = sweep.column(p) catch { + p.header_sweep = null; + return; + }; + if (headerPoint(p, column, mcol, mrow, true)) |point| sweep.cur = point.at; + if (m.kind == .release) { + const done = sweep.*; + p.header_sweep = null; + headerSweepRun(p, done); + } + return; + } + } if (mrow >= p.topBarHeight() and mrow < p.topBarHeight() + p.columnBarHeight() and m.kind == .press) { for (0..p.ncol) |column| { if (mcol < p.col_x[column] or mcol >= p.col_x[column] + @min(config.GUTTER, p.col_w[column])) continue; @@ -360,43 +470,26 @@ pub fn handleMouse(p: *Pardes, m: Mouse) void { }; if (column == null or mcol < x) return; } - const t = if (column) |c| &p.col_tags[c] else &p.global_tag; - const focused = p.header_focus and p.header_column == column; - const text = edit.flatSurface(p, t) catch return; - const row: u16 = @intCast(mrow - if (column != null) p.topBarHeight() else 0); - const line: u16 = @intCast(row + if (focused) p.header_top else 0); - if (line > 0 and line >= modal.lineCount(text)) return; - const bar = modal.lineSlice(text, line); - const scroll = if (focused) p.header_scroll else 0; - const at = @min(bar.len, panes.File.rawAtDisplay(bar, (Layer.columnAt(p, if (column != null) .column else .workspace, column orelse 0, p.pointer_tag_hit, p.header_drag, row) orelse (mcol -| x)) + scroll)); + const point = headerPoint(p, column, mcol, mrow, false) orelse return; if (m.button == config.select_button) { + const t = point.t; + const at = point.at - modal.lineStartOffset(point.text, point.line); // A clicked header is typed straight into, as a clicked tag is. - if (!focused) tagline.enterHeader(p, column); + if (!(p.header_focus and p.header_column == column)) tagline.enterHeader(p, column); t.mode = .insert; - t.cur_row = line; + t.cur_row = point.line; t.cur_col = @intCast(at); - t.vsel = .{ .active = false, .row = line, .col = @intCast(at) }; + t.vsel = .{ .active = false, .row = point.line, .col = @intCast(at) }; p.header_drag = true; } else { - const span = if (focused) tagline.headerSelection(t, text, line) else null; - const selected = if (span) |sp| - (if (at >= sp.lo and at < sp.hi) bar[sp.lo..sp.hi] else wordAtCol(bar, at)) - else - wordAtCol(bar, at); - const word = p.scratch.allocator().dupe(u8, selected) catch return; - tagline.exitHeader(p); - // A column tag's command acts on that column, empty or not. - p.exec_column = column; - defer p.exec_column = null; - p.exec_header = true; - defer p.exec_header = false; - if (word.len > 0) { - if (m.button == config.exec_button) { - const named = std.meta.stringToEnum(Builtin, word); - const held = if (named) |b| (if (builtins.registry.takesArg(b)) exec.heldSelection(p, p.active) else null) else exec.heldSelection(p, p.active); - _ = exec.execute(p, p.active, exec.withArg(p, word, held)); - } else exec.runBuiltin(p, config.look_cmd, p.active, "", word); - } + // Held, as a pane tag's sweep is: it runs when the button + // comes up (headerSweepRun). + p.header_sweep = .{ + .serial = if (column) |c| p.col_serial[c] else null, + .button = m.button, + .anchor = point.at, + .cur = point.at, + }; } return; } diff --git a/src/pardes.zig b/src/pardes.zig index 3ecc80ae..18794975 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -4474,6 +4474,8 @@ pub const Pardes = struct { header_column: ?usize = null, /// A mouse sweep is extending the focused header's selection. header_drag: bool = false, + /// A middle or right sweep held over a column's or the workspace's tag. + header_sweep: ?mouse.HeaderSweep = null, header_scroll: usize = 0, /// The focused header's first line on screen, which follows its caret /// when it has more lines than rows. diff --git a/test/snapshots/find.golden b/test/snapshots/find.golden index b5a75f2a..61716d87 100644 --- a/test/snapshots/find.golden +++ b/test/snapshots/find.golden @@ -89,3 +89,4 @@ |6: 1 zqmark-alpha.txt |7: 2 |8: +|16: 1 alpha body Find diff --git a/test/snapshots/headersweep-restored.golden b/test/snapshots/headersweep-restored.golden new file mode 100644 index 00000000..765f221f --- /dev/null +++ b/test/snapshots/headersweep-restored.golden @@ -0,0 +1,49 @@ +== style col-sweeping grid=120x21 +|0: 0-119 #b2c3b8,#1d2824, +|1: 0-1 d,#887455, 2-2 d,#314738, 3-35 #becfc4,#314738, 36-43 #f5f7ee,#5b7e5a, 44-59 #becfc4,#314738, 60-61 #becfc4,#887455, 62-62 #becfc4,#1d2824, 63-119 #b2c3b8,#1d2824, +|2: 0-1 d,#add38a, 2-2 d,#314738, 3-44 #becfc4,#314738, 45-53 #dfbce5,#314738, 54-59 #becfc4,#314738, 60-61 #becfc4,#496656, 62-62 #becfc4,#1d2824, 63-104 #b2c3b8,#1d2824, 105-113 #d3b0d9,#1d2824, 114-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-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-2 d,#1d2824, 3-44 #b2c3b8,#1d2824, 45-53 #d3b0d9,#1d2824, 54-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-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,9 +|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Exit Restore /tmp/pardes-snap/headersweep-restored/du +| 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 M /tmp/pardes-snap/headersweep-restored/cwd Tty+bash Save M +| ode Filter Collapse Del ode Filter Collapse Del +| $ ls $ ls +| $ $ +| ── restored history ── ── restored history ── +| echo RE''STORED-COL +| RESTORED-COL +| +| +| +| /tmp/pardes-snap/headersweep-restored/cwd Tty+bash Save M +| ode Filter Collapse Del +| $ ls +| $ +| ── restored history ── +== style ws-sweeping grid=120x21 +|0: 0-100 #b2c3b8,#1d2824, 101-108 #f5f7ee,#5b7e5a, 109-119 #b2c3b8,#1d2824, +|1: 0-1 d,#887455, 2-2 d,#314738, 3-59 #becfc4,#314738, 60-61 #becfc4,#887455, 62-62 #becfc4,#1d2824, 63-119 #b2c3b8,#1d2824, +|7: 0-0 d,#608269, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410, +|8: 0-0 d,#608269, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410, +== snap ws-swept grid=120x21 cursor=4,11 +|0: Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Exit Restore /tmp/pardes-snap/headersweep-restored ec +|9: echo RE''STORED-WS +|10: RESTORED-WS 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..92d23a1b --- /dev/null +++ b/test/snapshots/headersweep.golden @@ -0,0 +1,60 @@ +== style col-sweeping grid=120x21 +|0: 0-119 #b2c3b8,#1d2824, +|1: 0-1 d,#887455, 2-2 d,#314738, 3-35 #becfc4,#314738, 36-43 #f5f7ee,#5b7e5a, 44-59 #becfc4,#314738, 60-61 #becfc4,#887455, 62-62 #becfc4,#1d2824, 63-119 #b2c3b8,#1d2824, +|2: 0-1 d,#add38a, 2-2 d,#314738, 3-35 #becfc4,#314738, 36-44 #dfbce5,#314738, 45-59 #becfc4,#314738, 60-61 #becfc4,#496656, 62-62 #becfc4,#1d2824, 63-95 #b2c3b8,#1d2824, 96-104 #d3b0d9,#1d2824, 105-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-2 d,#1d2824, 3-35 #b2c3b8,#1d2824, 36-44 #d3b0d9,#1d2824, 45-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,8 +|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor 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 Filte /tmp/pardes-snap/headersweep/cwd Tty+bash Save Mode Filte +| r Collapse Del r Collapse Del +| ls ls +| hay.txt hay.txt +| echo SW''EPT-COL +| SWEPT-COL +| +| +| +| +| /tmp/pardes-snap/headersweep/cwd Tty+bash Save Mode Filte +| r Collapse Del +| ls +| hay.txt +== snap ws-swept grid=120x21 cursor=4,10 +|0: Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Exit echo SW''EPT-WS +|8: echo SW''EPT-WS +|9: SWEPT-WS +== snap ws-looked grid=120x21 cursor=7,19 +|0: Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Exit echo SW''EPT-WS xxhay.txtxx +|17: /tmp/pardes-snap/headersweep/cwd/hay.txt Save Tty Collaps +|18: e Del +|19: 1 ZQNEEDLE +== snap cancelled grid=120x21 cursor=7,19 +== style selected grid=120x21 +|1: 0-1 d,#887455, 2-2 d,#1d2824, 3-59 #b2c3b8,#1d2824, 60-61 #b2c3b8,#887455, 62-62 #b2c3b8,#314738, 63-70 #becfc4,#314738, 71-79 #f5f7ee,#3c614a, 80-80 #f5f7ee,#314738, 81-119 #becfc4,#314738, +|2: 0-1 d,#496656, 2-2 d,#1d2824, 3-35 #b2c3b8,#1d2824, 36-44 #d3b0d9,#1d2824, 45-59 #b2c3b8,#1d2824, 60-61 #b2c3b8,#add38a, 62-62 #b2c3b8,#314738, 63-95 #becfc4,#314738, 96-104 #dfbce5,#314738, 105-119 #becfc4,#314738, +|3: 0-2 d,#1d2824, 3-59 #b2c3b8,#1d2824, 60-62 #b2c3b8,#314738, 63-119 #becfc4,#314738, +|6: 0-0 d,#608269, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410, +|7: 0-0 d,#608269, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410, +|8: 0-0 d,#608269, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410, +|9: 0-0 d,#608269, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410, +|17: 0-1 d,#496656, 2-2 d,#1d2824, 3-35 #b2c3b8,#1d2824, 36-43 #d3b0d9,#1d2824, 44-59 #b2c3b8,#1d2824, 60-60 #b2c3b8,#608269, 61-119 #b2c3b8,#0d1410, +|18: 0-2 d,#1d2824, 3-59 #b2c3b8,#1d2824, 60-60 #b2c3b8,#608269, 61-119 #b2c3b8,#0d1410, +|19: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-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/restore.golden b/test/snapshots/restore.golden index 53dffe0f..af2b82c1 100644 --- a/test/snapshots/restore.golden +++ b/test/snapshots/restore.golden @@ -2,10 +2,11 @@ |Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Exit Restore /tmp/pardes-snap/res | New Tty Find Grep Joincol Delcol |$ /tmp/pardes-snap/restore/cwd Tty+bash Save Mode Filter Collapse Del -| $ ls +| $ ls Dump | $ echo KEEP''ME | KEEPME | $ == 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/theme.golden b/test/snapshots/theme.golden index f4e4f9ec..443d639c 100644 --- a/test/snapshots/theme.golden +++ b/test/snapshots/theme.golden @@ -53,12 +53,13 @@ |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,#654053, 60-60 #fff0eb,#2c2630, 61-99 #c6b6c5,#2c2630, |1: 0-1 d,#757a5f, 2-2 d,#533d4d, 3-49 #d2c2d1,#533d4d, 50-51 #d2c2d1,#757a5f, 52-52 #d2c2d1,#2c2630, 53-99 #c6b6c5,#2c2630, |2: 0-1 d,#edb092, 2-2 d,#533d4d, 3-29 #d2c2d1,#533d4d, 30-38 #a1d5c4,#533d4d, 39-49 #d2c2d1,#533d4d, 50-51 #d2c2d1,#745469, 52-52 #d2c2d1,#2c2630, 53-79 #c6b6c5,#2c2630, 80-88 #96c9b8,#2c2630, 89-99 #c6b6c5,#2c2630, |3: 0-2 d,#533d4d, 3-49 #d2c2d1,#533d4d, 50-52 #d2c2d1,#2c2630, 53-99 #c6b6c5,#2c2630, -|4: 0-0 d,#8e667c, 1-1 d,#39323b, 2-49 #c3b6c1,#39323b, 50-50 #c3b6c1,#8e667c, 51-99 #c3b6c1,#39323b, +|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, @@ -91,7 +92,7 @@ |1: 0-1 d,#8f7d5b, 2-2 d,#2b4051, 3-49 #e1eef9,#2b4051, 50-51 #e1eef9,#8f7d5b, 52-52 #e1eef9,#15212c, 53-99 #d5e4f1,#15212c, |2: 0-1 d,#86d8ff, 2-2 d,#2b4051, 3-29 #e1eef9,#2b4051, 30-38 #ffeab8,#2b4051, 39-49 #e1eef9,#2b4051, 50-51 #e1eef9,#5f7990, 52-52 #e1eef9,#15212c, 53-79 #d5e4f1,#15212c, 80-88 #f5e0ac,#15212c, 89-99 #d5e4f1,#15212c, |3: 0-2 d,#2b4051, 3-49 #e1eef9,#2b4051, 50-52 #e1eef9,#15212c, 53-99 #d5e4f1,#15212c, -|4: 0-0 d,#86a8c2, 1-1 d,#000000, 2-49 #f3f7fc,#000000, 50-50 #f3f7fc,#86a8c2, 51-99 #f3f7fc,#000000, +|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, @@ -124,7 +125,7 @@ |1: 0-1 d,#bda27e, 2-2 d,#bdd8ca, 3-49 #4a5a52,#bdd8ca, 50-51 #4a5a52,#bda27e, 52-52 #4a5a52,#e8eae3, 53-99 #52625a,#e8eae3, |2: 0-1 d,#367157, 2-2 d,#bdd8ca, 3-29 #4a5a52,#bdd8ca, 30-38 #69447a,#bdd8ca, 39-49 #4a5a52,#bdd8ca, 50-51 #4a5a52,#8fa594, 52-52 #4a5a52,#e8eae3, 53-79 #52625a,#e8eae3, 80-88 #724c83,#e8eae3, 89-99 #52625a,#e8eae3, |3: 0-2 d,#bdd8ca, 3-49 #4a5a52,#bdd8ca, 50-52 #4a5a52,#e8eae3, 53-99 #52625a,#e8eae3, -|4: 0-0 d,#869d8a, 1-1 d,#f5f3ed, 2-49 #303b3b,#f5f3ed, 50-50 #303b3b,#869d8a, 51-99 #303b3b,#f5f3ed, +|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, @@ -157,7 +158,7 @@ |1: 0-1 d,#b79a7a, 2-2 d,#c7dcec, 3-49 #213e56,#c7dcec, 50-51 #213e56,#b79a7a, 52-52 #213e56,#edf2f7, 53-99 #29465e,#edf2f7, |2: 0-1 d,#006198, 2-2 d,#c7dcec, 3-29 #213e56,#c7dcec, 30-38 #52255f,#c7dcec, 39-49 #213e56,#c7dcec, 50-51 #213e56,#7b9eb7, 52-52 #213e56,#edf2f7, 53-79 #29465e,#edf2f7, 80-88 #5a2d67,#edf2f7, 89-99 #29465e,#edf2f7, |3: 0-2 d,#c7dcec, 3-49 #213e56,#c7dcec, 50-52 #213e56,#edf2f7, 53-99 #29465e,#edf2f7, -|4: 0-0 d,#6685a0, 1-1 d,#ffffff, 2-49 #142d40,#ffffff, 50-50 #142d40,#6685a0, 51-99 #142d40,#ffffff, +|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, @@ -190,7 +191,7 @@ |1: 0-1 d,#bca481, 2-2 d,#bfdcce, 3-49 #35584d,#bfdcce, 50-51 #35584d,#bca481, 52-52 #35584d,#e4f0ed, 53-99 #3d6055,#e4f0ed, |2: 0-1 d,#36826b, 2-2 d,#bfdcce, 3-29 #35584d,#bfdcce, 30-38 #653f6b,#bfdcce, 39-49 #35584d,#bfdcce, 50-51 #35584d,#95baa2, 52-52 #35584d,#e4f0ed, 53-79 #3d6055,#e4f0ed, 80-88 #6e4774,#e4f0ed, 89-99 #3d6055,#e4f0ed, |3: 0-2 d,#bfdcce, 3-49 #35584d,#bfdcce, 50-52 #35584d,#e4f0ed, 53-99 #3d6055,#e4f0ed, -|4: 0-0 d,#9fae76, 1-1 d,#fffdeb, 2-49 #293f35,#fffdeb, 50-50 #293f35,#9fae76, 51-99 #293f35,#fffdeb, +|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, @@ -222,13 +223,13 @@ == style colors-off grid=100x31 |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 ls +|4: ls NextColor ls == style forge grid=100x31 |0: 0-50 #c5c9d2,#22252b, 51-59 #e2eef4,#1c5172, 60-60 #e2eef4,#22252b, 61-99 #c5c9d2,#22252b, |1: 0-1 d,#6a7b67, 2-2 d,#374253, 3-49 #d1d5de,#374253, 50-51 #d1d5de,#6a7b67, 52-52 #d1d5de,#22252b, 53-99 #c5c9d2,#22252b, |2: 0-1 d,#9cc3f7, 2-2 d,#374253, 3-29 #d1d5de,#374253, 30-38 #f8cba7,#374253, 39-49 #d1d5de,#374253, 50-51 #d1d5de,#55647b, 52-52 #d1d5de,#22252b, 53-79 #c5c9d2,#22252b, 80-88 #ecbf9b,#22252b, 89-99 #c5c9d2,#22252b, |3: 0-2 d,#374253, 3-49 #d1d5de,#374253, 50-52 #d1d5de,#22252b, 53-99 #c5c9d2,#22252b, -|4: 0-0 d,#708095, 1-1 d,#0c0c0e, 2-49 #e5e5e5,#0c0c0e, 50-50 #e5e5e5,#708095, 51-99 #e5e5e5,#0c0c0e, +|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, @@ -261,7 +262,7 @@ |1: 0-1 d,#9a7662, 2-2 d,#3a6154, 3-49 #c7e3d7,#3a6154, 50-51 #c7e3d7,#9a7662, 52-52 #c7e3d7,#29443f, 53-99 #bbd7cb,#29443f, |2: 0-1 d,#81cfb7, 2-2 d,#3a6154, 3-29 #c7e3d7,#3a6154, 30-38 #f0cef8,#3a6154, 39-49 #c7e3d7,#3a6154, 50-51 #c7e3d7,#548372, 52-52 #c7e3d7,#29443f, 53-79 #bbd7cb,#29443f, 80-88 #e4c2ec,#29443f, 89-99 #bbd7cb,#29443f, |3: 0-2 d,#3a6154, 3-49 #c7e3d7,#3a6154, 50-52 #c7e3d7,#29443f, 53-99 #bbd7cb,#29443f, -|4: 0-0 d,#6e9b8b, 1-1 d,#34464c, 2-49 #bac9ce,#34464c, 50-50 #bac9ce,#6e9b8b, 51-99 #bac9ce,#34464c, +|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, @@ -294,7 +295,7 @@ |1: 0-1 d,#347a9a, 2-2 d,#2f5c5c, 3-49 #d3e0c9,#2f5c5c, 50-51 #d3e0c9,#347a9a, 52-52 #d3e0c9,#123f43, 53-99 #c7d4bd,#123f43, |2: 0-1 d,#e1c266, 2-2 d,#2f5c5c, 3-29 #d3e0c9,#2f5c5c, 30-38 #f5cdec,#2f5c5c, 39-49 #d3e0c9,#2f5c5c, 50-51 #d3e0c9,#467f76, 52-52 #d3e0c9,#123f43, 53-79 #c7d4bd,#123f43, 80-88 #e9c1e0,#123f43, 89-99 #c7d4bd,#123f43, |3: 0-2 d,#2f5c5c, 3-49 #d3e0c9,#2f5c5c, 50-52 #d3e0c9,#123f43, 53-99 #c7d4bd,#123f43, -|4: 0-0 d,#65978c, 1-1 d,#173e45, 2-49 #a7b7ae,#173e45, 50-50 #a7b7ae,#65978c, 51-99 #a7b7ae,#173e45, +|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, @@ -327,7 +328,7 @@ |1: 0-1 d,#706596, 2-2 d,#5a523a, 3-49 #e9e4c7,#5a523a, 50-51 #e9e4c7,#706596, 52-52 #e9e4c7,#3b3830, 53-99 #ddd8bb,#3b3830, |2: 0-1 d,#ffd866, 2-2 d,#5a523a, 3-29 #e9e4c7,#5a523a, 30-38 #d7e3ff,#5a523a, 39-49 #e9e4c7,#5a523a, 50-51 #e9e4c7,#92844f, 52-52 #e9e4c7,#3b3830, 53-79 #ddd8bb,#3b3830, 80-88 #c5d7ff,#3b3830, 89-99 #ddd8bb,#3b3830, |3: 0-2 d,#5a523a, 3-49 #e9e4c7,#5a523a, 50-52 #e9e4c7,#3b3830, 53-99 #ddd8bb,#3b3830, -|4: 0-0 d,#948d6f, 1-1 d,#100e11, 2-49 #fcfcfa,#100e11, 50-50 #fcfcfa,#948d6f, 51-99 #fcfcfa,#100e11, +|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, @@ -360,7 +361,7 @@ |1: 0-1 d,#9b583f, 2-2 d,#4a583e, 3-49 #e1e4c4,#4a583e, 50-51 #e1e4c4,#9b583f, 52-52 #e1e4c4,#343b2e, 53-99 #d5d8b8,#343b2e, |2: 0-1 d,#d8bd83, 2-2 d,#4a583e, 3-29 #e1e4c4,#4a583e, 30-38 #c5e7f7,#4a583e, 39-49 #e1e4c4,#4a583e, 50-51 #e1e4c4,#7b7e4e, 52-52 #e1e4c4,#343b2e, 53-79 #d5d8b8,#343b2e, 80-88 #badbeb,#343b2e, 89-99 #d5d8b8,#343b2e, |3: 0-2 d,#4a583e, 3-49 #e1e4c4,#4a583e, 50-52 #e1e4c4,#343b2e, 53-99 #d5d8b8,#343b2e, -|4: 0-0 d,#888e5e, 1-1 d,#100e0b, 2-49 #f3f2cc,#100e0b, 50-50 #f3f2cc,#888e5e, 51-99 #f3f2cc,#100e0b, +|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, @@ -393,7 +394,7 @@ |1: 0-1 d,#875e65, 2-2 d,#4d5c48, 3-49 #e3e2c2,#4d5c48, 50-51 #e3e2c2,#875e65, 52-52 #e3e2c2,#343f36, 53-99 #d7d6b6,#343f36, |2: 0-1 d,#8ac874, 2-2 d,#4d5c48, 3-29 #e3e2c2,#4d5c48, 30-38 #b5ecec,#4d5c48, 39-49 #e3e2c2,#4d5c48, 50-51 #e3e2c2,#687c4d, 52-52 #e3e2c2,#343f36, 53-79 #d7d6b6,#343f36, 80-88 #aae0e0,#343f36, 89-99 #d7d6b6,#343f36, |3: 0-2 d,#4d5c48, 3-49 #e3e2c2,#4d5c48, 50-52 #e3e2c2,#343f36, 53-99 #d7d6b6,#343f36, -|4: 0-0 d,#8c9467, 1-1 d,#10100e, 2-49 #f3e5bc,#10100e, 50-50 #f3e5bc,#8c9467, 51-99 #f3e5bc,#10100e, +|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, @@ -426,7 +427,7 @@ |1: 0-1 d,#6a7b67, 2-2 d,#374253, 3-49 #d1d5de,#374253, 50-51 #d1d5de,#6a7b67, 52-52 #d1d5de,#22252b, 53-99 #c5c9d2,#22252b, |2: 0-1 d,#9cc3f7, 2-2 d,#374253, 3-29 #d1d5de,#374253, 30-38 #f8cba7,#374253, 39-49 #d1d5de,#374253, 50-51 #d1d5de,#55647b, 52-52 #d1d5de,#22252b, 53-79 #c5c9d2,#22252b, 80-88 #ecbf9b,#22252b, 89-99 #c5c9d2,#22252b, |3: 0-2 d,#374253, 3-49 #d1d5de,#374253, 50-52 #d1d5de,#22252b, 53-99 #c5c9d2,#22252b, -|4: 0-0 d,#708095, 1-1 d,#000000, 2-49 #f6f6f6,#000000, 50-50 #f6f6f6,#708095, 51-99 #f6f6f6,#000000, +|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, @@ -459,7 +460,7 @@ |1: 0-1 d,#6d7f6c, 2-2 d,#404a58, 3-49 #d1d5de,#404a58, 50-51 #d1d5de,#6d7f6c, 52-52 #d1d5de,#2a2d34, 53-99 #c5c9d2,#2a2d34, |2: 0-1 d,#9cc3f7, 2-2 d,#404a58, 3-29 #d1d5de,#404a58, 30-38 #f8cba7,#404a58, 39-49 #d1d5de,#404a58, 50-51 #d1d5de,#55647b, 52-52 #d1d5de,#2a2d34, 53-79 #c5c9d2,#2a2d34, 80-88 #ecbf9b,#2a2d34, 89-99 #c5c9d2,#2a2d34, |3: 0-2 d,#404a58, 3-49 #d1d5de,#404a58, 50-52 #d1d5de,#2a2d34, 53-99 #c5c9d2,#2a2d34, -|4: 0-0 d,#708095, 1-1 d,#35383e, 2-49 #bfc3cc,#35383e, 50-50 #bfc3cc,#708095, 51-99 #bfc3cc,#35383e, +|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, @@ -492,7 +493,7 @@ |1: 0-1 d,#887455, 2-2 d,#314738, 3-49 #becfc4,#314738, 50-51 #becfc4,#887455, 52-52 #becfc4,#1d2824, 53-99 #b2c3b8,#1d2824, |2: 0-1 d,#add38a, 2-2 d,#314738, 3-29 #becfc4,#314738, 30-38 #dfbce5,#314738, 39-49 #becfc4,#314738, 50-51 #becfc4,#496656, 52-52 #becfc4,#1d2824, 53-79 #b2c3b8,#1d2824, 80-88 #d3b0d9,#1d2824, 89-99 #b2c3b8,#1d2824, |3: 0-2 d,#314738, 3-49 #becfc4,#314738, 50-52 #becfc4,#1d2824, 53-99 #b2c3b8,#1d2824, -|4: 0-0 d,#608269, 1-1 d,#000000, 2-49 #f2f8ef,#000000, 50-50 #f2f8ef,#608269, 51-99 #f2f8ef,#000000, +|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, @@ -525,7 +526,7 @@ |1: 0-1 d,#8888cc, 2-2 d,#eaffff, 3-49 #000000,#eaffff, 50-51 #000000,#8888cc, 52-99 #000000,#eaffff, |2: 0-1 d,#8888cc, 2-2 d,#eaffff, 3-29 #000000,#eaffff, 30-38 #000099,#eaffff, 39-49 #000000,#eaffff, 50-51 #000000,#b9c3e5, 52-79 #000000,#eaffff, 80-88 #000099,#eaffff, 89-99 #000000,#eaffff, |3: 0-2 d,#eaffff, 3-99 #000000,#eaffff, -|4: 0-1 d,#ffffea, 2-99 #000000,#ffffea, +|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, @@ -558,7 +559,7 @@ |1: 0-1 d,#8a3a3a, 2-2 d,#25397d, 3-49 #eee6d2,#25397d, 50-51 #eee6d2,#8a3a3a, 52-52 #eee6d2,#0f1a4a, 53-99 #9aa6d9,#0f1a4a, |2: 0-1 d,#e8c46a, 2-2 d,#25397d, 3-29 #eee6d2,#25397d, 30-38 #f2d280,#25397d, 39-49 #eee6d2,#25397d, 50-51 #eee6d2,#6a78b1, 52-52 #eee6d2,#0f1a4a, 53-79 #9aa6d9,#0f1a4a, 80-88 #e8c46a,#0f1a4a, 89-99 #9aa6d9,#0f1a4a, |3: 0-2 d,#25397d, 3-49 #eee6d2,#25397d, 50-52 #eee6d2,#0f1a4a, 53-99 #9aa6d9,#0f1a4a, -|4: 0-0 d,#e8c46a, 1-1 d,#0a1030, 2-49 #eee6d2,#0a1030, 50-50 #eee6d2,#e8c46a, 51-99 #eee6d2,#0a1030, +|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, @@ -591,7 +592,7 @@ |1: 0-1 d,#458276, 2-2 d,#1e1e1e, 3-49 #ffffff,#1e1e1e, 50-51 #ffffff,#458276, 52-52 #ffffff,#3c3c3c, 53-99 #a7a7a7,#3c3c3c, |2: 0-1 d,#007fd4, 2-2 d,#1e1e1e, 3-29 #ffffff,#1e1e1e, 30-38 #cbe5fc,#1e1e1e, 39-49 #ffffff,#1e1e1e, 50-51 #ffffff,#1c608e, 52-52 #ffffff,#3c3c3c, 53-79 #a7a7a7,#3c3c3c, 80-88 #68aee9,#3c3c3c, 89-99 #a7a7a7,#3c3c3c, |3: 0-2 d,#1e1e1e, 3-49 #ffffff,#1e1e1e, 50-52 #ffffff,#3c3c3c, 53-99 #a7a7a7,#3c3c3c, -|4: 0-0 d,#424242, 1-1 d,#1e1e1e, 2-49 #d4d4d4,#1e1e1e, 50-50 #d4d4d4,#424242, 51-99 #d4d4d4,#1e1e1e, +|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, @@ -624,7 +625,7 @@ |1: 0-1 d,#758a41, 2-2 d,#93a1a1, 3-49 #073642,#93a1a1, 50-51 #073642,#758a41, 52-52 #073642,#657b83, 53-99 #01090b,#657b83, |2: 0-1 d,#2483c5, 2-2 d,#93a1a1, 3-29 #073642,#93a1a1, 30-38 #2d3502,#93a1a1, 39-49 #073642,#93a1a1, 50-51 #073642,#185986, 52-52 #073642,#657b83, 53-79 #01090b,#657b83, 80-88 #121600,#657b83, 89-99 #01090b,#657b83, |3: 0-2 d,#93a1a1, 3-49 #073642,#93a1a1, 50-52 #073642,#657b83, 53-99 #01090b,#657b83, -|4: 0-0 d,#839496, 1-1 d,#002b36, 2-49 #839496,#002b36, 50-50 #839496,#839496, 51-99 #839496,#002b36, +|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, diff --git a/test/snapshots/topbarexec.golden b/test/snapshots/topbarexec.golden index 8cb03894..500f9f2a 100644 --- a/test/snapshots/topbarexec.golden +++ b/test/snapshots/topbarexec.golden @@ -19,7 +19,7 @@ |1: New Tty Find Grep Joincol Delcol New ╭────────────────────────────────────╮ |2: /tmp/pardes-snap/topbarexec/cwd Tty+bash S /tmp│pardes resizes=1 │ |3: ave Mode Filter Collapse Del ave │theme orchard │ -|4: ls ls │font default │ +|4: ls Debug ls │font default │ |5: zmarkfile.txt zmark│terms 3 cols 2 │ |6: │active #0 43x8 │ |7: │scroll 0/8 │ @@ -30,7 +30,7 @@ |1: New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol |2: /tmp/pardes-snap/topbarexec/cwd Tty+bash S /tmp/pardes-snap/topbarexec/cwd Tty+bash S |3: ave Mode Filter Collapse Del ave Mode Filter Collapse Del -|4: ls ls +|4: ls Find ls |5: zmarkfile.txt zmarkfile.txt |6: |7: /tmp/pardes-snap/topbarexec/cwd/+Search Sa diff --git a/test/snapshots/ttyhelp.golden b/test/snapshots/ttyhelp.golden index 8b8d4195..c252ff28 100644 --- a/test/snapshots/ttyhelp.golden +++ b/test/snapshots/ttyhelp.golden @@ -23,6 +23,7 @@ | /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 @@ -40,3 +41,4 @@ |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/tutor.golden b/test/snapshots/tutor.golden index 2c523ca4..9793ca34 100644 --- a/test/snapshots/tutor.golden +++ b/test/snapshots/tutor.golden @@ -2,7 +2,7 @@ |Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor 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 ls +| ls Tutor ls | | /Tutor Save Tty Collapse Del | 1 diff --git a/test/snapshots/windowops.golden b/test/snapshots/windowops.golden index f91a4e55..d729f179 100644 --- a/test/snapshots/windowops.golden +++ b/test/snapshots/windowops.golden @@ -188,7 +188,7 @@ |1: New Tty Find Grep Joincol Delcol New Tty Find Grep Joincol Delcol |2: /tmp/pardes-snap/windowops/cwd Tty+ba /tmp/pardes-snap/windowops/cwd Tty+bash Save Mode Filter |3: sh Save Mode Filter Collapse Del Collapse Del -|4: ls ls +|4: ls ls Debug |5: w.txt w.txt |6: |7: |
