summaryrefslogtreecommitdiff
path: root/core/Query.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/Query.zig')
-rw-r--r--core/Query.zig4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/Query.zig b/core/Query.zig
index 615919c1..30b07e92 100644
--- a/core/Query.zig
+++ b/core/Query.zig
@@ -1751,9 +1751,11 @@ fn promote(p: *Pardes, qid: usize, id: usize) void {
f.saved_hash = null;
f.saved_len = null;
f.disk_gone = false;
+ // Its text was read from that file to preview it (displayPreview).
+ f.on_disk = filesystem.localPath(f.path) != null;
f.syntax_dirty = true;
pane.attached_to = null;
- if (Pardes.recentKeeps(f.path)) p.recent.opened(p.recentGpa(), f.path);
+ if (f.on_disk) p.recent.opened(p.recentGpa(), f.path);
if (filesystem.localPath(f.path) != null) p.emit(.{ .watch = .{ .pane = @intCast(id), .on = true } });
pardes.ctlfs.events.noteLog(p, .rename, pane);
p.panes[qid].?.query.?.preview = 0;