diff options
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| { |
