summaryrefslogtreecommitdiff
path: root/src/dump.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-07 19:45:54 -0300
committerGabriel Schneider <[email protected]>2026-11-07 20:39:56 -0300
commit4c134eaa5c7f84eba7091c9ccef86567f1434d49 (patch)
treec6bd720bc8999887573e8d9112e553e19154f78b /src/dump.zig
parentf2784acb88c98f33fed25dbf41f1a5af278c8e84 (diff)
downloadpardes-4c134eaa5c7f84eba7091c9ccef86567f1434d49.tar.gz
pardes-4c134eaa5c7f84eba7091c9ccef86567f1434d49.zip
gui: a kind's pane (an image, a PDF) is watched again and shows its file as it is now: Kind.open and a restored kind's pane emit its watch, which kinds #14 dropped with pdf_view, and a reload counts into its pictures' keys, since its kind numbers them afresh from each open and a window keeps a texture by key; the T1 session watches files as a host does (Session.filesChanged) and two behaviour cases pin it
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/dump.zig')
-rw-r--r--src/dump.zig5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/dump.zig b/src/dump.zig
index 8aa4aa16..9849c8e4 100644
--- a/src/dump.zig
+++ b/src/dump.zig
@@ -596,7 +596,10 @@ fn reviveSession(p: *Pardes, previous: ?*Pardes, resumed: bool) !void {
/// kind's pane opened again (a PDF a build before the pdf addon dumped, as
/// the addon's).
fn revivePane(p: *Pardes, id: usize, pane: *pardes.panes.Pane, was_on_disk: bool) void {
- if (pane.addon) |slot| return reviveSlot(p, id, slot);
+ if (pane.addon) |slot| {
+ if (slot.path.len > 0 and filesystem.localPath(slot.path) != null) p.emit(.{ .watch = .{ .pane = @intCast(id), .on = true } });
+ return reviveSlot(p, id, slot);
+ }
if (pane.terminal != null) {
// A command pane comes back finished, showing what it said: its
// command is not run again. A host that runs shells starts one