diff options
Diffstat (limited to 'src/gui')
| -rw-r--r-- | src/gui/gui.zig | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/gui.zig b/src/gui/gui.zig index 491373a8..de5da1e7 100644 --- a/src/gui/gui.zig +++ b/src/gui/gui.zig @@ -4045,6 +4045,7 @@ const Shell = struct { .pty_signal = ptySignal, .close_pty = closePaneShell, .tty_taken = ttyTaken, + .fg_name = fgName, .kill_job = killJob, .write_file = writeFile, .write_dump = writeDump, @@ -4507,6 +4508,13 @@ fn ttyTaken(ctx: ?*anyopaque, pane: u8) bool { return host_io.ttyTaken(pt.pid, pt.fd); } +fn fgName(ctx: ?*anyopaque, pane: u8, buf: []u8) ?[]const u8 { + const s = shellOf(ctx); + const pt = s.ptys[pane] orelse return null; + if (pt.fd < 0) return null; + return host_io.foregroundName(pt.pid, pt.fd, buf); +} + fn killJob(ctx: ?*anyopaque, pane: u8) bool { const s = shellOf(ctx); const pt = s.ptys[pane] orelse return false; |
