summaryrefslogtreecommitdiff
path: root/src/look.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/look.zig')
-rw-r--r--src/look.zig5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/look.zig b/src/look.zig
index a358b31a..0df1f307 100644
--- a/src/look.zig
+++ b/src/look.zig
@@ -1787,6 +1787,8 @@ pub fn lookAt(p: *Pardes, id: usize, operand_raw: []const u8) void {
if (t.at.line > pv.page_count) return missedPage(p, id, pv.path, t.at.line);
if (!pv.hitExists(p.pdf_gpa, @max(1, t.at.line), t.at.col)) return missedHit(p, id, pv.path, @max(1, t.at.line), t.at.col);
};
+ // A directory's pane, looked at again: read again.
+ if (target.file) |f| if (f.listing != null) return panes.Dir.show(p, id, t.id);
const before = p.active;
clearNavigationSelection(p, target);
focusPaneLine(p, t.id, t.at, .center);
@@ -1800,6 +1802,9 @@ pub fn lookAt(p: *Pardes, id: usize, operand_raw: []const u8) void {
var said: [4200]u8 = undefined;
return p.reportFailure(id, std.fmt.bufPrint(&said, "look: {s}: no such directory", .{dir[0..@min(dir.len, 4096)]}) catch "look: no such directory");
};
+ // acme's: a pane listing it (Dir.zig). `DirLook terminal`, what
+ // pardes did before: `ls` in a terminal there.
+ if (p.settings.dir_look == .pane) return panes.Dir.look(p, id, dir);
for (p.panes, 0..) |slot, i| {
if (slot) |tt| if (std.mem.eql(u8, tt.cwdSlice(), dir) and exec.takesCommandLine(p, i)) {
clearNavigationSelection(p, tt);