summaryrefslogtreecommitdiff
path: root/core/panes.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/panes.zig')
-rw-r--r--core/panes.zig4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/panes.zig b/core/panes.zig
index e4ed3e9d..20a03b25 100644
--- a/core/panes.zig
+++ b/core/panes.zig
@@ -1254,7 +1254,9 @@ pub fn teardownPane(p: *Pardes, pane: *Pane) void {
pane.jump.deinit(p.gpa);
pane.places.deinit(p.gpa);
p.gpa.free(pane.recipe_sels);
- @import("jj.zig").forget(p, pane.serial);
+ // A pane that walked on (Trail.show) is the same pane on another file:
+ // what jj answers now is its own.
+ if (p.paneBySerial(pane.serial) == null) @import("jj.zig").forget(p, pane.serial);
if (pane.query) |q| {
q.deinit(p.gpa);
p.gpa.destroy(q);