summaryrefslogtreecommitdiff
path: root/src/gui/gui.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/gui.zig')
-rw-r--r--src/gui/gui.zig8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/gui.zig b/src/gui/gui.zig
index da48d3fb..f7c4c51c 100644
--- a/src/gui/gui.zig
+++ b/src/gui/gui.zig
@@ -3579,6 +3579,7 @@ const Shell = struct {
.push_spawn = spawnPane,
.push_pty_write = ptyWrite,
.push_pty_resize = ptyResize,
+ .push_pty_signal = ptySignal,
.pull_tty_taken = ttyTaken,
.push_write_file = writeFile,
.push_write_dump = writeDump,
@@ -3917,6 +3918,13 @@ fn ptyResize(ctx: ?*anyopaque, pane: u8, cols: u16, rows: u16) void {
}
}
+/// `pty/ctl`'s `sig`. A pane with no pty of ours has nothing to signal, which
+/// is the same silence `ptyWrite` above gives it.
+fn ptySignal(ctx: ?*anyopaque, pane: u8, sig: pardes.PtySignal) void {
+ const s = shellOf(ctx);
+ if (s.ptys[pane]) |pt| look.signalTty(pt.pid, pt.fd, sig);
+}
+
/// Is a program (vim, a pager, an agent) holding this pane's tty instead of
/// the shell we forked? Asked by the core only where it is about to type a
/// command line, which is why the /proc walk behind it is not in pollCwds: