diff options
| author | Gabriel Schneider <[email protected]> | 2026-10-28 21:59:19 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-28 23:11:27 -0300 |
| commit | caffd9c1f8742a17431f7de0a2824d3fc02bfd72 (patch) | |
| tree | 9c51876719a9882e6b3fed58684107c4ab7ee40f /test/kitty_client.zig | |
| parent | 2e237ef20b6a5d9f680d80a560d144c0f67dff91 (diff) | |
| download | pardes-caffd9c1f8742a17431f7de0a2824d3fc02bfd72.tar.gz pardes-caffd9c1f8742a17431f7de0a2824d3fc02bfd72.zip | |
kitty z-index: a terminal image's z= goes with it, images go to the shell lowest first, and the tty hands z on to the outer terminal (under the text below 0); real clients recorded, replayed and run live
z-index was lost: an ImagePlace had none, so every image went over the cells in hash-map order, a z<0 picture (a background under text) over the text and overlapping images in any order. ImagePlace.z now carries the placement's z (a virtual placement's from its placeholder target), TerminalImages sorts what it appends lowest z first (stable), and the tty's exactKittyPlacement sets vaxis's z_index, so a kitty terminal outside stacks them and puts z<0 under the text. The GUI draws them in that order but still over the cells: under the text there needs a glyph pass after the images (ui.frag's clear_bg_bit) in gui.zig's vertex buffer.
Real clients: test/kitty_harness.zig's PARDES_KITTY_EXPLORE runs commands in the pane under script(1) and prints what pardes placed outside; kitten icat 0.49.2 (--align left/center/right, --place, --scale-up, --unicode-placeholder, --clear, file/memory/stream/detect), chafa 1.18.3, viu and yazi 26.9.1 all landed where they should. Their recorded traffic (test/kitty-fixtures/*.vt) replays through the core (test/kitty.zig) to the cells they drew live. The harness now also runs yazi live (shared memory, a virtual placement, placeholders), checks z=-1 outside, and runs a second pardes under a terminal without kitty graphics: no graphics command reaches it and the image is glyph art in all 32 cells. The harness empties NO_COLOR (zig build sets it, and vaxis drew no colour at all under the harness) by setenv, not unsetenv, which compacts the environment std captured.
Also: tests that a pane's image follows pardes's own scrollback, an edited copy taller than its rows, a narrow pane's edge, Collapse and a cell-size change; and a knownGap: images do not survive a dump (Dump, Handover, a pane reopened from the Store), whose VT text has none.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'test/kitty_client.zig')
| -rw-r--r-- | test/kitty_client.zig | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/kitty_client.zig b/test/kitty_client.zig index 23c7587f..753727df 100644 --- a/test/kitty_client.zig +++ b/test/kitty_client.zig @@ -109,6 +109,9 @@ fn play(arena: std.mem.Allocator, case: []const u8, cmds: *std.ArrayList(u8)) !v } else if (std.mem.eql(u8, case, "cancel")) { // CAN in the middle of the payload: nothing runs, the text goes on. try cmds.print(arena, "\x1b_Ga=T,i=64,f=24,s={d},v={d};{s}\x18CANCELLED-OK\r\n", .{ side, side, b64[0..512] }); + } else if (std.mem.eql(u8, case, "under")) { + // Under the text (z < 0), as a background picture is put. + try cmds.print(arena, "\x1b_Ga=T,i=66,f=24,s={d},v={d},c=8,r=4,z=-1,q=2;{s}\x1b\\\r\n", .{ side, side, b64 }); } else if (std.mem.eql(u8, case, "show")) { try cmds.print(arena, "\x1b_Ga=T,i=65,f=24,s={d},v={d},c=8,r=4,q=2;{s}\x1b\\\r\n", .{ side, side, b64 }); } else if (std.mem.eql(u8, case, "delete")) { |
