summaryrefslogtreecommitdiff
path: root/src/look.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-30 12:03:44 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:17 -0300
commitd6c877f55669869bc4c360e6d94563ded778d26d (patch)
treec9c8ec537b97445c60936135b359d03434c669d6 /src/look.zig
parent946e7c6c00c1ecc20c1e529608423ac9caa6c6ba (diff)
downloadpardes-d6c877f55669869bc4c360e6d94563ded778d26d.tar.gz
pardes-d6c877f55669869bc4c360e6d94563ded778d26d.zip
Help and Find from the workspace or a column tag act in the session's directory, not the keyboard pane's
New, Tty and commands clicked in a tag no pane owns ran in the session's directory, but Help named its +Help after the pane with the keyboard, and Find walked that pane's directory. So the same click gave different results depending on which pane was focused. Both now take the session's directory from a header, through execDir as the others do. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/look.zig')
-rw-r--r--src/look.zig5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/look.zig b/src/look.zig
index 65d001a9..36eae75c 100644
--- a/src/look.zig
+++ b/src/look.zig
@@ -583,8 +583,9 @@ pub fn runSearch(p: *Pardes, id: usize, pat_raw: []const u8, kind: Search, start
if (pat.len == 0) return 0;
const arena = p.scratch.allocator();
// where the pane lives: a file's directory, a shell's cwd — the walk
- // root, and the directory the results buffer is named in.
- const dir = Pardes.paneDir(pane);
+ // root, and the directory the results buffer is named in. From a
+ // column's or the workspace's tag, the session's.
+ const dir = if (p.exec_header) p.sessionDir() else Pardes.paneDir(pane);
const out = try arena.alloc(u8, filesystem.search_max_output_bytes);
var out_len: usize = 0;
var nrows: usize = 0;