From fb330ce04c4eec4de317637d26310b74e2ee5923 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 1 Oct 2026 06:22:44 -0300 Subject: 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 --- src/pardes.zig | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/pardes.zig') 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; -- cgit v1.3