diff options
Diffstat (limited to 'core/panes.zig')
| -rw-r--r-- | core/panes.zig | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/panes.zig b/core/panes.zig index 5277ebba..ee03ccf2 100644 --- a/core/panes.zig +++ b/core/panes.zig @@ -320,6 +320,9 @@ pub const Pane = struct { view: SessionView = .{}, /// The painters a file's body wears in this view (File.Layers). layers: File.Layers = .{}, + /// What jj answered for the last `Changes` in any view (jj.zig): the + /// pane's, so a client that joins late has it in the dump. + changes: ?*@import("jj.zig").Changes = null, sel: [3]Sel = @splat(.{}), pointer_selections: [3]?PointerSelection = @splat(null), next_pointer_selection: u64 = 0, @@ -1279,6 +1282,11 @@ pub fn teardownPane(p: *Pardes, pane: *Pane) void { pane.input.deinit(p.gpa); pane.jump.deinit(p.gpa); pane.places.deinit(p.gpa); + if (pane.changes) |changes| { + changes.deinit(p.gpa); + p.gpa.destroy(changes); + pane.changes = null; + } if (pane.query) |q| { q.deinit(p.gpa); p.gpa.destroy(q); |
