diff options
| author | Gabriel Schneider <[email protected]> | 2026-10-21 22:53:57 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-22 10:03:15 -0300 |
| commit | 6076ab9e805838d4c4e8bb795428fae0a85671e9 (patch) | |
| tree | ffbc0b1cfb803be44ff5ba65486ba42229df2ce7 /src/pardes.zig | |
| parent | 1c6ebadde64b2e0f416550f9fc806dfc3c80b5c1 (diff) | |
| download | pardes-6076ab9e805838d4c4e8bb795428fae0a85671e9.tar.gz pardes-6076ab9e805838d4c4e8bb795428fae0a85671e9.zip | |
Window mode: the pane's letter in its tag's box, no message
Diffstat (limited to 'src/pardes.zig')
| -rw-r--r-- | src/pardes.zig | 6 |
1 files changed, 4 insertions, 2 deletions
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" { |
