aboutsummaryrefslogtreecommitdiff
path: root/cmd-rotate-window.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2015-12-13 16:01:13 +0000
committerThomas Adam <thomas@xteddy.org>2015-12-13 16:01:13 +0000
commitae5ddfdc1ae471f13c6d0e94ff4029d4fb29e1f4 (patch)
tree72ebffc1c0617c28ddc421f24045f148b7d59e36 /cmd-rotate-window.c
parent92f187d1c2d84322860dc595da604260999a52f0 (diff)
parentff599f4004aaa6aae325ece5cbc996e2dc6f0b4f (diff)
downloadrtmux-ae5ddfdc1ae471f13c6d0e94ff4029d4fb29e1f4.tar.gz
rtmux-ae5ddfdc1ae471f13c6d0e94ff4029d4fb29e1f4.tar.bz2
rtmux-ae5ddfdc1ae471f13c6d0e94ff4029d4fb29e1f4.zip
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-rotate-window.c')
-rw-r--r--cmd-rotate-window.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/cmd-rotate-window.c b/cmd-rotate-window.c
index 859ff04a..4122886a 100644
--- a/cmd-rotate-window.c
+++ b/cmd-rotate-window.c
@@ -30,24 +30,19 @@ const struct cmd_entry cmd_rotate_window_entry = {
"rotate-window", "rotatew",
"Dt:U", 0, 0,
"[-DU] " CMD_TARGET_WINDOW_USAGE,
- 0,
+ CMD_WINDOW_T,
cmd_rotate_window_exec
};
enum cmd_retval
cmd_rotate_window_exec(struct cmd *self, struct cmd_q *cmdq)
{
- struct args *args = self->args;
- struct winlink *wl;
- struct window *w;
+ struct winlink *wl = cmdq->state.tflag.wl;
+ struct window *w = wl->window;
struct window_pane *wp, *wp2;
struct layout_cell *lc;
u_int sx, sy, xoff, yoff;
- if ((wl = cmd_find_window(cmdq, args_get(args, 't'), NULL)) == NULL)
- return (CMD_RETURN_ERROR);
- w = wl->window;
-
if (args_has(self->args, 'D')) {
wp = TAILQ_LAST(&w->panes, window_panes);
TAILQ_REMOVE(&w->panes, wp, entry);