summaryrefslogtreecommitdiff
path: root/core/term/terminal.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/term/terminal.zig')
-rw-r--r--core/term/terminal.zig11
1 files changed, 5 insertions, 6 deletions
diff --git a/core/term/terminal.zig b/core/term/terminal.zig
index d328748e..d99cfb79 100644
--- a/core/term/terminal.zig
+++ b/core/term/terminal.zig
@@ -721,12 +721,11 @@ pub fn scrollbackLen(state: ?*State) usize {
return @intCast(counting.fullCount());
}
-/// Its emulator and what it holds, freed; its kitty images' caches were
-/// `gpa`'s.
-pub fn close(state: *State, gpa: std.mem.Allocator) void {
- if (comptime images_enabled) state.images.deinit(gpa);
- state.stream.deinit();
+/// Its emulator and what it holds, freed.
+pub fn close(state: *State) void {
const own = state.gpa;
+ if (comptime images_enabled) state.images.deinit(own);
+ state.stream.deinit();
state.vt.deinit(own);
own.destroy(state);
}
@@ -1502,7 +1501,7 @@ pub fn images(state: *State, gpa: std.mem.Allocator, at: ImagesAt, out: *std.Arr
// Nothing to draw, no placeholder to blank and nothing cached to let
// go: the common case costs the rows' flags.
if (!any_placeholder and screen.kitty_images.placements.count() == 0 and state.images.converted.count() == 0) return;
- state.images.draw(gpa, &state.vt, at, rows_of[0..vp_rows], out, frame, frame_cols);
+ state.images.draw(state.gpa, gpa, &state.vt, at, rows_of[0..vp_rows], out, frame, frame_cols);
}
test "the luminance table answers exactly what ghostty computes" {