summaryrefslogtreecommitdiff
path: root/src/terminal.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-29 19:09:26 -0300
committerGabriel Schneider <[email protected]>2026-10-29 21:13:33 -0300
commit2eb8860b2ca05c426f3962661441aaee13d3be44 (patch)
tree8d363280576cc86db7209ef37c6210a0d5b75c8e /src/terminal.zig
parente4cfd57bc41c5740e3a823a8f05d70d3e87b68ca (diff)
downloadpardes-2eb8860b2ca05c426f3962661441aaee13d3be44.tar.gz
pardes-2eb8860b2ca05c426f3962661441aaee13d3be44.zip
web: the browser shell builds again and loads a dump of a native build: a theme by its name, a field compiled out passed over, no disk asked; touch.dump replaces the hand-written ZON fixture
Fixed for wasm32-freestanding: counts as usize, no threads, stb_image, tape or host stat there. touch.mjs follows the renderer's 13 tag-layer fields, helix's retuned colours and the tag column. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/terminal.zig')
-rw-r--r--src/terminal.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/terminal.zig b/src/terminal.zig
index ad35784f..bcb70110 100644
--- a/src/terminal.zig
+++ b/src/terminal.zig
@@ -254,7 +254,7 @@ pub const State = struct {
return;
}
if (bytes.len < 8) return error.EndOfDump;
- const n = std.mem.bytesToValue(u64, bytes[0..8]);
+ const n = std.math.cast(usize, std.mem.bytesToValue(u64, bytes[0..8])) orelse return error.EndOfDump;
if (bytes.len - 8 < n) return error.EndOfDump;
var arena: std.heap.ArenaAllocator = .init(gpa);
defer arena.deinit();
@@ -797,7 +797,7 @@ pub fn create(gpa: std.mem.Allocator, cols: u16, rows: u16) !*Pane {
// defaults to direct alone, which `kitten icat` and timg detect and
// fall back from, base64 through the pty. What the program can read
// it could send itself: it runs as the user, under pardes.
- .kitty_image_loading_limits = if (images_enabled) .allWithTempDir(tempDir()) else .direct,
+ .kitty_image_loading_limits = if (images_enabled) .allWithTempDir(tempDir()) else if (@FieldType(ghostty_vt.Terminal.Options, "kitty_image_loading_limits") == void) {} else .direct,
});
state.stream = .init(.{ .handler = .{ .inner = state.vt.vtHandler() }, .allocator = gpa });
state.reply_len = 0;