summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-move-window.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2020-04-13 08:26:28 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2020-04-13 08:26:28 +0000
commit9947eee19da9830a3c591d7fb4574df8cdd144e6 (patch)
tree1a0de0f756437614d69dd15dc6d5c4da36dec3d6 /usr.bin/tmux/cmd-move-window.c
parent5230ffc0bf4649be99e262688d7286dffa252d99 (diff)
Make struct cmd local to cmd.c and move it out of tmux.h.
Diffstat (limited to 'usr.bin/tmux/cmd-move-window.c')
-rw-r--r--usr.bin/tmux/cmd-move-window.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.bin/tmux/cmd-move-window.c b/usr.bin/tmux/cmd-move-window.c
index 55bc32ddfdd..013fea1b74d 100644
--- a/usr.bin/tmux/cmd-move-window.c
+++ b/usr.bin/tmux/cmd-move-window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-move-window.c,v 1.29 2017/04/22 10:22:39 nicm Exp $ */
+/* $OpenBSD: cmd-move-window.c,v 1.30 2020/04/13 08:26:27 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -59,7 +59,7 @@ const struct cmd_entry cmd_link_window_entry = {
static enum cmd_retval
cmd_move_window_exec(struct cmd *self, struct cmdq_item *item)
{
- struct args *args = self->args;
+ struct args *args = cmd_get_args(self);
const char *tflag = args_get(args, 't');
struct session *src;
struct session *dst;
@@ -86,11 +86,11 @@ cmd_move_window_exec(struct cmd *self, struct cmdq_item *item)
wl = item->source.wl;
idx = item->target.idx;
- kflag = args_has(self->args, 'k');
- dflag = args_has(self->args, 'd');
- sflag = args_has(self->args, 's');
+ kflag = args_has(args, 'k');
+ dflag = args_has(args, 'd');
+ sflag = args_has(args, 's');
- if (args_has(self->args, 'a')) {
+ if (args_has(args, 'a')) {
if ((idx = winlink_shuffle_up(dst, dst->curw)) == -1)
return (CMD_RETURN_ERROR);
}
@@ -101,7 +101,7 @@ cmd_move_window_exec(struct cmd *self, struct cmdq_item *item)
free(cause);
return (CMD_RETURN_ERROR);
}
- if (self->entry == &cmd_move_window_entry)
+ if (cmd_get_entry(self) == &cmd_move_window_entry)
server_unlink_window(src, wl);
/*