From 1b12f7aadaf0e0a4570a5985900f61d0fb897f79 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 5 Nov 2026 00:22:27 -0300 Subject: surface: a frame's images are a std.ArrayList(ImagePlace), where they were a slice of optionals grown by hand (appendImagePlace's doubling realloc, nimages beside it) whose slots were never null: every reader's `orelse continue` and `.?` go (gui, tui, terminal, TerminalImages, ninep/screen, test/pdf.zig, kitty and the two PDF benches); macos.zig's loop the same, passing ast-check but not built here Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/surface.zig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/surface.zig') diff --git a/src/surface.zig b/src/surface.zig index f5afdd98..3b99f517 100644 --- a/src/surface.zig +++ b/src/surface.zig @@ -499,8 +499,7 @@ pub const Surface = struct { cells: []Cell = &.{}, /// bar: draw an insert-style thin cursor instead of the block cursor: ?struct { x: u16, y: u16, bar: bool = false } = null, - images: []?ImagePlace = &.{}, - nimages: usize = 0, + images: std.ArrayList(ImagePlace) = .empty, panel_tracks: [MAX_PANES * 2]animation.Track = undefined, npanel_tracks: usize = 0, previous_cells: []const Cell = &.{}, -- cgit v1.3