diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-30 17:40:41 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:17 -0300 |
| commit | b196f602a6bbb53e0025140c7a3f9cbb9f23bcd2 (patch) | |
| tree | f043d8d929c0083038e4bcb47b41d6b91608f44a /src/pardes.zig | |
| parent | 13ef34f1c10a5880be411475cfabd7bb1344916b (diff) | |
| download | pardes-b196f602a6bbb53e0025140c7a3f9cbb9f23bcd2.tar.gz pardes-b196f602a6bbb53e0025140c7a3f9cbb9f23bcd2.zip | |
Save path logs a save record naming the path it wrote
Save of a pane's own file logged `save <serial> <name>`, and so did a
scratch's `Save path` (the pane takes that name). A `Save path` that
writes a copy of a file pane, or a terminal's scrollback, elsewhere
logged nothing, so a follower could not tell the file was written. It
now logs `save <serial> <path>` with the path written, once the host has
written it (events.noteLogAs). fs.md's log table says so.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/pardes.zig')
| -rw-r--r-- | src/pardes.zig | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pardes.zig b/src/pardes.zig index 8c6ad5bb..f08cf01b 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -5606,14 +5606,17 @@ pub const Pardes = struct { g.saved_revision = was; return; } - if (st.promote) p.promoteSaved(st.pane, st.path.slice()); + if (st.promote) p.promoteSaved(st.pane, st.path.slice()) else ctlfs.events.noteLogAs(p, .save, after, st.path.slice()); return; } if (!pane.isTerminal()) return; const text = panes.terminal.screenTextAlloc(pane, p.gpa) catch return; defer p.gpa.free(text); makeParents(st.path.slice()); + const failures = p.fs.failures; p.hostWriteFile(st.pane, st.path.slice(), text); + if (p.fs.failures == failures) if (p.panes[st.pane]) |still| if (still.serial == st.serial) + ctlfs.events.noteLogAs(p, .save, still, st.path.slice()); }, .write_dump => { const out = p.dump_out orelse return; |
