summaryrefslogtreecommitdiff
path: root/src/ninep
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-29 11:18:33 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:16 -0300
commit53fcf030b175fc035e62d1d471c01c2e0caefc9e (patch)
tree0539c39a8e8e63216269d79220c7c11bf59f85ea /src/ninep
parent23ff1aa588c5dfcb194543c949ebd87cbb12e725 (diff)
downloadpardes-53fcf030b175fc035e62d1d471c01c2e0caefc9e.tar.gz
pardes-53fcf030b175fc035e62d1d471c01c2e0caefc9e.zip
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 <[email protected]>
Diffstat (limited to 'src/ninep')
-rw-r--r--src/ninep/ctl.zig2
1 files changed, 2 insertions, 0 deletions
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" {