diff options
author | Thomas Adam <thomas@xteddy.org> | 2016-10-16 22:01:14 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2016-10-16 22:01:14 +0100 |
commit | 1a6e696b08113ca17ee8e881844167cf94276846 (patch) | |
tree | 60ecdd8c9e51bff46624e48d9373686b858d2fb1 /cmd-select-pane.c | |
parent | d401340c516131ae8e07bfb978b670347486d077 (diff) | |
parent | d15d54c2c8e6b95695169442eb2a27d814efc078 (diff) | |
download | rtmux-1a6e696b08113ca17ee8e881844167cf94276846.tar.gz rtmux-1a6e696b08113ca17ee8e881844167cf94276846.tar.bz2 rtmux-1a6e696b08113ca17ee8e881844167cf94276846.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-select-pane.c')
-rw-r--r-- | cmd-select-pane.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/cmd-select-pane.c b/cmd-select-pane.c index 956d42a8..c0374fa7 100644 --- a/cmd-select-pane.c +++ b/cmd-select-pane.c @@ -24,7 +24,7 @@ * Select pane. */ -static enum cmd_retval cmd_select_pane_exec(struct cmd *, struct cmd_q *); +static enum cmd_retval cmd_select_pane_exec(struct cmd *, struct cmdq_item *); const struct cmd_entry cmd_select_pane_entry = { .name = "select-pane", @@ -53,19 +53,19 @@ const struct cmd_entry cmd_last_pane_entry = { }; static enum cmd_retval -cmd_select_pane_exec(struct cmd *self, struct cmd_q *cmdq) +cmd_select_pane_exec(struct cmd *self, struct cmdq_item *item) { struct args *args = self->args; - struct winlink *wl = cmdq->state.tflag.wl; + struct winlink *wl = item->state.tflag.wl; struct window *w = wl->window; - struct session *s = cmdq->state.tflag.s; - struct window_pane *wp = cmdq->state.tflag.wp, *lastwp, *markedwp; + struct session *s = item->state.tflag.s; + struct window_pane *wp = item->state.tflag.wp, *lastwp, *markedwp; const char *style; if (self->entry == &cmd_last_pane_entry || args_has(args, 'l')) { if (wl->window->last == NULL) { - cmdq_error(cmdq, "no last pane"); + cmdq_error(item, "no last pane"); return (CMD_RETURN_ERROR); } @@ -112,13 +112,13 @@ cmd_select_pane_exec(struct cmd *self, struct cmd_q *cmdq) style = args_get(args, 'P'); if (style_parse(&grid_default_cell, &wp->colgc, style) == -1) { - cmdq_error(cmdq, "bad style: %s", style); + cmdq_error(item, "bad style: %s", style); return (CMD_RETURN_ERROR); } wp->flags |= PANE_REDRAW; } if (args_has(self->args, 'g')) - cmdq_print(cmdq, "%s", style_tostring(&wp->colgc)); + cmdq_print(item, "%s", style_tostring(&wp->colgc)); return (CMD_RETURN_NORMAL); } @@ -151,7 +151,7 @@ cmd_select_pane_exec(struct cmd *self, struct cmd_q *cmdq) return (CMD_RETURN_NORMAL); server_unzoom_window(wp->window); if (!window_pane_visible(wp)) { - cmdq_error(cmdq, "pane not visible"); + cmdq_error(item, "pane not visible"); return (CMD_RETURN_ERROR); } window_redraw_active_switch(w, wp); |