diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/terminal.zig | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/terminal.zig b/src/terminal.zig index 20a9a015..d4238c83 100644 --- a/src/terminal.zig +++ b/src/terminal.zig @@ -900,8 +900,10 @@ pub fn screenTextLen(pane: *Pane) usize { /// Release the emulator's heap. The Pane allocation itself is the core's. pub fn deinitEmulator(pane: *Pane, gpa: std.mem.Allocator) void { if (comptime !enabled) return; - if (authorityOnly("close a terminal")) return; + // A pane with none (a file's, a picker's, a preview's) closes in a + // speculation as anywhere. const state = pane.terminal orelse return; + if (authorityOnly("close a terminal")) return; if (comptime images_enabled) state.images.deinit(gpa); state.stream.deinit(); const own = state.gpa; |
