diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-25 07:26:39 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-25 07:36:10 -0300 |
| commit | c225fe093d7b4cb23bd5f66c7369f93beb5cfb18 (patch) | |
| tree | d0f484b696d284d00f075713c79f0100ebf07832 | |
| parent | 1ee22df4c6c8fb2fd63325fcec616ea8aedad147 (diff) | |
| parent | 415b4e2683d03624f5600c23bfabde749a1a207c (diff) | |
| download | pardes-c225fe093d7b4cb23bd5f66c7369f93beb5cfb18.tar.gz pardes-c225fe093d7b4cb23bd5f66c7369f93beb5cfb18.zip | |
walk UI M5: the polish round's P3 (uppppkkk 1ee22df4c6c8: code actions as a picker, /kbdin as typed, Esc at once, `]` targets in one pass and cached, a pane keeps its number when it walks, B3 on an answer word) and P2 (zvkrxzwq 415b4e2683d0: the colour roles of UX DESIGN.md D4, the tui reading box, the themes picker's `in use`, registers D11, painted targets D10, the preview legible D7, prompts D14, 29 goldens, the roles derived faster) merged, both on G3's kytxrnnk, resolved by meaning: Pick.zig's five conflicts: Row carries P3's `key` (an action's digit) and P2's `meta` (`in use`), rowAt keeps P2's themes arm and P3's actions arm, steps passes both to Band.Row, head's no-second-row branch is P3's (themes and actions) with P2's hints as a dim span (`⏎ or 1-9 apply it · esc` dim as `⏎ wear it · esc` is), and both lines' tests at the file's end; body_layer.zig merged without a conflict and agrees: P3's treeTargets cache answers targetLine's `]f` `]c` `]T` arms, and P2's paintTargets paints whatever targetLine answers in place of the line's number, so the cached lines are the painted ones; the `g` target and the `]g` motion both ask jj.nextChange (body_layer targetLine, normal.zig goto_change), whose P2 change finds the last unsaved edit with the Changes layer off, so they agree; Band.zig is P2's alone: its Row.meta (right-aligned, dim, the first to give way) is the "right-aligned row meta" P3 left as not done, nothing more to build for it; an action's rows are drawn by P2's painter (Band.Row.key: the digit bold in the roles' key ink) and its ghost lines stand on colors.Grounds add/del, which D4's add/del role is (as the Changes layer), so neither needed wiring; A MERGE FAULT FOUND BY A TEST FIRST: P2's D7 preview (Pick.landingLine, Pick.sentence) held for every picker that previews but themes, and P3's actions picker previews: its body got the hit ground and `▸` on the caret's line (the line the edit starts, or for an edit that only puts lines in, the untouched line under them) and the notice row said `⏎ lands here · its text is the preview · S-⏎ a new pane` where Enter applies an edit and lands nowhere; both now leave out actions as they leave out themes (an action's preview is its edit on the Changes grounds, the head says what Enter does); TEST: Pick.zig's code actions test asks no landing line, no `▸` before the line the edit changes, no sentence on the notice row, and no hit ground on the line under an edit that puts a line in (fails on the merge at Pick.zig:2188, landingLine answered the caret's line); find.golden (the conflict) resolved by meaning and checked by process-test: snap nomatch's and topbar's notice rows are P2's D7 sentence with P3's count `1 message` (the walked pane's two Find echoes one entry), cancel's is P3's row; leader.golden (P3's, CodeAction's new doc) passes as P3 wrote it; docs/typ/builtins-tui.json is P3's, current (core-test's builtins_json test passes); core-test 1072/1242 (170 skipped), process-test 0 of 147 failed (3 skipped, gui-only)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBFhdevVu48bvL9kCE
42 files changed, 1164 insertions, 224 deletions
diff --git a/core/Band.zig b/core/Band.zig index 835c249f..5ddbe5af 100644 --- a/core/Band.zig +++ b/core/Band.zig @@ -39,6 +39,9 @@ pub const Row = struct { on: bool = false, /// Its first `key` bytes are a key: the key ink, bold. key: u8 = 0, + /// Its first `chord` bytes are a chord (Help's `SPC h t`): the key ink + /// at the text's weight. + chord: u8 = 0, dim: bool = false, /// The leaf its group ran last. under: bool = false, @@ -53,6 +56,14 @@ pub const Row = struct { /// tint; the `faint` bytes after them dimmed (a path's directory). pre: u16 = 0, faint: u16 = 0, + /// Said at the row's right end in the dim ink, two cells off its text + /// at least, and the first to give way (UX D5): `in use`. + meta: []const u8 = "", + /// Its bytes `quiet[0]..quiet[1]` in the dim ink: an empty register's + /// `—`, a value's `⏎`. + quiet: [2]u16 = .{ 0, 0 }, + /// Bytes that are keys, each in the key ink, bold: a register's verbs. + keys: []const u16 = &.{}, }; /// A column of rows. A level of more than 9 rows flows into two columns @@ -205,7 +216,9 @@ fn helpSteps(band: *Band, p: *Pardes, arena: std.mem.Allocator, s: *const TagSta const low = try std.ascii.allocLowerString(arena, leaf.row); _ = Names.match(q, leaf.row, low, 0, &marks, &nmarks); } - row.* = .{ .text = leaf.row, .on = i == s.rows.at, .marks = try arena.dupe(u16, marks[0..nmarks]), .index = @intCast(i), .dim = bindings.dimmed(p.panes[p.view().active].?, leaf.child) }; + // Its chord (`SPC h t`, before the first ` · `) in the key ink. + const chord = std.mem.indexOf(u8, leaf.row, " · ") orelse 0; + row.* = .{ .text = leaf.row, .on = i == s.rows.at, .chord = @intCast(@min(chord, 255)), .marks = try arena.dupe(u16, marks[0..nmarks]), .index = @intCast(i), .dim = bindings.dimmed(p.panes[p.view().active].?, leaf.child) }; } band.add(.{ .rows = rows }); var buf: [TagState.row_max]u8 = undefined; @@ -213,6 +226,18 @@ fn helpSteps(band: *Band, p: *Pardes, arena: std.mem.Allocator, s: *const TagSta band.add(try docStep(p, arena, at.root, at.path[0 .. at.path.len - 1], at.child)); } +/// What a register's doc step offers next, its letters keys (UX D11). +const verbs = "p after P before R replace y into"; +const verb_keys = blk: { + var out: [4]u16 = undefined; + var n: usize = 0; + for (0..verbs.len) |i| if (i == 0 or (i >= 2 and std.mem.eql(u8, verbs[i - 2 .. i], " "))) { + out[n] = i; + n += 1; + }; + break :blk out; +}; + /// `"` unrolled (SPEC §9): the registers, a row each (its key, what it /// is, its first line) around the cursor, or under `"a` its verbs; beside /// them the value of the one on the cursor (or named) in full, as many of @@ -230,17 +255,25 @@ fn registerSteps(band: *Band, p: *Pardes, arena: std.mem.Allocator, pane: *const if (path.len > 0) band.add(try levelStep(arena, pane, level, at, used)) else { const w = (Cursor{ .at = @intCast(at) }).window(@intCast(level.len)); const rows = try arena.alloc(Row, w.hi - w.lo); + // A row each (UX D11): `key value`, its name at the right; an + // empty one's `—` and a newline's `⏎` dim. for (rows, w.lo..) |*row, i| { const c = level[i]; const name = for (bindings.register_names) |r| { if (r.key == c.key) break r.name; } else "named"; + const key = bindings.keyName(c.key); + const shown = try bindings.registerShown(arena, p.settings.tab, bindings.registerValue(p, c.key)); + const text = try std.fmt.allocPrint(arena, "{s} {s}", .{ key, shown }); + const quiet = if (std.mem.eql(u8, shown, "—")) key.len + 2 else if (std.mem.endsWith(u8, shown, "⏎")) text.len - "⏎".len else text.len; row.* = .{ - .text = try std.fmt.allocPrint(arena, "{s} {s: <17} {s}{s}", .{ bindings.keyName(c.key), name, c.label, if (c.more) "…" else "" }), + .text = text, .on = i == at, - .key = 1, + .key = @intCast(key.len), .under = c.key == used, .index = @intCast(i), + .meta = name, + .quiet = .{ @intCast(quiet), @intCast(text.len) }, }; } band.add(.{ .rows = rows }); @@ -266,7 +299,7 @@ fn registerSteps(band: *Band, p: *Pardes, arena: std.mem.Allocator, pane: *const try rows.append(arena, .{ .text = look[0..end] }); rest = rest[end + 1 ..]; } - if (path.len == 0) try rows.append(arena, .{ .text = "next p after P before R replace y into", .dim = true }); + if (path.len == 0) try rows.append(arena, .{ .text = verbs, .dim = true, .keys = &verb_keys }); band.add(.{ .rows = rows.items, .doc = true }); } @@ -351,6 +384,8 @@ pub fn docStep(p: *Pardes, arena: std.mem.Allocator, root: bindings.Root, path: .role => bindings.docOf(root, c, try arena.alloc(u8, 160)), } else bindings.docOf(root, c, &.{}); try rows.append(arena, .{ .text = doc }); + // A leaf a language server answers, in a pane with none (SPEC §4.2). + if (bindings.dimmed(p.panes[p.view().active].?, c)) try rows.append(arena, .{ .text = "needs a language server", .dim = true }); var buf: [64]u8 = undefined; const here = try std.mem.concat(arena, u8, &.{ path, &.{c.key} }); try rows.append(arena, .{ .text = try std.fmt.allocPrint(arena, "keys {s}", .{bindings.chord(root, here, &buf)}) }); @@ -368,7 +403,7 @@ fn place(band: *Band, p: *Pardes, arena: std.mem.Allocator, pane: *Pane, id: usi for (band.steps[0..band.nsteps]) |*step| { if (step.doc) continue; var widest: usize = 0; - for (step.rows) |row| widest = @max(widest, File.displayWidth(tab, row.text)); + for (step.rows) |row| widest = @max(widest, File.displayWidth(tab, row.text) + if (row.meta.len > 0) 2 + File.displayWidth(tab, row.meta) else 0); const column: u16 = @intCast(@min(widest + 2, std.math.maxInt(u16) / 4, @max(min_width, band.columns -| x))); step.width = if (step.two) 2 * column + 1 else column; need += step.width + 2; @@ -486,14 +521,26 @@ pub fn line(band: *const Band, arena: std.mem.Allocator, tab: u16, y: u16) !Line col += @intCast(File.displayWidth(tab, lead)); try parts.append(arena, .{ .col = col, .width = per -| @as(u16, @intCast(File.displayWidth(tab, lead))), .row = row }); const room = per -| @as(u16, @intCast(File.displayWidth(tab, lead))); + const at = col; const cut = File.byteAtDisplay(tab, row.text, room); try text.appendSlice(arena, row.text[0..cut]); col += @intCast(File.displayWidth(tab, row.text[0..cut])); + if (metaShown(tab, row, room)) { + const meta: u16 = @intCast(File.displayWidth(tab, row.meta)); + while (col < at + room - meta) : (col += 1) try text.append(arena, ' '); + try text.appendSlice(arena, row.meta); + col += meta; + } } } return .{ .text = text.items, .parts = parts.items }; } +/// Whether row `row`'s meta fits `room` cells after its text. +pub fn metaShown(tab: u16, row: Row, room: u16) bool { + return row.meta.len > 0 and File.displayWidth(tab, row.text) + 2 + File.displayWidth(tab, row.meta) <= room; +} + /// The word under column `col` of band row `y` of pane `id`, at the /// tagline's pitch: what B2 executes and B3 looks at. pub fn wordAt(p: *Pardes, arena: std.mem.Allocator, id: usize, y: u16, col: u16) !?[]const u8 { @@ -653,3 +700,71 @@ test "a doc's paragraphs are rows of their own: no newline in a band's row" { }; try std.testing.expect(docs > 2); } + +test "a band is drawn in the theme's roles (UX D4): spines in the rule ink, a chord in the key ink, a matched letter bold in the match ink on its row's own ground, the cursor row's too; an LSP leaf with no server in the dim ink, never faint, its doc saying why" { + const Key = pardes.Key; + const Cells = struct { + /// The cell `word` starts at, a grapheme a cell. + fn find(cells: []const pardes.Cell, word: []const u8) ?usize { + var at: usize = 0; + while (at + word.len <= cells.len) : (at += 1) { + for (word, cells[at..][0..word.len]) |c, cell| { + if (cell.len != 1 or cell.text[0] != c) break; + } else return at; + } + return null; + } + }; + const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 140, .rows = 40 }); + defer p.deinit(); + const pane = try p.setTestFile("one\n"); + const id = p.view().active; + var frame = std.heap.ArenaAllocator.init(std.testing.allocator); + defer frame.deinit(); + const a = frame.allocator(); + const roles = &p.chromeTheme().roles; + const inks = roles.on(if (pardes.Trail.reading(p, pane)) .reading_focused else .focused); + const selected = roles.selectedOn(if (pardes.Trail.reading(p, pane)) .reading_focused else .focused); + // Help with `wrap` typed: `▶ SPC t w · Wrap · view` on the cursor row. + for ([_]u21{ ' ', '?', 'w', 'r', 'a', 'p' }) |c| p.update(.{ .key = .{ .cp = c } }); + _ = try p.render(a); + var layer = bandLayer(p, id).?; + var spines: usize = 0; + var cursor_row: ?usize = null; + for (0..layer.rows) |row| for (layer.cells[row * layer.cols ..][0..layer.cols]) |cell| { + try std.testing.expect(!cell.style.dim); + if (std.mem.eql(u8, cell.grapheme(), "│")) { + try std.testing.expectEqual(pardes.Color{ .rgb = inks.rule }, cell.style.fg); + spines += 1; + } + if (std.mem.eql(u8, cell.grapheme(), "▶")) cursor_row = row; + }; + try std.testing.expect(spines > 0); + const on = layer.cells[cursor_row.? * layer.cols ..][0..layer.cols]; + const s_cell = on[Cells.find(on, "SPC t w").?]; + try std.testing.expectEqual(pardes.Color{ .rgb = roles.key }, s_cell.style.fg); + try std.testing.expect(!s_cell.style.bold); + var matched: usize = 0; + for (on) |cell| if (std.meta.eql(cell.style.fg, pardes.Color{ .rgb = roles.match })) { + try std.testing.expect(cell.style.bold); + try std.testing.expectEqual(pardes.Color{ .rgb = selected.ground }, cell.style.bg); + matched += 1; + }; + try std.testing.expect(matched >= 4); + p.update(.{ .key = .{ .cp = Key.escape } }); + // SPC l unrolled in a text file no server speaks for: its leaves dim. + for ([_]u21{ ' ', 'l', Key.down }) |c| p.update(.{ .key = .{ .cp = c } }); + _ = try p.render(a); + layer = bandLayer(p, id).?; + var dimmed: usize = 0; + var why = false; + for (0..layer.rows) |row| { + const cells = layer.cells[row * layer.cols ..][0..layer.cols]; + if (Cells.find(cells, "needs a language server") != null) why = true; + const cell = cells[Cells.find(cells, "Hover") orelse continue]; + try std.testing.expect(!cell.style.dim); + try std.testing.expectEqual(pardes.Color{ .rgb = inks.dim }, cell.style.fg); + dimmed += 1; + } + try std.testing.expect(dimmed > 0 and why); +} diff --git a/core/Messages.zig b/core/Messages.zig index 2b63e647..6231e3d1 100644 --- a/core/Messages.zig +++ b/core/Messages.zig @@ -413,10 +413,10 @@ pub fn markOf(m: *const Messages, pane: *const Pane) ?Kind { /// A kind's ink, for its glyph, its mark and its words at a line. pub fn ink(chrome: *const pardes.colors.ChromeTheme, kind: Kind) [3]u8 { return switch (kind) { - .@"error" => chrome.diagnostic_error, - .warn => chrome.diagnostic_warning, - .question => chrome.diagnostic_info, - else => chrome.diagnostic_hint, + .@"error" => chrome.roles.err, + .warn => chrome.roles.warn, + .question => chrome.roles.question, + else => chrome.roles.hint, }; } @@ -679,6 +679,10 @@ pub const Row = struct { text: []const u8 = "", /// The message the left says, when it says one. lead: ?*const Said = null, + /// The left in the dim ink (a picker's sentence, UX D7), but for the + /// bytes `word` (an address, in the text's). + quiet_left: bool = false, + word: [2]usize = .{ 0, 0 }, }; /// Room for the notice row's line: the widest window's at the tagline's @@ -704,8 +708,10 @@ pub fn noticeRow(p: *const Pardes, width: usize, out: *[notice_row_cap]u8) Row { live += 1; if (s.kind == .question) questions += 1; } - const lead = m.headline(); - if (lead) |s| { + // While a picker previews, its sentence (UX D7), before any message. + const said = pardes.Pick.sentence(p, &w); + const lead = if (said == null) m.headline() else null; + if (said != null) {} else if (lead) |s| { w.print("{s} ", .{s.kind.glyph()}) catch {}; // Its cause first, unless its words name it already. const words = s.words(); @@ -743,7 +749,7 @@ pub fn noticeRow(p: *const Pardes, width: usize, out: *[notice_row_cap]u8) Row { for (0..gap) |_| w.writeByte(' ') catch {}; const right_at = w.end; w.writeAll(tail) catch {}; - return .{ .left = cut, .right = right_at, .text = w.buffered(), .lead = lead }; + return .{ .left = cut, .right = right_at, .text = w.buffered(), .lead = lead, .quiet_left = said != null, .word = said orelse .{ 0, 0 } }; } /// What notice band `i` says. The grid pass and the band layers both diff --git a/core/Pick.zig b/core/Pick.zig index ab63cc5d..3bc8c858 100644 --- a/core/Pick.zig +++ b/core/Pick.zig @@ -484,7 +484,7 @@ const Target = union(enum) { none, place: struct { path: []const u8, at: look.Sp /// Row `i` as the band shows it and what it points at, its text in /// `arena`. -const Row = struct { text: []const u8, key: u8 = 0, pre: u16 = 0, faint: u16 = 0, dim: bool = false, marks: []const u16 = &.{}, target: Target = .none }; +const Row = struct { text: []const u8, key: u8 = 0, pre: u16 = 0, faint: u16 = 0, dim: bool = false, marks: []const u16 = &.{}, target: Target = .none, meta: []const u8 = "" }; fn rowAt(p: *Pardes, pk: *const Pick, arena: std.mem.Allocator, i: usize) !Row { const dir = pk.dir.slice(); @@ -552,7 +552,10 @@ fn rowAt(p: *Pardes, pk: *const Pick, arena: std.mem.Allocator, i: usize) !Row { const f = owner.file orelse return row; row.target = .{ .place = .{ .path = f.path, .at = .{ .line = cand.ref } } }; }, - .themes => {}, + // The theme in use says so, whichever the window wears (POLISH 12). + .themes => if (p.custom_theme == null and cand.ref == p.settings.theme) { + row.meta = "in use"; + }, // An action: its digit a key; its place the first line its edit // changes, which the body is moved to while it is previewed. .actions => { @@ -628,7 +631,9 @@ pub fn head(p: *Pardes, arena: std.mem.Allocator, pane: *Pane) !?TagState.Head { if (pk.names.busy() or p.stream.busyFor(pk.id)) try text.appendSlice(arena, " ⋯"); // Themes and actions have no acts and no other sources: no second row. if (pk.source == .themes or pk.source == .actions) { + const hint: u32 = @intCast(text.items.len); try text.appendSlice(arena, if (pk.source == .themes) " ⏎ wear it · esc" else " ⏎ or 1-9 apply it · esc"); + try spans.append(arena, .{ .lo = hint, .hi = @intCast(text.items.len), .style = .dim }); for (cells[0..ncells]) |c| try spans.append(arena, .{ .lo = c[0], .hi = c[1], .style = .key }); return .{ .text = text.items, .spans = spans.items, .cells = @intCast(ncells), .caret = caret }; } @@ -642,13 +647,15 @@ pub fn head(p: *Pardes, arena: std.mem.Allocator, pane: *Pane) !?TagState.Head { for (cells[0..ncells]) |c| { const at = lead + File.displayWidth(p.settings.tab, text.items[0..c[0]]); while (col < at) : (col += 1) try text.append(arena, ' '); - try spans.append(arena, .{ .lo = @intCast(text.items.len), .hi = @intCast(text.items.len + "│".len), .style = .key }); + try spans.append(arena, .{ .lo = @intCast(text.items.len), .hi = @intCast(text.items.len + "│".len), .style = .rule }); try text.appendSlice(arena, "│"); col += 1; } const nspines: u8 = @intCast(spans.items.len); try text.appendSlice(arena, if (ncells == 0) "" else " "); for (acts) |act| if (offered(pk, act)) try text.print(arena, "{s} ", .{act.word}); + // The other sources' words, and the `|` before them, dim (UX D4). + const sources: u32 = @intCast(text.items.len); try text.appendSlice(arena, "|"); var first = false; inline for (comptime std.enums.values(Source)) |src| if (src != .list and src != .messages and src != .themes and src != .actions) { @@ -658,6 +665,7 @@ pub fn head(p: *Pardes, arena: std.mem.Allocator, pane: *Pane) !?TagState.Head { try text.appendSlice(arena, words.get(src).word); } }; + try spans.append(arena, .{ .lo = sources, .hi = @intCast(text.items.len), .style = .dim }); for (cells[0..ncells]) |c| try spans.append(arena, .{ .lo = c[0], .hi = c[1], .style = .key }); return .{ .text = text.items, .spans = spans.items, .cells = nspines, .caret = caret }; } @@ -703,7 +711,7 @@ pub fn steps(p: *Pardes, arena: std.mem.Allocator) ![]Band.Step { const rows = try arena.alloc(Band.Row, w.hi - w.lo); for (rows, w.lo..) |*row, i| { const r = try rowAt(p, pk, arena, i); - row.* = .{ .text = r.text, .key = r.key, .on = i == s.rows.at, .mark = marked(pk, idOf(pk, i)) != null, .dim = r.dim, .pre = r.pre, .faint = r.faint, .marks = r.marks, .index = @intCast(i) }; + row.* = .{ .text = r.text, .key = r.key, .on = i == s.rows.at, .mark = marked(pk, idOf(pk, i)) != null, .dim = r.dim, .pre = r.pre, .faint = r.faint, .marks = r.marks, .index = @intCast(i), .meta = r.meta }; } out[0] = .{ .rows = rows }; return out; @@ -711,6 +719,47 @@ pub fn steps(p: *Pardes, arena: std.mem.Allocator) ![]Band.Step { // ---- the preview ---- +/// The line (from 0) pane `pane`'s body lands the live picker's cursor row +/// on, while it is that picker's landing pane previewing that row's file +/// (UX D7: drawn on the hit ground, body_layer.zig); null else. +pub fn landingLine(p: *Pardes, arena: std.mem.Allocator, pane: *const Pane) ?usize { + const pk = live(p) orelse return null; + // A theme or an action lands nowhere: the window wearing it, its + // edit on the Changes grounds are their previews. + if (!pk.previews or pk.landing != pane.serial or pk.source == .themes or pk.source == .actions) return null; + const s = &p.view().tag_state; + if (pk.shown != s.rows.at or count(p, pk) == 0) return null; + const row = rowAt(p, pk, arena, s.rows.at) catch return null; + const place = switch (row.target) { + .place => |t| t, + else => return null, + }; + const f = pane.file orelse return null; + if (!std.mem.eql(u8, f.path, place.path)) return null; + return @intCast(@max(0, pane.body.cur_row)); +} + +/// The notice row's sentence while a picker previews (UX D7), written to +/// `w`: where Enter lands (`here`, or the owner's reader by its address, +/// a word to Look at), that the body is the preview, and Shift-Enter's new +/// pane; the address's bytes in what was written, or null with no picker +/// previewing. +pub fn sentence(p: *const Pardes, w: *std.Io.Writer) ?[2]usize { + const pk = live(p) orelse return null; + if (!pk.previews or pk.source == .themes or pk.source == .actions) return null; + if (pk.landing == pk.owner) { + w.writeAll("⏎ lands here") catch return null; + } else { + w.writeAll("⏎ lands in ") catch return null; + } + const lo = w.end; + if (pk.landing != pk.owner) w.print("@p{d}", .{pk.owner}) catch return null; + const hi = w.end; + if (pk.landing != pk.owner) w.writeAll("'s reader") catch return null; + w.writeAll(" · its text is the preview · S-⏎ a new pane") catch return null; + return .{ lo, hi }; +} + /// The landing pane's body showing the current row's place (SPEC §5.3): /// a file at its line, the query's matches lit for a Grep. Its own text is /// set aside the first time, put back when the picker rolls up. A file an @@ -776,7 +825,7 @@ fn preview(p: *Pardes, pk: *Pick) void { pane.body.cur_col = 0; return; } - look.focusPaneLine(p, id, at, .center); + look.focusPaneLine(p, id, at, .third); // A Grep's matches in the file lit, as its own pane would have them. if (pk.source == .grep) pane.places.search(p, pane, .list, pk.id, std.mem.trim(u8, s.field.text(), " "), true, null, false); } @@ -2135,6 +2184,13 @@ test "code actions: a picker in the asking pane's tag, the one under the cursor try std.testing.expectEqual(pardes.Color{ .rgb = grounds.del.row }, shot.at(x, y + 1).style.bg); try std.testing.expectEqual(pardes.Color{ .rgb = grounds.add.row }, shot.at(x, y + 2).style.bg); try std.testing.expectEqualStrings("one\ntwo add\nthree\n", pane.file.?.content); + // An action lands nowhere: no landing line, no `▸` before the line it + // changes, no sentence of where Enter lands (UX D7's are a jump's; an + // action's preview is its edit on the Changes grounds). + try std.testing.expect(landingLine(p, frame.allocator(), pane) == null); + try std.testing.expect(!std.mem.eql(u8, "▸", shot.at(x - 1, y + 1).grapheme())); + var notice: [pardes.Messages.notice_row_cap]u8 = undefined; + try std.testing.expect(!pardes.Messages.noticeRow(p, 100, ¬ice).quiet_left); // Up: the line put in at the top, before line 1, nothing deleted. p.update(.{ .key = .{ .cp = Key_.up } }); settle(p); @@ -2146,6 +2202,7 @@ test "code actions: a picker in the asking pane's tag, the one under the cursor try std.testing.expectEqual(pardes.Color{ .rgb = grounds.add.row }, shot.at(x, y).style.bg); try std.testing.expectEqualStrings("o", shot.at(x, y + 1).grapheme()); try std.testing.expect(!std.meta.eql(pardes.Color{ .rgb = grounds.del.row }, shot.at(x, y + 1).style.bg)); + try std.testing.expect(!std.meta.eql(pardes.Color{ .rgb = p.chromeTheme().roles.hit }, shot.at(x, y + 1).style.bg)); // `3`: the rename applied, the tag at rest; one undo takes it back. p.update(.{ .key = .{ .cp = '3', .text = "3" } }); try std.testing.expectEqual(TagState.Kind.rest, s.kind); @@ -2160,3 +2217,111 @@ test "code actions: a picker in the asking pane's tag, the one under the cursor try std.testing.expectEqualStrings("one\ntwo add\nthree\n", pane.file.?.content); try std.testing.expectEqualStrings("Actions: extract: no edit to apply", p.messages.saidBy(pane)); } + +test "the themes picker marks the theme in use: `in use` at its row's right end in the dim ink, the cursor on it when it opens, the mark staying on it while the window wears another (POLISH 12, UX A15)" { + const Key_ = pardes.Key; + const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 120, .rows = 40 }); + defer p.deinit(); + const pane = try p.setTestFile("one\n"); + const id = p.view().active; + var frame = std.heap.ArenaAllocator.init(std.testing.allocator); + defer frame.deinit(); + const a = frame.allocator(); + const was = p.settings.theme; + for (" tt") |c| p.update(.{ .key = .{ .cp = c } }); + const s = &p.view().tag_state; + try std.testing.expectEqual(@as(u16, @intCast(was)), s.rows.at); + const Find = struct { + fn row(band: Band, text: []const u8) ?Band.Row { + for (band.steps[0..band.nsteps]) |step| for (step.rows) |r| if (std.mem.eql(u8, r.text, text)) return r; + return null; + } + }; + var band = (try Band.of(p, a, pane, id)).?; + const worn = Find.row(band, pardes.colors.themes[was].name).?; + try std.testing.expectEqualStrings("in use", worn.meta); + try std.testing.expect(worn.on); + // One row says it. + var said: usize = 0; + for (band.steps[0..band.nsteps]) |step| for (step.rows) |r| { + said += @intFromBool(r.meta.len > 0); + }; + try std.testing.expectEqual(@as(usize, 1), said); + // Drawn at the row's right end, in the dim ink of the selection it is on. + _ = try p.render(a); + const layer = &p.surface.tag_layers[pardes.BAND_LAYER]; + const roles = &p.chromeTheme().roles; + const on = roles.selectedOn(if (pardes.Trail.reading(p, pane)) .reading_focused else .focused); + var found = false; + for (0..layer.rows) |row| { + const cells = layer.cells[row * layer.cols ..][0..layer.cols]; + var at: usize = 0; + while (at + 6 <= cells.len) : (at += 1) { + if (!std.mem.eql(u8, cells[at].grapheme(), "i") or !std.mem.eql(u8, cells[at + 1].grapheme(), "n") or !std.mem.eql(u8, cells[at + 3].grapheme(), "u")) continue; + try std.testing.expectEqual(pardes.Color{ .rgb = on.dim }, cells[at].style.fg); + found = true; + } + } + try std.testing.expect(found); + // The window wearing the next: the mark stays on the theme in use. + p.update(.{ .key = .{ .cp = if (was + 1 < pardes.colors.themes.len) Key_.down else Key_.up } }); + band = (try Band.of(p, a, pane, id)).?; + try std.testing.expectEqualStrings("in use", Find.row(band, pardes.colors.themes[was].name).?.meta); +} + +test "a picker's preview is legible as one (UX D7): its landing line on the hit ground with `▸` in the gutter, a third of the body above it, and the notice row saying where Enter lands" { + const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 140, .rows = 50 }); + defer p.deinit(); + p.settings.jumps = .walk; + var tmp = std.testing.tmpDir(.{}); + defer tmp.cleanup(); + var text: std.ArrayList(u8) = .empty; + defer text.deinit(std.testing.allocator); + for (1..81) |i| try text.print(std.testing.allocator, "line {d} of the file\n", .{i}); + const path = try testFile(p, &tmp, "long.zig", text.items); + defer p.gpa.free(path); + _ = try p.setTestFile("held\n"); + const asker = p.view().active; + Trail.keep(p.panes[asker].?); + const rows = try std.fmt.allocPrint(std.testing.allocator, "{s}:40:6 line 40 of the file\n", .{path}); + defer std.testing.allocator.free(rows); + open(p, asker, .list, "Refs", "", rows); + const pk = live(p).?; + const reader = p.paneBySerial(pk.landing).?; + p.update(.tick); + const pane = p.panes[reader].?; + try std.testing.expectEqualStrings(path, pane.file.?.path); + var frame = std.heap.ArenaAllocator.init(std.testing.allocator); + defer frame.deinit(); + const s = try p.render(frame.allocator()); + const r = p.view().rects[reader]; + const body_y = p.bodyTop(pane, r); + // Line 40 a third of the way down: ⌈rows/3⌉ rows of context above it. + var at: ?u16 = null; + for (0..pane.rows) |row| if (pane.wrapAt(p.settings.tab, @intCast(row)).line == 39) { + at = @intCast(row); + break; + }; + try std.testing.expectEqual(@as(?u16, @intCast((pane.rows + 2) / 3)), at); + const y = body_y + at.?; + const roles = &p.chromeTheme().roles; + const tx = r.x + pardes.config.GUTTER; + const gutter = File.gutterWidth(pane); + // Its text on the hit ground across the row; the row above as it was. + for (gutter..r.w - pardes.config.GUTTER) |x| try std.testing.expectEqual(pardes.Color{ .rgb = roles.hit }, s.at(tx + @as(u16, @intCast(x)), y).style.bg); + try std.testing.expect(!std.meta.eql(s.at(tx + gutter + 2, y - 1).style.bg, pardes.Color{ .rgb = roles.hit })); + // `▸` in the key ink in the gutter's cell after the number. + const mark = s.at(tx + gutter - 1, y); + try std.testing.expectEqualStrings("▸", mark.grapheme()); + try std.testing.expectEqual(pardes.Color{ .rgb = roles.key }, mark.style.fg); + // The notice row: where Enter lands, the owner's address a word in it. + var buf: [pardes.Messages.notice_row_cap]u8 = undefined; + const said = pardes.Messages.noticeRow(p, 120, &buf); + const want = try std.fmt.allocPrint(frame.allocator(), "⏎ lands in @p{d}'s reader · its text is the preview · S-⏎ a new pane", .{p.panes[asker].?.serial}); + try std.testing.expect(std.mem.startsWith(u8, said.text, want)); + try std.testing.expect(said.quiet_left); + try std.testing.expectEqualStrings(try std.fmt.allocPrint(frame.allocator(), "@p{d}", .{p.panes[asker].?.serial}), said.text[said.word[0]..said.word[1]]); + // At rest: no ground, no mark, the row back to its own. + p.update(.{ .key = .{ .cp = pardes.Key.escape } }); + try std.testing.expect(!pardes.Messages.noticeRow(p, 120, &buf).quiet_left); +} diff --git a/core/Places.zig b/core/Places.zig index 7f847f6a..8563d7c8 100644 --- a/core/Places.zig +++ b/core/Places.zig @@ -658,14 +658,15 @@ pub fn origin(set: *const Places, pane: *Pane) usize { return @min(r.anchor, r.head); } -/// Every place on the rows shown, tinted over the text; the current one in -/// the search colour itself, the rest halfway to the page. +/// Every place on the rows shown, tinted over the text: the hit ground, +/// the current one the current hit's (colors.Roles, UX D4, D14). pub fn paint(set: *Places, p: *Pardes, s: *Surface, pane: *Pane, r: pardes.Rect, body_h: u16) void { if (!set.shows(pane)) return; const f = &pane.file.?; const th = p.theme(); - var strong = p.chromeTheme().search_bg; - var quiet = colors.mix(th.bg orelse th.tag_bg, strong); + const roles = &p.chromeTheme().roles; + var strong = roles.hit_current; + var quiet = roles.hit; // A search prompt's pattern that is no regex: its last places, dimmed. if (pardes.Prompt.dims(p, pane)) { strong = quiet; diff --git a/core/Prompt.zig b/core/Prompt.zig index 64e030e0..4db7e424 100644 --- a/core/Prompt.zig +++ b/core/Prompt.zig @@ -819,7 +819,7 @@ pub fn unlit(p: *const Pardes, pane: *Pane) ?[2]usize { } /// The gutter's marks while a prompt is typed (SPEC §7.1): `▸` on the -/// current place's line and `▪` on every other line holding a place (`/ +/// current place's line alone (`/ /// ?`); `┃` on each line the selections a sam prompt began with cover (`s /// S K A-K`), its scope. In the blank after a row's line number, on a /// line's first row. @@ -836,8 +836,12 @@ pub fn paintGutter(p: *Pardes, s: *Surface, pane: *Pane, r: pardes.Rect, body_h: const tab = p.settings.tab; const x = gutterX(pane, r); const y = p.bodyTop(pane, r); - const ink = p.chromeTheme().box; + const ink = p.chromeTheme().roles.key; const nlines = File.nlines(p.gpa, f); + // `▸` on the current place's line alone: the lines with places are the + // rail's ticks (Places.addTicks), never glyphs of their own (UX D14). + const c = set.current orelse return; + if (c >= hits.len) return; var last: i32 = -1; var vr: u16 = 0; while (vr < body_h) : (vr += 1) { @@ -847,12 +851,11 @@ pub fn paintGutter(p: *Pardes, s: *Surface, pane: *Pane, r: pardes.Rect, body_h: last = line; const ls = File.lineStart(p.gpa, f, @intCast(line)); const next = File.lineStart(p.gpa, f, @intCast(line + 1)); - const i = Places.firstFrom(hits, ls); - if (i == hits.len or hits[i].start >= @max(next, ls + 1)) continue; - const current = if (set.current) |c| c < hits.len and hits[c].start >= ls and hits[c].start < @max(next, ls + 1) else false; + if (hits[c].start < ls or hits[c].start >= @max(next, ls + 1)) continue; var style = s.at(x, y + vr).style; style.fg = .{ .rgb = ink }; - s.set(x, y + vr, if (current) "▸" else "▪", style); + s.set(x, y + vr, "▸", style); + return; } } @@ -1077,10 +1080,13 @@ pub fn head(p: *Pardes, arena: std.mem.Allocator, pane: *Pane) !TagState.Head { try styled(arena, &text, &spans, try std.fmt.allocPrint(arena, " = {s}", .{verb}), .dim); try text.print(arena, " {s}", .{w.buffered()}); } + // A pattern that is no regex: why, in the err ink, in place of the + // hints (UX D14), what is shown meanwhile dim. if (pr.bad) { try text.appendSlice(arena, " "); try styled(arena, &text, &spans, regexMessage(line), .err); - try text.print(arena, " · the {d} from before shown, dimmed", .{@as(usize, pane.body.nsel) + 1}); + try styled(arena, &text, &spans, try std.fmt.allocPrint(arena, " · the {d} from before shown, dimmed", .{@as(usize, pane.body.nsel) + 1}), .dim); + return .{ .text = text.items, .spans = spans.items, .cells = 1, .caret = caret }; } else if (behavior(pr.op) != null) { try pipeCount(p, arena, &text, &spans, pane, pr, line); } else try count(arena, &text, pane, pr); @@ -1282,7 +1288,8 @@ test "s asks in the tag's head: its key cell, the field, the plain word and the try std.testing.expectEqual(@as(u16, 1), pane.body.nsel); // No regex: the two from before, dimmed, and why. typeKeys(p, "("); - try std.testing.expect(has(try tagOf(p), " bad regular expression · the 2 from before shown, dimmed ")); + // Its reason in place of the hints (UX D14), what follows it dim. + try std.testing.expect(std.mem.endsWith(u8, try tagOf(p), " bad regular expression · the 2 from before shown, dimmed")); try std.testing.expectEqual(@as(u16, 1), pane.body.nsel); try std.testing.expect(selecting(p, pane).?.dim); // Esc: rest, the tag and the selection as they were. @@ -1353,7 +1360,7 @@ fn gutterAt(p: *Pardes, arena: std.mem.Allocator, row: u16) ![]const u8 { return s.at(x, p.bodyTop(pane, r) + row).grapheme(); } -test "/ searches the body as it is typed: the current place selected, the gutter marked, counted 3/7 · 5 lines; Enter folds /dirty/ 3/7 into the trail; n says where it went, round the end too; the first Esc clears the tints and dims the word, Look on it lights them again" { +test "/ searches the body as it is typed: the current place selected, `▸` in the key ink on its line alone (the others are the rail's ticks), the places on the hit ground, counted 3/7 · 5 lines; Enter folds /dirty/ 3/7 into the trail; n says where it went, round the end too; the first Esc clears the tints and dims the word, Look on it lights them again (UX D14)" { const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 200, .rows = 30 }); defer p.deinit(); var frame = std.heap.ArenaAllocator.init(std.testing.allocator); @@ -1364,10 +1371,20 @@ test "/ searches the body as it is typed: the current place selected, the gutter typeKeys(p, "/dirty"); try std.testing.expect(has(try tagOf(p), " / dirty = Look /dirty/ 3/7 · 5 lines ⏎ land · M-⏎ as a list")); try std.testing.expectEqual(@as(?usize, 2), pane.places.current); - try std.testing.expectEqualStrings("▪", try gutterAt(p, frame.allocator(), 0)); + try std.testing.expectEqualStrings(" ", try gutterAt(p, frame.allocator(), 0)); try std.testing.expectEqualStrings(" ", try gutterAt(p, frame.allocator(), 1)); try std.testing.expectEqualStrings("▸", try gutterAt(p, frame.allocator(), 2)); - try std.testing.expectEqualStrings("▪", try gutterAt(p, frame.allocator(), 7)); + try std.testing.expectEqualStrings(" ", try gutterAt(p, frame.allocator(), 7)); + { + const s = try p.render(frame.allocator()); + const r = p.view().rects[0]; + const roles = &p.chromeTheme().roles; + const x = r.x + config.GUTTER + File.gutterWidth(pane); + const y = p.bodyTop(pane, r); + try std.testing.expectEqual(pardes.Color{ .rgb = roles.key }, s.at(x - 1 - File.laneCells(pane) - pane.layers.heat, y + 2).style.fg); + // Line 1's place (`dirty` at its start) on the hit ground. + try std.testing.expectEqual(pardes.Color{ .rgb = roles.hit }, s.at(x, y).style.bg); + } p.update(.{ .key = .{ .cp = Key.enter } }); try std.testing.expectEqual(TagState.Kind.rest, p.view().tag_state.kind); try std.testing.expect(std.mem.startsWith(u8, try tagOf(p), "/dirty/ 3/7 › /test.txt ")); diff --git a/core/TagState.zig b/core/TagState.zig index 3bd79176..7a34ed77 100644 --- a/core/TagState.zig +++ b/core/TagState.zig @@ -444,7 +444,7 @@ pub fn helpLeaf(p: *const Pardes, at: u16, buf: *[row_max]u8) Leaf { } /// How a span of the head is drawn (draw.zig paintPaneTag). -pub const Style = enum { key, dim, under, strike, err }; +pub const Style = enum { key, dim, under, strike, err, rule }; pub const Span = struct { lo: u32, hi: u32, style: Style }; /// The head: its text, the spans drawn apart, and the caret in it when the /// head is typed in. @@ -532,9 +532,12 @@ pub fn head(p: *Pardes, arena: std.mem.Allocator, pane: *Pane) !?Head { try b.put(" "); try b.put(c.label); }; - try b.put(" ⏎ run · esc"); + try b.styled(" ⏎ run · esc", .dim); } else try b.put("…"); - } else try b.put("… press a key or a sequence · esc"); + } else { + try b.put("…"); + try b.styled(" press a key or a sequence · esc", .dim); + } return b.done(); }, .pick => return @import("Pick.zig").head(p, arena, pane), @@ -548,7 +551,7 @@ pub fn head(p: *Pardes, arena: std.mem.Allocator, pane: *Pane) !?Head { var h = b.done(); h.caret = @intCast(b.text.items.len + s.field.caret); try b.put(s.field.text()); - try b.put(" ⏎ rename · esc"); + try b.styled(" ⏎ rename · esc", .dim); h.text = b.text.items; h.spans = b.spans.items; return h; @@ -564,7 +567,7 @@ pub fn head(p: *Pardes, arena: std.mem.Allocator, pane: *Pane) !?Head { const node = bindings.nodeAt(cur.root, cur.path) orelse return b.done(); if (s.unrolled) { try b.put(if (cur.path.len == 0) bindings.info.get(cur.root).label else node.label); - try b.put(" ↑ roll up · ? field · esc"); + try b.styled(" ↑ roll up · ? field · esc", .dim); return b.done(); } try b.styled("▸", .key); @@ -585,19 +588,31 @@ pub fn head(p: *Pardes, arena: std.mem.Allocator, pane: *Pane) !?Head { var children: [bindings.max_children]bindings.Child = undefined; const level = bindings.level(p, cur.root, cur.path, &children); const used = s.used[node.group]; + // The registers rolled (UX D11): the ones holding something, each its + // value as a row shows it, a newline's `⏎` dim. + const registers = cur.root == .register and cur.path.len == 0; var width = panes.File.displayWidth(tab, b.text.items); + var put: usize = 0; for (level, 0..) |c, i| { - width += @as(usize, if (i == 0) 1 else 2) + panes.File.displayWidth(tab, bindings.keyName(c.key)) + 1 + panes.File.displayWidth(tab, c.label) + @intFromBool(c.group); + const value = if (registers) bindings.registerValue(p, c.key) else ""; + if (registers and value.len == 0) continue; + const label = if (registers) try bindings.registerShown(arena, tab, value) else c.label; + const cut = c.group or (c.more and !registers); + width += @as(usize, if (put == 0) 1 else 2) + panes.File.displayWidth(tab, bindings.keyName(c.key)) + 1 + panes.File.displayWidth(tab, label) + @intFromBool(cut); if (width + @as(usize, if (i + 1 < level.len) panes.File.displayWidth(tab, more) else 0) > room) { try b.put(more); break; } - try b.put(if (i == 0) " " else " "); + try b.put(if (put == 0) " " else " "); + put += 1; const lo: u32 = @intCast(b.text.items.len); try b.styled(bindings.keyName(c.key), .key); try b.put(" "); - try b.put(c.label); - if (c.group or c.more) try b.put("…"); + if (registers and std.mem.endsWith(u8, label, "⏎")) { + try b.put(label[0 .. label.len - "⏎".len]); + try b.styled("⏎", .dim); + } else try b.put(label); + if (cut) try b.put("…"); const hi: u32 = @intCast(b.text.items.len); if (bindings.dimmed(pane, c)) try b.spans.append(arena, .{ .lo = lo, .hi = hi, .style = .dim }); if (c.key == used) try b.spans.append(arena, .{ .lo = lo, .hi = hi, .style = .under }); @@ -606,7 +621,7 @@ pub fn head(p: *Pardes, arena: std.mem.Allocator, pane: *Pane) !?Head { try b.put(" "); try b.styled(bindings.keyName(s.miss), .strike); } - try b.put(hint); + try b.styled(hint, .dim); return b.done(); } diff --git a/core/Trail.zig b/core/Trail.zig index 5f6302e4..1cd14091 100644 --- a/core/Trail.zig +++ b/core/Trail.zig @@ -673,8 +673,9 @@ test "the session of pick-ui §6.7: four jumps across three files, back by a cli var arena: std.heap.ArenaAllocator = .init(std.testing.allocator); defer arena.deinit(); const s = try p.render(arena.allocator()); + // In the dim ink of the reading tag's ground (UX D4: 3:1 at least). const dim = try tagCell(p, r, "place.zig:40"); - try std.testing.expectEqual(pardes.Color{ .rgb = p.chromeTheme().lineno }, s.at(dim[0], dim[1]).style.fg); + try std.testing.expectEqual(pardes.Color{ .rgb = p.chromeTheme().roles.on(.reading_focused).dim }, s.at(dim[0], dim[1]).style.fg); // A click on a forward step goes forward to it. try clickTag(p, r, "place.zig:9", .left); r = p.view().active; diff --git a/core/bindings.zig b/core/bindings.zig index 2df51945..96ce1359 100644 --- a/core/bindings.zig +++ b/core/bindings.zig @@ -338,8 +338,30 @@ pub const register_names = [_]struct { key: u8, name: []const u8 }{ }; /// The display columns of a register's first line which-key shows; the -/// rest is `…`. -pub const register_cut = 24; +/// rest is `…` (UX D11: 20 cells, the `…` among them). +pub const register_cut = 20; + +/// A register's value as a row shows it (UX D11): its first line in +/// `register_cut` cells at most, a path cut from the left +/// (`…core/Query.zig`), other text from the right (`…` after it), a newline +/// that ends what shows said `⏎`; `—` when it holds nothing. Only its first +/// `4 * register_cut` bytes are read. +pub fn registerShown(arena: std.mem.Allocator, tab: u16, value: []const u8) ![]const u8 { + if (value.len == 0) return "—"; + const bound = if (value.len > 4 * register_cut) modal.graphemeStart(value, 4 * register_cut) else value.len; + const newline = std.mem.indexOfScalar(u8, value[0..bound], '\n'); + const line = value[0 .. newline orelse bound]; + const width = File.displayWidth(tab, line); + if (width <= register_cut and line.len == value.len) return line; + if (width < register_cut and newline != null) return std.mem.concat(arena, u8, &.{ line, "⏎" }); + // A path: one line, no spaces, a slash in it; its end says which file. + if (newline == null and bound == value.len and std.mem.indexOfAny(u8, line, " \t") == null and std.mem.indexOfScalar(u8, line, '/') != null) { + var start = File.rawAtDisplay(tab, line, width - (register_cut - 1)); + if (File.rawDisplayCol(tab, line, start) < width - (register_cut - 1)) start = modal.nextGrapheme(line, start); + return std.mem.concat(arena, u8, &.{ "…", line[start..] }); + } + return std.mem.concat(arena, u8, &.{ line[0..File.byteAtDisplay(tab, line, register_cut - 1)], "…" }); +} /// `"`'s level: a child a register, its label the first line of its value /// (`—` when empty), cut. Read when the level is (a key, a frame), never @@ -553,13 +575,15 @@ test "Help's rows: every leaf of every root, spelled as its chord, its word and for (flat) |f| try std.testing.expectEqual(f.row.len, f.lower.len); } -test "\" shows the registers rolled, each its first line; Down unrolls them beside the cursor's value; a register's key goes down to its verbs, Backspace back up, p pastes it" { +test "\" shows the registers rolled, the ones holding something, each its value cut to 20 cells (a path from the left, a newline a dim ⏎); Down unrolls them all, `key value` with the name at the right, beside the cursor's value and its verbs, their keys in the key ink; a register's key goes down to its verbs, Backspace back up, p pastes it (UX D11)" { const tagline = @import("tagline.zig"); const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 160, .rows = 40 }); defer p.deinit(); const pane = try p.setTestFile("one\ntwo\n"); try p.registers.put(p.gpa, 'a', "const best = rank(q, name) orelse continue;\nreturn best;", 0, 1, true); try p.registers.put(p.gpa, '"', "self.dirty = true;", 0, 1, true); + try p.registers.put(p.gpa, 'n', "ab\ncd", 0, 1, true); + try p.registers.put(p.gpa, 'p', "/tmp/claude-1000/wuS/r/proj/core/Query.zig", 0, 1, true); var frame = std.heap.ArenaAllocator.init(std.testing.allocator); defer frame.deinit(); const a = frame.allocator(); @@ -573,8 +597,13 @@ test "\" shows the registers rolled, each its first line; Down unrolls them besi try std.testing.expectEqual(p.clock.now_ns + 300 * std.time.ns_per_ms, p.view().tag_state.due_ns); p.clock.now_ns = p.view().tag_state.due_ns; const rolled = try tagline.tagText(p, a, pane); - try std.testing.expect(std.mem.indexOf(u8, rolled, " \" ▸ \" self.dirty = true; a const best = rank(q, nam… / —") != null); - try std.testing.expect(std.mem.indexOf(u8, rolled, "% /test.txt . o # 1 _ —") != null); + try std.testing.expect(std.mem.indexOf(u8, rolled, " \" ▸ \" self.dirty = true; a const best = rank(q… n ab⏎ p …proj/core/Query.zig % /test.txt . o # 1 ") != null); + // Its ⏎ in the dim ink. + const h = (try @import("TagState.zig").head(p, a, pane)).?; + const nl = std.mem.indexOf(u8, h.text, "ab⏎").? + 2; + for (h.spans) |span| { + if (span.lo == nl) break try std.testing.expectEqual(.dim, span.style); + } else return error.NoDimNewline; // Down unrolls: a row each, the cursor on the default, its value // beside them. p.update(.{ .key = .{ .cp = Key.down } }); @@ -584,8 +613,37 @@ test "\" shows the registers rolled, each its first line; Down unrolls them besi const layer = &p.surface.tag_layers[pardes.BAND_LAYER]; var band: std.ArrayList(u8) = .empty; for (0..layer.rows) |row| for (layer.cells[row * layer.cols ..][0..layer.cols]) |cell| try band.appendSlice(a, cell.grapheme()); - try std.testing.expect(std.mem.indexOf(u8, band.items, "▶ \" yank self.dirty = true;") != null); + try std.testing.expect(std.mem.indexOf(u8, band.items, "▶ \" self.dirty = true;") != null); + try std.testing.expect(std.mem.indexOf(u8, band.items, "/ —") != null); try std.testing.expect(std.mem.indexOf(u8, band.items, "\"\" · yank") != null); + try std.testing.expect(std.mem.indexOf(u8, band.items, "p after P before R replace y into") != null); + // The empty register's `—` and the names in the dim ink, the verbs' + // letters bold in the key ink. + const roles = &p.chromeTheme().roles; + const inks = roles.on(if (pardes.Trail.reading(p, pane)) .reading_focused else .focused); + const Cells = struct { + fn at(l: *const pardes.Layer, word: []const u8) ?*const pardes.Cell { + for (0..l.rows) |row| { + const cells = l.cells[row * l.cols ..][0..l.cols]; + var x: usize = 0; + while (x + word.len <= cells.len) : (x += 1) { + for (word, cells[x..][0..word.len]) |c, cell| { + if (cell.len != 1 or cell.text[0] != c) break; + } else return &cells[x]; + } + } + return null; + } + }; + try std.testing.expectEqual(pardes.Color{ .rgb = inks.dim }, Cells.at(layer, "last search").?.style.fg); + const verbs = Cells.at(layer, "p after").?; + try std.testing.expectEqual(pardes.Color{ .rgb = roles.key }, verbs.style.fg); + try std.testing.expect(verbs.style.bold); + for (0..layer.rows) |row| { + const cells = layer.cells[row * layer.cols ..][0..layer.cols]; + for (cells, 0..) |cell, x| if (std.mem.eql(u8, cell.grapheme(), "—") and x > 2 and std.mem.eql(u8, cells[x - 3].grapheme(), "/")) + try std.testing.expectEqual(pardes.Color{ .rgb = inks.dim }, cell.style.fg); + } // The next row's value in full, every line of it. p.update(.{ .key = .{ .cp = Key.down } }); _ = frame.reset(.retain_capacity); diff --git a/core/body_layer.zig b/core/body_layer.zig index 8bc38e23..0107b3e0 100644 --- a/core/body_layer.zig +++ b/core/body_layer.zig @@ -349,7 +349,11 @@ pub fn renderBody(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane panes.File.recolorSyntax(p, s, pane, f, r, tx, tw, body_h); panes.Tables.paint(p, s, pane, r, tx, tw, body_h); drawWrapMarkers(p, s, pane, r, tx, tw, body_h, pane_bg); + // A picker's landing line under the places it lights (UX D7). + const landing = pardes.Pick.landingLine(p, arena, pane); + if (landing) |line| paintLanding(p, s, pane, r, tx, tw, body_h, line); pane.places.paint(p, s, pane, r, body_h); + if (landing) |line| paintLandingSpan(p, s, pane, r, f, line); pardes.Prompt.paintGutter(p, s, pane, r, body_h); panes.Query.paint(p, s, pane, r, body_h); } else if (pane.isTerminal()) { @@ -652,6 +656,47 @@ pub fn wordAt(p: *Pardes, arena: std.mem.Allocator, id: usize, row: usize, col: return text.items[b.lo..b.hi]; } +/// A picker's landing line (UX D7): its text on the hit ground across +/// the body's width, and `▸` in the key ink in the gutter's cell after its +/// number (the one a prompt's current place has, Prompt.paintGutter), on +/// each row it wraps onto. +fn paintLanding(p: *Pardes, s: *Surface, pane: *Pane, r: Rect, tx: u16, tw: u16, body_h: u16, line: usize) void { + const roles = &p.chromeTheme().roles; + const gutter = File.gutterWidth(pane); + const number = gutter -| File.laneCells(pane) -| pane.layers.heat -| 1; + const body_y = p.bodyTop(pane, r); + var vr: u16 = pane.context_rows; + while (vr < body_h) : (vr += 1) { + const w = pane.wrapAt(p.settings.tab, vr); + if (w.line != @as(i32, @intCast(line))) continue; + for (gutter..tw) |x| { + const cell = s.at(tx + @as(u16, @intCast(x)), body_y + vr); + cell.default = false; + cell.style.bg = .{ .rgb = roles.hit }; + } + if (gutter > 0 and w.at == 0) { + var style = s.at(tx + number, body_y + vr).style; + style.fg = .{ .rgb = roles.key }; + s.set(tx + number, body_y + vr, "▸", style); + } + } +} + +/// The landing line's matched span (a Grep's match at the row's column) on +/// the current hit's ground, over the places lit on it (UX D7). +fn paintLandingSpan(p: *Pardes, s: *Surface, pane: *Pane, r: Rect, f: *panes.File.State, line: usize) void { + if (!pane.places.shows(pane)) return; + const hits = pane.places.hits.items; + const ls = File.lineStart(p.gpa, f, line); + const caret = ls + @as(usize, @intCast(@max(0, pane.body.cur_col))); + var i = panes.Places.firstFrom(hits, ls); + while (i < hits.len and hits[i].start <= caret) : (i += 1) { + if (hits[i].end <= caret) continue; + File.paintWordSelection(p, s, pane, r, @intCast(line), @intCast(hits[i].start - ls), @intCast(hits[i].end - ls), p.chromeTheme().roles.hit_current); + return; + } +} + /// Painted targets (SPEC §4.4), while a motion root's level shows in this /// body's tag: each of its keys at the line it would go to, in the gutter /// (`g e t b .` for `g`; for `]` the next and for `[` the previous @@ -708,10 +753,9 @@ fn paintTargets(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, return; } if (cur.root != .goto and cur.root != .next and cur.root != .prev) return; - const th = p.theme(); - const style: CellStyle = .{ .fg = .{ .rgb = p.chromeTheme().box }, .bg = if (th.bg) |c| .{ .rgb = c } else .default, .bold = true }; - // The rows painted so far: a second key on a row goes after the first. - var painted: [bindings.max_children]u16 = undefined; + // Each target's row and key, in the level's order. + var rows: [bindings.max_children]u16 = undefined; + var keys: [bindings.max_children]u8 = undefined; var n: usize = 0; for (level) |c| { const leaf = (c.node orelse continue).leaf orelse continue; @@ -723,12 +767,34 @@ fn paintTargets(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, const w = pane.wrapAt(tab, row); if (w.line == line and w.at == 0) break; } else continue; - const x: u16 = @intCast(std.mem.count(u16, painted[0..n], &.{row})); - if (x >= tw) continue; - s.set(tx + x, body_y + row, bindings.keyName(c.key), style); - painted[n] = row; + rows[n] = row; + keys[n] = c.key; n += 1; } + // In place of the line's number (UX D10): its cells blank and the + // row's keys, as many as they hold, right-aligned to its last digit, + // bold in the key ink on the gutter's ground. With no numbers, over + // the line's first cells on the selection's ground. Never a shift. + const ink = p.chromeTheme().roles.key; + const number = File.gutterWidth(pane) -| File.laneCells(pane) -| pane.layers.heat -| 1; + const cells = @min(if (number > 0) number else tw, tw); + for (rows[0..n], 0..) |row, i| { + if (std.mem.indexOfScalar(u16, rows[0..i], row) != null) continue; + const y = body_y + row; + const shown = @min(std.mem.count(u16, rows[0..n], &.{row}), cells); + if (number > 0) for (0..cells) |x| { + s.at(tx + @as(u16, @intCast(x)), y).text[0] = ' '; + s.at(tx + @as(u16, @intCast(x)), y).len = 1; + }; + var x: u16 = if (number > 0) @intCast(cells - shown) else 0; + for (rows[i..n], keys[i..n]) |other, key| { + if (other != row) continue; + if (x >= (if (number > 0) cells else shown)) break; + const bg = if (number > 0) s.at(tx + x, y).style.bg else pardes.Color{ .rgb = p.theme().sel_bg }; + s.set(tx + x, y, bindings.keyName(key), .{ .fg = .{ .rgb = ink }, .bg = bg, .bold = true }); + x += 1; + } + } } /// A hover's answer as ghost lines under the line it was asked at (SPEC @@ -1170,7 +1236,7 @@ test "a click under a message's detail lands on the row drawn there, a click on try std.testing.expectEqualStrings("one\ntwo\nthree\nfour\nfive\nsix\n", pane.file.?.content); } -test "a motion root's level paints its targets in the gutter: `]` the next paragraph's p, `g` g and e; `m` browsed on `i` tints the braces' inside; nothing at rest" { +test "a motion root's level paints its targets in place of their lines' numbers, right-aligned to the last digit, bold in the key ink: `]` the next paragraph's p and an unsaved edit's g, which `]g` goes to; `g` g and e; `m` browsed on `i` tints the braces' inside; nothing at rest (UX D10)" { const Key = pardes.Key; const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 80, .rows = 20 }); defer p.deinit(); @@ -1182,34 +1248,59 @@ test "a motion root's level paints its targets in the gutter: `]` the next parag p.clock.now_ns = 5 * std.time.ns_per_s; p.clock.stepped_ns = p.clock.now_ns; pane.focus = .body; - pane.body.cur_row = 1; - pane.body.cur_col = 4; + // An edit on line 6, not saved; the caret back on line 2. + for ("5jAx") |c| p.update(.{ .key = .{ .cp = c, .text = &[_]u8{c} } }); + p.update(.{ .key = .{ .cp = Key.escape } }); + for ("4k") |c| p.update(.{ .key = .{ .cp = c, .text = &[_]u8{c} } }); + try std.testing.expectEqual(@as(i32, 1), pane.body.cur_row); p.sync(); var s = try p.render(a); const body = s.region(.body, id).?.rect; const gutter = body.x; - const at_rest = [_][]const u8{ s.at(gutter, body.y).grapheme(), s.at(gutter, body.y + 4).grapheme(), s.at(gutter, body.y + 6).grapheme() }; - for (at_rest) |g| try std.testing.expect(!std.mem.eql(u8, g, "p") and !std.mem.eql(u8, g, "g") and !std.mem.eql(u8, g, "e")); + // The number's cells: the gutter less its blank. + const number = panes.File.gutterWidth(pane) - 1; + const Field = struct { + /// Row `y`'s number field, its blanks trimmed. + fn of(sf: *pardes.Surface, x: u16, y: u16, n: u16, buf: *[16]u8) []const u8 { + var w = std.Io.Writer.fixed(buf); + for (0..n) |i| w.writeAll(sf.at(x + @as(u16, @intCast(i)), y).grapheme()) catch {}; + return std.mem.trim(u8, w.buffered(), " "); + } + }; + var buf: [16]u8 = undefined; + try std.testing.expectEqualStrings("5", Field.of(s, gutter, body.y + 4, number, &buf)); const plain_bg = s.at(gutter + panes.File.gutterWidth(pane) + 4, body.y + 1).style.bg; - // `]`: nothing until its level shows; then `p` on the next paragraph. + // `]`: nothing until its level shows; then `p` on the next paragraph's + // number, `g` on the edit's, the digits gone. p.update(.{ .key = .{ .cp = ']' } }); p.advance(p.clock.now_ns); _ = frame.reset(.retain_capacity); s = try p.render(a); - try std.testing.expect(!std.mem.eql(u8, s.at(gutter, body.y + 4).grapheme(), "p")); + try std.testing.expectEqualStrings("5", Field.of(s, gutter, body.y + 4, number, &buf)); p.clock.now_ns = p.view().tag_state.due_ns; _ = frame.reset(.retain_capacity); s = try p.render(a); - try std.testing.expectEqualStrings("p", s.at(gutter, body.y + 4).grapheme()); - p.update(.{ .key = .{ .cp = Key.escape } }); + try std.testing.expectEqualStrings("p", Field.of(s, gutter, body.y + 4, number, &buf)); + const key = s.at(gutter + number - 1, body.y + 4); + try std.testing.expectEqualStrings("p", key.grapheme()); + try std.testing.expectEqual(pardes.Color{ .rgb = p.chromeTheme().roles.key }, key.style.fg); + try std.testing.expect(key.style.bold); + try std.testing.expect(std.mem.indexOfScalar(u8, Field.of(s, gutter, body.y + 5, number, &buf), 'g') != null); + try std.testing.expect(std.mem.indexOfAny(u8, Field.of(s, gutter, body.y + 5, number, &buf), "0123456789") == null); + // The text never shifts. + try std.testing.expectEqualStrings("t", s.at(gutter + panes.File.gutterWidth(pane) + 4, body.y + 5).grapheme()); + // `]g` goes where its target is. + p.update(.{ .key = .{ .cp = 'g', .text = "g" } }); + try std.testing.expectEqual(@as(i32, 5), pane.body.cur_row); + for ("4k") |c| p.update(.{ .key = .{ .cp = c, .text = &[_]u8{c} } }); // `g`: its first and last lines. p.update(.{ .key = .{ .cp = 'g' } }); p.advance(p.clock.now_ns); p.clock.now_ns = p.view().tag_state.due_ns; _ = frame.reset(.retain_capacity); s = try p.render(a); - try std.testing.expectEqualStrings("g", s.at(gutter, body.y).grapheme()); - try std.testing.expectEqualStrings("e", s.at(gutter, body.y + 6).grapheme()); + try std.testing.expect(std.mem.indexOfScalar(u8, Field.of(s, gutter, body.y, number, &buf), 'g') != null); + try std.testing.expect(std.mem.indexOfScalar(u8, Field.of(s, gutter, body.y + 6, number, &buf), 'e') != null); p.update(.{ .key = .{ .cp = Key.escape } }); // `m` unrolled, its cursor on `i`: the inside of the braces around the // caret tinted. @@ -1224,5 +1315,5 @@ test "a motion root's level paints its targets in the gutter: `]` the next parag p.update(.{ .key = .{ .cp = Key.escape } }); _ = frame.reset(.retain_capacity); s = try p.render(a); - try std.testing.expectEqualStrings(at_rest[1], s.at(gutter, body.y + 4).grapheme()); + try std.testing.expectEqualStrings("5", Field.of(s, gutter, body.y + 4, number, &buf)); } diff --git a/core/colors.zig b/core/colors.zig index ef2d5aae..b2069465 100644 --- a/core/colors.zig +++ b/core/colors.zig @@ -287,8 +287,8 @@ pub const Theme = struct { lineno_active: ?[3]u8 = null, /// A tag's selection, where it differs from the body's (acme's #9eeeee). tag_sel_bg: ?[3]u8 = null, - /// The tag of a reading pane, one a jump steps (Trail.zig): unset, the - /// page tinted toward the search's ground, so it reads as the body's. + /// The tag of a reading pane, one a jump steps (Trail.zig): unset, or + /// too near the tag to see, the tag toward paper yellow (readingOf). tag_reading_bg: ?[3]u8 = null, /// Each pointer button's sweep, select, exec and look (Mouse.Button /// order), and the ink over it. Unset, tints of `sel_bg` in `sel_fg`. @@ -558,10 +558,11 @@ pub const ChromeTheme = struct { lineno: [3]u8, scroll_track: [3]u8, scroll_thumb: [3]u8, + roles: Roles, pub fn fromTheme(th: *const Theme) ChromeTheme { // The initial chrome is resolved at compile time: contrast takes pow. - @setEvalBranchQuota(200_000); + @setEvalBranchQuota(1_000_000); const active_bg = focusTint(th); const active_fg = th.tag_active_fg orelse th.tag_fg; // A name is always tinted: a theme that names no tint gets one of @@ -570,6 +571,7 @@ pub const ChromeTheme = struct { const name_fg = th.tag_name_fg orelse (derivedNameTint(th, th.tag_fg, th.tag_bg) orelse th.tag_fg); const active_name_fg = th.tag_active_name_fg orelse (th.tag_name_fg orelse (derivedNameTint(th, active_fg, active_bg) orelse active_fg)); + const reading = readingOf(th); return .{ .tag_bg = th.tag_bg, .tag_fg = th.tag_fg, @@ -583,7 +585,7 @@ pub const ChromeTheme = struct { .empty_col = th.empty_col orelse separatorOf(th), .search_bg = th.search_bg orelse th.sel_bg, .search_fg = th.search_fg orelse th.sel_fg, - .tag_reading_bg = th.tag_reading_bg orelse mixOklab(th.bg orelse th.tag_bg, th.search_bg orelse th.sel_bg, 0.4), + .tag_reading_bg = reading, .diagnostic_error = th.diagnostic_error orelse (th.fg orelse th.tag_fg), .diagnostic_warning = th.diagnostic_warning orelse (th.fg orelse th.tag_fg), .diagnostic_info = th.diagnostic_info orelse (th.fg orelse th.tag_fg), @@ -595,10 +597,262 @@ pub const ChromeTheme = struct { .lineno = th.lineno, .scroll_track = th.scroll_track, .scroll_thumb = th.scroll_thumb, + .roles = .of(th, th.tag_bg, active_bg, reading), }; } }; +/// A tag's ground in the walk UI (UX DESIGN.md D4): the plain tag's, the +/// focused one's tint, a reading pane's tint, focused or not (its ink is +/// the focused tag's while it has the keyboard). +pub const TagGround = enum { plain, focused, reading, reading_focused }; + +/// The inks drawn on one ground: labels and rows (`text`, 4.5:1 at least), +/// hints, meta and forward steps (`dim`, 3.5:1, never under 3), and the +/// spines and the rules between steps (`rule`, 2:1). +pub const Inks = struct { ground: [3]u8, text: [3]u8, dim: [3]u8, rule: [3]u8 }; + +/// The walk UI's colour roles (UX DESIGN.md D4), worked out from a theme +/// once, with its chrome (never a frame), each held to its floor on every +/// ground it is drawn on: a tag's four (`tag`) and a band's cursor row on +/// each of them (`selected`, its ground that tag's selection). +pub const Roles = struct { + tag: [4]Inks, + selected: [4]Inks, + /// The notice row's (the tagline's ground): its dim words. + notice: Inks, + /// Key cells, a level's or a row's key letters, `▶`, `•`, a target's + /// keys: 4.5:1 on every tag ground and on the selection. + key: [3]u8, + /// The letters a query matched: an ink, never a ground, 4.5:1 on every + /// tag ground and on the selection. + match: [3]u8, + /// The body's places and a preview's landing line, and the current + /// one (its matched span): grounds off the page, its ink on them 4.5:1. + hit: [3]u8, + hit_current: [3]u8, + /// A message's ink by its kind (Messages.ink): 4.5:1 on the tags and + /// the page. + err: [3]u8, + warn: [3]u8, + question: [3]u8, + hint: [3]u8, + + pub const text_floor: f32 = 4.5; + pub const dim_floor: f32 = 3; + pub const rule_floor: f32 = 1.8; + pub const rule_ceiling: f32 = 2.5; + pub const ink_floor: f32 = 4.5; + pub const hit_floor: f32 = 1.25; + pub const hit_current_floor: f32 = 1.6; + pub const reading_distance: f32 = 0.04; + + pub fn on(r: *const Roles, ground: TagGround) *const Inks { + return &r.tag[@backingInt(ground)]; + } + + pub fn selectedOn(r: *const Roles, ground: TagGround) *const Inks { + return &r.selected[@backingInt(ground)]; + } + + /// The selection's floor off a tag's ground: 1.4:1 on a dark tag, 1.25 + /// on a light one. + pub fn selectionFloor(ground: [3]u8) f32 { + return if (relativeLuminance(ground) < 0.18) 1.4 else 1.25; + } + + fn of(th: *const Theme, plain: [3]u8, focused: [3]u8, reading: [3]u8) Roles { + const grounds = [4][3]u8{ plain, focused, reading, reading }; + const plain_ink = th.tag_fg; + const focused_ink = th.tag_active_fg orelse th.tag_fg; + const texts = [4][3]u8{ plain_ink, focused_ink, plain_ink, focused_ink }; + var r: Roles = undefined; + for (&r.tag, &r.selected, grounds, texts) |*inks, *selected, ground, ink| { + inks.* = inksOn(ground, ink); + selected.* = inksOn(selectionOf(th.tag_sel_bg orelse th.sel_bg, ground, inks.text), inks.text); + } + r.notice = inksOn(th.tagline_bg orelse th.tag_bg, th.tagline_fg orelse th.tag_fg); + const tag_grounds = [_][3]u8{ plain, focused, reading, r.selected[0].ground, r.selected[1].ground, r.selected[2].ground, r.selected[3].ground }; + r.key = pushAway(th.box, &tag_grounds, ink_floor); + r.match = pushAway(matchHue(th), &tag_grounds, ink_floor); + const page = th.bg orelse null_page; + const body_ink = th.fg orelse th.tag_fg; + const dark = relativeLuminance(page) < 0.18; + // The theme's search ground where it stands off the page and the + // body reads on it; else the page a little way toward its hue (the + // warm accent's without one). The current one as far past the hit + // as 32 % is past 18 % (38 past 22 on a light page). + const hue = th.search_bg orelse th.num; + const own = th.search_bg != null and contrast(hue, page) >= hit_floor and contrast(body_ink, hue) >= ink_floor; + const at: f32 = if (own) 1 else if (dark) 0.18 else 0.22; + r.hit = if (own) hue else hitOf(page, hue, body_ink, at, hit_floor); + const past: f32 = if (dark) 0.32 / 0.18 else 0.38 / 0.22; + r.hit_current = hitOf(page, hue, body_ink, at * past, hit_current_floor); + // Never fainter than the hit, where the ink holds both short. + if (contrast(r.hit_current, page) < contrast(r.hit, page)) r.hit_current = r.hit; + const message_grounds = [_][3]u8{ plain, focused, reading, page }; + const ink = th.fg orelse th.tag_fg; + r.err = pushAway(th.diagnostic_error orelse ink, &message_grounds, ink_floor); + r.warn = pushAway(th.diagnostic_warning orelse ink, &message_grounds, ink_floor); + r.question = pushAway(th.diagnostic_info orelse ink, &message_grounds, ink_floor); + r.hint = pushAway(th.diagnostic_hint orelse ink, &message_grounds, ink_floor); + return r; + } +}; + +/// A tag's text, dim and rule inks on `ground`, from its ink (pushed to the +/// text floor where it has less). +fn inksOn(ground: [3]u8, ink: [3]u8) Inks { + const text = pushAway(ink, &.{ground}, Roles.text_floor); + return .{ .ground = ground, .text = text, .dim = toward(text, ground, 3.5), .rule = toward(text, ground, 2) }; +} + +/// `ink` mixed toward `ground` (OKLab) by hundredths as far as it still +/// reads at `floor` on it: found by halves (its contrast falls as it nears +/// the ground), seven mixes where a walk took up to a hundred (the first +/// frame's bodyChrome derives them too). +fn toward(ink: [3]u8, ground: [3]u8, floor: f32) [3]u8 { + const a = toOklab(ink); + const b = toOklab(ground); + var best = ink; + var lo: u32 = 0; + var hi: u32 = 101; + while (hi - lo > 1) { + const mid = (lo + hi) / 2; + const t = @as(f32, @floatFromInt(mid)) / 100; + const c = fromOklab(.{ a[0] + (b[0] - a[0]) * t, a[1] + (b[1] - a[1]) * t, a[2] + (b[2] - a[2]) * t }); + if (contrast(c, ground) >= floor) { + lo = mid; + best = c; + } else hi = mid; + } + return best; +} + +/// `ink` pushed by fiftieths toward white or black, whichever reads better +/// on all its grounds, until it reads at `floor` on every one; where no ink +/// does (solarized's mid-grey tag), that end, the most any ink reaches. +fn pushAway(ink: [3]u8, grounds: []const [3]u8, floor: f32) [3]u8 { + const white: [3]u8 = @splat(255); + const black: [3]u8 = @splat(0); + if (leastContrast(ink, grounds) >= floor) return ink; + const end = if (leastContrast(white, grounds) >= leastContrast(black, grounds)) white else black; + const a = toOklab(ink); + const b = toOklab(end); + var step: f32 = 0; + while (step <= 50) : (step += 1) { + const t = step / 50; + const c = fromOklab(.{ a[0] + (b[0] - a[0]) * t, a[1] + (b[1] - a[1]) * t, a[2] + (b[2] - a[2]) * t }); + if (leastContrast(c, grounds) >= floor) return c; + } + return end; +} + +fn leastContrast(ink: [3]u8, grounds: []const [3]u8) f32 { + var least: f32 = 21; + for (grounds) |g| least = @min(least, contrast(ink, g)); + return least; +} + +/// The match's hue: the search's ink where it is a hue of its own (a port's +/// is often the page's or the tag's, set for the search's ground), else the +/// theme's warm accent. +fn matchHue(th: *const Theme) [3]u8 { + const own = th.search_fg orelse return th.num; + const lab = toOklab(own); + return if (@sqrt(lab[1] * lab[1] + lab[2] * lab[2]) >= name_tint_chroma) own else th.num; +} + +/// The selection a band's cursor row is drawn on over `ground`: the +/// theme's where it stands off it, else moved by hundredths toward the +/// text, then away from it, to the first that does with the text still at +/// 4.5:1 on it; where none does (a tag whose text has no contrast to +/// spare), the one furthest off it. +fn selectionOf(own: [3]u8, ground: [3]u8, text: [3]u8) [3]u8 { + var best = own; + var best_off: f32 = 0; + const away: [3]u8 = if (relativeLuminance(text) > relativeLuminance(own)) @splat(0) else @splat(255); + if (contrast(own, ground) >= Roles.selectionFloor(ground) and contrast(text, own) >= Roles.text_floor) return own; + const o = toOklab(own); + for ([2][3]u8{ text, away }) |end| { + const e = toOklab(end); + var step: f32 = 0; + while (step <= 100) : (step += 1) { + const t = step / 100; + const c = fromOklab(.{ o[0] + (e[0] - o[0]) * t, o[1] + (e[1] - o[1]) * t, o[2] + (e[2] - o[2]) * t }); + if (contrast(text, c) < Roles.text_floor) break; + const off = contrast(c, ground) / Roles.selectionFloor(ground); + if (off >= 1) return c; + if (off > best_off) { + best = c; + best_off = off; + } + } + } + return best; +} + +/// A ground off `page` toward `hue` at `t` (past 1, beyond the hue, as far +/// as the gamut goes), held where the body's `ink` reads on it at 4.5:1 +/// (or its own on the page, where that is less); moved on toward the ink +/// until it stands off the page at `floor`, as far as the ink allows. +fn hitOf(page: [3]u8, hue: [3]u8, ink: [3]u8, t: f32, floor: f32) [3]u8 { + const a = toOklab(page); + const b = toOklab(hue); + const ink_floor = @min(Roles.ink_floor, contrast(ink, page)); + var k = t; + var c = fromOklab(.{ a[0] + (b[0] - a[0]) * k, a[1] + (b[1] - a[1]) * k, a[2] + (b[2] - a[2]) * k }); + while (contrast(ink, c) < ink_floor and k > 0) { + k -= t / 50; + c = fromOklab(.{ a[0] + (b[0] - a[0]) * k, a[1] + (b[1] - a[1]) * k, a[2] + (b[2] - a[2]) * k }); + } + const start = c; + var step: f32 = 1; + while (contrast(c, page) < floor and step <= 50) : (step += 1) { + const next = mixOklab(start, ink, step / 100); + if (contrast(ink, next) < ink_floor) break; + c = next; + } + return c; +} + +/// A reading pane's tag (UX DESIGN.md D4): the theme's own where it stands +/// off the tag, else the tag shifted toward paper yellow by 0.04 in OKLab +/// and lighter by half that on a dark tag (darker on a light), so it reads +/// as a page; then less light, or darker, where its text would lose +/// contrast, and further where the bytes cannot show so small a step (a +/// near-black tag). +fn readingOf(th: *const Theme) [3]u8 { + if (th.tag_reading_bg) |own| if (oklabDistance(toOklab(own), toOklab(th.tag_bg)) >= Roles.reading_distance) return own; + const tag = toOklab(th.tag_bg); + const paper = toOklab(.{ 0xdc, 0xc8, 0x78 }); + const da = paper[1] - tag[1]; + const db = paper[2] - tag[2]; + const n = @max(@sqrt(da * da + db * db), 1e-6); + const sign: f32 = if (relativeLuminance(th.tag_bg) < 0.18) 1 else -1; + // Away from the text's lightness, where the first lean costs it. + const away: f32 = if (relativeLuminance(th.tag_fg) > relativeLuminance(th.tag_bg)) -1 else 1; + const inks = [2][3]u8{ th.tag_fg, th.tag_active_fg orelse th.tag_fg }; + var best = th.tag_bg; + var best_text: f32 = -21; + var reach = Roles.reading_distance; + while (reach <= 0.2) : (reach *= 1.25) { + for ([_]f32{ sign * 0.5, 0, away * 0.5, away, away * 1.5 }) |lean| { + const c = fromOklab(.{ tag[0] + lean * reach, tag[1] + da / n * reach, tag[2] + db / n * reach }); + if (oklabDistance(toOklab(c), tag) < Roles.reading_distance) continue; + // Each ink by its own floor: 7:1, or what it has on the tag. + var text: f32 = 21; + for (inks) |ink| text = @min(text, contrast(ink, c) - (@min(7, contrast(ink, th.tag_bg)) - 0.01)); + if (text >= 0) return c; + if (text > best_text) { + best = c; + best_text = text; + } + } + } + return best; +} + pub const initial_chrome = ChromeTheme.fromTheme(&themes[0]); fn nextThemeFileGeneration(p: *Pardes) u32 { @@ -1281,3 +1535,89 @@ test "every theme tints its names off the tag's ink, and they read on both groun } } } + +test "every theme's walk UI roles meet their floors on every ground they are drawn on, dark and light" { + // Where a theme's own colours leave no room for a floor, the most it + // allows: an ink's on a mid-grey tag (solarized's) is the better of + // white and black there; a ground's is where the ink it carries would + // drop under its floor. + const white: [3]u8 = @splat(255); + const black: [3]u8 = @splat(0); + const Reach = struct { + fn of(grounds: []const [3]u8) f32 { + return @max(leastContrast(white, grounds), leastContrast(black, grounds)); + } + }; + const a = std.testing.allocator; + const Check = struct { what: []const u8, got: f32, floor: f32 }; + var checks: std.ArrayList(Check) = .empty; + defer checks.deinit(a); + var failed: usize = 0; + for (&themes) |*th| { + checks.clearRetainingCapacity(); + const chrome = ChromeTheme.fromTheme(th); + const r = &chrome.roles; + const page = th.bg orelse null_page; + const body_ink = th.fg orelse th.tag_fg; + const tags = [_][3]u8{ r.tag[0].ground, r.tag[1].ground, r.tag[2].ground, r.selected[0].ground, r.selected[1].ground, r.selected[2].ground, r.selected[3].ground }; + const messages = [_][3]u8{ r.tag[0].ground, r.tag[1].ground, r.tag[2].ground, page }; + for (r.tag ++ r.selected ++ [1]Inks{r.notice}) |inks| { + const text = contrast(inks.text, inks.ground); + try checks.append(a, .{ .what = "text", .got = text, .floor = @min(Roles.text_floor, Reach.of(&.{inks.ground})) }); + try checks.append(a, .{ .what = "dim", .got = contrast(inks.dim, inks.ground), .floor = @min(Roles.dim_floor, text) }); + try checks.append(a, .{ .what = "dim under text", .got = text - contrast(inks.dim, inks.ground), .floor = 0 }); + } + try checks.append(a, .{ .what = "key", .got = leastContrast(r.key, &tags), .floor = @min(Roles.ink_floor, Reach.of(&tags)) }); + try checks.append(a, .{ .what = "match", .got = leastContrast(r.match, &tags), .floor = @min(Roles.ink_floor, Reach.of(&tags)) }); + for (r.tag) |inks| { + try checks.append(a, .{ .what = "rule", .got = contrast(inks.rule, inks.ground), .floor = Roles.rule_floor }); + try checks.append(a, .{ .what = "rule ceiling", .got = Roles.rule_ceiling - contrast(inks.rule, inks.ground), .floor = 0 }); + } + for ([_][3]u8{ r.err, r.warn, r.question, r.hint }) |ink| + try checks.append(a, .{ .what = "message", .got = leastContrast(ink, &messages), .floor = @min(Roles.ink_floor, Reach.of(&messages)) }); + // A selection off its tag by 1.4:1 (1.25 light) with the text at + // 4.5:1 on it, where the text has that much over the tag. + for (r.tag, r.selected) |inks, selected| { + const floor = Roles.selectionFloor(inks.ground); + const room = contrast(inks.text, inks.ground) >= floor * Roles.text_floor * 1.03; + try checks.append(a, .{ .what = "selection", .got = contrast(selected.ground, inks.ground), .floor = if (room) floor else 0 }); + } + try checks.append(a, .{ .what = "reading", .got = oklabDistance(toOklab(chrome.tag_reading_bg), toOklab(th.tag_bg)), .floor = Roles.reading_distance }); + for ([_][3]u8{ th.tag_fg, th.tag_active_fg orelse th.tag_fg }) |ink| + try checks.append(a, .{ .what = "text on reading", .got = contrast(ink, chrome.tag_reading_bg), .floor = @min(7, contrast(ink, th.tag_bg)) - 0.02 }); + const ink_floor = @min(Roles.ink_floor, contrast(body_ink, page)); + for ([_][3]u8{ r.hit, r.hit_current }, [_]f32{ Roles.hit_floor, Roles.hit_current_floor }) |ground, floor| { + const on = contrast(body_ink, ground); + try checks.append(a, .{ .what = "hit", .got = contrast(ground, page), .floor = if (on < ink_floor + 0.3) 0 else floor }); + try checks.append(a, .{ .what = "ink on hit", .got = on, .floor = ink_floor - 0.01 }); + } + try checks.append(a, .{ .what = "current over hit", .got = contrast(r.hit_current, page) - contrast(r.hit, page), .floor = 0 }); + for (checks.items) |c| if (c.got < c.floor - 0.005) { + failed += 1; + std.debug.print("{s}: {s} {d:.2} under {d:.2}\n", .{ th.name, c.what, c.got, c.floor }); + }; + } + try std.testing.expectEqual(0, failed); +} + +test "neonotte84's and acme's roles are the ones UX derived (DESIGN.md D4, tools/roles.py)" { + const Want = struct { name: []const u8, text: ?[3]u8, dim: [3]u8, rule: [3]u8, key: [3]u8, match: [3]u8, reading: [3]u8, hit: [3]u8, hit_current: [3]u8 }; + const wants = [_]Want{ + .{ .name = "neonotte84", .text = .{ 0xb5, 0xbf, 0xe3 }, .dim = .{ 0x70, 0x76, 0x8f }, .rule = .{ 0x4c, 0x50, 0x63 }, .key = .{ 0xf8, 0xde, 0xd9 }, .match = .{ 0xf1, 0xa2, 0x71 }, .reading = .{ 0x29, 0x27, 0x1e }, .hit = .{ 0x36, 0x28, 0x2a }, .hit_current = .{ 0x52, 0x38, 0x31 } }, + // acme's key and match a little darker than UX's #5c5c8d and + // #974d00 (which hold on its tag and its #9eeeee): a reading pane's + // band's selection is pushed off the reading ground (#9eeeee is + // 1.12:1 off #f3f0cc), and they read on that one too. + .{ .name = "acme", .text = null, .dim = .{ 0x7a, 0x86, 0x86 }, .rule = .{ 0xa8, 0xb7, 0xb7 }, .key = .{ 0x55, 0x55, 0x83 }, .match = .{ 0x8f, 0x48, 0x00 }, .reading = .{ 0xf3, 0xf0, 0xcc }, .hit = .{ 0xec, 0xd8, 0xbb }, .hit_current = .{ 0xdd, 0xbc, 0x99 } }, + }; + for (wants) |want| { + const chrome = ChromeTheme.fromTheme(&themes[themeIndex(want.name).?]); + const plain = chrome.roles.on(.plain); + const got = [_][3]u8{ plain.text, plain.dim, plain.rule, chrome.roles.key, chrome.roles.match, chrome.tag_reading_bg, chrome.roles.hit, chrome.roles.hit_current }; + const expected = [_][3]u8{ want.text orelse plain.text, want.dim, want.rule, want.key, want.match, want.reading, want.hit, want.hit_current }; + for (got, expected, 0..) |g, e, i| for (g, e) |x, y| if (@abs(@as(i16, x) - y) > 2) { + std.debug.print("{s} role {d}: {x} for {x}\n", .{ want.name, i, g, e }); + return error.TestUnexpectedResult; + }; + } +} diff --git a/core/draw.zig b/core/draw.zig index 68778667..16dfde5e 100644 --- a/core/draw.zig +++ b/core/draw.zig @@ -173,10 +173,15 @@ pub fn place(p: *Pardes, s: *Surface) void { /// A pane's grip in the grid: `box` focused, else halfway between its ring /// and `box_dim`, so it shows on its tag without the ring a pixel shell /// draws (gui.zig draws its button from the region and Chrome instead). -fn gripBg(p: *const Pardes, active: bool) [3]u8 { +/// A grip cell's colour: the focused pane's button, else its ring mixed +/// with the box's dim fill; where that fill is the tag's own ground +/// (acme's), a reading pane's is its tint, as a window rings a reading +/// pane's tag ground (gui.zig gripFill). +fn gripBg(p: *const Pardes, active: bool, reading: bool) [3]u8 { const chrome = p.chromeTheme(); if (active) return chrome.box; - return colors.mix(boxBorder(p), chrome.box_dim); + const fill = if (reading and std.mem.eql(u8, &chrome.box_dim, &chrome.tag_bg)) chrome.tag_reading_bg else chrome.box_dim; + return colors.mix(boxBorder(p), fill); } /// An unfocused grip's ring, and a dirty one's fill (colors.Theme). @@ -471,7 +476,7 @@ fn renderPane(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, r: // on the dirty colour, a cue that survives any palette. const band = tagGround(p, pane, active); const dirty = tagline.dirty(pane); - const box_bg = gripBg(p, active); + const box_bg = gripBg(p, active, pardes.Trail.reading(p, pane)); const box_style: CellStyle = .{ .fg = .{ .rgb = inkOn(box_bg) }, .bg = .{ .rgb = box_bg }, @@ -635,12 +640,21 @@ fn paintNoticeRow(p: *Pardes, s: *Surface) !void { const layer = &s.tag_layers[pardes.NOTICE_ROW_LAYER]; try renderHeaderLayer(p, layer, .notice_row, 0, viewport, row.text, 0, chrome.tagline_bg, chrome.tagline_fg); if (layer.rows == 0) return; - const dim: Color = .{ .rgb = colors.mix(chrome.tagline_fg, chrome.tagline_bg) }; + // The dim ink of the notice row's ground (colors.Roles: 3:1 at least). + const dim: Color = .{ .rgb = chrome.roles.notice.dim }; const ink: Color = .{ .rgb = chrome.tagline_fg }; const cells = layer.cells[0..layer.cols]; const tab = p.settings.tab; const left = @min(cells.len, panes.File.displayWidth(tab, row.text[0..row.left])); const right = @min(cells.len, panes.File.displayWidth(tab, row.text[0..row.right])); + // A picker's sentence: dim, its address in the text's ink. + if (row.quiet_left) { + const lo = panes.File.displayWidth(tab, row.text[0..@min(row.word[0], row.left)]); + const hi = panes.File.displayWidth(tab, row.text[0..@min(row.word[1], row.left)]); + for (cells[0..left], 0..) |*cell, x| if ((x < lo or x >= hi) and std.meta.eql(cell.style.fg, ink)) { + cell.style.fg = dim; + }; + } if (row.lead) |lead| { if (lead.kind == .@"error" or lead.kind == .warn) if (cells.len > 0 and std.meta.eql(cells[0].style.fg, ink)) { cells[0].style.fg = .{ .rgb = if (lead.kind == .@"error") chrome.diagnostic_error else chrome.diagnostic_warning }; @@ -883,13 +897,17 @@ fn joinBand(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, r: R const layer = &s.tag_layers[pardes.BAND_LAYER]; if (r.w <= TAG_TEXT_INSET) return; const band = (try pardes.Band.of(p, arena, pane, id)) orelse return; - const th = p.theme(); const chrome = p.chromeTheme(); const tab = p.settings.tab; const rows = pane.band_rows; const columns = @max(band.columns, 1); - const bg = tagGround(p, pane, active); - const fg = if (active) chrome.tag_active_fg else chrome.tag_fg; + // The walk UI's inks on this tag's ground (colors.Roles, UX DESIGN.md + // D4), and on its cursor row's selection. + const ground = groundOf(p, pane, active); + const inks = chrome.roles.on(ground); + const selected = chrome.roles.selectedOn(ground); + const bg = inks.ground; + const fg = inks.text; const storage = try arena.alloc(Cell, @as(usize, columns) * rows); @memset(storage, .{}); var t: Surface = .{ .cols = columns, .rows = rows, .cells = storage, .tab = tab }; @@ -898,35 +916,53 @@ fn joinBand(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, r: R t.fill(0, row, columns, 1, .{ .bg = .{ .rgb = bg }, .font_role = .tagline }); const ln = try band.line(arena, tab, row); _ = t.print(0, row, columns, ln.text, .{ .fg = .{ .rgb = fg }, .bg = .{ .rgb = bg }, .font_role = .tagline }); - // The spines and the rules between steps: the key ink. + // The spines and the rules between steps in the rule ink; a row's + // `▶` (the cursor) and `•` (marked) in the key ink. var col: u16 = 0; var at: usize = 0; while (at < ln.text.len and col < columns) : (col += 1) { const next = modal.nextGrapheme(ln.text, at); - if (std.mem.eql(u8, ln.text[at..next], "│")) t.at(col, row).style.fg = .{ .rgb = chrome.box }; - if (std.mem.eql(u8, ln.text[at..next], "▶")) t.at(col, row).style.fg = .{ .rgb = chrome.box }; + const glyph = ln.text[at..next]; + if (std.mem.eql(u8, glyph, "│")) t.at(col, row).style.fg = .{ .rgb = inks.rule }; + if (std.mem.eql(u8, glyph, "▶") or std.mem.eql(u8, glyph, "•")) t.at(col, row).style.fg = .{ .rgb = chrome.roles.key }; at = next; } for (ln.parts) |part| { const end = @min(columns, part.col + part.width); - if (part.row.on and part.col < end) t.tint(part.col, row, end - part.col, th.tag_sel_bg orelse th.sel_bg, th.sel_fg); + const on = if (part.row.on) selected else inks; + if (part.row.on and part.col < end) t.tint(part.col, row, end - part.col, selected.ground, selected.text); var c = part.col; var b: usize = 0; while (b < part.row.text.len and c < end) : (c += 1) { const next = modal.nextGrapheme(part.row.text, b); const style = &t.at(c, row).style; if (b < part.row.key) { - style.fg = .{ .rgb = chrome.box }; + style.fg = .{ .rgb = chrome.roles.key }; style.bold = true; } + // A chord (Help's `SPC h t`): keys, at the text's weight. + if (b < part.row.chord) style.fg = .{ .rgb = chrome.roles.key }; if (b < part.row.pre) style.fg = .{ .rgb = if (active) chrome.tag_active_name_fg else chrome.tag_name_fg }; - if (part.row.dim or (b >= part.row.pre and b < part.row.pre + part.row.faint)) style.dim = true; + if (part.row.dim or (b >= part.row.pre and b < part.row.pre + part.row.faint) or (b >= part.row.quiet[0] and b < part.row.quiet[1])) style.fg = .{ .rgb = on.dim }; + for (part.row.keys) |k| if (k == b) { + style.fg = .{ .rgb = chrome.roles.key }; + style.bold = true; + }; if (part.row.under) style.ul = .single; + // A matched letter: the match ink, bold, on the row's own + // ground (never a ground of its own: on the cursor row's + // selection one vanished). for (part.row.marks) |m| if (m == b) { - style.bg = .{ .rgb = chrome.search_bg }; + style.fg = .{ .rgb = chrome.roles.match }; + style.bold = true; }; b = next; } + // Its meta, right-aligned in the part (Band.line), dim. + if (pardes.Band.metaShown(tab, part.row, part.width) and part.col + part.width <= columns) { + const meta: u16 = @intCast(panes.File.displayWidth(tab, part.row.meta)); + for (part.col + part.width - meta..part.col + part.width) |x| t.at(@intCast(x), row).style.fg = .{ .rgb = on.dim }; + } } } const count = @as(usize, columns) * rows; @@ -967,9 +1003,14 @@ fn inkTag(p: *Pardes, s: *Surface, shown: tagline.Shown, lines: []const []const /// A pane's tag's ground: a reading pane's tint (its focus is its grip's), /// else the focused tag's or the tag's. fn tagGround(p: *Pardes, pane: *const Pane, active: bool) [3]u8 { - const chrome = p.chromeTheme(); - if (pardes.Trail.reading(p, pane)) return chrome.tag_reading_bg; - return if (active) chrome.tag_active_bg else chrome.tag_bg; + return p.chromeTheme().roles.on(groundOf(p, pane, active)).ground; +} + +/// Which of a tag's grounds pane `pane`'s is: its walk UI inks +/// (colors.Roles) are that ground's. +fn groundOf(p: *Pardes, pane: *const Pane, active: bool) colors.TagGround { + if (pardes.Trail.reading(p, pane)) return if (active) .reading_focused else .reading; + return if (active) .focused else .plain; } fn paintPaneTag(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, r: Rect, id: usize, active: bool) !void { @@ -981,7 +1022,8 @@ fn paintPaneTag(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, const rows = pane.tag_rows - pane.band_rows; const page_rgb = th.bg orelse th.tag_bg; // Focus is visible along the tag without changing its live text grid. - const tag_bg = tagGround(p, pane, active); + const inks = chrome.roles.on(groundOf(p, pane, active)); + const tag_bg = inks.ground; const tag_fg = if (active) chrome.tag_active_fg else chrome.tag_fg; const tag_style: CellStyle = .{ .fg = .{ .rgb = tag_fg }, .bg = .{ .rgb = tag_bg }, .font_role = .tagline }; // Padding belongs to the same font row but keeps its default ink: a @@ -995,6 +1037,8 @@ fn paintPaneTag(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, const head = try TagState.head(p, arena, pane); const tail = if (head) |h| h.text else tagline.curTail(pane); const prefix_len = whole.len - tail.len; + // Out of rest, the walk UI's text ink (at rest the tag's own, unchanged). + const text_style: CellStyle = if (head == null) tag_style else .{ .fg = .{ .rgb = inks.text }, .bg = .{ .rgb = tag_bg }, .font_role = .tagline }; // A row per line shown, from `tag_top`: the tag's first line carries // the prefix, the rest are the tag's own text alone. const top = pane.tag_top; @@ -1028,7 +1072,7 @@ fn paintPaneTag(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, for (lines[0..rows], 0..) |line, row| { // The scroll is the caret's line's: a shorter row shows nothing. const start = @min(line.len, panes.File.rawAtDisplay(p.settings.tab, line, pane.tag_scroll)); - _ = s.print(tx, tag_y + @as(u16, @intCast(row)), tw, line[start..], tag_style); + _ = s.print(tx, tag_y + @as(u16, @intCast(row)), tw, line[start..], text_style); } // The pane's progress at its first row's right end, where the row has // room for it (SPEC §10.2). @@ -1048,9 +1092,9 @@ fn paintPaneTag(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, inkTag(p, s, shown, lines[0..rows], top, tx, tag_y, tw, name.lo, @min(name.hi, first_line.len), if (active) chrome.tag_active_name_fg else chrome.tag_name_fg); // A walk's forward steps, after the name, dimmed (Trail.zig). const ahead = tagline.forwardSpan(p, pane); - if (ahead[0] < ahead[1]) inkTag(p, s, shown, lines[0..rows], top, tx, tag_y, tw, ahead[0], @min(ahead[1], first_line.len), chrome.lineno); + if (ahead[0] < ahead[1]) inkTag(p, s, shown, lines[0..rows], top, tx, tag_y, tw, ahead[0], @min(ahead[1], first_line.len), inks.dim); // A search word its places no longer light, dimmed (Prompt.zig). - if (pardes.Prompt.unlit(p, pane)) |span| inkTag(p, s, shown, lines[0..rows], top, tx, tag_y, tw, span[0], @min(span[1], first_line.len), chrome.lineno); + if (pardes.Prompt.unlit(p, pane)) |span| inkTag(p, s, shown, lines[0..rows], top, tx, tag_y, tw, span[0], @min(span[1], first_line.len), inks.dim); // The head's keys in the key ink, its dimmed, underlined and struck // words (TagState.Span), over whichever rows they wrapped onto. if (head) |h| for (h.spans) |span| { @@ -1068,13 +1112,14 @@ fn paintPaneTag(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, const style = &s.at(tx + @as(u16, @intCast(col)), y).style; switch (span.style) { .key => { - style.fg = .{ .rgb = chrome.box }; + style.fg = .{ .rgb = chrome.roles.key }; style.bold = true; }, - .dim => style.dim = true, + .dim => style.fg = .{ .rgb = inks.dim }, .under => style.ul = .single, .strike => style.strikethrough = true, - .err => style.fg = .{ .rgb = chrome.diagnostic_error }, + .err => style.fg = .{ .rgb = chrome.roles.err }, + .rule => style.fg = .{ .rgb = inks.rule }, } } } @@ -1148,6 +1193,7 @@ test "an unfocused grip shows on its tag in the grid, in every native theme" { p.newScratchBelow(0); var arena: std.heap.ArenaAllocator = .init(std.testing.allocator); defer arena.deinit(); + var ok = true; for (pardes.themes[0..colors.native_count], 0..) |theme, index| { colors.setThemeIndex(p, index); p.view().active = 1; @@ -1155,12 +1201,16 @@ test "an unfocused grip shows on its tag in the grid, in every native theme" { const s = try p.render(arena.allocator()); const r = p.view().rects[0]; const grip = s.at(r.x, p.tagTop(p.panes[0].?, r)).style.bg.rgb; - const ratio = colors.contrast(grip, p.chromeTheme().tag_bg); + // Its tag's ground: a reading pane's the reading tint. + const ratio = colors.contrast(grip, tagGround(p, p.panes[0].?, false)); // ponytail: dark and helix have always had a faint grip (1.2:1); flagged, not changed here. const floor: f32 = if (std.mem.eql(u8, theme.name, "dark") or std.mem.eql(u8, theme.name, "helix")) 1.2 else 1.5; - if (ratio < floor) std.debug.print("{s}: grip {d:.2}\n", .{ theme.name, ratio }); - try std.testing.expect(ratio >= floor); + // Against a reading tint (UX D4's, lighter on a dark tag) a little + // less: forestbones_dark's 1.486, nordbones' 1.488, monokai's 1.4999. + if (ratio < floor - 0.02) std.debug.print("{s}: grip {d:.4}\n", .{ theme.name, ratio }); + ok = ok and ratio >= floor - 0.02; } + try std.testing.expect(ok); } test "a grip's four states, focused or not and clean or dirty, are each its own in every native theme" { @@ -1745,3 +1795,70 @@ test "progress is said at the right end of its tag: a pane's at its tag's, a ser s = try p.render(frame.allocator()); try std.testing.expect(std.mem.indexOf(u8, Row.of(s, tag_y, &buf), "\u{22ef}") == null); } + +test "a tag out of rest draws its keys bold in the key ink and its hint in the dim ink, never faint (UX D4)" { + const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 200, .rows = 30 }); + defer p.deinit(); + const pane = try p.setTestFile("one\n"); + var frame = std.heap.ArenaAllocator.init(std.testing.allocator); + defer frame.deinit(); + const a = frame.allocator(); + const roles = &p.chromeTheme().roles; + const inks = roles.on(if (pardes.Trail.reading(p, pane)) .reading_focused else .focused); + // SPC's level rolled, after its delay: `␣ ▸ … l lsp… … ↓ unroll · ? help`. + p.clock.now_ns = 5 * std.time.ns_per_s; + p.clock.stepped_ns = p.clock.now_ns; + p.update(.{ .key = .{ .cp = ' ' } }); + p.advance(p.clock.now_ns); + p.clock.now_ns = p.view().tag_state.due_ns; + p.sync(); + const s = try p.render(a); + const r = p.view().rects[p.view().active]; + const row = s.cells[@as(usize, r.y) * s.cols ..][0 .. @as(usize, s.cols) * (pane.tag_rows - pane.band_rows)]; + const Row = struct { + fn find(cells: []const Cell, word: []const u8) ?usize { + var at: usize = 0; + while (at + word.len <= cells.len) : (at += 1) { + for (word, cells[at..][0..word.len]) |c, cell| { + if (cell.len != 1 or cell.text[0] != c) break; + } else return at; + } + return null; + } + }; + const hint = Row.find(row, "unroll").?; + try std.testing.expectEqual(Color{ .rgb = inks.dim }, row[hint].style.fg); + for (row) |cell| try std.testing.expect(!cell.style.dim); + var keys: usize = 0; + for (row) |cell| if (std.meta.eql(cell.style.fg, Color{ .rgb = roles.key })) { + try std.testing.expect(cell.style.bold); + keys += 1; + }; + try std.testing.expect(keys > 3); +} + +test "an unfocused reading pane's box in the grid is its ring round the reading tint where the box's fill is the tag's own ground (acme's), as a window draws it; a held pane's, or another theme's, as before" { + const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 100, .rows = 30 }); + defer p.deinit(); + const pane = try p.setTestFile("one\n"); + const reader = p.view().active; + p.newScratchBelow(reader); + colors.setThemeIndex(p, colors.themeIndex("acme").?); + p.sync(); + var frame = std.heap.ArenaAllocator.init(std.testing.allocator); + defer frame.deinit(); + try std.testing.expect(pardes.Trail.reading(p, pane) and p.view().active != reader); + var s = try p.render(frame.allocator()); + const r = p.view().rects[reader]; + const want = colors.mix(boxBorder(p), p.chromeTheme().tag_reading_bg); + for (0..config.GUTTER) |x| try std.testing.expectEqual(Color{ .rgb = want }, s.at(r.x + @as(u16, @intCast(x)), r.y).style.bg); + // Held, the ring round the plain box. + pane.trail.held = true; + s = try p.render(frame.allocator()); + try std.testing.expectEqual(Color{ .rgb = colors.mix(boxBorder(p), p.chromeTheme().tag_bg) }, s.at(r.x, r.y).style.bg); + // orchard's box has a fill of its own: a reader's keeps it. + pane.trail.held = false; + colors.setThemeIndex(p, colors.themeIndex("orchard").?); + s = try p.render(frame.allocator()); + try std.testing.expectEqual(Color{ .rgb = colors.mix(boxBorder(p), p.chromeTheme().box_dim) }, s.at(r.x, r.y).style.bg); +} diff --git a/core/jj.zig b/core/jj.zig index dea0236f..696bd659 100644 --- a/core/jj.zig +++ b/core/jj.zig @@ -2033,8 +2033,17 @@ fn ownerOf(ch: *const Changes, f: *const File.State, row: usize) PinIndex { /// with none shown, or none that way, or none in the `most` lines looked /// at (a body's painted targets look at the rows shown alone). pub fn nextChange(p: *Pardes, pane: *const Pane, from: usize, forward: bool, most: usize) ?usize { - if (pane.layers.lanes == 0) return null; const f = if (pane.file) |*file| file else return null; + // No changes shown: the last edit not saved yet is one (POLISH 11: + // `]g` and its painted target found nothing in an edited file). + if (pane.layers.lanes == 0) { + if (f.revision == f.saved_revision) return null; + const at = pane.body.last_edit orelse return null; + const line: usize = @intCast(@max(0, at.row)); + if (forward and line > from and line - from <= most) return line; + if (!forward and line < from and from - line <= most) return line; + return null; + } const ch = answered(p, f.layer.owner) orelse return null; const n = File.lineCount(f.content); var row = from; diff --git a/core/look.zig b/core/look.zig index 0b42b603..f9dcfbc3 100644 --- a/core/look.zig +++ b/core/look.zig @@ -803,7 +803,7 @@ pub fn advanceLookHover(p: *Pardes) void { p.look_hover_wait = null; } -pub fn focusPaneLine(p: *Pardes, id: usize, at_in: Spot, landing: enum { center, keep }) void { +pub fn focusPaneLine(p: *Pardes, id: usize, at_in: Spot, landing: enum { center, third, keep }) void { if (id >= MAX_PANES) return; const pane = p.panes[id] orelse return; p.view().active = id; @@ -822,7 +822,9 @@ pub fn focusPaneLine(p: *Pardes, id: usize, at_in: Spot, landing: enum { center, if (at.line > panes.File.nlines(p.gpa, f)) return; // centred (its first row of text half the body's rows down, as // zz), clamped at the top; a text that fits is shown whole - if (landing == .center) panes.File.setTop(pane, if (pane.textFits()) .{ .line = 0 } else panes.File.walkRows(p.settings.tab, pane, .{ .line = at.line - 1, .row = panes.File.rowOf(p.settings.tab, pane, at.line - 1, 0) }, -@as(i64, pane.rows / 2)).to); + // or a third of them down (a picker's preview, UX D7: context above + // its landing line, the rest below) + if (landing != .keep) panes.File.setTop(pane, if (pane.textFits()) .{ .line = 0 } else panes.File.walkRows(p.settings.tab, pane, .{ .line = at.line - 1, .row = panes.File.rowOf(p.settings.tab, pane, at.line - 1, 0) }, -@as(i64, if (landing == .third) (pane.rows + 2) / 3 else pane.rows / 2)).to); } pane.body.cur_row = std.math.cast(i32, at.line - 1) orelse return; pane.body.cur_col = columnOn(pane, pane.body.cur_row, at.col); diff --git a/test/snapshots/callstack.golden b/test/snapshots/callstack.golden index 69b2f311..d1140d0c 100644 --- a/test/snapshots/callstack.golden +++ b/test/snapshots/callstack.golden @@ -42,7 +42,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-32 #b2c3b8,#2c2819, 33-40 #d3b0d9,#2c2819, 41-109 #b2c3b8,#2c2819, +|2: 0-1 d,#496656, 2-32 #b2c3b8,#2c2c0f, 33-40 #d3b0d9,#2c2c0f, 41-109 #b2c3b8,#2c2c0f, |3: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-10 #c9a7ed,#0d1410, 11-109 #e5eee5,#0d1410, |4: 0-0 d,#608269, 1-4 d,#0d1410, 5-109 #59675c,#0d1410, |5: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-9 #c9a7ed,#0d1410, 10-109 #e5eee5,#0d1410, @@ -79,7 +79,7 @@ |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-1 d,#1d2824, 2-109 #67756e,#1d2824, +|39: 0-1 d,#1d2824, 2-109 #6f7d75,#1d2824, == snap caller grid=110x40 cursor=13,27 |24: ‹@p2 › /tmp/pardes-snap/callstack/cwd/main.rs Keep Save Term Collapse Follow TreeContext Def Refs Del |25: 1 mod lib; diff --git a/test/snapshots/chordcut.golden b/test/snapshots/chordcut.golden index a52c6ae8..8fc71f7e 100644 --- a/test/snapshots/chordcut.golden +++ b/test/snapshots/chordcut.golden @@ -87,7 +87,7 @@ |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, -|31: 0-1 d,#1d2824, 2-119 #67756e,#1d2824, +|31: 0-1 d,#1d2824, 2-119 #6f7d75,#1d2824, == style clickdismiss grid=120x32 |23: 0-1 d,#314738, 2-59 #becfc4,#314738, 60-60 #becfc4,#608269, 61-119 #becfc4,#0d1410, |24: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410, diff --git a/test/snapshots/colgrip.golden b/test/snapshots/colgrip.golden index e41cf833..7a11e85b 100644 --- a/test/snapshots/colgrip.golden +++ b/test/snapshots/colgrip.golden @@ -1,8 +1,8 @@ == style rest grid=100x24 |0: 0-1 d,#1d2824, 2-99 #b2c3b8,#1d2824, |1: 0-1 d,#887455, 2-49 #b2c3b8,#1d2824, 50-51 #b2c3b8,#887455, 52-99 #becfc4,#314738, -|2: 0-1 d,#496656, 2-30 #b2c3b8,#2c2819, 31-36 #d3b0d9,#2c2819, 37-49 #b2c3b8,#2c2819, 50-51 #b2c3b8,#add38a, 52-80 #becfc4,#314738, 81-90 #dfbce5,#314738, 91-99 #becfc4,#314738, -|3: 0-1 d,#2c2819, 2-49 #b2c3b8,#2c2819, 50-52 #b2c3b8,#314738, 53-99 #becfc4,#314738, +|2: 0-1 d,#496656, 2-30 #b2c3b8,#2c2c0f, 31-36 #d3b0d9,#2c2c0f, 37-49 #b2c3b8,#2c2c0f, 50-51 #b2c3b8,#add38a, 52-80 #becfc4,#314738, 81-90 #dfbce5,#314738, 91-99 #becfc4,#314738, +|3: 0-1 d,#2c2c0f, 2-49 #b2c3b8,#2c2c0f, 50-52 #b2c3b8,#314738, 53-99 #becfc4,#314738, |4: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-49 #e5eee5,#0d1410, 50-50 #e5eee5,#608269, 51-99 #e5eee5,#0d1410, |5: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-51 d,#0d1410, 52-99 #e5eee5,#0d1410, |6: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410, @@ -60,8 +60,8 @@ == snap reorder-drag grid=100x24 cursor=44,6 == style reorder-drag grid=100x24 |1: 0-1 d,#887455, 2-39 #b2c3b8,#1d2824, 40-41 #b2c3b8,#f4c086, 42-99 #becfc4,#314738, -|2: 0-1 d,#496656, 2-30 #b2c3b8,#2c2819, 31-36 #d3b0d9,#2c2819, 37-39 #b2c3b8,#2c2819, 40-41 #b2c3b8,#add38a, 42-70 #becfc4,#314738, 71-80 #dfbce5,#314738, 81-99 #becfc4,#314738, -|3: 0-1 d,#2c2819, 2-39 #b2c3b8,#2c2819, 40-41 #b2c3b8,#314738, 42-99 #becfc4,#314738, +|2: 0-1 d,#496656, 2-30 #b2c3b8,#2c2c0f, 31-36 #d3b0d9,#2c2c0f, 37-39 #b2c3b8,#2c2c0f, 40-41 #b2c3b8,#add38a, 42-70 #becfc4,#314738, 71-80 #dfbce5,#314738, 81-99 #becfc4,#314738, +|3: 0-1 d,#2c2c0f, 2-39 #b2c3b8,#2c2c0f, 40-41 #b2c3b8,#314738, 42-99 #becfc4,#314738, |4: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-39 #e5eee5,#0d1410, 40-40 #e5eee5,#608269, 41-99 #e5eee5,#0d1410, |5: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-41 d,#0d1410, 42-99 #e5eee5,#0d1410, |6: 0-0 d,#608269, 1-39 d,#0d1410, 40-40 d,#608269, 41-99 d,#0d1410, diff --git a/test/snapshots/collapse.golden b/test/snapshots/collapse.golden index 89155f5e..da7d22ee 100644 --- a/test/snapshots/collapse.golden +++ b/test/snapshots/collapse.golden @@ -35,7 +35,7 @@ |1: New Term Find Grep Joincol Delcol @1: 0-1 #ffffff,#887455,,tagline 2-34 #becfc4,#314738,,tagline 35-159 d,#314738,,tagline |2: /tmp/pardes-snap/collapse/cwd/kept.txt Keep Save Term Collapse Follow Del -@2: 0-1 #000000,#add38a,,tagline 2-31 #becfc4,#2c2819,,tagline 32-39 #dfbce5,#2c2819,,tagline 40-74 #becfc4,#2c2819,,tagline 75-159 d,#2c2819,,tagline +@2: 0-1 #000000,#add38a,,tagline 2-31 #becfc4,#2c2c0f,,tagline 32-39 #dfbce5,#2c2c0f,,tagline 40-74 #becfc4,#2c2c0f,,tagline 75-159 d,#2c2c0f,,tagline |3: @3: 0-159 d,#486152,,body |4: @@ -80,7 +80,7 @@ @23: 0-159 d,#486152,,body |24: ✓ /tmp/pardes-snap/collapse/cwd/kept.txt Collapse 2 messages · SPC h m +24: 2="✓" 150="·" -@24: 0-1 d,#1d2824,,tagline 2-50 #67756e,#1d2824,,tagline 51-138 #b2c3b8,#1d2824,,tagline 139-158 #67756e,#1d2824,,tagline 159-159 d,#1d2824,,tagline +@24: 0-1 d,#1d2824,,tagline 2-50 #6f7d75,#1d2824,,tagline 51-138 #b2c3b8,#1d2824,,tagline 139-158 #6f7d75,#1d2824,,tagline 159-159 d,#1d2824,,tagline == snap middle-restored grid=160x25 cursor=7,3 |3: 1 KEEP-FIRST |4: 2 KEEP-SECOND @@ -94,7 +94,7 @@ == 9p tab-collapsed-cursor grid=160x25 cursor=none |24: ✓ /tmp/pardes-snap/collapse/cwd/kept.txt Collapse 7 messages · SPC h m +24: 2="✓" 150="·" -@24: 0-1 d,#1d2824,,tagline 2-50 #67756e,#1d2824,,tagline 51-138 #b2c3b8,#1d2824,,tagline 139-158 #67756e,#1d2824,,tagline 159-159 d,#1d2824,,tagline +@24: 0-1 d,#1d2824,,tagline 2-50 #6f7d75,#1d2824,,tagline 51-138 #b2c3b8,#1d2824,,tagline 139-158 #6f7d75,#1d2824,,tagline 159-159 d,#1d2824,,tagline == snap tab-restored grid=160x25 cursor=7,3 |3: 1 KEEP-FIRST |4: 2 KEEP-SECOND diff --git a/test/snapshots/cursorline.golden b/test/snapshots/cursorline.golden index 6ee64e71..689ffe94 100644 --- a/test/snapshots/cursorline.golden +++ b/test/snapshots/cursorline.golden @@ -47,8 +47,8 @@ |13: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410, |14: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410, |15: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410, -|16: 0-1 d,#496656, 2-33 #b2c3b8,#1d2824, 34-43 #d3b0d9,#1d2824, 44-74 #b2c3b8,#1d2824, 75-76 #b2c3b8,#add38a, 77-115 #becfc4,#2c2819, 116-123 #dfbce5,#2c2819, 124-149 #becfc4,#2c2819, -|17: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-76 #e5eee5,#2c2819, 77-149 #becfc4,#2c2819, +|16: 0-1 d,#496656, 2-33 #b2c3b8,#1d2824, 34-43 #d3b0d9,#1d2824, 44-74 #b2c3b8,#1d2824, 75-76 #b2c3b8,#add38a, 77-115 #becfc4,#2c2c0f, 116-123 #dfbce5,#2c2c0f, 124-149 #becfc4,#2c2c0f, +|17: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-76 #e5eee5,#2c2c0f, 77-149 #becfc4,#2c2c0f, |18: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-76 #e5eee5,#0d1410, 77-79 #e5eee5,#0d1410,b 80-81 #616f64,#0d1410,b 82-149 #e5eee5,#0d1410, |19: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-79 d,#0d1410, 80-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410, |20: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-79 d,#0d1410, 80-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410, @@ -61,7 +61,7 @@ |27: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#152019, 76-78 d,#0d1410, 79-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410, |28: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#152019, 76-78 d,#0d1410, 79-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410, |29: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#152019, 76-78 d,#0d1410, 79-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410, -|30: 0-1 d,#1d2824, 2-149 #67756e,#1d2824, +|30: 0-1 d,#1d2824, 2-149 #6f7d75,#1d2824, == snap down3 grid=150x31 cursor=82,21 == style down3 grid=150x31 |18: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-79 #e5eee5,#0d1410, 80-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410, diff --git a/test/snapshots/diffview.golden b/test/snapshots/diffview.golden index e5020d48..3a83fb25 100644 --- a/test/snapshots/diffview.golden +++ b/test/snapshots/diffview.golden @@ -33,7 +33,7 @@ == 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,#2c2819, 32-43 #dfbce5,#2c2819, 44-99 #becfc4,#2c2819, +|2: 0-1 d,#add38a, 2-31 #becfc4,#2c2c0f, 32-43 #dfbce5,#2c2c0f, 44-99 #becfc4,#2c2c0f, |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, @@ -120,7 +120,7 @@ == 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,#2c2819, 32-40 #dfbce5,#2c2819, 41-99 #becfc4,#2c2819, +|2: 0-1 d,#add38a, 2-31 #becfc4,#2c2c0f, 32-40 #dfbce5,#2c2c0f, 41-99 #becfc4,#2c2c0f, |3: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-99 #e5eee5,#0d1410, |4: 0-0 d,#608269, 1-4 d,#0d1410, 5-99 #59675c,#0d1410, |5: 0-0 d,#608269, 1-99 d,#0d1410, @@ -148,7 +148,7 @@ |27: 0-0 d,#608269, 1-2 d,#0d1410, 3-99 #e5eee5,#0d1410, |28: 0-0 d,#608269, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410, |29: 0-0 d,#152019, 1-99 d,#0d1410, -|30: 0-1 d,#1d2824, 2-99 #67756e,#1d2824, +|30: 0-1 d,#1d2824, 2-99 #6f7d75,#1d2824, == snap command-look grid=100x31 cursor=55,28 |17: + \\areas, defer |18: + \\summed diff --git a/test/snapshots/edit.golden b/test/snapshots/edit.golden index 42b8f753..fb558f5a 100644 --- a/test/snapshots/edit.golden +++ b/test/snapshots/edit.golden @@ -61,4 +61,4 @@ |27: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410, |28: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410, |29: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410, -|30: 0-1 d,#1d2824, 2-99 #67756e,#1d2824, +|30: 0-1 d,#1d2824, 2-99 #6f7d75,#1d2824, diff --git a/test/snapshots/find.golden b/test/snapshots/find.golden index c2eac2df..5fe63c16 100644 --- a/test/snapshots/find.golden +++ b/test/snapshots/find.golden @@ -49,8 +49,8 @@ |7: sub/ZQMARK-beta.txt |8: sub/nest/zqmark-gamma.txt |9: zqmark-alpha.txt -|10: 1 Find zqm -|40: ✓ /tmp/pardes-snap/find/cwd/here.txt Find 1 message · SPC h m +|10: 1▸Find zqm +|40: ⏎ lands here · its text is the preview · S-⏎ a new pane 1 message · SPC h m == snap typing grid=120x41 cursor=57,2 |2: ^ /tmp/pardes-snap/find/cwd/zqmark-alpha.txt ␣ f Find zqm 1/3 |3: │ │ Walk Look Split Newcol Grep Edit Copy Keep Drop | Grep Recent Panes Sym @@ -60,14 +60,14 @@ |7: sub/nest/zqmark-gamma.txt |8: |9: -|10: 1 alpha body +|10: 1▸alpha body == snap next grid=120x41 cursor=60,2 |2: ^ /tmp/pardes-snap/find/cwd/sub/ZQMARK-beta.txt ␣ f Find zqm 2/3 |3: │ │ Walk Look Split Newcol Grep Edit Copy Keep Drop | Grep Recent Panes |4: Symbols All Jumplist |5: zqmark-alpha.txt |6: ▶ sub/ZQMARK-beta.txt -|10: 1 beta body +|10: 1▸beta body == snap promoted grid=120x41 cursor=7,3 |2: here.txt:1 › Find zqm 2/3 › /tmp/pardes-snap/find/cwd/sub/ZQMARK-beta.txt Keep Save Term Collapse Follow Del |3: 1 beta body @@ -76,23 +76,25 @@ |6: |7: |10: +|40: ✓ /tmp/pardes-snap/find/cwd/here.txt Find 1 message · SPC h m == snap nomatch grid=120x41 cursor=85,2 |2: ^ · › Find zqm 2/3 › /tmp/pardes-snap/find/cwd/sub/ZQMARK-beta.txt Keep ␣ f Find zzqq 0/0 |3: │ │ Walk Look Split Newcol Grep Edit Copy Keep D |4: rop | Grep Recent Panes Symbols All Jumplist |5: nothing matches |7: 1 beta body -|40: ✓ /tmp/pardes-snap/find/cwd/sub/ZQMARK-beta.txt Find 1 message · SPC h m +|40: ⏎ lands here · its text is the preview · S-⏎ a new pane 1 message · SPC h m == snap cancel grid=120x41 cursor=7,3 |2: here.txt:1 › Find zqm 2/3 › /tmp/pardes-snap/find/cwd/sub/ZQMARK-beta.txt Keep Save Term Collapse Follow Del |3: 1 beta body |4: |5: |7: +|40: ✓ /tmp/pardes-snap/find/cwd/sub/ZQMARK-beta.txt Find 1 message · SPC h m == snap topbar grid=120x41 cursor=84,2 |2: ^ · › Find zqm 2/3 › /tmp/pardes-snap/find/cwd/sub/ZQMARK-beta.txt Keep ␣ f Find bod 0/0 |3: │ │ Walk Look Split Newcol Grep Edit Copy Keep D |4: rop | Grep Recent Panes Symbols All Jumplist |5: nothing matches |7: 1 beta body -|40: ✓ /tmp/pardes-snap/find/cwd/sub/ZQMARK-beta.txt Find ×2 1 message · SPC h m +|40: ⏎ lands here · its text is the preview · S-⏎ a new pane 1 message · SPC h m diff --git a/test/snapshots/fsearch.golden b/test/snapshots/fsearch.golden index 7d0c1efe..81fdc08a 100644 --- a/test/snapshots/fsearch.golden +++ b/test/snapshots/fsearch.golden @@ -49,8 +49,6 @@ |16: /tmp/pardes-snap/fsearch/cwd Term+bash Save Mode Filter Collapse Del ^ ‹@p1 › /tmp/pardes-snap/fsearch/cwd/g.txt Keep / MARK = Look /MARK/ 1/3 · 3 lines ⏎ |17: ls land · M-⏎ as a list · C-r history · esc |19: 2▸MARK a -|23: 6▪MARK b -|27: 10▪MARK c == style typing grid=180x31 |0: 0-1 d,#1d2824, 2-179 #b2c3b8,#1d2824, |1: 0-1 d,#887455, 2-89 #b2c3b8,#1d2824, 90-91 #b2c3b8,#887455, 92-179 #becfc4,#314738, @@ -68,21 +66,21 @@ |13: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269,f 91-179 d,#0d1410,f |14: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269,f 91-179 d,#0d1410,f |15: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269,f 91-179 d,#0d1410,f -|16: 0-1 d,#496656,f 2-30 #b2c3b8,#1d2824,f 31-40 #d3b0d9,#1d2824,f 41-89 #b2c3b8,#1d2824,f 90-91 #000000,#add38a, 92-127 #becfc4,#2c2819, 128-133 #dfbce5,#2c2819, 134-138 #becfc4,#2c2819, 139-139 #add38a,#2c2819,b 140-140 #add38a,#2c2819, 141-144 #becfc4,#2c2819, 145-152 #becfc4,#2c2819,f 153-178 #becfc4,#2c2819, 179-179 #becfc4,#2c2819,f -|17: 0-0 d,#608269,f 1-1 d,#0d1410,f 2-89 #e5eee5,#0d1410,f 90-91 #e5eee5,#2c2819, 92-92 #e5eee5,#2c2819,f 93-132 #becfc4,#2c2819,f 133-179 #becfc4,#2c2819, +|16: 0-1 d,#496656,f 2-30 #b2c3b8,#1d2824,f 31-40 #d3b0d9,#1d2824,f 41-89 #b2c3b8,#1d2824,f 90-91 #000000,#add38a, 92-127 #becfc4,#2c2c0f, 128-133 #dfbce5,#2c2c0f, 134-138 #becfc4,#2c2c0f, 139-139 #bada9d,#2c2c0f,b 140-140 #bada9d,#2c2c0f, 141-146 #becfc4,#2c2c0f, 147-153 #79836f,#2c2c0f, 154-178 #becfc4,#2c2c0f, 179-179 #79836f,#2c2c0f, +|17: 0-0 d,#608269,f 1-1 d,#0d1410,f 2-89 #e5eee5,#0d1410,f 90-92 #e5eee5,#2c2c0f, 93-179 #79836f,#2c2c0f, |18: 0-0 d,#608269,f 1-1 d,#0d1410,f 2-89 #e5eee5,#0d1410,f 90-90 #e5eee5,#e5eee5, 91-94 #e5eee5,#0d1410, 95-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410, -|19: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269, 91-91 d,#0d1410, 92-94 d,#0d1410,b 95-95 #616f64,#0d1410,b 96-96 #add38a,#0d1410,b 97-100 #f5f7ee,#3c614a, 101-101 #f5f7ee,#0d1410, 102-179 #e5eee5,#0d1410, +|19: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269, 91-91 d,#0d1410, 92-94 d,#0d1410,b 95-95 #616f64,#0d1410,b 96-96 #bada9d,#0d1410,b 97-100 #f5f7ee,#3c614a, 101-101 #f5f7ee,#0d1410, 102-179 #e5eee5,#0d1410, |20: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269, 91-94 d,#0d1410, 95-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410, |21: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269, 91-94 d,#0d1410, 95-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410, |22: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#5e4923, 91-94 d,#0d1410, 95-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410, -|23: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269, 91-94 d,#0d1410, 95-95 #59675c,#0d1410, 96-96 #add38a,#0d1410, 97-100 #e5eee5,#352e19, 101-179 #e5eee5,#0d1410, +|23: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269, 91-94 d,#0d1410, 95-96 #59675c,#0d1410, 97-100 #e5eee5,#5e4923, 101-179 #e5eee5,#0d1410, |24: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269, 91-94 d,#0d1410, 95-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410, |25: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269, 91-94 d,#0d1410, 95-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410, |26: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269, 91-94 d,#0d1410, 95-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410, -|27: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#5e4923, 91-93 d,#0d1410, 94-95 #59675c,#0d1410, 96-96 #add38a,#0d1410, 97-100 #e5eee5,#352e19, 101-179 #e5eee5,#0d1410, +|27: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#5e4923, 91-93 d,#0d1410, 94-96 #59675c,#0d1410, 97-100 #e5eee5,#5e4923, 101-179 #e5eee5,#0d1410, |28: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269, 91-93 d,#0d1410, 94-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410, |29: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269, 91-93 d,#0d1410, 94-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410, -|30: 0-1 d,#1d2824, 2-179 #67756e,#1d2824, +|30: 0-1 d,#1d2824, 2-179 #6f7d75,#1d2824, == snap list grid=180x31 cursor=150,16 |16: /tmp/pardes-snap/fsearch/cwd Term+bash Save Mode Filter Collapse Del ^ ‹@p1 › /tmp/pardes-snap/fsearch/cwd/g.txt Keep ␣ l /MARK/ 1/3 |17: ls │ │ Walk Look Split Newcol Grep Edit Copy @@ -91,25 +89,26 @@ |20: /tmp/pardes-snap/fsearch/cwd/g.txt:6:1: MARK b |21: /tmp/pardes-snap/fsearch/cwd/g.txt:10:1: MARK c |22: 1 l1 -|23: 2 MARK a +|23: 2▸MARK a |24: 3 l3 |25: 4 l4 |26: 5 l5 |27: 6 MARK b |28: 7 l7 |29: 8 l8 +|30: ⏎ lands here · its text is the preview · S-⏎ a new pane 1 message · SPC h m == snap ctrln grid=180x31 cursor=150,16 |16: /tmp/pardes-snap/fsearch/cwd Term+bash Save Mode Filter Collapse Del ^ ‹@p1 › /tmp/pardes-snap/fsearch/cwd/g.txt Keep ␣ l /MARK/ 2/3 |19: /tmp/pardes-snap/fsearch/cwd/g.txt:2:1: MARK a |20: ▶ /tmp/pardes-snap/fsearch/cwd/g.txt:6:1: MARK b -|22: 2 MARK a -|23: 3 l3 -|24: 4 l4 -|25: 5 l5 -|26: 6 MARK b -|27: 7 l7 -|28: 8 l8 -|29: 9 l9 +|22: 3 l3 +|23: 4 l4 +|24: 5 l5 +|25: 6▸MARK b +|26: 7 l7 +|27: 8 l8 +|28: 9 l9 +|29: 10 MARK c == snap landed grid=180x31 cursor=97,22 |16: /tmp/pardes-snap/fsearch/cwd Term+bash Save Mode Filter Collapse Del ‹@p1 › g.txt:1 › /MARK/ 2/3 › /tmp/pardes-snap/fsearch/cwd/g.txt Keep Save Term Collapse |17: ls Follow Del @@ -125,6 +124,7 @@ |27: 11 l11 |28: 12 l12 |29: +|30: · @p1 a copy of the terminal's text: Tab or B2 runs it; what the program draws next replaces it (Ctrl-b types to the program) 1 message · SPC h m == snap n grid=180x31 cursor=97,27 |16: /tmp/pardes-snap/fsearch/cwd Term+bash Save Mode Filter Collapse Del ‹@p1 › g.txt:1 › /MARK/ 3/3 › /tmp/pardes-snap/fsearch/cwd/g.txt Keep Save Term Collapse |18: g.txt 1 l1 diff --git a/test/snapshots/headersweep-restored.golden b/test/snapshots/headersweep-restored.golden index 3952525b..f7e5b2a4 100644 --- a/test/snapshots/headersweep-restored.golden +++ b/test/snapshots/headersweep-restored.golden @@ -19,7 +19,7 @@ |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-1 d,#1d2824, 2-119 #67756e,#1d2824, +|20: 0-1 d,#1d2824, 2-119 #6f7d75,#1d2824, == snap col-swept grid=120x21 cursor=4,7 | Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit Restore /tmp/pardes-snap/headerswe | New Term Find Grep Joincol Delcol echo RE''STORED-COL New Term Find Grep Joincol Delcol diff --git a/test/snapshots/headersweep.golden b/test/snapshots/headersweep.golden index 0d57cdcd..8763fbb2 100644 --- a/test/snapshots/headersweep.golden +++ b/test/snapshots/headersweep.golden @@ -58,8 +58,8 @@ |1: 0-1 d,#887455, 2-59 #b2c3b8,#1d2824, 60-61 #b2c3b8,#887455, 62-70 #becfc4,#314738, 71-80 #f5f7ee,#3c614a, 81-119 #becfc4,#314738, |2: 0-1 d,#496656, 2-34 #b2c3b8,#1d2824, 35-44 #d3b0d9,#1d2824, 45-59 #b2c3b8,#1d2824, 60-61 #b2c3b8,#add38a, 62-94 #becfc4,#314738, 95-104 #dfbce5,#314738, 105-119 #becfc4,#314738, |3: 0-1 d,#1d2824, 2-59 #b2c3b8,#1d2824, 60-61 #b2c3b8,#314738, 62-119 #becfc4,#314738, -|12: 0-1 d,#1d2824, 2-59 #b2c3b8,#1d2824, 60-61 #b2c3b8,#496656, 62-101 #b2c3b8,#2c2819, 102-109 #d3b0d9,#2c2819, 110-119 #b2c3b8,#2c2819, -|13: 0-0 d,#608269, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-61 #e5eee5,#2c2819, 62-119 #b2c3b8,#2c2819, +|12: 0-1 d,#1d2824, 2-59 #b2c3b8,#1d2824, 60-61 #b2c3b8,#496656, 62-101 #b2c3b8,#2c2c0f, 102-109 #d3b0d9,#2c2c0f, 110-119 #b2c3b8,#2c2c0f, +|13: 0-0 d,#608269, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-61 #e5eee5,#2c2c0f, 62-119 #b2c3b8,#2c2c0f, |14: 0-0 d,#608269, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-64 #e5eee5,#0d1410, 65-66 #59675c,#0d1410, 67-119 #e5eee5,#0d1410, |16: 0-1 d,#496656, 2-59 #b2c3b8,#1d2824, 60-60 #b2c3b8,#608269, 61-119 #b2c3b8,#0d1410, |17: 0-1 d,#1d2824, 2-59 #b2c3b8,#1d2824, 60-60 #b2c3b8,#608269, 61-119 #b2c3b8,#0d1410, diff --git a/test/snapshots/images.golden b/test/snapshots/images.golden index 9cf46ec4..7808e7d4 100644 --- a/test/snapshots/images.golden +++ b/test/snapshots/images.golden @@ -63,7 +63,7 @@ |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, -|31: 0-1 d,#1d2824, 2-149 #67756e,#1d2824, +|31: 0-1 d,#1d2824, 2-149 #6f7d75,#1d2824, == style term-palette grid=150x32 |6: 0-1 d,#add38a, 2-70 #becfc4,#314738, 71-74 #dfbce5,#314738, 75-75 #dfbce5,#608269, 76-149 #dfbce5,#0d1410, |7: 0-1 d,#314738, 2-5 #dfbce5,#314738, 6-74 #becfc4,#314738, 75-75 #becfc4,#608269, 76-149 #becfc4,#0d1410, diff --git a/test/snapshots/jumps.golden b/test/snapshots/jumps.golden index abac4c7f..5ac7f4d8 100644 --- a/test/snapshots/jumps.golden +++ b/test/snapshots/jumps.golden @@ -180,7 +180,7 @@ |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-1 d,#1d2824, 2-149 #67756e,#1d2824, +|30: 0-1 d,#1d2824, 2-149 #6f7d75,#1d2824, == snap step2-file grid=150x31 cursor=7,3 |3: 1 line 1 ls |4: 2 line 2 big.txt diff --git a/test/snapshots/load.golden b/test/snapshots/load.golden index ded020a4..bb28bbfe 100644 --- a/test/snapshots/load.golden +++ b/test/snapshots/load.golden @@ -61,4 +61,4 @@ |27: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410, |28: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410, |29: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410, -|30: 0-1 d,#1d2824, 2-99 #67756e,#1d2824, +|30: 0-1 d,#1d2824, 2-99 #6f7d75,#1d2824, diff --git a/test/snapshots/look-file.golden b/test/snapshots/look-file.golden index 757a174e..c6a703c4 100644 --- a/test/snapshots/look-file.golden +++ b/test/snapshots/look-file.golden @@ -47,8 +47,8 @@ |13: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410, |14: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410, |15: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410, -|16: 0-1 d,#496656, 2-32 #b2c3b8,#1d2824, 33-42 #d3b0d9,#1d2824, 43-74 #b2c3b8,#1d2824, 75-76 #b2c3b8,#add38a, 77-114 #becfc4,#2c2819, 115-122 #dfbce5,#2c2819, 123-149 #becfc4,#2c2819, -|17: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-76 #e5eee5,#2c2819, 77-149 #becfc4,#2c2819, +|16: 0-1 d,#496656, 2-32 #b2c3b8,#1d2824, 33-42 #d3b0d9,#1d2824, 43-74 #b2c3b8,#1d2824, 75-76 #b2c3b8,#add38a, 77-114 #becfc4,#2c2c0f, 115-122 #dfbce5,#2c2c0f, 123-149 #becfc4,#2c2c0f, +|17: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-76 #e5eee5,#2c2c0f, 77-149 #becfc4,#2c2c0f, |18: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 #e5eee5,#152019, 76-78 #e5eee5,#0d1410, 79-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410, |19: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#152019, 76-78 d,#0d1410, 79-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410, |20: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#152019, 76-78 d,#0d1410, 79-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410, @@ -61,4 +61,4 @@ |27: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#152019, 76-78 d,#0d1410, 79-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410, |28: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#152019, 76-78 d,#0d1410, 79-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410, |29: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#152019, 76-78 d,#0d1410, 79-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410, -|30: 0-1 d,#1d2824, 2-149 #67756e,#1d2824, +|30: 0-1 d,#1d2824, 2-149 #6f7d75,#1d2824, diff --git a/test/snapshots/lookpanes.golden b/test/snapshots/lookpanes.golden index 2027b910..ece0ed3c 100644 --- a/test/snapshots/lookpanes.golden +++ b/test/snapshots/lookpanes.golden @@ -70,8 +70,8 @@ == style mru-beta grid=130x51 |0: 0-1 d,#1d2824, 2-129 #b2c3b8,#1d2824, |1: 0-1 d,#887455, 2-64 #becfc4,#314738, 65-66 #becfc4,#887455, 67-129 #b2c3b8,#1d2824, -|2: 0-1 d,#496656, 2-51 #b2c3b8,#2c2819, 52-60 #d3b0d9,#2c2819, 61-64 #b2c3b8,#2c2819, 65-66 #b2c3b8,#496656, 67-97 #b2c3b8,#1d2824, 98-107 #d3b0d9,#1d2824, 108-129 #b2c3b8,#1d2824, -|3: 0-2 d,#2c2819, 3-64 #b2c3b8,#2c2819, 65-129 #b2c3b8,#1d2824, +|2: 0-1 d,#496656, 2-51 #b2c3b8,#2c2c0f, 52-60 #d3b0d9,#2c2c0f, 61-64 #b2c3b8,#2c2c0f, 65-66 #b2c3b8,#496656, 67-97 #b2c3b8,#1d2824, 98-107 #d3b0d9,#1d2824, 108-129 #b2c3b8,#1d2824, +|3: 0-2 d,#2c2c0f, 3-64 #b2c3b8,#2c2c0f, 65-129 #b2c3b8,#1d2824, |4: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-64 #e5eee5,#0d1410, 65-65 #e5eee5,#608269, 66-129 #e5eee5,#0d1410, |5: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-66 d,#0d1410, 67-129 #e5eee5,#0d1410, |6: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, @@ -95,8 +95,8 @@ |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-1 d,#add38a, 2-64 #becfc4,#2c2819, 65-65 #becfc4,#608269, 66-129 #becfc4,#0d1410, -|28: 0-1 d,#2c2819, 2-9 #becfc4,#2c2819, 10-18 #dfbce5,#2c2819, 19-64 #becfc4,#2c2819, 65-65 #becfc4,#608269, 66-129 #becfc4,#0d1410, +|27: 0-1 d,#add38a, 2-64 #becfc4,#2c2c0f, 65-65 #becfc4,#608269, 66-129 #becfc4,#0d1410, +|28: 0-1 d,#2c2c0f, 2-9 #becfc4,#2c2c0f, 10-18 #dfbce5,#2c2c0f, 19-64 #becfc4,#2c2c0f, 65-65 #becfc4,#608269, 66-129 #becfc4,#0d1410, |29: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-64 #e5eee5,#0d1410, 65-65 #e5eee5,#608269, 66-129 #e5eee5,#0d1410, |30: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, |31: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, @@ -118,4 +118,4 @@ |47: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, |48: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, |49: 0-0 d,#608269, 1-64 d,#0d1410, 65-65 d,#608269, 66-129 d,#0d1410, -|50: 0-1 d,#1d2824, 2-129 #67756e,#1d2824, +|50: 0-1 d,#1d2824, 2-129 #6f7d75,#1d2824, diff --git a/test/snapshots/lookrange.golden b/test/snapshots/lookrange.golden index a0cbd3be..7fb41d13 100644 --- a/test/snapshots/lookrange.golden +++ b/test/snapshots/lookrange.golden @@ -101,7 +101,7 @@ |30: /tmp/pardes-snap/lookrange/cwd/r.txt:8 == style hit1 grid=150x31 |7: 0-1 d,#add38a, 2-47 #becfc4,#314738, 48-53 #dfbce5,#314738, 54-149 #becfc4,#314738, -|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, +|14: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-9 #e5eee5,#0d1410, 10-15 #e5eee5,#5e4923, 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,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-149 #e5eee5,#0d1410, |22: 0-0 d,#5e4923, 1-149 d,#0d1410, @@ -112,15 +112,15 @@ == style hit2 grid=150x31 |7: 0-1 d,#add38a, 2-49 #becfc4,#314738, 50-55 #dfbce5,#314738, 56-149 #becfc4,#314738, |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, +|15: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-11 #e5eee5,#0d1410, 12-17 #e5eee5,#5e4923, 18-149 #e5eee5,#0d1410, |22: 0-0 d,#e5eee5, 1-149 d,#0d1410, |25: 0-0 d,#5e4923, 1-149 d,#0d1410, -|30: 0-1 d,#1d2824, 2-149 #67756e,#1d2824, +|30: 0-1 d,#1d2824, 2-149 #6f7d75,#1d2824, == snap back grid=150x31 cursor=17,15 |7: /NEEDLE/ 2/2 ↻ › /tmp/pardes-snap/lookrange/cwd/r.txt Save Term Collapse Follow Del |30: · /tmp/pardes-snap/lookrange/cwd/r.txt /NEEDLE/ 2/2 ↻ · line 8 2 messages · SPC h m == style back grid=150x31 -|14: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-9 #e5eee5,#0d1410, 10-15 #e5eee5,#352e19, 16-149 #e5eee5,#0d1410, +|14: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-9 #e5eee5,#0d1410, 10-15 #e5eee5,#5e4923, 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, |22: 0-0 d,#5e4923, 1-149 d,#0d1410, |25: 0-0 d,#e5eee5, 1-149 d,#0d1410, diff --git a/test/snapshots/lsp.golden b/test/snapshots/lsp.golden index 6a53098e..447dbd25 100644 --- a/test/snapshots/lsp.golden +++ b/test/snapshots/lsp.golden @@ -63,7 +63,7 @@ |5: ▶ a.zig:1:7-9 std |6: a.zig:3:4-9 helper |7: a.zig:7:8-11 main -|8: 1 const std = @import("std"); +|8: 1▸const std = @import("std"); |9: 2 |10: 3 fn helper(x: u32) u32 { |11: fn helper(x: u32) u32 @@ -75,11 +75,12 @@ |17: 8 _ = helper(41); |18: 9 } |19: ~ -|40: ✓ /tmp/pardes-snap/lsp/cwd/a.zig Symbols 2 messages · SPC h m +|40: ⏎ lands here · its text is the preview · S-⏎ a new pane 2 messages · SPC h m == snap step grid=120x41 cursor=63,2 |2: ^ a.zig:8 › /tmp/pardes-snap/lsp/cwd/a.zig Keep ␣ l Symbols jn 0/0 |5: nothing matches |6: |7: +|8: 1 const std = @import("std"); == snap nothing grid=120x41 cursor=65,2 |2: ^ a.zig:8 › /tmp/pardes-snap/lsp/cwd/a.zig Keep ␣ l Symbols jngd 0/0 diff --git a/test/snapshots/markup.golden b/test/snapshots/markup.golden index f3793951..f3383ab0 100644 --- a/test/snapshots/markup.golden +++ b/test/snapshots/markup.golden @@ -27,7 +27,7 @@ == style typst grid=92x25 |0: 0-1 d,#1d2824, 2-91 #b2c3b8,#1d2824, |1: 0-1 d,#887455, 2-91 #becfc4,#314738, -|2: 0-1 d,#add38a, 2-29 #becfc4,#2c2819, 30-39 #dfbce5,#2c2819, 40-91 #becfc4,#2c2819, +|2: 0-1 d,#add38a, 2-29 #becfc4,#2c2c0f, 30-39 #dfbce5,#2c2c0f, 40-91 #becfc4,#2c2c0f, |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, @@ -79,7 +79,7 @@ == style markdown grid=92x25 |0: 0-1 d,#1d2824, 2-91 #b2c3b8,#1d2824, |1: 0-1 d,#887455, 2-91 #becfc4,#314738, -|2: 0-1 d,#add38a, 2-29 #becfc4,#2c2819, 30-38 #dfbce5,#2c2819, 39-91 #becfc4,#2c2819, +|2: 0-1 d,#add38a, 2-29 #becfc4,#2c2c0f, 30-38 #dfbce5,#2c2c0f, 39-91 #becfc4,#2c2c0f, |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, diff --git a/test/snapshots/mini.golden b/test/snapshots/mini.golden index 178c81ee..e8f63a82 100644 --- a/test/snapshots/mini.golden +++ b/test/snapshots/mini.golden @@ -25,7 +25,7 @@ == style opened grid=90x23 |0: 0-1 d,#1d2824, 2-89 #b2c3b8,#1d2824, |1: 0-1 d,#887455, 2-89 #becfc4,#314738, -|2: 0-1 d,#496656, 2-27 #b2c3b8,#2c2819, 28-40 #d3b0d9,#2c2819, 41-89 #b2c3b8,#2c2819, +|2: 0-1 d,#496656, 2-27 #b2c3b8,#2c2c0f, 28-40 #d3b0d9,#2c2c0f, 41-89 #b2c3b8,#2c2c0f, |3: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-89 #e5eee5,#0d1410, |4: 0-0 d,#608269, 1-89 d,#0d1410, |5: 0-1 d,#add38a, 2-27 #becfc4,#314738, 28-41 #dfbce5,#314738, 42-89 #becfc4,#314738, @@ -45,14 +45,14 @@ |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-1 d,#1d2824, 2-89 #67756e,#1d2824, +|22: 0-1 d,#1d2824, 2-89 #6f7d75,#1d2824, == 9p opened grid=90x23 cursor=7,6,block |0: Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit @0: 0-84 #b2c3b8,#1d2824,,tagline 85-89 d,#1d2824,,tagline |1: New Term Find Grep Joincol Delcol @1: 0-1 #ffffff,#887455,,tagline 2-34 #becfc4,#314738,,tagline 35-89 d,#314738,,tagline |2: /tmp/pardes-snap/mini/cwd/commands.txt Keep Save Term Collapse Follow Del -@2: 0-1 #ffffff,#496656,,tagline 2-27 #b2c3b8,#2c2819,,tagline 28-39 #d3b0d9,#2c2819,,tagline 40-74 #b2c3b8,#2c2819,,tagline 75-89 d,#2c2819,,tagline +@2: 0-1 #ffffff,#496656,,tagline 2-27 #b2c3b8,#2c2c0f,,tagline 28-39 #d3b0d9,#2c2c0f,,tagline 40-74 #b2c3b8,#2c2c0f,,tagline 75-89 d,#2c2c0f,,tagline |3: 1 @`Mini demo.zig` @3: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-22 #e5eee5,#0d1410,,body 23-89 d,#0d1410,,body |4: @@ -96,7 +96,7 @@ @21: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body |22: ✓ /tmp/pardes-snap/mini/cwd/commands.txt Mini 2 messages · SPC h m +22: 2="✓" 80="·" -@22: 0-1 d,#1d2824,,tagline 2-46 #67756e,#1d2824,,tagline 47-68 #b2c3b8,#1d2824,,tagline 69-88 #67756e,#1d2824,,tagline 89-89 d,#1d2824,,tagline +@22: 0-1 d,#1d2824,,tagline 2-46 #6f7d75,#1d2824,,tagline 47-68 #b2c3b8,#1d2824,,tagline 69-88 #6f7d75,#1d2824,,tagline 89-89 d,#1d2824,,tagline == snap resized grid=105x27 cursor=7,7 | Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit | New Term Find Grep Joincol Delcol @@ -131,7 +131,7 @@ |1: New Term Find Grep Joincol Delcol @1: 0-1 #ffffff,#887455,,tagline 2-34 #becfc4,#314738,,tagline 35-104 d,#314738,,tagline |2: /tmp/pardes-snap/mini/cwd/commands.txt Keep Save Term Collapse Follow Del -@2: 0-1 #ffffff,#496656,,tagline 2-27 #b2c3b8,#2c2819,,tagline 28-39 #d3b0d9,#2c2819,,tagline 40-74 #b2c3b8,#2c2819,,tagline 75-104 d,#2c2819,,tagline +@2: 0-1 #ffffff,#496656,,tagline 2-27 #b2c3b8,#2c2c0f,,tagline 28-39 #d3b0d9,#2c2c0f,,tagline 40-74 #b2c3b8,#2c2c0f,,tagline 75-104 d,#2c2c0f,,tagline |3: 1 @`Mini demo.zig` @3: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-22 #e5eee5,#0d1410,,body 23-104 d,#0d1410,,body |4: @@ -183,4 +183,4 @@ @25: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body |26: ✓ /tmp/pardes-snap/mini/cwd/commands.txt Mini 2 messages · SPC h m +26: 2="✓" 95="·" -@26: 0-1 d,#1d2824,,tagline 2-46 #67756e,#1d2824,,tagline 47-83 #b2c3b8,#1d2824,,tagline 84-103 #67756e,#1d2824,,tagline 104-104 d,#1d2824,,tagline +@26: 0-1 d,#1d2824,,tagline 2-46 #6f7d75,#1d2824,,tagline 47-83 #b2c3b8,#1d2824,,tagline 84-103 #6f7d75,#1d2824,,tagline 104-104 d,#1d2824,,tagline diff --git a/test/snapshots/multicursor.golden b/test/snapshots/multicursor.golden index cba867d2..267fba5e 100644 --- a/test/snapshots/multicursor.golden +++ b/test/snapshots/multicursor.golden @@ -47,8 +47,8 @@ |13: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410, |14: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410, |15: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410, -|16: 0-1 d,#496656, 2-34 #b2c3b8,#1d2824, 35-44 #d3b0d9,#1d2824, 45-74 #b2c3b8,#1d2824, 75-76 #b2c3b8,#add38a, 77-116 #becfc4,#2c2819, 117-122 #dfbce5,#2c2819, 123-149 #becfc4,#2c2819, -|17: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-76 #e5eee5,#2c2819, 77-149 #becfc4,#2c2819, +|16: 0-1 d,#496656, 2-34 #b2c3b8,#1d2824, 35-44 #d3b0d9,#1d2824, 45-74 #b2c3b8,#1d2824, 75-76 #b2c3b8,#add38a, 77-116 #becfc4,#2c2c0f, 117-122 #dfbce5,#2c2c0f, 123-149 #becfc4,#2c2c0f, +|17: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-76 #e5eee5,#2c2c0f, 77-149 #becfc4,#2c2c0f, |18: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-79 #e5eee5,#0d1410, 80-81 #59675c,#0d1410, 82-82 #3c614a,#f5f7ee, 83-149 #e5eee5,#0d1410, |19: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-79 d,#0d1410, 80-81 #59675c,#0d1410, 82-82 #3c614a,#f5f7ee, 83-149 #e5eee5,#0d1410, |20: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-76 d,#0d1410, 77-79 d,#0d1410,b 80-81 #616f64,#0d1410,b 82-149 #e5eee5,#0d1410, @@ -61,7 +61,7 @@ |27: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-78 d,#0d1410, 79-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410, |28: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-78 d,#0d1410, 79-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410, |29: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#152019, 76-78 d,#0d1410, 79-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410, -|30: 0-1 d,#1d2824, 2-149 #67756e,#1d2824, +|30: 0-1 d,#1d2824, 2-149 #6f7d75,#1d2824, == snap edited-at-three grid=150x31 cursor=84,19 |16: /tmp/pardes-snap/multicursor/cwd Term+bash Save Mode Filter Collapse Del */tmp/pardes-snap/multicursor/cwd/f.txt Save Term Collapse Follow Del |17: ls 1 >>line 1 diff --git a/test/snapshots/ninep.golden b/test/snapshots/ninep.golden index 26aa6a29..d62b01a4 100644 --- a/test/snapshots/ninep.golden +++ b/test/snapshots/ninep.golden @@ -17,8 +17,8 @@ == style opened grid=90x15 |0: 0-1 d,#1d2824, 2-89 #b2c3b8,#1d2824, |1: 0-1 d,#887455, 2-89 #becfc4,#314738, -|2: 0-1 d,#add38a, 2-28 #becfc4,#2c2819, 29-37 #dfbce5,#2c2819, 38-89 #becfc4,#2c2819, -|3: 0-1 d,#2c2819, 2-89 #becfc4,#2c2819, +|2: 0-1 d,#add38a, 2-28 #becfc4,#2c2c0f, 29-37 #dfbce5,#2c2c0f, 38-89 #becfc4,#2c2c0f, +|3: 0-1 d,#2c2c0f, 2-89 #becfc4,#2c2c0f, |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, @@ -36,9 +36,9 @@ |1: New Term Find Grep Joincol Delcol @1: 0-1 #ffffff,#887455,,tagline 2-34 #becfc4,#314738,,tagline 35-89 d,#314738,,tagline |2: /tmp/pardes-snap/ninep/cwd/demo.zig Keep Save Term Collapse Follow TreeContext Def Refs -@2: 0-1 #000000,#add38a,,tagline 2-28 #becfc4,#2c2819,,tagline 29-36 #dfbce5,#2c2819,,tagline 37-89 #becfc4,#2c2819,,tagline +@2: 0-1 #000000,#add38a,,tagline 2-28 #becfc4,#2c2c0f,,tagline 29-36 #dfbce5,#2c2c0f,,tagline 37-89 #becfc4,#2c2c0f,,tagline |3: Del -@3: 0-1 d,#2c2819,,tagline 2-4 #becfc4,#2c2819,,tagline 5-89 d,#2c2819,,tagline +@3: 0-1 d,#2c2c0f,,tagline 2-4 #becfc4,#2c2c0f,,tagline 5-89 d,#2c2c0f,,tagline |4: 1 const greeting = "café λ 界 é"; +4: 28="é" 30="λ" 32="界" 33="" 35="é" @4: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #616f64,#0d1410,b,body 7-23 #e5eee5,#0d1410,,body 24-36 #b8d88a,#0d1410,,body 37-37 #e5eee5,#0d1410,,body 38-89 d,#0d1410,,body diff --git a/test/snapshots/selregex.golden b/test/snapshots/selregex.golden index 0cf3abed..2212ef11 100644 --- a/test/snapshots/selregex.golden +++ b/test/snapshots/selregex.golden @@ -30,7 +30,7 @@ == style preview grid=160x25 |0: 0-1 d,#1d2824, 2-159 #b2c3b8,#1d2824, |1: 0-1 d,#887455, 2-159 #becfc4,#314738, -|2: 0-1 #000000,#add38a, 2-31 #becfc4,#2c2819, 32-37 #dfbce5,#2c2819, 38-42 #becfc4,#2c2819, 43-43 #add38a,#2c2819,b 44-44 #add38a,#2c2819, 45-49 #becfc4,#2c2819, 50-57 #becfc4,#2c2819,f 58-100 #becfc4,#2c2819, 101-144 #becfc4,#2c2819,f 145-159 #becfc4,#2c2819, +|2: 0-1 #000000,#add38a, 2-31 #becfc4,#2c2c0f, 32-37 #dfbce5,#2c2c0f, 38-42 #becfc4,#2c2c0f, 43-43 #bada9d,#2c2c0f,b 44-44 #bada9d,#2c2c0f, 45-51 #becfc4,#2c2c0f, 52-58 #79836f,#2c2c0f, 59-100 #becfc4,#2c2c0f, 101-159 #79836f,#2c2c0f, |3: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-5 #616f64,#0d1410,b 6-6 #add38a,#0d1410,b 7-10 #f5f7ee,#3c614a, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-18 #e5eee5,#0d1410, 19-19 #f8c082,#0d1410, 20-159 #e5eee5,#0d1410, |4: 0-0 d,#608269, 1-4 d,#0d1410, 5-5 #59675c,#0d1410, 6-6 #add38a,#0d1410, 7-10 #f5f7ee,#243a2d, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-18 #e5eee5,#0d1410, 19-19 #f8c082,#0d1410, 20-159 #e5eee5,#0d1410, |5: 0-0 d,#608269, 1-4 d,#0d1410, 5-5 #59675c,#0d1410, 6-6 #add38a,#0d1410, 7-10 #f5f7ee,#243a2d, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-20 #e5eee5,#0d1410, 21-21 #f8c082,#0d1410, 22-159 #e5eee5,#0d1410, @@ -59,7 +59,7 @@ |4: 2 const two = 2; |5: 3 const three = 3; == style three-selected grid=160x25 -|2: 0-1 d,#add38a, 2-47 #becfc4,#2c2819, 48-53 #dfbce5,#2c2819, 54-159 #becfc4,#2c2819, +|2: 0-1 d,#add38a, 2-47 #becfc4,#2c2c0f, 48-53 #dfbce5,#2c2c0f, 54-159 #becfc4,#2c2c0f, |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, @@ -69,7 +69,7 @@ |4: 2┃const two = 2; |5: 3┃const three = 3; == style narrowed grid=160x25 -|2: 0-1 #000000,#add38a, 2-47 #becfc4,#2c2819, 48-53 #dfbce5,#2c2819, 54-58 #becfc4,#2c2819, 59-59 #add38a,#2c2819,b 60-60 #add38a,#2c2819, 61-61 #becfc4,#2c2819, 62-69 #becfc4,#2c2819,f 70-108 #becfc4,#2c2819, 109-152 #becfc4,#2c2819,f 153-159 #becfc4,#2c2819, +|2: 0-1 #000000,#add38a, 2-47 #becfc4,#2c2c0f, 48-53 #dfbce5,#2c2c0f, 54-58 #becfc4,#2c2c0f, 59-59 #bada9d,#2c2c0f,b 60-60 #bada9d,#2c2c0f, 61-63 #becfc4,#2c2c0f, 64-70 #79836f,#2c2c0f, 71-108 #becfc4,#2c2c0f, 109-159 #79836f,#2c2c0f, |3: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-5 #616f64,#0d1410,b 6-6 #add38a,#0d1410,b 7-10 #e5eee5,#0d1410, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-18 #e5eee5,#0d1410, 19-19 #f8c082,#0d1410, 20-159 #e5eee5,#0d1410, |4: 0-0 d,#608269, 1-4 d,#0d1410, 5-5 #59675c,#0d1410, 6-6 #add38a,#0d1410, 7-10 #e5eee5,#0d1410, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-18 #e5eee5,#0d1410, 19-19 #f8c082,#0d1410, 20-159 #e5eee5,#0d1410, |5: 0-0 d,#608269, 1-4 d,#0d1410, 5-5 #59675c,#0d1410, 6-6 #add38a,#0d1410, 7-10 #e5eee5,#0d1410, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-20 #e5eee5,#0d1410, 21-21 #f8c082,#0d1410, 22-159 #e5eee5,#0d1410, @@ -79,7 +79,7 @@ |4: 2 const two = 2; |5: 3 const three = 3; == style esc-restores grid=160x25 -|2: 0-1 d,#add38a, 2-47 #becfc4,#2c2819, 48-53 #dfbce5,#2c2819, 54-159 #becfc4,#2c2819, +|2: 0-1 d,#add38a, 2-47 #becfc4,#2c2c0f, 48-53 #dfbce5,#2c2c0f, 54-159 #becfc4,#2c2c0f, |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, diff --git a/test/snapshots/stepgrain.golden b/test/snapshots/stepgrain.golden index deb91993..5f73bd1f 100644 --- a/test/snapshots/stepgrain.golden +++ b/test/snapshots/stepgrain.golden @@ -36,7 +36,7 @@ |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, +|3: 0-0 d,#5e4923, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-12 #e5eee5,#0d1410, 13-18 #e5eee5,#5e4923, 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, @@ -63,7 +63,7 @@ |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-1 d,#1d2824, 2-149 #67756e,#1d2824, +|30: 0-1 d,#1d2824, 2-149 #6f7d75,#1d2824, == snap step-row3 grid=150x31 cursor=13,12 |11: ^ +Search 3/3 Del |21: /tmp/pardes-snap/stepgrain/cwd/sub/b.txt Del diff --git a/test/snapshots/syntax.golden b/test/snapshots/syntax.golden index 58865398..e4413147 100644 --- a/test/snapshots/syntax.golden +++ b/test/snapshots/syntax.golden @@ -47,8 +47,8 @@ |13: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410, |14: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410, |15: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410, -|16: 0-1 d,#496656, 2-29 #b2c3b8,#1d2824, 30-39 #d3b0d9,#1d2824, 40-74 #b2c3b8,#1d2824, 75-76 #b2c3b8,#add38a, 77-111 #becfc4,#2c2819, 112-120 #dfbce5,#2c2819, 121-149 #becfc4,#2c2819, -|17: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-76 #e5eee5,#2c2819, 77-149 #becfc4,#2c2819, +|16: 0-1 d,#496656, 2-29 #b2c3b8,#1d2824, 30-39 #d3b0d9,#1d2824, 40-74 #b2c3b8,#1d2824, 75-76 #b2c3b8,#add38a, 77-111 #becfc4,#2c2c0f, 112-120 #dfbce5,#2c2c0f, 121-149 #becfc4,#2c2c0f, +|17: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-76 #e5eee5,#2c2c0f, 77-149 #becfc4,#2c2c0f, |18: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-76 #e5eee5,#0d1410, 77-79 #e5eee5,#0d1410,b 80-81 #616f64,#0d1410,b 82-93 #e5eee5,#0d1410, 94-100 #c9a7ed,#0d1410, 101-101 #e5eee5,#0d1410, 102-106 #b8d88a,#0d1410, 107-109 #e5eee5,#0d1410, 110-149 #b9f480,#0d1410, |19: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-79 d,#0d1410, 80-81 #59675c,#0d1410, 82-85 #e5eee5,#0d1410, 86-88 #c9a7ed,#0d1410, 89-149 #e5eee5,#0d1410, |20: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-79 d,#0d1410, 80-85 #59675c,#0d1410, 86-98 #e5eee5,#0d1410, 99-100 #f8c082,#0d1410, 101-149 #e5eee5,#0d1410, @@ -61,4 +61,4 @@ |27: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410, |28: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410, |29: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410, -|30: 0-1 d,#1d2824, 2-149 #67756e,#1d2824, +|30: 0-1 d,#1d2824, 2-149 #6f7d75,#1d2824, diff --git a/test/snapshots/tagpath.golden b/test/snapshots/tagpath.golden index a62212bb..02ead66b 100644 --- a/test/snapshots/tagpath.golden +++ b/test/snapshots/tagpath.golden @@ -36,7 +36,7 @@ == style sel-path grid=100x31 |0: 0-1 d,#1d2824, 2-99 #b2c3b8,#1d2824, |1: 0-1 d,#887455, 2-99 #becfc4,#314738, -|2: 0-1 d,#add38a, 2-35 #f5f7ee,#3c614a, 36-36 #f5f7ee,#2c2819, 37-99 #becfc4,#2c2819, +|2: 0-1 d,#add38a, 2-35 #f5f7ee,#3c614a, 36-36 #f5f7ee,#2c2c0f, 37-99 #becfc4,#2c2c0f, |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, diff --git a/test/snapshots/theme.golden b/test/snapshots/theme.golden index 0722d2e6..4654ea93 100644 --- a/test/snapshots/theme.golden +++ b/test/snapshots/theme.golden @@ -95,7 +95,7 @@ |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-1 d,#2c2630, 2-99 #796e7a,#2c2630, +|30: 0-1 d,#2c2630, 2-99 #847885,#2c2630, == snap ink grid=100x31 cursor=4,6 |30: ✓ @p1 NextColor ×2 1 message · SPC h m == style ink grid=100x31 @@ -129,7 +129,7 @@ |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-1 d,#15212c, 2-99 #75828e,#15212c, +|30: 0-1 d,#15212c, 2-99 #697784,#15212c, == snap paper grid=100x31 cursor=4,6 |30: ✓ @p1 NextColor ×3 1 message · SPC h m == style paper grid=100x31 @@ -163,7 +163,7 @@ |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-1 d,#e8eae3, 2-99 #9da69e,#e8eae3, +|30: 0-1 d,#e8eae3, 2-99 #6f7d75,#e8eae3, == snap daybreak grid=100x31 cursor=4,6 |30: ✓ @p1 NextColor ×4 1 message · SPC h m == style daybreak grid=100x31 @@ -197,7 +197,7 @@ |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-1 d,#edf2f7, 2-99 #8b9caa,#edf2f7, +|30: 0-1 d,#edf2f7, 2-99 #6d8294,#edf2f7, == snap atelier grid=100x31 cursor=4,6 |30: ✓ @p1 NextColor ×5 1 message · SPC h m == style atelier grid=100x31 @@ -231,7 +231,7 @@ |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-1 d,#e4f0ed, 2-99 #90a8a1,#e4f0ed, +|30: 0-1 d,#e4f0ed, 2-99 #66837a,#e4f0ed, == snap forge grid=100x31 cursor=4,6 |30: ✓ @p1 NextColor ×6 1 message · SPC h m == style forge grid=100x31 @@ -265,7 +265,7 @@ |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-1 d,#22252b, 2-99 #73777e,#22252b, +|30: 0-1 d,#22252b, 2-99 #767a82,#22252b, == snap lagoon grid=100x31 cursor=4,6 |30: ✓ @p1 NextColor ×7 1 message · SPC h m == style lagoon grid=100x31 @@ -299,7 +299,7 @@ |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-1 d,#29443f, 2-99 #728d85,#29443f, +|30: 0-1 d,#29443f, 2-99 #809c93,#29443f, == snap solarium grid=100x31 cursor=4,6 |30: ✓ @p1 NextColor ×8 1 message · SPC h m == style solarium grid=100x31 @@ -333,7 +333,7 @@ |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-1 d,#123f43, 2-99 #6c8980,#123f43, +|30: 0-1 d,#123f43, 2-99 #7b9489,#123f43, == snap spectrum grid=100x31 cursor=4,6 |30: ✓ @p1 NextColor ×9 1 message · SPC h m == style spectrum grid=100x31 @@ -367,7 +367,7 @@ |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-1 d,#3b3830, 2-99 #8c8875,#3b3830, +|30: 0-1 d,#3b3830, 2-99 #918d7a,#3b3830, == snap harvest grid=100x31 cursor=4,6 |30: ✓ @p1 NextColor ×10 1 message · SPC h m == style harvest grid=100x31 @@ -401,7 +401,7 @@ |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-1 d,#343b2e, 2-99 #848973,#343b2e, +|30: 0-1 d,#343b2e, 2-99 #8b9079,#343b2e, == snap clay grid=100x31 cursor=4,6 |30: ✓ @p1 NextColor ×11 1 message · SPC h m == style clay grid=100x31 @@ -435,7 +435,7 @@ |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-1 d,#343f36, 2-99 #858a76,#343f36, +|30: 0-1 d,#343f36, 2-99 #90947e,#343f36, == snap forge-black grid=100x31 cursor=4,6 |30: ✓ @p1 NextColor ×12 1 message · SPC h m == style forge-black grid=100x31 @@ -469,7 +469,7 @@ |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-1 d,#22252b, 2-99 #73777e,#22252b, +|30: 0-1 d,#22252b, 2-99 #767a82,#22252b, == snap forge-soft grid=100x31 cursor=4,6 |30: ✓ @p1 NextColor ×13 1 message · SPC h m == style forge-soft grid=100x31 @@ -503,7 +503,7 @@ |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-1 d,#2a2d34, 2-99 #777b83,#2a2d34, +|30: 0-1 d,#2a2d34, 2-99 #7e818a,#2a2d34, == snap orchard-black grid=100x31 cursor=4,6 |30: ✓ @p1 NextColor ×14 1 message · SPC h m == style orchard-black grid=100x31 @@ -537,7 +537,7 @@ |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-1 d,#1d2824, 2-99 #67756e,#1d2824, +|30: 0-1 d,#1d2824, 2-99 #6f7d75,#1d2824, == snap acme grid=100x31 cursor=4,6 |30: ✓ @p1 NextColor ×15 1 message · SPC h m == style acme grid=100x31 @@ -571,7 +571,7 @@ |27: 0-99 d,#ffffea, |28: 0-99 d,#ffffea, |29: 0-99 d,#ffffea, -|30: 0-1 d,#eaffff, 2-99 #757f7f,#eaffff, +|30: 0-1 d,#eaffff, 2-99 #7a8686,#eaffff, == snap lapis grid=100x31 cursor=4,6 |30: ✓ @p1 NextColor ×16 1 message · SPC h m == style lapis grid=100x31 @@ -605,7 +605,7 @@ |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-1 d,#0f1a4a, 2-99 #546091,#0f1a4a, +|30: 0-1 d,#0f1a4a, 2-99 #6472a5,#0f1a4a, == snap dark-plus grid=100x31 cursor=4,6 |30: ✓ @p1 NextColor ×17 1 message · SPC h m == style dark-plus grid=100x31 @@ -639,7 +639,7 @@ |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-1 d,#007acc, 2-99 #7fbce5,#007acc, +|30: 0-1 d,#007acc, 2-99 #d3e5f7,#007acc, == snap solarized-dark grid=100x31 cursor=4,6 |30: ✓ @p1 NextColor ×18 1 message · SPC h m == style solarized-dark grid=100x31 @@ -673,4 +673,4 @@ |27: 0-0 d,#839496, 1-49 d,#002b36, 50-50 d,#839496, 51-99 d,#002b36, |28: 0-0 d,#839496, 1-49 d,#002b36, 50-50 d,#839496, 51-99 d,#002b36, |29: 0-0 d,#839496, 1-49 d,#002b36, 50-50 d,#839496, 51-99 d,#002b36, -|30: 0-1 d,#657b83, 2-99 #334247,#657b83, +|30: 0-1 d,#657b83, 2-99 #162528,#657b83, diff --git a/test/snapshots/themesel.golden b/test/snapshots/themesel.golden index 1cf6f0a5..b975c35b 100644 --- a/test/snapshots/themesel.golden +++ b/test/snapshots/themesel.golden @@ -79,7 +79,7 @@ |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-1 d,#1d2824, 2-99 #67756e,#1d2824, +|30: 0-1 d,#1d2824, 2-99 #6f7d75,#1d2824, == snap step-dusk grid=100x31 cursor=7,19 |30: ✓ /tmp/pardes-snap/themesel/cwd/+Themes Theme 5 messages · SPC h m == style step-dusk grid=100x31 @@ -113,7 +113,7 @@ |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-1 d,#2c2630, 2-99 #796e7a,#2c2630, +|30: 0-1 d,#2c2630, 2-99 #847885,#2c2630, == snap step-atelier grid=100x31 cursor=7,23 |30: ✓ /tmp/pardes-snap/themesel/cwd/+Themes Theme 7 messages · SPC h m == style step-atelier grid=100x31 @@ -147,7 +147,7 @@ |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-1 d,#e4f0ed, 2-99 #90a8a1,#e4f0ed, +|30: 0-1 d,#e4f0ed, 2-99 #66837a,#e4f0ed, == snap step-forge grid=100x31 cursor=7,24 |30: ✓ /tmp/pardes-snap/themesel/cwd/+Themes Theme 9 messages · SPC h m == style step-forge grid=100x31 @@ -181,7 +181,7 @@ |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-1 d,#22252b, 2-99 #73777e,#22252b, +|30: 0-1 d,#22252b, 2-99 #767a82,#22252b, == snap step-lagoon grid=100x31 cursor=7,25 |30: ✓ /tmp/pardes-snap/themesel/cwd/+Themes Theme 11 messages · SPC h m == style step-lagoon grid=100x31 @@ -215,7 +215,7 @@ |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-1 d,#29443f, 2-99 #728d85,#29443f, +|30: 0-1 d,#29443f, 2-99 #809c93,#29443f, == snap step-solarium grid=100x31 cursor=7,26 |30: ✓ /tmp/pardes-snap/themesel/cwd/+Themes Theme 13 messages · SPC h m == style step-solarium grid=100x31 @@ -249,7 +249,7 @@ |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-1 d,#123f43, 2-99 #6c8980,#123f43, +|30: 0-1 d,#123f43, 2-99 #7b9489,#123f43, == snap step-spectrum grid=100x31 cursor=7,26 |17: 2 Theme orchard |18: 3 Theme dusk @@ -296,7 +296,7 @@ |27: 0-0 d,#211d23, 1-3 d,#100e11, 4-6 #68616b,#100e11, 7-99 #fcfcfa,#100e11, |28: 0-0 d,#211d23, 1-3 d,#100e11, 4-6 #68616b,#100e11, 7-99 #fcfcfa,#100e11, |29: 0-0 d,#211d23, 1-3 d,#100e11, 4-6 #68616b,#100e11, 7-99 #fcfcfa,#100e11, -|30: 0-1 d,#3b3830, 2-99 #8c8875,#3b3830, +|30: 0-1 d,#3b3830, 2-99 #918d7a,#3b3830, == snap step-harvest grid=100x31 cursor=7,26 |17: 3 Theme dusk |18: 4 Theme ink @@ -343,7 +343,7 @@ |27: 0-0 d,#201d17, 1-3 d,#100e0b, 4-6 #6a6456,#100e0b, 7-99 #f3f2cc,#100e0b, |28: 0-0 d,#201d17, 1-3 d,#100e0b, 4-6 #6a6456,#100e0b, 7-99 #f3f2cc,#100e0b, |29: 0-0 d,#201d17, 1-3 d,#100e0b, 4-6 #6a6456,#100e0b, 7-99 #f3f2cc,#100e0b, -|30: 0-1 d,#343b2e, 2-99 #848973,#343b2e, +|30: 0-1 d,#343b2e, 2-99 #8b9079,#343b2e, == snap step-clay grid=100x31 cursor=7,26 |17: 4 Theme ink |18: 5 Theme paper @@ -390,7 +390,7 @@ |27: 0-0 d,#222119, 1-3 d,#10100e, 4-6 #696455,#10100e, 7-99 #f3e5bc,#10100e, |28: 0-0 d,#222119, 1-3 d,#10100e, 4-6 #696455,#10100e, 7-99 #f3e5bc,#10100e, |29: 0-0 d,#222119, 1-3 d,#10100e, 4-6 #696455,#10100e, 7-99 #f3e5bc,#10100e, -|30: 0-1 d,#343f36, 2-99 #858a76,#343f36, +|30: 0-1 d,#343f36, 2-99 #90947e,#343f36, == snap step-forge-black grid=100x31 cursor=7,26 |17: 5 Theme paper |18: 6 Theme daybreak @@ -437,7 +437,7 @@ |27: 0-0 d,#14161a, 1-3 d,#000000, 4-6 #62656c,#000000, 7-99 #f6f6f6,#000000, |28: 0-0 d,#14161a, 1-3 d,#000000, 4-6 #62656c,#000000, 7-99 #f6f6f6,#000000, |29: 0-0 d,#14161a, 1-3 d,#000000, 4-6 #62656c,#000000, 7-99 #f6f6f6,#000000, -|30: 0-1 d,#22252b, 2-99 #73777e,#22252b, +|30: 0-1 d,#22252b, 2-99 #767a82,#22252b, == snap step-forge-soft grid=100x31 cursor=7,26 |17: 6 Theme daybreak |18: 7 Theme atelier @@ -484,7 +484,7 @@ |27: 0-0 d,#3d4047, 1-3 d,#35383e, 4-6 #868991,#35383e, 7-99 #bfc3cc,#35383e, |28: 0-0 d,#3d4047, 1-3 d,#35383e, 4-6 #868991,#35383e, 7-99 #bfc3cc,#35383e, |29: 0-0 d,#3d4047, 1-3 d,#35383e, 4-6 #868991,#35383e, 7-99 #bfc3cc,#35383e, -|30: 0-1 d,#2a2d34, 2-99 #777b83,#2a2d34, +|30: 0-1 d,#2a2d34, 2-99 #7e818a,#2a2d34, == snap step-orchard-black grid=100x31 cursor=7,26 |17: 7 Theme atelier |18: 8 Theme forge @@ -531,7 +531,7 @@ |27: 0-0 d,#111813, 1-3 d,#000000, 4-6 #59675c,#000000, 7-99 #f2f8ef,#000000, |28: 0-0 d,#111813, 1-3 d,#000000, 4-6 #59675c,#000000, 7-99 #f2f8ef,#000000, |29: 0-0 d,#111813, 1-3 d,#000000, 4-99 #59675c,#000000, -|30: 0-1 d,#1d2824, 2-99 #67756e,#1d2824, +|30: 0-1 d,#1d2824, 2-99 #6f7d75,#1d2824, == snap step-acme grid=100x31 cursor=7,26 |17: 8 Theme forge |18: 9 Theme lagoon @@ -578,7 +578,7 @@ |27: 0-0 d,#99994c, 1-3 d,#ffffea, 4-6 #999980,#ffffea, 7-99 #000000,#ffffea, |28: 0-0 d,#99994c, 1-3 d,#ffffea, 4-99 #999980,#ffffea, |29: 0-0 d,#99994c, 1-3 d,#ffffea, 4-6 #999980,#ffffea, 7-99 #000000,#ffffea, -|30: 0-1 d,#eaffff, 2-99 #757f7f,#eaffff, +|30: 0-1 d,#eaffff, 2-99 #7a8686,#eaffff, == snap step-lapis grid=100x31 cursor=7,26 |17: 9 Theme lagoon |18: 10 Theme solarium @@ -625,7 +625,7 @@ |27: 0-0 d,#050a24, 1-3 d,#0a1030, 4-99 #5a6aa8,#0a1030, |28: 0-0 d,#050a24, 1-3 d,#0a1030, 4-6 #5a6aa8,#0a1030, 7-99 #eee6d2,#0a1030, |29: 0-0 d,#050a24, 1-3 d,#0a1030, 4-6 #5a6aa8,#0a1030, 7-99 #eee6d2,#0a1030, -|30: 0-1 d,#0f1a4a, 2-99 #546091,#0f1a4a, +|30: 0-1 d,#0f1a4a, 2-99 #6472a5,#0f1a4a, == snap step-dark-plus grid=100x31 cursor=7,26 |17: 12 Theme harvest |18: 13 Theme clay @@ -672,7 +672,7 @@ |27: 0-3 d,#1e1e1e, 4-99 #858585,#1e1e1e, |28: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e, |29: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 7-99 #d4d4d4,#1e1e1e, -|30: 0-1 d,#007acc, 2-99 #7fbce5,#007acc, +|30: 0-1 d,#007acc, 2-99 #d3e5f7,#007acc, == snap step-solarized-dark grid=100x31 cursor=7,26 |17: 15 Theme forge_soft |18: 16 Theme orchard_black @@ -719,7 +719,7 @@ |27: 0-0 d,#eee8d5, 1-3 d,#002b36, 4-6 #586e75,#002b36, 7-99 #839496,#002b36, |28: 0-0 d,#eee8d5, 1-3 d,#002b36, 4-99 #586e75,#002b36, |29: 0-0 d,#eee8d5, 1-3 d,#002b36, 4-6 #586e75,#002b36, 7-99 #839496,#002b36, -|30: 0-1 d,#657b83, 2-99 #334247,#657b83, +|30: 0-1 d,#657b83, 2-99 #162528,#657b83, == snap step-back grid=100x31 cursor=7,23 |30: ✓ /tmp/pardes-snap/themesel/cwd/+Themes Theme 35 messages · SPC h m == style step-back grid=100x31 @@ -753,7 +753,7 @@ |27: 0-3 d,#1e1e1e, 4-6 #858585,#1e1e1e, 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-1 d,#007acc, 2-99 #7fbce5,#007acc, +|30: 0-1 d,#007acc, 2-99 #d3e5f7,#007acc, == snap tail grid=100x31 cursor=7,28 |17: 305 Theme wolf_alabaster_dark_bg |18: 306 Theme wolf_alabaster_dark_mono diff --git a/test/snapshots/windowops.golden b/test/snapshots/windowops.golden index 3b9af25b..ed43ef7f 100644 --- a/test/snapshots/windowops.golden +++ b/test/snapshots/windowops.golden @@ -94,7 +94,7 @@ |27: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410, |28: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410, |29: 0-0 d,#608269, 1-49 d,#0d1410, 50-50 d,#608269, 51-99 d,#0d1410, -|30: 0-1 d,#1d2824, 2-99 #67756e,#1d2824, +|30: 0-1 d,#1d2824, 2-99 #6f7d75,#1d2824, == snap debug-off grid=100x31 cursor=54,6 |1: New Term Find Grep Joincol Delcol New Term Find Grep Joincol Delcol |2: /tmp/pardes-snap/windowops/cwd Term+bash Save Mo /tmp/pardes-snap/windowops/cwd Term+bash Save Mo |
