summaryrefslogtreecommitdiffstats
path: root/control.c
diff options
context:
space:
mode:
authornicm <nicm>2020-06-11 09:55:47 +0000
committernicm <nicm>2020-06-11 09:55:47 +0000
commit50ee41423f6f7b4c0bc83ecf9468a37fc8bf9e99 (patch)
treed2c7dec252a8331249a05f5b1d1b7f61e4537579 /control.c
parent23d79cfda87f822c7440fd572ce5fc440c079ac2 (diff)
Add a -A option to pause a pane manually.
Diffstat (limited to 'control.c')
-rw-r--r--control.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/control.c b/control.c
index 140849e1..8ff7736f 100644
--- a/control.c
+++ b/control.c
@@ -265,6 +265,20 @@ control_continue_pane(struct client *c, struct window_pane *wp)
}
}
+/* Pause a pane. */
+void
+control_pause_pane(struct client *c, struct window_pane *wp)
+{
+ struct control_pane *cp;
+
+ cp = control_add_pane(c, wp);
+ if (~cp->flags & CONTROL_PANE_PAUSED) {
+ cp->flags |= CONTROL_PANE_PAUSED;
+ control_discard_pane(c, cp);
+ control_write(c, "%%pause %%%u", wp->id);
+ }
+}
+
/* Write a line. */
static void
control_vwrite(struct client *c, const char *fmt, va_list ap)