diff options
Diffstat (limited to 'src/look.zig')
| -rw-r--r-- | src/look.zig | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/look.zig b/src/look.zig index de51804d..357a9c63 100644 --- a/src/look.zig +++ b/src/look.zig @@ -1499,8 +1499,11 @@ fn isRecentList(pane: *const Pane) bool { return std.meta.eql(o.from, panes.Output.Origin{ .cmd = .Recent }) or std.meta.eql(o.from, panes.Output.Origin{ .cmd = .Jumplist }); } -pub fn lookAt(p: *Pardes, id: usize, operand: []const u8) void { +pub fn lookAt(p: *Pardes, id: usize, operand_raw: []const u8) void { const pane = p.panes[id] orelse return; + // `~/x`, `~/x:12`, `~/x:/re/`: home, before anything reads the text. + var home_buf: [4096]u8 = undefined; + const operand = filesystem.expandHome(std.mem.trim(u8, operand_raw, " \t\r\n"), &home_buf); // A +Recent row is a remembered place: reopened and clamped to the file // as it is now, never a miss for a line the file no longer has. if (isRecentList(pane)) { |
