From 35e72930c11af5563da9d62df2b74a7439f36653 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 29 Sep 2026 04:18:04 -0300 Subject: A file changed on disk never reloads over unsaved edits A watched file rewritten on disk was loaded over a buffer's unsaved edits and its dirty flag cleared, so Exit and Del no longer asked about them. A clean buffer still reloads; one with edits keeps its text and stays dirty, says changed on disk (get reloads it, Save overwrites it), logs changed , and its Save warns once before overwriting the newer file, as acme's Put refuses a file modified since read (exec.c:577); get asks as ever (winclean, exec.c:513). The restored-watch test's dirty case now keeps the snapshot, and the filewatch snapshot script (re-recorded by name) checks both halves: the edited pane keeps its edit and says so, the clean one reloads. Co-Authored-By: Claude Opus 5.5 --- docs/fs.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/fs.md b/docs/fs.md index cf90aadc..3baac9c4 100644 --- a/docs/fs.md +++ b/docs/fs.md @@ -466,7 +466,13 @@ tab width — followed by rio's `current` or `notcurrent` (rio(4), `wctl`): whether the pane has the keyboard. It takes the pane's builtins (below), `get`, which reloads the buffer from the name it carries (unsaved edits are refused once, `: Modified (get again to -discard)`, as acme's get asks winclean, exec.c:513), `answer ` +discard)`, as acme's get asks winclean, exec.c:513). A file that changes on +disk reloads by itself only into a buffer with no unsaved edits; one with +them keeps its text and stays dirty, says ` changed on disk (get +reloads it, Save overwrites it)` and logs `changed `, and then its +`Save` warns once, ` modified on disk since read (Save again to +overwrite)`, as acme's Put does (exec.c:577) -- acme reloads nothing by +itself. `answer ` for the question the pane asks on its notice band, which the log names as `ask ` -- `ask 4 del k j` for Del's side from the keyboard (`k` the pane above takes the rows, `j` the one below), `ask 4 -- cgit v1.3