summaryrefslogtreecommitdiff
path: root/src/9p_io.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-01 06:22:44 -0300
committerGabriel Schneider <[email protected]>2026-10-01 07:16:43 -0300
commitfb330ce04c4eec4de317637d26310b74e2ee5923 (patch)
treeb1f9ce6f7c6814122ccd5a82f7f7812889472a16 /src/9p_io.zig
parentdf10c37122cc3e6565d13aeefb9466dc6c0dc780 (diff)
downloadpardes-fb330ce04c4eec4de317637d26310b74e2ee5923.tar.gz
pardes-fb330ce04c4eec4de317637d26310b74e2ee5923.zip
A Rename that previews other files answers its preview pane to the 9P write that asked it, and says on the message row that it previewed and applied nothing
A multi-file Rename filled a +Search preview but the waiting exec write answered the pane it was asked from, and nothing was said. lspResponse now notes the pane it filled (fs.lsp_result); the write that waited for the answer reads that pane back, as a look or an exec answers the pane it went to, and the message row says `Rename: N edit(s) across files, previewed, not applied`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/9p_io.zig')
-rw-r--r--src/9p_io.zig13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/9p_io.zig b/src/9p_io.zig
index ea3f799c..a4340ddf 100644
--- a/src/9p_io.zig
+++ b/src/9p_io.zig
@@ -317,7 +317,20 @@ pub const Listener = struct {
if (core.effects_len != 0) pardes.turn.awaitSettled(epoch);
if (core.fs.lsp_answer_at) |n| {
core.fs.lsp_answer_at = null;
+ core.fs.lsp_result = null;
pardes.turn.awaitLsp(n);
+ // The answer filled a pane (a Rename's preview): that is what
+ // this write's open reads back, as look and exec answer.
+ if (l.core == core) if (core.fs.lsp_result) |serial| {
+ core.fs.lsp_result = null;
+ core.fs.results[0] = serial;
+ core.fs.results_len = 1;
+ if (pardes.ctlfs.openOf(core, req)) |o| {
+ o.results.list[0] = serial;
+ o.results.len = 1;
+ o.results.read = 0;
+ }
+ };
}
core.fs.write_waits = false;
// ponytail: one slot, so a failure of another client's effects that