Add a -A option to pause a pane manually.

This commit is contained in:
nicm
2020-06-11 09:55:47 +00:00
parent 23d79cfda8
commit 50ee41423f
4 changed files with 25 additions and 3 deletions

View File

@ -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)