From 53fcf030b175fc035e62d1d471c01c2e0caefc9e Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 29 Sep 2026 11:18:33 -0300 Subject: A Find or Grep that finds nothing empties its directory's +Search It failed with no match but left the last search's rows in the +Search, where they read as this one's. Co-Authored-By: Claude Opus 5.5 --- src/ninep/ctl.zig | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/ninep') diff --git a/src/ninep/ctl.zig b/src/ninep/ctl.zig index 2dc3a51b..a78a9fcd 100644 --- a/src/ninep/ctl.zig +++ b/src/ninep/ctl.zig @@ -1886,6 +1886,8 @@ test "Grep with no hit says grep: no match and opens nothing, a missing pane dir var after: usize = 0; for (p.panes) |slot| after += @intFromBool(slot != null); try testing.expectEqual(count, after); + // The +Search the miss would have filled is emptied, not left stale. + try testing.expectEqualStrings("", found.file.?.content); } test "Unmount of a name not mounted says no such mount, which a mount reads as ENOENT" { -- cgit v1.3