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/ninep/ctl.zig | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/ninep') diff --git a/src/ninep/ctl.zig b/src/ninep/ctl.zig index b17f150a..f0dab28d 100644 --- a/src/ninep/ctl.zig +++ b/src/ninep/ctl.zig @@ -4105,3 +4105,15 @@ test "Tty+bash on a pane ctl is Tty with its argument, as exec and the tag take try testing.expectEqual(Status.ok, r.reply.status); try testing.expect(r.spawned); } + +test "a Rename that reaches other files previews them, says so, and is the pane a waiting write answers" { + const p = try withFile(testing.allocator, "x\n"); + defer p.deinit(); + const id = p.active; + p.fs.lsp_result = null; + p.lspRequest(id, .rename, "sum"); + p.lspResponse(p.lsp_wait.?.id, "lib.rs:2:8 sum\nmain.rs:4:13-15 sum\n"); + const preview = p.panes[p.panes[id].?.search_pane.?].?; + try testing.expectEqual(preview.serial, p.fs.lsp_result.?); + try testing.expect(th.logHas(p, "Rename: 2 edit(s) across files, previewed, not applied")); +} -- cgit v1.3