diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-29 03:13:10 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:15 -0300 |
| commit | 6dfc6838c1c02978c026b650d69f87f23e3ff81c (patch) | |
| tree | a488db19607f2a1a7759f2e66a4688182e371124 /src/exec.zig | |
| parent | 073695995ecf4a269da8d338b23bfab1d3369c05 (diff) | |
| download | pardes-6dfc6838c1c02978c026b650d69f87f23e3ff81c.tar.gz pardes-6dfc6838c1c02978c026b650d69f87f23e3ff81c.zip | |
Words from the workspace and column tags run in the session's directory
A command or Tty run from the workspace tag or a column tag started in
the focused pane's directory, though those tags have none of their own.
As acme's row and column tags do, they now run in the session's
directory, where pardes started (Pardes.sessionDir); a pane's tag and
text keep the pane's. The same for /tagexec, a column's exec and ctl.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/exec.zig')
| -rw-r--r-- | src/exec.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/exec.zig b/src/exec.zig index bb4309a4..484b85d7 100644 --- a/src/exec.zig +++ b/src/exec.zig @@ -310,12 +310,12 @@ pub fn spawnV9fsTty(p: *Pardes, from: usize) void { } fn spawnTtyWithMount(p: *Pardes, from: usize, v9fs: bool) ?*Pane { - const src = p.panes[from] orelse return null; + if (p.panes[from] == null) return null; const free = p.freeSlot() orelse { p.reportError(from, "Tty", error.NoPaneSlots); return null; }; - const nt = p.newShell(free, Pardes.paneDir(src)) catch |err| { + const nt = p.newShell(free, p.execDir(from)) catch |err| { p.reportError(from, "Tty", err); return null; }; @@ -577,7 +577,7 @@ fn runCommand(p: *Pardes, from: usize, line: []const u8) ?usize { return null; } const src = p.panes[from] orelse return null; - const dir = Pardes.paneDir(src); + const dir = p.execDir(from); // Not one whose pty a job it left behind still prints to: reusing it // would hang that job up. const reuse: ?usize = if (src.command != null and src.command_done and !src.command_pty) from else for (p.panes, 0..) |slot, i| { |
