diff options
Diffstat (limited to 'src/look.zig')
| -rw-r--r-- | src/look.zig | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/look.zig b/src/look.zig index d7e763d3..136a9ede 100644 --- a/src/look.zig +++ b/src/look.zig @@ -1162,6 +1162,13 @@ pub fn lookAt(p: *Pardes, id: usize, operand: []const u8) void { pane.search_row = null; _ = searchStep(p, id, 1); } + // A path that is not there searches for its text, and a search + // that found nothing says so rather than leave an empty buffer. + const results = if (pane.search_pane) |rid| p.panes[rid] else null; + if (results) |r| if (r.file) |f| if (f.content.len == 0) { + var said: [96]u8 = undefined; + p.setMessage(id, std.fmt.bufPrint(&said, "Look: no match for \"{s}\"", .{@import("Messages.zig").clip(trimmed, 48)}) catch "Look: no match"); + }; }, .pane => |t| { if (t.id >= MAX_PANES) return; |
