diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-05 22:40:49 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-05 23:58:31 -0300 |
| commit | dfcc040ac979b695dc2e68b9d866c2769ba6d928 (patch) | |
| tree | cd88c998b46f758a7c74e3d800312d968d6303ac /test | |
| parent | f930d53c58187381b2f0df6892546ac1c217c9db (diff) | |
| download | pardes-dfcc040ac979b695dc2e68b9d866c2769ba6d928.tar.gz pardes-dfcc040ac979b695dc2e68b9d866c2769ba6d928.zip | |
settings #2, five presentation variants go, each now the style it had by default: Colors (text panes and terminals coloured, with SPC t c), TreeContextTagStyle (TreeContext rows in the tag's style), FocusTint (the focused tags tinted), SyntaxBold (keywords not bold) and Ligatures (the window shapes them; gui.zig's syncLigatures and the words' ligatures flag go, and Capabilities.ligatures); the reads deleted are in File.zig, body_layer.zig, Tables.zig, exec.zig's applySettingBuiltin, Core.zig (SessionView.layered left at its default), draw.zig, surface.zig's comment and gui.zig; deleted tests: "settings: Colors off draws a source plain, and on again colours its keywords", "Ligatures is a setting only in the shell that shapes text" and "Ligatures off draws a ligature as its cells' own glyphs, and on shapes it again", and the toggled half of TreeContext's Core test; rewritten through what stays: SyntaxBold's every-row test as keywords coloured in every row, the tag-click tests on JumpTrail, the tag-name tint tests with the focused tag's ink plain, Core's tab test by the keyword's ink; golden changes, each the cut's: syntax, theme, mini and ninep lose their Colors toggles and frames (the message row after them names the builtin before, Mini), and leader, ttyhelp and builtins' Help listing is four columns narrower, TreeContextTagStyle having been its longest word; perf.zig's harness id moves again; the window scenes from 09 on take new gui-goldens lines, the scene no longer writing FocusTint on and its word gone from the message row (the base window build running the same scenes gives the same frames); gates on tui: core-test 965/965, behaviour-test 242/242, unit-test 1482/1483, pane-test 171/172, snap all 105 scripts ok, process-test 0 of 37 failed; gui unit-test 1526/1527, gui-golden 0 of 1 failed
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'test')
| -rw-r--r-- | test/behaviour/settings.zig | 38 | ||||
| -rw-r--r-- | test/behaviour/tags.zig | 27 | ||||
| -rw-r--r-- | test/column_drag.zig | 39 | ||||
| -rw-r--r-- | test/gui-goldens.txt | 14 | ||||
| -rw-r--r-- | test/monkey9p.zig | 4 | ||||
| -rw-r--r-- | test/output.zig | 24 | ||||
| -rw-r--r-- | test/panes.zig | 28 | ||||
| -rw-r--r-- | test/perf-baseline-gui-debug.json | 2 | ||||
| -rw-r--r-- | test/perf-baseline-tui-debug.json | 2 | ||||
| -rw-r--r-- | test/perf.zig | 1 | ||||
| -rw-r--r-- | test/process/window.zig | 1 | ||||
| -rw-r--r-- | test/snapshots/builtins.golden | 8 | ||||
| -rw-r--r-- | test/snapshots/builtins.snap | 8 | ||||
| -rw-r--r-- | test/snapshots/leader.golden | 12 | ||||
| -rw-r--r-- | test/snapshots/mini.golden | 33 | ||||
| -rw-r--r-- | test/snapshots/mini.snap | 7 | ||||
| -rw-r--r-- | test/snapshots/ninep.golden | 54 | ||||
| -rw-r--r-- | test/snapshots/ninep.snap | 13 | ||||
| -rw-r--r-- | test/snapshots/syntax.golden | 8 | ||||
| -rw-r--r-- | test/snapshots/syntax.snap | 12 | ||||
| -rw-r--r-- | test/snapshots/theme.golden | 5 | ||||
| -rw-r--r-- | test/snapshots/theme.snap | 11 | ||||
| -rw-r--r-- | test/snapshots/ttyhelp.golden | 12 |
23 files changed, 112 insertions, 251 deletions
diff --git a/test/behaviour/settings.zig b/test/behaviour/settings.zig index 80573e2f..fdb37fa3 100644 --- a/test/behaviour/settings.zig +++ b/test/behaviour/settings.zig @@ -207,41 +207,15 @@ fn keywordsIn(s: *Session, want: []const u8) !usize { return seen; } -test "settings: Colors off draws a source plain, and on again colours its keywords, the layout as it was, an edit made while off included" { - if (!syntax) return error.SkipZigTest; - for ([_]bool{ false, true }) |edit_while_off| { - var s = try Session.initFile(std.testing.allocator, "pub fn first() void { if (true) {} }\n"); - defer s.deinit(); - const n = try s.focused(); - try s.write(s.at("/pane/{d}/name", .{n}), "/colors.zig\n"); - var ident: []const u8 = "first"; - if (edit_while_off) { - try std.testing.expect(!std.mem.eql(u8, try styleOf(&s, " fn ", 1), try styleOf(&s, "first", 0))); - try s.write("/ctl", "Colors off\n"); - try s.replace(s.at("/pane/{d}/body", .{n}), "pub fn edited() void { if (false) {} }\n"); - ident = "edited"; - } else try s.write("/ctl", "Colors off\n"); - try std.testing.expectEqual(@as(usize, 2), try keywordsIn(&s, try styleOf(&s, ident, 0))); - const layout = try s.read("/layout"); - try s.write("/ctl", "Colors on\n"); - try s.expect("/layout", layout); - const kw = try styleOf(&s, " fn ", 1); - try std.testing.expect(!std.mem.eql(u8, kw, try styleOf(&s, ident, 0))); - try std.testing.expect(!has(kw, "\"bold\":true")); - try std.testing.expectEqual(@as(usize, 2), try keywordsIn(&s, kw)); - } -} - -test "settings: SyntaxBold keywords stay coloured and bold in every row a pane grows into" { +test "settings: keywords stay coloured in every row a pane grows into" { if (!syntax) return error.SkipZigTest; var s = try Session.initFile(std.testing.allocator, std.mem.asBytes(&@as([100][33]u8, @splat("pub fn f() void { if (true) {} }\n".*)))); defer s.deinit(); try s.write(s.at("/pane/{d}/name", .{try s.focused()}), "/resize.zig\n"); - try s.write("/ctl", "SyntaxBold on\n"); s.detach(); try s.write("/ctl", "size 80 8\n"); const kw = try styleOf(&s, " fn ", 1); - try std.testing.expect(has(kw, "\"bold\":true")); + try std.testing.expect(!std.mem.eql(u8, kw, try styleOf(&s, "f()", 0))); for ([_]usize{ 50, 12, 70 }) |rows| { try s.write("/ctl", s.at("size 80 {d}\n", .{rows})); try std.testing.expect(try keywordsIn(&s, kw) >= 2 * (rows - 4)); @@ -272,9 +246,9 @@ test "settings: every on/off setting the root ctl reads flips when its word is w flipped += 1; } // A floor, so a ctl that lists none fails: a bare session's on/off - // words, Colors to PagerColor, are ten. - try std.testing.expect(flipped >= 10); - for ([_][]const u8{ "Colors off", "Wrap off", "Debug on" }) |want| + // words, Wrap, Debug, Verbose and JumpTrail at least, are four. + try std.testing.expect(flipped >= 4); + for ([_][]const u8{ "Wrap off", "Debug on" }) |want| try std.testing.expectEqualStrings(want, try setting(&s, want[0..std.mem.indexOfScalar(u8, want, ' ').?])); try s.write("/ctl", "Theme acme\n"); try s.write("/ctl", "Shell /bin/sh\n"); @@ -289,7 +263,7 @@ fn look(s: *Session, style: []const u8) !struct { bool, []const u8 } { return .{ json.object.get("bold").?.bool, try std.json.Stringify.valueAlloc(a, json.object.get("fg").?, .{}) }; } -test "settings: a keyword is coloured apart from the text beside it, and not bold (SyntaxBold is off by default), at a long file's end" { +test "settings: a keyword is coloured apart from the text beside it, and not bold, at a long file's end" { var s = try Session.initFile(std.testing.allocator, "initial\n"); defer s.deinit(); const n = try s.focused(); diff --git a/test/behaviour/tags.zig b/test/behaviour/tags.zig index 4477e73e..8d04f8ad 100644 --- a/test/behaviour/tags.zig +++ b/test/behaviour/tags.zig @@ -250,15 +250,15 @@ test "tags: a long pane tag wraps onto rows, and a click on a wrapped row maps t try s.write("/ctl", "size 50 12\n"); const n = try s.focused(); try s.write(s.at("/pane/{d}/name", .{n}), "/an/especially/deep/project/path/with/a/long/component/filename.zig"); - try s.write(s.at("/pane/{d}/tag", .{n}), " SyntaxBold"); + try s.write(s.at("/pane/{d}/tag", .{n}), " JumpTrail"); const before = try tag(&s, n); try s.keys(":A"); try std.testing.expect((try s.cursor()).?[0] < 50); - // SyntaxBold is on a row of its own, below the path's. - try std.testing.expect((try s.where("SyntaxBold"))[1] > (try s.where("/an/"))[1]); + // JumpTrail is on a row of its own, below the path's. + try std.testing.expect((try s.where("JumpTrail"))[1] > (try s.where("/an/"))[1]); // Its last character, which a wrapped row's offset not mapped back misses. - try s.click("SyntaxBold", "SyntaxBol".len, 2); - try std.testing.expect(std.mem.indexOf(u8, try s.read("/ctl"), "SyntaxBold on\n") != null); + try s.click("JumpTrail", "JumpTrai".len, 2); + try std.testing.expect(std.mem.indexOf(u8, try s.read("/ctl"), "JumpTrail on\n") != null); try std.testing.expectEqualStrings(before, try tag(&s, n)); } @@ -268,20 +268,20 @@ test "tags: a word the tag's wrapping breaks across rows is still one word to a s.detach(); try s.write("/ctl", "size 50 12\n"); const n = try s.focused(); - // Lengthen the path until the wrap splits the word after "Synt" (a + // Lengthen the path until the wrap splits the word after "Jump" (a // rename resets the tag's text, so it is written again each time). var pad: usize = 1; while (pad < 80) : (pad += 1) { try s.write(s.at("/pane/{d}/name", .{n}), s.at("/{s}/f.zig", .{(&@as([80]u8, @splat('a')))[0..pad]})); - try s.write(s.at("/pane/{d}/tag", .{n}), " SyntaxBold"); + try s.write(s.at("/pane/{d}/tag", .{n}), " JumpTrail"); var rows = std.mem.splitScalar(u8, try s.screen(), '\n'); const split = while (rows.next()) |row| { - if (std.mem.endsWith(u8, std.mem.trimEnd(u8, row, " "), "Synt")) break true; + if (std.mem.endsWith(u8, std.mem.trimEnd(u8, row, " "), "Jump")) break true; } else false; if (split) break; } else return error.NoSplit; - try s.click("Synt", 1, 2); - try std.testing.expect(std.mem.indexOf(u8, try s.read("/ctl"), "SyntaxBold on\n") != null); + try s.click("Jump", 1, 2); + try std.testing.expect(std.mem.indexOf(u8, try s.read("/ctl"), "JumpTrail on\n") != null); } /// A click on the tag's path, at its last character: a name drafted @@ -296,18 +296,18 @@ test "tags: a name drafted in the tag commits with Enter, cancels with two Escs, defer s.deinit(); const n = try s.focused(); const name = s.at("/pane/{d}/name", .{n}); - try s.write(s.at("/pane/{d}/tag", .{n}), " SyntaxBold"); + try s.write(s.at("/pane/{d}/tag", .{n}), " JumpTrail"); for ([_]bool{ false, true }) |commit| { const path = std.mem.trimEnd(u8, try s.read(name), "\n"); try clickPathEnd(&s, path); try s.keys("\x15/new name.zig"); try s.expect(name, s.at("{s}\n", .{path})); - _ = try s.where("/new name.zig Save Term Collapse Del SyntaxBold"); + _ = try s.where("/new name.zig Save Term Collapse Del JumpTrail"); try s.expect(s.at("/pane/{d}/body", .{n}), "original body\n"); // Esc keeps the draft pending; a second drops it. try s.keys(if (commit) "\n" else "\x1b\x1b"); try s.expect(name, if (commit) "/new name.zig\n" else "/test.txt\n"); - try std.testing.expectEqualStrings(s.at("{s} Save Term Collapse Del SyntaxBold", .{if (commit) "/new name.zig" else "/test.txt"}), try tag(&s, n)); + try std.testing.expectEqualStrings(s.at("{s} Save Term Collapse Del JumpTrail", .{if (commit) "/new name.zig" else "/test.txt"}), try tag(&s, n)); // The keyboard is the body's again. try std.testing.expect((try s.cursor()).?[1] != (try s.where("Save Term"))[1]); } @@ -464,7 +464,6 @@ test "tags: a pane tag's file name is tinted, its directory, dirty marker and wo var s = try Session.initFile(std.testing.allocator, "body\n"); defer s.deinit(); const n = try s.focused(); - try s.write("/ctl", "FocusTint off\n"); try s.write(s.at("/pane/{d}/name", .{n}), "/project/界file.zig\n"); try s.write(s.at("/pane/{d}/dirty", .{n}), "1"); const x0, const y = try s.where("/project/"); diff --git a/test/column_drag.zig b/test/column_drag.zig index 8c71ba74..013d536f 100644 --- a/test/column_drag.zig +++ b/test/column_drag.zig @@ -175,29 +175,26 @@ test "column grips stay blank, and muted across focus and hover until grabbed" { try std.testing.expect(layout.splitColumn(p, p.active, p.active, false)); var frame = std.heap.ArenaAllocator.init(p.gpa); defer frame.deinit(); - for ([_]bool{ false, true }) |focus_tint| { - p.settings.focus_tint = focus_tint; - for (0..p.ncol) |active_column| { - p.active = p.cols[active_column].panes[0]; - const x = p.col_x[active_column]; - p.update(.{ .mouse = .{ .button = .none, .kind = .motion, .col = x, .row = pardes.TOPBAR_H } }); - for ([_]bool{ false, true }) |dragging| { - if (dragging) mouse(p, .press, x); - _ = frame.reset(.retain_capacity); - const surface = try p.render(frame.allocator()); - const muted: pardes.Color = .{ .rgb = p.chromeTheme().column_box_dim }; - const lit: pardes.Color = .{ .rgb = p.chromeTheme().column_box }; - for (0..p.ncol) |column| { - for (0..config.GUTTER) |offset| { - const cell = surface.at(p.col_x[column] + @as(u16, @intCast(offset)), pardes.TOPBAR_H); - try std.testing.expectEqualStrings(" ", cell.grapheme()); - try std.testing.expectEqual(if (dragging and column == active_column) lit else muted, cell.style.bg); - try std.testing.expectEqual(pardes.FontRole.tagline, cell.style.font_role); - } - try std.testing.expectEqual(p.col_x[column] + pardes.TAG_TEXT_INSET, (try tagLayer(p, column)).viewport.x); + for (0..p.ncol) |active_column| { + p.active = p.cols[active_column].panes[0]; + const x = p.col_x[active_column]; + p.update(.{ .mouse = .{ .button = .none, .kind = .motion, .col = x, .row = pardes.TOPBAR_H } }); + for ([_]bool{ false, true }) |dragging| { + if (dragging) mouse(p, .press, x); + _ = frame.reset(.retain_capacity); + const surface = try p.render(frame.allocator()); + const muted: pardes.Color = .{ .rgb = p.chromeTheme().column_box_dim }; + const lit: pardes.Color = .{ .rgb = p.chromeTheme().column_box }; + for (0..p.ncol) |column| { + for (0..config.GUTTER) |offset| { + const cell = surface.at(p.col_x[column] + @as(u16, @intCast(offset)), pardes.TOPBAR_H); + try std.testing.expectEqualStrings(" ", cell.grapheme()); + try std.testing.expectEqual(if (dragging and column == active_column) lit else muted, cell.style.bg); + try std.testing.expectEqual(pardes.FontRole.tagline, cell.style.font_role); } - if (dragging) mouse(p, .release, x); + try std.testing.expectEqual(p.col_x[column] + pardes.TAG_TEXT_INSET, (try tagLayer(p, column)).viewport.x); } + if (dragging) mouse(p, .release, x); } } } diff --git a/test/gui-goldens.txt b/test/gui-goldens.txt index e9882515..253df55c 100644 --- a/test/gui-goldens.txt +++ b/test/gui-goldens.txt @@ -6,10 +6,10 @@ 06-tag-focus-selection 248bcdad20febb363e35a53bd8b14d15289b2f56e7edc7d087ee86668236b670 07-prompt-notice 4b1511f42b1cc06d3fe8b07e44a296a6c3fb2a37788cf0e9b5b1c7837a00993b 08-wide-glyph-edges c200d9fd0254af6b39a6387a074b1e29efeb3bd4114b373f83650a8bae8900ad -09-collapsed-focus-tint 4ac6f25f742ad68ea00a5033fd6c6c785b3426a0045499f046f99db9310c5721 -12-multiline-tag 02af5e9e367063f3e15e13bfe69c4fbce2ebf000ca392bd814c348cb7a773e7c -13-image 5b50a99f020ab5d61b5b481cda9e77496f1c03700df5d957f5280ec873e9cfa3 -14-theme-ink 41932127a60a7347c08f84e32bba064c862aa06fa46e2ca9e117a1e37177f534 -15-theme-acme-light 7a0336e9c8429ac0d0fb04e6357e2ee20a69cf57b1c484680222912aeb1877f2 -16-debug 8c0d51dddb4badb908a3975952b3a960bc1f1132ffa94e874be7172d36d997d4 -17-terminal 9acf2cfaefd7e48a3c32a03254307293297c0e5ab9829475f8a94b96decbc35d +09-collapsed-focus-tint 5f2caa8496cd0d223eda7dbbbd6f37c6540b31f56458f7680011b1e212718100 +12-multiline-tag e0d7cf913d500589d9d47a6cdb553323c76611168b380df5094f2e02946c1704 +13-image 81c1cb7d9aa0b91ba5abc4e896fe499215f75f43df0bcccdd9c1cc6e5f319650 +14-theme-ink ff44cd685cb95f8a74832bbc6822dfd6dfe7805df15ec4c35016c43cdac18862 +15-theme-acme-light a475cd29cf0cd8bca5a2a453d87552a283d7c47d73fdb8d41fa55d277b0a4b69 +16-debug 80ccae7579437eba04d2f2221fff5739aac69ce38e78186f88e8f6b7749e7d94 +17-terminal c23f79212ab9afc9d3ccf982c44503b34b09742e45b74f8e3c375e9ae50a5bb2 diff --git a/test/monkey9p.zig b/test/monkey9p.zig index b3f53093..39a1a187 100644 --- a/test/monkey9p.zig +++ b/test/monkey9p.zig @@ -74,8 +74,8 @@ const builtins = [_][]const u8{ "Look", "Exec", "Kill", "Dump", "Msg", "NextColor", "Themes", "DumpThemes", "TreeContext", "PdfFit", "PdfTint", "PdfSections", "Petscii", "Palette", "Ascii", "Save", "New", "Newcol", "Del", "Filter", "Mode", "Togglettymode", "Edit", "Undo", "Redo", "Collapse", "Delcol", "DelAbove", "DelBelow", "Term", "Repl", "Joincol", "Config", "LocationsConfig", "Messages", "Mini", "Find", "Grep", "Left", - "Down", "Up", "Right", "Back", "Forward", "Last", "Recent", "Jumplist", "Colors", "Wrap", "Debug", "FocusTint", - "Verbose", "SyntaxBold", "InactiveDim", "DumpDir", "Theme", "Get", "Put", "Undo", "Redo", "Zerox", "Snarf", "Paste", "Cut", + "Down", "Up", "Right", "Back", "Forward", "Last", "Recent", "Jumplist", "Wrap", "Debug", + "Verbose", "InactiveDim", "DumpDir", "Theme", "Get", "Put", "Undo", "Redo", "Zerox", "Snarf", "Paste", "Cut", "Sort", "Font", "Local", }; const pane_files = [_][]const u8{ "name", "body", "tag", "ctl", "addr", "dot", "limit", "data", "xdata", "sel", "dirty", "mark", "scroll", "errors", "event", "look", "exec", "tagexec", "pty", "pty/run", "pty/data", "pty/ctl", "pty/status" }; diff --git a/test/output.zig b/test/output.zig index 70518de8..7fb9f237 100644 --- a/test/output.zig +++ b/test/output.zig @@ -38,16 +38,13 @@ test "search tint survives wrapping and theme changes while selections remain au pane.file.?.output = .{ .from = .search }; var frame = std.heap.ArenaAllocator.init(std.testing.allocator); defer frame.deinit(); - for ([_]bool{ true, false, true }) |colors| { - p.settings.colors = colors; - const surface = try p.render(frame.allocator()); - var marked: usize = 0; - for (surface.cells) |cell| { - if (std.meta.eql(cell.style.bg, pardes.Color{ .rgb = p.theme().search_bg.? })) marked += 1; - } - try std.testing.expectEqual(@as(usize, if (colors) 3 else 0), marked); - _ = frame.reset(.retain_capacity); + const surface = try p.render(frame.allocator()); + var marked: usize = 0; + for (surface.cells) |cell| { + if (std.meta.eql(cell.style.bg, pardes.Color{ .rgb = p.theme().search_bg.? })) marked += 1; } + try std.testing.expectEqual(@as(usize, 3), marked); + _ = frame.reset(.retain_capacity); // The body changes immediately even when dark chrome is still fading. try std.testing.expect(p.executeBuiltinLine(0, "Theme daybreak")); const light = try p.render(frame.allocator()); @@ -430,7 +427,7 @@ test "Mini dump preserves its exact virtual snapshot and body writes detach colo try std.testing.expect(mini.file.?.mini == null); } -test "Mini syntax colors survive toggles themes and rendering without source access" { +test "Mini syntax colors survive themes and rendering without source access" { if (!pardes.syntax.enabled) return error.SkipZigTest; var tmp = std.testing.tmpDir(.{}); defer tmp.cleanup(); @@ -440,7 +437,6 @@ test "Mini syntax colors survive toggles themes and rendering without source acc const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 80, .rows = 24 }); defer p.deinit(); try p.panes[0].?.setOwnedCwd(dir); - p.settings.colors = false; try panes.mini.open(p, 0, "demo.zig"); const id = p.active; const mini = p.panes[id].?; @@ -453,14 +449,13 @@ test "Mini syntax colors survive toggles themes and rendering without source acc const colors = mini.file.?.mini.?.colors.ptr; var frame = std.heap.ArenaAllocator.init(std.testing.allocator); defer frame.deinit(); - for ([_]bool{ false, true, false, true }) |enabled| { - p.settings.colors = enabled; + for (0..4) |_| { mini.file.?.syntax_dirty = true; const surface = try p.render(frame.allocator()); const rect = p.rects[id]; const x = rect.x + config.GUTTER + panes.File.gutterWidth(mini) + @as(u16, @intCast(column)); const y = p.bodyTop(mini, rect) + @as(u16, @intCast(position.row)); - if (enabled) try std.testing.expectEqualDeep(pardes.Color{ .rgb = p.theme().kw }, surface.at(x, y).style.fg); + try std.testing.expectEqualDeep(pardes.Color{ .rgb = p.theme().kw }, surface.at(x, y).style.fg); try std.testing.expectEqual(colors, mini.file.?.mini.?.colors.ptr); try std.testing.expectEqual(@as(usize, 0), mini.file.?.highlights.len); _ = frame.reset(.retain_capacity); @@ -776,7 +771,6 @@ test "identical result refresh keeps warm content caches without allocation" { defer p.deinit(); p.locations_config.layout = .@"inline"; const source = try p.setTestFile("notes\n"); - p.settings.colors = true; const text = "a.zig:1:1 pub fn first() void {}\na.zig:2:1 if (true) return;\n"; try panes.Output.fillResults(p, 0, "/tmp", .{ .query = .references }, "before", try p.gpa.dupe(u8, text), 0); const id = source.search_pane orelse return error.MissingResults; diff --git a/test/panes.zig b/test/panes.zig index 45302b6f..a6b6aecd 100644 --- a/test/panes.zig +++ b/test/panes.zig @@ -376,7 +376,6 @@ const TreeContextTests = struct { pane.tag_expanded = false; // a one-row tag keeps this small screen's rows p.sync(); p.settings.wrap = false; - p.settings.colors = false; try std.testing.expect(p.executeBuiltinLine(0, "TreeContext")); pane.scrollBy(8); pane.hscroll = 4; @@ -794,9 +793,10 @@ const TagNameTintTests = struct { theme.tag_name_fg = name_fg; theme.tag_active_name_fg = null; theme.tag_fg = tag_fg; + // The focused tag's ink is the plain one, as an unfocused tag's. + theme.tag_active_fg = null; p.custom_theme = theme; p.chrome = pardes.ChromeTheme.fromTheme(p.theme()); - p.settings.focus_tint = false; } fn check(p: *Pardes, id: usize, name: []const u8) !usize { @@ -892,19 +892,16 @@ const TagNameTintTests = struct { p.chrome = pardes.ChromeTheme.fromTheme(p.theme()); var arena = std.heap.ArenaAllocator.init(p.gpa); defer arena.deinit(); - for ([_]bool{ false, true }) |active| { - p.settings.focus_tint = active; - const surface = try p.render(arena.allocator()); - const x = p.rects[0].x + pardes.TAG_TEXT_INSET; - const y = tagY(p, p.rects[0]); - const fg = if (active) active_fg else tag_fg; - // The directory in the ink; the name tinted, never in it. - const chrome = p.chromeTheme(); - const tint = if (active) chrome.tag_active_name_fg else chrome.tag_name_fg; - try std.testing.expect(!std.meta.eql(tint, fg)); - try std.testing.expectEqual(pardes.Color{ .rgb = fg }, surface.at(x + 1, y).style.fg); - try std.testing.expectEqual(pardes.Color{ .rgb = tint }, surface.at(x + 5, y).style.fg); - } + const surface = try p.render(arena.allocator()); + const x = p.rects[0].x + pardes.TAG_TEXT_INSET; + const y = tagY(p, p.rects[0]); + const fg = active_fg; + // The directory in the ink; the name tinted, never in it. + const chrome = p.chromeTheme(); + const tint = chrome.tag_active_name_fg; + try std.testing.expect(!std.meta.eql(tint, fg)); + try std.testing.expectEqual(pardes.Color{ .rgb = fg }, surface.at(x + 1, y).style.fg); + try std.testing.expectEqual(pardes.Color{ .rgb = tint }, surface.at(x + 5, y).style.fg); } }; @@ -3653,7 +3650,6 @@ test "Zig keywords keep every rendered byte colored across line-number widths" { pane.body.cur_row = @intCast(line - 1); pane.body.cur_col = @intCast(std.mem.indexOf(u8, sample, "fn").?); pane.hscroll = view.horizontal; - p.settings.colors = true; p.settings.wrap = view.wrap; p.sync(); var frame = std.heap.ArenaAllocator.init(gpa); diff --git a/test/perf-baseline-gui-debug.json b/test/perf-baseline-gui-debug.json index e7f577bf..0bf89243 100644 --- a/test/perf-baseline-gui-debug.json +++ b/test/perf-baseline-gui-debug.json @@ -1 +1 @@ -{"harness":"1a1e0068d88dc7a7","build":{"compiler":"0.17.0","target":"x86_64-linux.5.10...7.2-gnu.2.38","cpu":"x86_64","driver_optimize":"fast","core_optimize":"debug","c_optimize":"fast","terminal_optimize":"safe","platform":"gui","grammars":"full","mupdf":true,"jpx":true,"tracy":false,"terminal_simd":true,"prebuilt_shaders":false},"cols":120,"rows":40,"reps":10,"only":"medium","fixtures":[{"name":"small","lines":1000,"cols":60,"bytes":62694},{"name":"medium","lines":50000,"cols":60,"bytes":3201944},{"name":"large","lines":300000,"cols":60,"bytes":19464444},{"name":"longline","lines":400,"cols":8000,"bytes":3200400}],"cells":[{"op":"open","fixture":"medium","min_us":2290,"med_us":2523,"p90_us":2642,"max_us":2642},{"op":"render","fixture":"medium","min_us":96,"med_us":97,"p90_us":99,"max_us":99},{"op":"key-down","fixture":"medium","min_us":104,"med_us":106,"p90_us":113,"max_us":113},{"op":"key-right","fixture":"medium","min_us":105,"med_us":107,"p90_us":111,"max_us":112},{"op":"page-down","fixture":"medium","min_us":104,"med_us":107,"p90_us":121,"max_us":125},{"op":"wheel","fixture":"medium","min_us":101,"med_us":104,"p90_us":105,"max_us":106},{"op":"edit-char","fixture":"medium","min_us":1023,"med_us":1293,"p90_us":1447,"max_us":1467},{"op":"edit-twin","fixture":"medium","min_us":1089,"med_us":1340,"p90_us":1418,"max_us":1441},{"op":"body-2m","fixture":"medium","min_us":5061,"med_us":8829,"p90_us":11118,"max_us":11667},{"op":"body-appends","fixture":"medium","min_us":149285,"med_us":210882,"p90_us":266047,"max_us":279235},{"op":"deep-sel","fixture":"medium","min_us":87,"med_us":90,"p90_us":96,"max_us":96}]} +{"harness":"4fb8a759a45cd6fa","build":{"compiler":"0.17.0","target":"x86_64-linux.5.10...7.2-gnu.2.38","cpu":"x86_64","driver_optimize":"fast","core_optimize":"debug","c_optimize":"fast","terminal_optimize":"safe","platform":"gui","grammars":"full","mupdf":true,"jpx":true,"tracy":false,"terminal_simd":true,"prebuilt_shaders":false},"cols":120,"rows":40,"reps":10,"only":"medium","fixtures":[{"name":"small","lines":1000,"cols":60,"bytes":62694},{"name":"medium","lines":50000,"cols":60,"bytes":3201944},{"name":"large","lines":300000,"cols":60,"bytes":19464444},{"name":"longline","lines":400,"cols":8000,"bytes":3200400}],"cells":[{"op":"open","fixture":"medium","min_us":2290,"med_us":2523,"p90_us":2642,"max_us":2642},{"op":"render","fixture":"medium","min_us":96,"med_us":97,"p90_us":99,"max_us":99},{"op":"key-down","fixture":"medium","min_us":104,"med_us":106,"p90_us":113,"max_us":113},{"op":"key-right","fixture":"medium","min_us":105,"med_us":107,"p90_us":111,"max_us":112},{"op":"page-down","fixture":"medium","min_us":104,"med_us":107,"p90_us":121,"max_us":125},{"op":"wheel","fixture":"medium","min_us":101,"med_us":104,"p90_us":105,"max_us":106},{"op":"edit-char","fixture":"medium","min_us":1023,"med_us":1293,"p90_us":1447,"max_us":1467},{"op":"edit-twin","fixture":"medium","min_us":1089,"med_us":1340,"p90_us":1418,"max_us":1441},{"op":"body-2m","fixture":"medium","min_us":5061,"med_us":8829,"p90_us":11118,"max_us":11667},{"op":"body-appends","fixture":"medium","min_us":149285,"med_us":210882,"p90_us":266047,"max_us":279235},{"op":"deep-sel","fixture":"medium","min_us":87,"med_us":90,"p90_us":96,"max_us":96}]} diff --git a/test/perf-baseline-tui-debug.json b/test/perf-baseline-tui-debug.json index 464ec4d9..e98d37c2 100644 --- a/test/perf-baseline-tui-debug.json +++ b/test/perf-baseline-tui-debug.json @@ -1 +1 @@ -{"harness":"1a1e0068d88dc7a7","build":{"compiler":"0.17.0","target":"x86_64-linux.5.10...7.2-gnu.2.38","cpu":"x86_64","driver_optimize":"fast","core_optimize":"debug","c_optimize":"fast","terminal_optimize":"safe","platform":"tui","grammars":"full","mupdf":true,"jpx":true,"tracy":false,"terminal_simd":true,"prebuilt_shaders":false},"cols":120,"rows":40,"reps":10,"only":"medium","fixtures":[{"name":"small","lines":1000,"cols":60,"bytes":62694},{"name":"medium","lines":50000,"cols":60,"bytes":3201944},{"name":"large","lines":300000,"cols":60,"bytes":19464444},{"name":"longline","lines":400,"cols":8000,"bytes":3200400}],"cells":[{"op":"open","fixture":"medium","min_us":1820,"med_us":2128,"p90_us":2500,"max_us":3046},{"op":"render","fixture":"medium","min_us":90,"med_us":96,"p90_us":98,"max_us":101},{"op":"key-down","fixture":"medium","min_us":101,"med_us":103,"p90_us":105,"max_us":114},{"op":"key-right","fixture":"medium","min_us":101,"med_us":103,"p90_us":106,"max_us":112},{"op":"page-down","fixture":"medium","min_us":97,"med_us":102,"p90_us":103,"max_us":105},{"op":"wheel","fixture":"medium","min_us":97,"med_us":102,"p90_us":112,"max_us":160},{"op":"edit-char","fixture":"medium","min_us":838,"med_us":899,"p90_us":1129,"max_us":1167},{"op":"edit-twin","fixture":"medium","min_us":869,"med_us":1099,"p90_us":1321,"max_us":1393},{"op":"body-2m","fixture":"medium","min_us":4820,"med_us":8314,"p90_us":11931,"max_us":12182},{"op":"body-appends","fixture":"medium","min_us":125039,"med_us":170714,"p90_us":213376,"max_us":232728},{"op":"deep-sel","fixture":"medium","min_us":90,"med_us":92,"p90_us":96,"max_us":101}]} +{"harness":"4fb8a759a45cd6fa","build":{"compiler":"0.17.0","target":"x86_64-linux.5.10...7.2-gnu.2.38","cpu":"x86_64","driver_optimize":"fast","core_optimize":"debug","c_optimize":"fast","terminal_optimize":"safe","platform":"tui","grammars":"full","mupdf":true,"jpx":true,"tracy":false,"terminal_simd":true,"prebuilt_shaders":false},"cols":120,"rows":40,"reps":10,"only":"medium","fixtures":[{"name":"small","lines":1000,"cols":60,"bytes":62694},{"name":"medium","lines":50000,"cols":60,"bytes":3201944},{"name":"large","lines":300000,"cols":60,"bytes":19464444},{"name":"longline","lines":400,"cols":8000,"bytes":3200400}],"cells":[{"op":"open","fixture":"medium","min_us":1820,"med_us":2128,"p90_us":2500,"max_us":3046},{"op":"render","fixture":"medium","min_us":90,"med_us":96,"p90_us":98,"max_us":101},{"op":"key-down","fixture":"medium","min_us":101,"med_us":103,"p90_us":105,"max_us":114},{"op":"key-right","fixture":"medium","min_us":101,"med_us":103,"p90_us":106,"max_us":112},{"op":"page-down","fixture":"medium","min_us":97,"med_us":102,"p90_us":103,"max_us":105},{"op":"wheel","fixture":"medium","min_us":97,"med_us":102,"p90_us":112,"max_us":160},{"op":"edit-char","fixture":"medium","min_us":838,"med_us":899,"p90_us":1129,"max_us":1167},{"op":"edit-twin","fixture":"medium","min_us":869,"med_us":1099,"p90_us":1321,"max_us":1393},{"op":"body-2m","fixture":"medium","min_us":4820,"med_us":8314,"p90_us":11931,"max_us":12182},{"op":"body-appends","fixture":"medium","min_us":125039,"med_us":170714,"p90_us":213376,"max_us":232728},{"op":"deep-sel","fixture":"medium","min_us":90,"med_us":92,"p90_us":96,"max_us":101}]} diff --git a/test/perf.zig b/test/perf.zig index 236716ae..55b64a99 100644 --- a/test/perf.zig +++ b/test/perf.zig @@ -1488,7 +1488,6 @@ fn miniMeasurement(fallback: std.mem.Allocator, probe: MiniProbe, path: []const try pardes.panes.mini.open(p, 0, path); for (p.panes, 0..) |slot, id| if (slot != null and id != p.active) try p.removePane(id, null); pump(p); - p.settings.colors = true; const file = p.panes[p.active].?.file.?; try checkMini(.{ .content = file.content, .colors = file.mini.?.colors }, expected); } diff --git a/test/process/window.zig b/test/process/window.zig index b7397fec..ea7d21d5 100644 --- a/test/process/window.zig +++ b/test/process/window.zig @@ -293,7 +293,6 @@ fn goldens(gpa: std.mem.Allocator, exe: [:0]const u8) !void { try shot(&d, a, &results, keep, "08-wide-glyph-edges", "latest.ppm"); try f.write("/ctl", "Wrap on\n"); try f.write(f.at("/pane/{d}/exec", .{wide_pane}), "Del\n"); - try f.write("/ctl", "FocusTint on\n"); try f.write(f.at("/pane/{d}/ctl", .{notes_pane}), "Collapse\n"); try shot(&d, a, &results, keep, "09-collapsed-focus-tint", "latest.ppm"); try f.write(f.at("/pane/{d}/ctl", .{notes_pane}), "Collapse\n"); diff --git a/test/snapshots/builtins.golden b/test/snapshots/builtins.golden index 93a6ab2b..95fa5f33 100644 --- a/test/snapshots/builtins.golden +++ b/test/snapshots/builtins.golden @@ -14,14 +14,14 @@ |10: 1 pardes builtins under SPC c |11: 2 |12: 3 SPC c d Delcol -|13: 4 SPC c j Joincol topbar -|14: 5 SPC c n Newcol topbar +|13: 4 SPC c j Joincol topbar +|14: 5 SPC c n Newcol topbar |15: 6 == snap docs-group grid=120x67 cursor=7,10 |10: 1 pardes builtins under SPC h -|12: 3 SPC h c Changelog topbar +|12: 3 SPC h c Changelog topbar |13: 4 SPC h m Messages -|14: 5 SPC h t Tutor topbar +|14: 5 SPC h t Tutor topbar == snap tutor-from-index grid=120x67 cursor=7,16 |10: 1 pardes builtins under SPC h Tutor |15: /tmp/pardes-snap/builtins/cwd/+Tutor Save Term Collapse Del diff --git a/test/snapshots/builtins.snap b/test/snapshots/builtins.snap index cf367c5a..320d4360 100644 --- a/test/snapshots/builtins.snap +++ b/test/snapshots/builtins.snap @@ -60,16 +60,16 @@ wheel up 110 50 wheel up 110 50 wheel up 110 50 wheel up 110 50 -wait 10000 Look enter, right-click -wait 10000 Exec tab, middle-click +wait 10000 Look enter, right-click +wait 10000 Exec tab, middle-click wait 10000 Filter wait 10000 Theme stable 700 15000 # n moves through look-able text; it must not execute command names. key space j n space j n space j n -wait 10000 Look enter, right-click -wait 10000 Exec tab, middle-click +wait 10000 Look enter, right-click +wait 10000 Exec tab, middle-click key space c ? wait 10000 under SPC c wait 10000 Joincol diff --git a/test/snapshots/leader.golden b/test/snapshots/leader.golden index e047786c..884a28b1 100644 --- a/test/snapshots/leader.golden +++ b/test/snapshots/leader.golden @@ -12,9 +12,9 @@ |5: /tmp/pardes-snap/leader/cwd/+Help Save Term Collapse Del |6: 1 pardes builtins under SPC h |7: 2 -|8: 3 SPC h c Changelog topbar +|8: 3 SPC h c Changelog topbar |9: 4 SPC h m Messages -|10: 5 SPC h t Tutor topbar +|10: 5 SPC h t Tutor topbar |11: 6 == snap tutor grid=100x41 cursor=7,12 |6: 1 pardes builtins under SPC h Tutor @@ -82,16 +82,16 @@ |35: /tmp/pardes-snap/leader/cwd/+Help Save Term Collapse Del |36: 1 pardes builtins under SPC h |37: 2 -|38: 3 SPC h c Changelog topbar +|38: 3 SPC h c Changelog topbar |39: 4 SPC h m Messages -|40: 5 SPC h t Tutor topbar +|40: 5 SPC h t Tutor topbar == snap help-column grid=100x41 cursor=7,6 |5: /tmp/pardes-snap/leader/cwd/+Help Save Term Collapse Del |6: 1 pardes builtins under SPC c |7: 2 |8: 3 SPC c d Delcol -|9: 4 SPC c j Joincol topbar -|10: 5 SPC c n Newcol topbar +|9: 4 SPC c j Joincol topbar +|10: 5 SPC c n Newcol topbar |11: 6 |35: |36: diff --git a/test/snapshots/mini.golden b/test/snapshots/mini.golden index 2ed8eee9..886ac08c 100644 --- a/test/snapshots/mini.golden +++ b/test/snapshots/mini.golden @@ -83,36 +83,15 @@ @21: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body |22: @22: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body -== style colors-off grid=90x23 -|3: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-89 #e5eee5,#0d1410, -|6: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-81 #e5eee5,#0d1410, 82-82 #e5eee5,#1d2824, 83-89 #b2c3b8,#1d2824, -|7: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-89 #e5eee5,#0d1410, -|8: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-89 #e5eee5,#0d1410, -== 9p colors-off grid=90x23 cursor=7,6,block -|3: 1 @`Mini demo.zig` -@3: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-22 #e5eee5,#0d1410,,body 23-89 d,#0d1410,,body -|6: 1 ⠭⠍⣥⢩⣭⡭⣭⣬⣌⢭⣭⠌⠬⠅⠍⠁ Colors -+6: 7="⠭" 8="⠍" 9="⣥" 10="⢩" 11="⣭" 12="⡭" 13="⣭" 14="⣬" 15="⣌" 16="⢭" 17="⣭" 18="⠌" 19="⠬" 20="⠅" 21="⠍" 22="⠁" -@6: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #616f64,#0d1410,b,body 7-22 #e5eee5,#0d1410,,body 23-81 d,#0d1410,,body 82-82 d,#1d2824,,tagline 83-88 #b2c3b8,#1d2824,,tagline 89-89 d,#1d2824,,tagline -|7: 2 ⣂⢀⣉⣉⢉⣈⢁⣀⣀⢀⣀⣀⣀⢀⣀⣀⣀⣀⣀ -+7: 7="⣂" 8="⢀" 9="⣉" 10="⣉" 11="⢉" 12="⣈" 13="⢁" 14="⣀" 15="⣀" 16="⢀" 17="⣀" 18="⣀" 19="⣀" 20="⢀" 21="⣀" 22="⣀" 23="⣀" 24="⣀" 25="⣀" -@7: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-25 #e5eee5,#0d1410,,body 26-89 d,#0d1410,,body -|8: 3 ⠉⠉⠁⠉⠉⠉⠈⠈⠉⠉⠉⠉⠉⠉ -+8: 7="⠉" 8="⠉" 9="⠁" 10="⠉" 11="⠉" 12="⠉" 13="⠈" 14="⠈" 15="⠉" 16="⠉" 17="⠉" 18="⠉" 19="⠉" 20="⠉" -@8: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-20 #e5eee5,#0d1410,,body 21-89 d,#0d1410,,body -== style colors-on grid=90x23 -|6: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-8 #e5eee5,#0d1410, 9-9 #c9a7ed,#0d1410, 10-12 #e5eee5,#0d1410, 13-15 #c9a7ed,#0d1410, 16-21 #b8d88a,#0d1410, 22-81 #e5eee5,#0d1410, 82-82 #e5eee5,#1d2824, 83-89 #b2c3b8,#1d2824, -|7: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-8 #b9f480,#0d1410, 9-11 #c9a7ed,#0d1410, 12-89 #b9f480,#0d1410, -|8: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-17 #e5eee5,#0d1410, 18-19 #f8c082,#0d1410, 20-89 #e5eee5,#0d1410, == snap resized grid=105x27 cursor=7,7 | Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit | New Term Find Grep Joincol Delcol | /tmp/pardes-snap/mini/cwd/commands.txt Save Term Collapse Del -| 1 @`Mini demo.zig` +| 1 @`Mini demo.zig` Mini | | | /tmp/pardes-snap/mini/cwd/Mini demo.zig Save Term Collapse Del -| 1 ⠭⠍⣥⢩⣭⡭⣭⣬⣌⢭⣭⠌⠬⠅⠍⠁ Colors +| 1 ⠭⠍⣥⢩⣭⡭⣭⣬⣌⢭⣭⠌⠬⠅⠍⠁ | 2 ⣂⢀⣉⣉⢉⣈⢁⣀⣀⢀⣀⣀⣀⢀⣀⣀⣀⣀⣀ | 3 ⠉⠉⠁⠉⠉⠉⠈⠈⠉⠉⠉⠉⠉⠉ | 4 @@ -123,17 +102,17 @@ @1: 0-1 #ffffff,#887455,,tagline 2-34 #becfc4,#314738,,tagline 35-104 d,#314738,,tagline |2: /tmp/pardes-snap/mini/cwd/commands.txt Save Term Collapse Del @2: 0-1 #ffffff,#496656,,tagline 2-27 #b2c3b8,#1d2824,,tagline 28-39 #d3b0d9,#1d2824,,tagline 40-62 #b2c3b8,#1d2824,,tagline 63-104 d,#1d2824,,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 +|3: 1 @`Mini demo.zig` Mini +@3: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-22 #e5eee5,#0d1410,,body 23-98 d,#0d1410,,body 99-99 d,#1d2824,,tagline 100-103 #b2c3b8,#1d2824,,tagline 104-104 d,#1d2824,,tagline |4: @4: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body |5: @5: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-104 d,#0d1410,,body |6: /tmp/pardes-snap/mini/cwd/Mini demo.zig Save Term Collapse Del @6: 0-1 #000000,#add38a,,tagline 2-27 #becfc4,#314738,,tagline 28-40 #dfbce5,#314738,,tagline 41-63 #becfc4,#314738,,tagline 64-104 d,#314738,,tagline -|7: 1 ⠭⠍⣥⢩⣭⡭⣭⣬⣌⢭⣭⠌⠬⠅⠍⠁ Colors +|7: 1 ⠭⠍⣥⢩⣭⡭⣭⣬⣌⢭⣭⠌⠬⠅⠍⠁ +7: 7="⠭" 8="⠍" 9="⣥" 10="⢩" 11="⣭" 12="⡭" 13="⣭" 14="⣬" 15="⣌" 16="⢭" 17="⣭" 18="⠌" 19="⠬" 20="⠅" 21="⠍" 22="⠁" -@7: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #616f64,#0d1410,b,body 7-8 #e5eee5,#0d1410,,body 9-9 #c9a7ed,#0d1410,,body 10-12 #e5eee5,#0d1410,,body 13-15 #c9a7ed,#0d1410,,body 16-21 #b8d88a,#0d1410,,body 22-22 #e5eee5,#0d1410,,body 23-96 d,#0d1410,,body 97-97 d,#1d2824,,tagline 98-103 #b2c3b8,#1d2824,,tagline 104-104 d,#1d2824,,tagline +@7: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #616f64,#0d1410,b,body 7-8 #e5eee5,#0d1410,,body 9-9 #c9a7ed,#0d1410,,body 10-12 #e5eee5,#0d1410,,body 13-15 #c9a7ed,#0d1410,,body 16-21 #b8d88a,#0d1410,,body 22-22 #e5eee5,#0d1410,,body 23-104 d,#0d1410,,body |8: 2 ⣂⢀⣉⣉⢉⣈⢁⣀⣀⢀⣀⣀⣀⢀⣀⣀⣀⣀⣀ +8: 7="⣂" 8="⢀" 9="⣉" 10="⣉" 11="⢉" 12="⣈" 13="⢁" 14="⣀" 15="⣀" 16="⢀" 17="⣀" 18="⣀" 19="⣀" 20="⢀" 21="⣀" 22="⣀" 23="⣀" 24="⣀" 25="⣀" @8: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-8 #b9f480,#0d1410,,body 9-11 #c9a7ed,#0d1410,,body 12-25 #b9f480,#0d1410,,body 26-104 d,#0d1410,,body diff --git a/test/snapshots/mini.snap b/test/snapshots/mini.snap index 4905c68d..ca27c0c1 100644 --- a/test/snapshots/mini.snap +++ b/test/snapshots/mini.snap @@ -10,13 +10,6 @@ stable 500 10000 snap opened snapstyle opened snap9p opened -key space t c -stable 300 8000 -snapstyle colors-off -snap9p colors-off -key space t c -stable 300 8000 -snapstyle colors-on resize 27 105 stable 400 10000 snap resized diff --git a/test/snapshots/ninep.golden b/test/snapshots/ninep.golden index 8519a23d..a92cc6fc 100644 --- a/test/snapshots/ninep.golden +++ b/test/snapshots/ninep.golden @@ -57,22 +57,7 @@ @13: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body |14: @14: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body -== style colors-off grid=90x15 -|3: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-32 #e5eee5,#0d1410, 33-33 d,d, 34-34 d,#0d1410, 35-81 #e5eee5,#0d1410, 82-82 #e5eee5,#1d2824, 83-89 #b2c3b8,#1d2824, -|5: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-89 #e5eee5,#0d1410, -|6: 0-0 d,#608269, 1-4 d,#0d1410, 5-10 #59675c,#0d1410, 11-89 #e5eee5,#0d1410, -|7: 0-0 d,#608269, 1-4 d,#0d1410, 5-10 #59675c,#0d1410, 11-89 #e5eee5,#0d1410, -== 9p colors-off grid=90x15 cursor=7,3,block -|3: 1 const greeting = "café λ 界 é"; Colors -+3: 28="é" 30="λ" 32="界" 33="" 35="é" -@3: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #616f64,#0d1410,b,body 7-37 #e5eee5,#0d1410,,body 38-81 d,#0d1410,,body 82-82 d,#1d2824,,tagline 83-88 #b2c3b8,#1d2824,,tagline 89-89 d,#1d2824,,tagline -|5: 3 pub fn choose(ok: bool) u32 { -@5: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-35 #e5eee5,#0d1410,,body 36-89 d,#0d1410,,body -|6: 4 if (ok) return 42; -@6: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-28 #e5eee5,#0d1410,,body 29-89 d,#0d1410,,body -|7: 5 return 7; -@7: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-19 #e5eee5,#0d1410,,body 20-89 d,#0d1410,,body -== snap edited-with-colors-off grid=90x15 cursor=7,4 +== snap edited grid=90x15 cursor=7,4 |2: */tmp/pardes-snap/ninep/cwd/demo.zig Save Term Collapse TreeContext Def Refs Del |3: 1 // café λ 界 |4: 2 const greeting = "café λ 界 é"; @@ -82,30 +67,30 @@ |8: 6 return 7; |9: 7 } |10: 8 -== 9p edited-with-colors-off grid=90x15 cursor=7,4,block +== 9p edited grid=90x15 cursor=7,4,block |2: */tmp/pardes-snap/ninep/cwd/demo.zig Save Term Collapse TreeContext Def Refs Del @2: 0-0 #000000,#add38a,,tagline 1-1 #000000,#f9cb70,b,tagline 2-28 #becfc4,#314738,,tagline 29-36 #dfbce5,#314738,,tagline 37-80 #becfc4,#314738,,tagline 81-89 d,#314738,,tagline |3: 1 // café λ 界 +3: 13="é" 15="λ" 17="界" 18="" -@3: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-18 #e5eee5,#0d1410,,body 19-89 d,#0d1410,,body +@3: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-18 #b9f480,#0d1410,,body 19-89 d,#0d1410,,body |4: 2 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-37 #e5eee5,#0d1410,,body 38-89 d,#0d1410,,body +@4: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #616f64,#0d1410,b,body 7-23 #e5eee5,#0d1410,,body 24-36 #b8d88a,#0d1410,,body 37-37 #e5eee5,#0d1410,,body 38-89 d,#0d1410,,body |5: 3 @5: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body |6: 4 pub fn choose(ok: bool) u32 { -@6: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-35 #e5eee5,#0d1410,,body 36-89 d,#0d1410,,body +@6: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-10 #e5eee5,#0d1410,,body 11-12 #c9a7ed,#0d1410,,body 13-35 #e5eee5,#0d1410,,body 36-89 d,#0d1410,,body |7: 5 if (ok) return 42; -@7: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-28 #e5eee5,#0d1410,,body 29-89 d,#0d1410,,body +@7: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-10 #e5eee5,#0d1410,,body 11-12 #c9a7ed,#0d1410,,body 13-18 #e5eee5,#0d1410,,body 19-24 #c9a7ed,#0d1410,,body 25-25 #e5eee5,#0d1410,,body 26-27 #f8c082,#0d1410,,body 28-28 #e5eee5,#0d1410,,body 29-89 d,#0d1410,,body |8: 6 return 7; -@8: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-19 #e5eee5,#0d1410,,body 20-89 d,#0d1410,,body +@8: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-10 #e5eee5,#0d1410,,body 11-16 #c9a7ed,#0d1410,,body 17-17 #e5eee5,#0d1410,,body 18-18 #f8c082,#0d1410,,body 19-19 #e5eee5,#0d1410,,body 20-89 d,#0d1410,,body |9: 7 } @9: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-7 #e5eee5,#0d1410,,body 8-89 d,#0d1410,,body |10: 8 @10: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-89 d,#0d1410,,body -== style colors-on grid=90x15 +== style edited grid=90x15 |2: 0-0 d,#add38a, 1-1 #000000,#f9cb70,b 2-28 #becfc4,#314738, 29-37 #dfbce5,#314738, 38-89 #becfc4,#314738, -|3: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-17 #b9f480,#0d1410, 18-18 d,d, 19-81 d,#0d1410, 82-82 d,#1d2824, 83-89 #b2c3b8,#1d2824, +|3: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-17 #b9f480,#0d1410, 18-18 d,d, 19-89 d,#0d1410, |4: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-23 #e5eee5,#0d1410, 24-32 #b8d88a,#0d1410, 33-33 d,d, 34-34 d,#0d1410, 35-36 #b8d88a,#0d1410, 37-89 #e5eee5,#0d1410, |5: 0-0 d,#608269, 1-4 d,#0d1410, 5-89 #59675c,#0d1410, |6: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-13 #c9a7ed,#0d1410, 14-89 #e5eee5,#0d1410, @@ -113,24 +98,11 @@ |8: 0-0 d,#608269, 1-4 d,#0d1410, 5-10 #59675c,#0d1410, 11-17 #c9a7ed,#0d1410, 18-18 #f8c082,#0d1410, 19-89 #e5eee5,#0d1410, |9: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-89 #e5eee5,#0d1410, |10: 0-0 d,#608269, 1-4 d,#0d1410, 5-89 #59675c,#0d1410, -== 9p colors-on grid=90x15 cursor=7,4,block -|3: 1 // café λ 界 Colors -+3: 13="é" 15="λ" 17="界" 18="" -@3: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-18 #b9f480,#0d1410,,body 19-81 d,#0d1410,,body 82-82 d,#1d2824,,tagline 83-88 #b2c3b8,#1d2824,,tagline 89-89 d,#1d2824,,tagline -|4: 2 const greeting = "café λ 界 é"; -+4: 28="é" 30="λ" 32="界" 33="" 35="é" -@4: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #616f64,#0d1410,b,body 7-23 #e5eee5,#0d1410,,body 24-36 #b8d88a,#0d1410,,body 37-37 #e5eee5,#0d1410,,body 38-89 d,#0d1410,,body -|6: 4 pub fn choose(ok: bool) u32 { -@6: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-10 #e5eee5,#0d1410,,body 11-12 #c9a7ed,#0d1410,,body 13-35 #e5eee5,#0d1410,,body 36-89 d,#0d1410,,body -|7: 5 if (ok) return 42; -@7: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-10 #e5eee5,#0d1410,,body 11-12 #c9a7ed,#0d1410,,body 13-18 #e5eee5,#0d1410,,body 19-24 #c9a7ed,#0d1410,,body 25-25 #e5eee5,#0d1410,,body 26-27 #f8c082,#0d1410,,body 28-28 #e5eee5,#0d1410,,body 29-89 d,#0d1410,,body -|8: 6 return 7; -@8: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-10 #e5eee5,#0d1410,,body 11-16 #c9a7ed,#0d1410,,body 17-17 #e5eee5,#0d1410,,body 18-18 #f8c082,#0d1410,,body 19-19 #e5eee5,#0d1410,,body 20-89 d,#0d1410,,body == style resized grid=105x20 |0: 0-1 d,#1d2824, 2-104 #b2c3b8,#1d2824, |1: 0-1 d,#887455, 2-104 #becfc4,#314738, |2: 0-0 d,#add38a, 1-1 #000000,#f9cb70,b 2-28 #becfc4,#314738, 29-37 #dfbce5,#314738, 38-104 #becfc4,#314738, -|3: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-17 #b9f480,#0d1410, 18-18 d,d, 19-96 d,#0d1410, 97-97 d,#1d2824, 98-104 #b2c3b8,#1d2824, +|3: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-17 #b9f480,#0d1410, 18-18 d,d, 19-104 d,#0d1410, |4: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-23 #e5eee5,#0d1410, 24-32 #b8d88a,#0d1410, 33-33 d,d, 34-34 d,#0d1410, 35-36 #b8d88a,#0d1410, 37-104 #e5eee5,#0d1410, |5: 0-0 d,#608269, 1-4 d,#0d1410, 5-104 #59675c,#0d1410, |6: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-13 #c9a7ed,#0d1410, 14-104 #e5eee5,#0d1410, @@ -154,9 +126,9 @@ @1: 0-1 #ffffff,#887455,,tagline 2-34 #becfc4,#314738,,tagline 35-104 d,#314738,,tagline |2: */tmp/pardes-snap/ninep/cwd/demo.zig Save Term Collapse TreeContext Def Refs Del @2: 0-0 #000000,#add38a,,tagline 1-1 #000000,#f9cb70,b,tagline 2-28 #becfc4,#314738,,tagline 29-36 #dfbce5,#314738,,tagline 37-80 #becfc4,#314738,,tagline 81-104 d,#314738,,tagline -|3: 1 // café λ 界 Colors +|3: 1 // café λ 界 +3: 13="é" 15="λ" 17="界" 18="" -@3: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-18 #b9f480,#0d1410,,body 19-96 d,#0d1410,,body 97-97 d,#1d2824,,tagline 98-103 #b2c3b8,#1d2824,,tagline 104-104 d,#1d2824,,tagline +@3: 0-0 d,#608269,,body 1-1 d,#0d1410,,body 2-6 #59675c,#0d1410,,body 7-18 #b9f480,#0d1410,,body 19-104 d,#0d1410,,body |4: 2 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-104 d,#0d1410,,body @@ -194,7 +166,7 @@ | Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit | New Term Find Grep Joincol Delcol | */tmp/pardes-snap/ninep/cwd/demo.zig Save Term Collapse TreeContext Def Refs Del -| 1 // café λ 界 Colors +| 1 // café λ 界 | 2 const greeting = "café λ 界 é"; | 3 | 4 pub fn choose(ok: bool) u32 { diff --git a/test/snapshots/ninep.snap b/test/snapshots/ninep.snap index 9299058f..5ea33887 100644 --- a/test/snapshots/ninep.snap +++ b/test/snapshots/ninep.snap @@ -5,21 +5,14 @@ stable 400 10000 snap opened snapstyle opened snap9p opened -key space t c -stable 300 8000 -snapstyle colors-off -snap9p colors-off key g g i send // café λ 界\n key esc settle 100 stable 300 8000 -snap edited-with-colors-off -snap9p edited-with-colors-off -key space t c -stable 300 8000 -snapstyle colors-on -snap9p colors-on +snap edited +snap9p edited +snapstyle edited resize 20 105 stable 400 10000 snapstyle resized diff --git a/test/snapshots/syntax.golden b/test/snapshots/syntax.golden index 13793144..e6fd1ad7 100644 --- a/test/snapshots/syntax.golden +++ b/test/snapshots/syntax.golden @@ -51,11 +51,3 @@ |28: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410, |29: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410, |30: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-149 d,#0d1410, -== style colors-off grid=150x31 -|8: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-66 #e5eee5,#0d1410, 67-67 #e5eee5,#1d2824, 68-74 #b2c3b8,#1d2824, 75-75 #b2c3b8,#608269, 76-149 #b2c3b8,#0d1410, -|9: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410, -|10: 0-0 d,#608269, 1-4 d,#0d1410, 5-10 #59675c,#0d1410, 11-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410, -== style colors-on grid=150x31 -|8: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-18 #e5eee5,#0d1410, 19-25 #c9a7ed,#0d1410, 26-26 #e5eee5,#0d1410, 27-31 #b8d88a,#0d1410, 32-34 #e5eee5,#0d1410, 35-66 #b9f480,#0d1410, 67-67 #b9f480,#1d2824, 68-74 #b2c3b8,#1d2824, 75-75 #b2c3b8,#608269, 76-149 #b2c3b8,#0d1410, -|9: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-10 #e5eee5,#0d1410, 11-13 #c9a7ed,#0d1410, 14-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410, -|10: 0-0 d,#608269, 1-4 d,#0d1410, 5-10 #59675c,#0d1410, 11-23 #e5eee5,#0d1410, 24-25 #f8c082,#0d1410, 26-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-149 #e5eee5,#0d1410, diff --git a/test/snapshots/syntax.snap b/test/snapshots/syntax.snap index aae49c1b..85aae5c8 100644 --- a/test/snapshots/syntax.snap +++ b/test/snapshots/syntax.snap @@ -1,5 +1,5 @@ # tree-sitter: open a .zig file, keyword/string/number/comment colors on; -# Colors off (SPC t c) clears them; edit re-highlights +# edit re-highlights file demo.zig const std = @import("std"); // greet\npub fn main() void {\n var x: u32 = 42;\n _ = x;\n} start 31 150 -n 3 wait 8000 demo.zig @@ -17,13 +17,3 @@ wait 10000 @import stable 700 15000 snap zig-open snapstyle zig-open -key space -key t -key c -stable 500 10000 -snapstyle colors-off -key space -key t -key c -stable 500 10000 -snapstyle colors-on diff --git a/test/snapshots/theme.golden b/test/snapshots/theme.golden index 3c6dbcbd..8e9d49c2 100644 --- a/test/snapshots/theme.golden +++ b/test/snapshots/theme.golden @@ -218,12 +218,7 @@ |28: 0-0 d,#9fae76, 1-49 d,#fffdeb, 50-50 d,#9fae76, 51-99 d,#fffdeb, |29: 0-0 d,#9fae76, 1-49 d,#fffdeb, 50-50 d,#9fae76, 51-99 d,#fffdeb, |30: 0-0 d,#9fae76, 1-49 d,#fffdeb, 50-50 d,#9fae76, 51-99 d,#fffdeb, -== snap colors-off grid=100x31 cursor=4,6 -|4: ls Colors ls -== style colors-off grid=100x31 -|4: 0-0 d,#9fae76, 1-1 d,#fffdeb, 2-41 #293f35,#fffdeb, 42-42 #293f35,#e4f0ed, 43-49 #3d6055,#e4f0ed, 50-50 #3d6055,#9fae76, 51-51 #3d6055,#fffdeb, 52-99 #293f35,#fffdeb, == snap forge grid=100x31 cursor=4,6 -|4: ls NextColor ls == style forge grid=100x31 |0: 0-1 d,#22252b, 2-77 #c5c9d2,#22252b, 78-86 #e2eef4,#1c5172, 87-99 #e2eef4,#22252b, |1: 0-1 d,#6a7b67, 2-49 #d1d5de,#374253, 50-51 #d1d5de,#6a7b67, 52-99 #c5c9d2,#22252b, diff --git a/test/snapshots/theme.snap b/test/snapshots/theme.snap index 19176475..5b9544cf 100644 --- a/test/snapshots/theme.snap +++ b/test/snapshots/theme.snap @@ -41,17 +41,6 @@ release middle @NextColor 1 stable 700 10000 snap atelier snapstyle atelier -# Colors still toggles the existing recolor pass through its leader binding. -key space -key t -key c -stable 700 10000 -snap colors-off -snapstyle colors-off -key space -key t -key c -stable 700 10000 press middle @NextColor 1 release middle @NextColor 1 stable 700 10000 diff --git a/test/snapshots/ttyhelp.golden b/test/snapshots/ttyhelp.golden index f60fe579..d0b90887 100644 --- a/test/snapshots/ttyhelp.golden +++ b/test/snapshots/ttyhelp.golden @@ -29,16 +29,16 @@ |7: 2 SPC and its keys, a chord, a button, the |8: 3 topbar - or the name, executed anywhere. |9: 4 -|10: 5 SPC ? Help topbar +|10: 5 SPC ? Help topbar |11: 6 SPC P ClipPasteBefore |12: 7 SPC R ClipReplace |13: 8 SPC Y ClipYankMain |14: 9 SPC c d Delcol -|15: 10 SPC c j Joincol topbar -|16: 11 SPC c n Newcol topbar +|15: 10 SPC c j Joincol topbar +|16: 11 SPC c n Newcol topbar |17: 12 SPC d Del -|18: 13 SPC f c Config topbar -|19: 14 SPC f f Find topbar -|20: 15 SPC f g Grep topbar +|18: 13 SPC f c Config topbar +|19: 14 SPC f f Find topbar +|20: 15 SPC f g Grep topbar == snap leaderworks grid=100x31 cursor=7,6 |3: $ |
