diff options
author | Thomas Adam <thomas@xteddy.org> | 2021-08-25 12:01:11 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2021-08-25 12:01:11 +0100 |
commit | c6375a0d4003d1008bb64e96e9c0c4433e4a5d13 (patch) | |
tree | ac84b463df1f905b68cfce14c68a1bfe3d543b05 /cmd-display-panes.c | |
parent | 6616b42b2c28cd7a1b6d52dfc895f5a1d3dce8b3 (diff) | |
parent | 24636be42b4b0463afe5c72e1d982f28729a0579 (diff) | |
download | rtmux-c6375a0d4003d1008bb64e96e9c0c4433e4a5d13.tar.gz rtmux-c6375a0d4003d1008bb64e96e9c0c4433e4a5d13.tar.bz2 rtmux-c6375a0d4003d1008bb64e96e9c0c4433e4a5d13.zip |
Merge branch 'obsd-master' into master
Diffstat (limited to 'cmd-display-panes.c')
-rw-r--r-- | cmd-display-panes.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/cmd-display-panes.c b/cmd-display-panes.c index 169ab3d5..5773a2d0 100644 --- a/cmd-display-panes.c +++ b/cmd-display-panes.c @@ -27,14 +27,16 @@ * Display panes on a client. */ -static enum cmd_retval cmd_display_panes_exec(struct cmd *, - struct cmdq_item *); +static enum args_parse_type cmd_display_panes_args_parse(struct args *, + u_int, char **); +static enum cmd_retval cmd_display_panes_exec(struct cmd *, + struct cmdq_item *); const struct cmd_entry cmd_display_panes_entry = { .name = "display-panes", .alias = "displayp", - .args = { "bd:Nt:", 0, 1, NULL }, + .args = { "bd:Nt:", 0, 1, cmd_display_panes_args_parse }, .usage = "[-bN] [-d duration] " CMD_TARGET_CLIENT_USAGE " [template]", .flags = CMD_AFTERHOOK|CMD_CLIENT_TFLAG, @@ -46,6 +48,13 @@ struct cmd_display_panes_data { struct args_command_state *state; }; +static enum args_parse_type +cmd_display_panes_args_parse(__unused struct args *args, __unused u_int idx, + __unused char **cause) +{ + return (ARGS_PARSE_COMMANDS_OR_STRING); +} + static void cmd_display_panes_draw_pane(struct screen_redraw_ctx *ctx, struct window_pane *wp) @@ -139,7 +148,7 @@ cmd_display_panes_draw_pane(struct screen_redraw_ctx *ctx, if (sx >= len + llen + 1) { len += llen + 1; tty_cursor(tty, xoff + px - len / 2, yoff + py); - tty_putn(tty, buf, len, len); + tty_putn(tty, buf, len, len); tty_putn(tty, " ", 1, 1); tty_putn(tty, lbuf, llen, llen); } else { @@ -263,7 +272,7 @@ cmd_display_panes_exec(struct cmd *self, struct cmdq_item *item) struct args *args = cmd_get_args(self); struct client *tc = cmdq_get_target_client(item); struct session *s = tc->session; - u_int delay; + u_int delay; char *cause; struct cmd_display_panes_data *cdata; int wait = !args_has(args, 'b'); |