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 2369dd28..6978284b 100644 --- a/src/gui/gui.zig +++ b/src/gui/gui.zig @@ -3841,6 +3841,7 @@ const Shell = struct { .pty_signal = ptySignal, .close_pty = closePaneShell, .tty_taken = ttyTaken, + .kill_job = killJob, .write_file = writeFile, .write_dump = writeDump, .watch_file = watchFile, @@ -4196,6 +4197,13 @@ fn ttyTaken(ctx: ?*anyopaque, pane: u8) bool { return host_io.ttyTaken(pt.pid, pt.fd); } +fn killJob(ctx: ?*anyopaque, pane: u8) bool { + const s = shellOf(ctx); + const pt = s.ptys[pane] orelse return false; + if (pt.fd < 0) return false; + return host_io.killJob(pt.pid, pt.fd); +} + fn writeFile(ctx: ?*anyopaque, pane: u8, path: []const u8, bytes: []const u8) void { const s = shellOf(ctx); filesystem.write(s.core, path, bytes) catch |err| |
