From 6076ab9e805838d4c4e8bb795428fae0a85671e9 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 21 Oct 2026 22:53:57 -0300 Subject: Window mode: the pane's letter in its tag's box, no message --- src/pardes.zig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/pardes.zig') diff --git a/src/pardes.zig b/src/pardes.zig index cb2ebe56..aaa9d177 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -8581,13 +8581,15 @@ test "window mode moves an outline and focuses it on Enter, Esc or a label" { try std.testing.expect(p.executeBuiltinLine(p.active, "Window")); p.update(.{ .key = .{ .cp = 'a', .text = "a" } }); try std.testing.expectEqual(@as(usize, 0), p.active); - // Painted: the outlined tag's band in the selection colour, a label on each. + // Painted: the outlined tag's band in the selection colour, each pane's + // letter in its tag's box. try std.testing.expect(p.executeBuiltinLine(p.active, "Window")); var arena: std.heap.ArenaAllocator = .init(std.testing.allocator); defer arena.deinit(); const shown = try p.render(arena.allocator()); try std.testing.expectEqual(p.theme().sel_bg, shown.tag_layers[0].bg); - try std.testing.expectEqualStrings("a", shown.tag_layers[0].cells[1].text[0..shown.tag_layers[0].cells[1].len]); + const box = shown.at(p.rects[0].x, p.tagTop(p.panes[0].?, p.rects[0])); + try std.testing.expectEqualStrings("a", box.text[0..box.len]); } test "raw tty Ctrl-B switches to editor mode without sending child input" { -- cgit v1.3