summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-rotate-window.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2017-05-09 11:00:48 +0000
committernicm <nicm@openbsd.org>2017-05-09 11:00:48 +0000
commit7f9920f81e6062ea0cfc64de2c0fcb873f57ff78 (patch)
tree46cae9268f970fcdb9491575b798dd6468778925 /usr.bin/tmux/cmd-rotate-window.c
parentConvert a splsoftnet()/splx() dance to NET_ASSERT_LOCKED(). (diff)
downloadwireguard-openbsd-7f9920f81e6062ea0cfc64de2c0fcb873f57ff78.tar.xz
wireguard-openbsd-7f9920f81e6062ea0cfc64de2c0fcb873f57ff78.zip
Set current pane in rotate-window.
Diffstat (limited to 'usr.bin/tmux/cmd-rotate-window.c')
-rw-r--r--usr.bin/tmux/cmd-rotate-window.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/tmux/cmd-rotate-window.c b/usr.bin/tmux/cmd-rotate-window.c
index 82a3608e65c..aae2dc35786 100644
--- a/usr.bin/tmux/cmd-rotate-window.c
+++ b/usr.bin/tmux/cmd-rotate-window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-rotate-window.c,v 1.23 2017/04/22 10:22:39 nicm Exp $ */
+/* $OpenBSD: cmd-rotate-window.c,v 1.24 2017/05/09 11:00:48 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -43,6 +43,7 @@ const struct cmd_entry cmd_rotate_window_entry = {
static enum cmd_retval
cmd_rotate_window_exec(struct cmd *self, struct cmdq_item *item)
{
+ struct cmd_find_state *current = &item->shared->current;
struct winlink *wl = item->target.wl;
struct window *w = wl->window;
struct window_pane *wp, *wp2;
@@ -77,6 +78,7 @@ cmd_rotate_window_exec(struct cmd *self, struct cmdq_item *item)
if ((wp = TAILQ_PREV(w->active, window_panes, entry)) == NULL)
wp = TAILQ_LAST(&w->panes, window_panes);
window_set_active_pane(w, wp);
+ cmd_find_from_winlink_pane(current, wl, wp);
server_redraw_window(w);
} else {
wp = TAILQ_FIRST(&w->panes);
@@ -104,6 +106,7 @@ cmd_rotate_window_exec(struct cmd *self, struct cmdq_item *item)
if ((wp = TAILQ_NEXT(w->active, entry)) == NULL)
wp = TAILQ_FIRST(&w->panes);
window_set_active_pane(w, wp);
+ cmd_find_from_winlink_pane(current, wl, wp);
server_redraw_window(w);
}