summaryrefslogtreecommitdiff
path: root/src/pardes.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/pardes.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/pardes.zig')
-rw-r--r--src/pardes.zig9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/pardes.zig b/src/pardes.zig
index f5001797..ca0980f4 100644
--- a/src/pardes.zig
+++ b/src/pardes.zig
@@ -6764,6 +6764,15 @@ pub const Pardes = struct {
p.reportError(w.pane, "language response", err);
return;
};
+ // What a 9P write that asked it answers: the pane the rows are in
+ // (a multi-file Rename's preview), not the pane it was asked from.
+ if (pane.search_pane) |rid| if (p.panes[rid]) |rp| {
+ p.fs.lsp_result = rp.serial;
+ };
+ if (w.kind == .rename) {
+ var said_buf: [96]u8 = undefined;
+ p.setMessage(w.pane, std.fmt.bufPrint(&said_buf, "Rename: {d} edit(s) across files, previewed, not applied", .{nrows}) catch "Rename: previewed");
+ }
if (panes.Output.traits(from).jumps) {
const result = p.panes[pane.search_pane orelse return] orelse return;
const file = pane.file orelse return;