diff options
author | 2016-10-16 19:04:05 +0000 | |
---|---|---|
committer | 2016-10-16 19:04:05 +0000 | |
commit | 68e0a7f271bc1c08e58a23a65844d346c6665089 (patch) | |
tree | 315962d2740c0dca5e710bb5c9db0ac9878f55ba /usr.bin/tmux/cmd-select-window.c | |
parent | Replace fs/msdosfs/{msdosfs_conv.c,direntry.h} with stripped-down (diff) | |
download | wireguard-openbsd-68e0a7f271bc1c08e58a23a65844d346c6665089.tar.xz wireguard-openbsd-68e0a7f271bc1c08e58a23a65844d346c6665089.zip |
Mass rename struct cmd_q to struct cmdq_item and related.
Diffstat (limited to 'usr.bin/tmux/cmd-select-window.c')
-rw-r--r-- | usr.bin/tmux/cmd-select-window.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/usr.bin/tmux/cmd-select-window.c b/usr.bin/tmux/cmd-select-window.c index be85201f12e..44b2f76bbb1 100644 --- a/usr.bin/tmux/cmd-select-window.c +++ b/usr.bin/tmux/cmd-select-window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-select-window.c,v 1.17 2016/10/10 21:51:39 nicm Exp $ */ +/* $OpenBSD: cmd-select-window.c,v 1.18 2016/10/16 19:04:05 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -26,7 +26,8 @@ * Select window by index. */ -static enum cmd_retval cmd_select_window_exec(struct cmd *, struct cmd_q *); +static enum cmd_retval cmd_select_window_exec(struct cmd *, + struct cmdq_item *); const struct cmd_entry cmd_select_window_entry = { .name = "select-window", @@ -81,10 +82,10 @@ const struct cmd_entry cmd_last_window_entry = { }; static enum cmd_retval -cmd_select_window_exec(struct cmd *self, struct cmd_q *cmdq) +cmd_select_window_exec(struct cmd *self, struct cmdq_item *item) { - struct winlink *wl = cmdq->state.tflag.wl; - struct session *s = cmdq->state.tflag.s; + struct winlink *wl = item->state.tflag.wl; + struct session *s = item->state.tflag.s; int next, previous, last, activity; next = self->entry == &cmd_next_window_entry; @@ -101,17 +102,17 @@ cmd_select_window_exec(struct cmd *self, struct cmd_q *cmdq) activity = args_has(self->args, 'a'); if (next) { if (session_next(s, activity) != 0) { - cmdq_error(cmdq, "no next window"); + cmdq_error(item, "no next window"); return (CMD_RETURN_ERROR); } } else if (previous) { if (session_previous(s, activity) != 0) { - cmdq_error(cmdq, "no previous window"); + cmdq_error(item, "no previous window"); return (CMD_RETURN_ERROR); } } else { if (session_last(s) != 0) { - cmdq_error(cmdq, "no last window"); + cmdq_error(item, "no last window"); return (CMD_RETURN_ERROR); } } @@ -124,7 +125,7 @@ cmd_select_window_exec(struct cmd *self, struct cmd_q *cmdq) */ if (args_has(self->args, 'T') && wl == s->curw) { if (session_last(s) != 0) { - cmdq_error(cmdq, "no last window"); + cmdq_error(item, "no last window"); return (-1); } server_redraw_session(s); |