summaryrefslogtreecommitdiff
path: root/src/pardes.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-28 20:11:51 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:15 -0300
commit54c14c2e65fe15b097bef11919d6ec8d9fce411a (patch)
treea3945447aa94fc20b00ed5cbf655e594b1565d95 /src/pardes.zig
parent6a49974e56521cf66c9a4d0eb579cd5de949891e (diff)
downloadpardes-54c14c2e65fe15b097bef11919d6ec8d9fce411a.tar.gz
pardes-54c14c2e65fe15b097bef11919d6ec8d9fce411a.zip
An empty column shows its theme's empty_col: white in the acme theme, as acme paints it
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/pardes.zig')
-rw-r--r--src/pardes.zig19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/pardes.zig b/src/pardes.zig
index bad512a9..e3f4bb60 100644
--- a/src/pardes.zig
+++ b/src/pardes.zig
@@ -1317,6 +1317,25 @@ test "Placement pardes brings back the old rules, and says so in Config" {
try std.testing.expectEqual(config.Runtime.Placement.acme, p.settings.placement);
}
+test "an empty column shows its theme's empty_col under its tag: acme's white, else the border" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 120, .rows = 20 });
+ defer p.deinit();
+ p.newColumn(0);
+ tagline.exitHeader(p);
+ inline for (.{ "acme", "dark" }) |name| {
+ try std.testing.expect(p.executeBuiltinLine(0, "Theme " ++ name));
+ p.chrome_animation.displayed = colors.ChromeTheme.fromTheme(p.theme());
+ p.sync();
+ var arena: std.heap.ArenaAllocator = .init(std.testing.allocator);
+ defer arena.deinit();
+ const s = try p.render(arena.allocator());
+ const cell = s.at(p.col_x[1] + 3, p.screen_h - 2);
+ const want = p.chromeTheme().empty_col;
+ try std.testing.expectEqual(want, cell.style.bg.rgb);
+ if (std.mem.eql(u8, name, "acme")) try std.testing.expectEqual([3]u8{ 0xff, 0xff, 0xff }, want) else try std.testing.expectEqual(p.chromeTheme().border, want);
+ }
+}
+
test "dragging a column's only pane to another leaves that column in place, empty" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 160, .rows = 32 });
defer p.deinit();