diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-28 00:42:04 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:14 -0300 |
| commit | 425d9beb9c977df364ed83743cb2efdef9429478 (patch) | |
| tree | eaba2e20ff041b50539d1b47fdeb498e59237cf0 /test/mode.zig | |
| parent | 1912878e753ce12fdc1ac72ae2e83ddfc18df002 (diff) | |
| download | pardes-425d9beb9c977df364ed83743cb2efdef9429478.tar.gz pardes-425d9beb9c977df364ed83743cb2efdef9429478.zip | |
File the tag code into tagline.zig and draw tags beside bodies
With tags reduced to Texts, what is left of them is the computed prefix, the
default and saved tails, entering and leaving a tag and the headers: that goes
to tagline.zig, as acme keeps the tag half of a window in wind.c. Tag and
header drawing moves next to body drawing in body_layer.zig, and the tag hit
helpers go to tag_layer.zig with the Hit they read, where sameCell now also
tells the lines of a taller tag apart. The docs describe the tag as a Text.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'test/mode.zig')
| -rw-r--r-- | test/mode.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/mode.zig b/test/mode.zig index c429ea72..c7d7d548 100644 --- a/test/mode.zig +++ b/test/mode.zig @@ -11,7 +11,7 @@ fn mode(p: *Pardes, id: usize, expected: panes.Text.Mode) !void { fn clickModeTag(p: *Pardes) !void { const pane = p.panes[0].?; - const text = try p.tagText(p.scratch.allocator(), pane); + const text = try pardes.tagline.tagText(p, p.scratch.allocator(), pane); const col = std.mem.indexOf(u8, text, "Mode") orelse return error.MissingModeTag; const rect = p.rects[0]; const row = if (p.settings.tag_bottom) rect.y + rect.h - pardes.BOX_H else rect.y; @@ -33,7 +33,7 @@ test "Mode cycles terminal modes and keeps legacy toggle and custom tags" { while (p.nextEffect()) |_| {} const pane = p.panes[0].?; try std.testing.expectEqual(panes.Text.Mode.tty, pane.body.mode); - try std.testing.expect(std.mem.indexOf(u8, try p.tagText(p.scratch.allocator(), pane), " Mode") != null); + try std.testing.expect(std.mem.indexOf(u8, try pardes.tagline.tagText(p, p.scratch.allocator(), pane), " Mode") != null); try mode(p, 0, .normal); try mode(p, 0, .insert); // A clicked tag is typed into; its execute key is a normal-mode key, as @@ -67,7 +67,7 @@ test "Mode from actual tag Exec preserves parked file and output insert transact p.presentation.enabled = false; const pane = try p.setTestFile("ab\n"); if (output) pane.file.?.output = .{ .from = .search }; - try std.testing.expect(std.mem.indexOf(u8, try p.tagText(p.scratch.allocator(), pane), " Mode") == null); + try std.testing.expect(std.mem.indexOf(u8, try pardes.tagline.tagText(p, p.scratch.allocator(), pane), " Mode") == null); try customTag(pane, " Mode"); try mode(p, 0, .insert); p.update(.{ .key = .{ .cp = '界', .text = "界" } }); |
