diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-19 22:15:16 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-19 22:26:54 -0300 |
| commit | ba10cc4ff30d08d27ad35576df04a03282b6521b (patch) | |
| tree | e367489aa56f36d71485ce07b4022b512139a94c /core/term/TerminalImages.zig | |
| parent | 98b2bc05cd7b6c78952600029939bbc44c5fc56b (diff) | |
| download | pardes-ba10cc4ff30d08d27ad35576df04a03282b6521b.tar.gz pardes-ba10cc4ff30d08d27ad35576df04a03282b6521b.zip | |
Term: the two things a speculation writes into a terminal and no rollback puts back move into the pane, which the copy holds and the digest covers: the cell its program last heard the mouse at (Pane.term_mouse, handed to Term.mouse and Term.wheel, which ghostty's encoder reads and writes) and its kitty graphics as glyph art (Pane.term_petscii, which the Petscii builtin flips and the images' draw takes in ImagesAt): the sizing's table (reports/pardes-term-bytes.md, section 1; the brief's step 1c); Parts loses both (a dump of an older build carries them and they are passed over by name: a terminal's Petscii chosen before an Upgrade is off after it), Ops loses petscii and togglePetscii; term-test 17/17, core-test 848/991 (143 skipped), shell-test 1027/1030
Co-Authored-By: Claude Opus <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'core/term/TerminalImages.zig')
| -rw-r--r-- | core/term/TerminalImages.zig | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/core/term/TerminalImages.zig b/core/term/TerminalImages.zig index feba5ddc..d0d364a1 100644 --- a/core/term/TerminalImages.zig +++ b/core/term/TerminalImages.zig @@ -24,9 +24,6 @@ const image_decode_pixels: usize = 64 * 1024 * 1024; /// oldest past this): a 4K picture in RGBA, with room for a second. pub const storage_limit = 64 * 1024 * 1024; -/// This pane asks for its images as glyph art even where pixels could be -/// drawn (the Petscii builtin). -petscii: bool = false, /// Pixels in RGBA for images ghostty-vt holds in another format (RGB, /// grey): only for images on screen, dropped the frame they are not. /// The emulator's own allocator's, as the emulator is (`draw`'s `own`): @@ -191,7 +188,7 @@ pub fn draw( const bottom = pages.getBottomRight(.viewport) orelse return; const cw: u32 = @max(1, where.cell_w); const ch: u32 = @max(1, where.cell_h); - const ctx: Ctx = .{ .ti = ti, .own = own, .gpa = gpa, .out = out, .pane = where.pane, .serial = where.serial, .tx = where.tx, .body_y = where.body_y, .cols = where.cols, .rows_of = rows_of, .cw = cw, .ch = ch }; + const ctx: Ctx = .{ .ti = ti, .own = own, .gpa = gpa, .out = out, .pane = where.pane, .serial = where.serial, .tx = where.tx, .body_y = where.body_y, .cols = where.cols, .rows_of = rows_of, .cw = cw, .ch = ch, .glyph = where.petscii }; // Handed on lowest z first (the storage's order is a hash map's), the // order a shell draws them in; equal z keeps the order they came in. const first = out.items.len; @@ -283,6 +280,8 @@ const Ctx = struct { rows_of: []const ?u16, cw: u32, ch: u32, + /// Its images as glyph art (the pane's Petscii). + glyph: bool, /// Draw `src` of `img` over `dst`, one cell row of it at a time: a row /// is shown, or not, or shown elsewhere, as the body lays it out. @@ -323,7 +322,7 @@ const Ctx = struct { }, .key = plain.Placement.keyOf(ctx.serial, img.id, @truncate(img.generation)), .z = z, - .art = .{ .glyph = ctx.ti.petscii }, + .art = .{ .glyph = ctx.glyph }, }) catch {}; } } |
