summaryrefslogtreecommitdiffstats
path: root/control.c
diff options
context:
space:
mode:
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)