summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2015-12-02 23:09:23 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2015-12-02 23:09:23 +0000
commit5dd68af77f28b30f776d0dbaa9c4e69dfb9a4433 (patch)
treedc18a87d639639a1eaefd81e3a69c7d4e702b0a6
parent7ae68a993f4e4a0cfc82b061817e28c748bea851 (diff)
Mark new active pane changed after pane lost in window, and after
break-pane. Reported by tim@.
-rw-r--r--usr.bin/tmux/cmd-break-pane.c3
-rw-r--r--usr.bin/tmux/window.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-break-pane.c b/usr.bin/tmux/cmd-break-pane.c
index 482dd2562a5..1295e237f5b 100644
--- a/usr.bin/tmux/cmd-break-pane.c
+++ b/usr.bin/tmux/cmd-break-pane.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-break-pane.c,v 1.29 2015/10/27 15:58:42 nicm Exp $ */
+/* $OpenBSD: cmd-break-pane.c,v 1.30 2015/12/02 23:09:22 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -82,6 +82,7 @@ cmd_break_pane_exec(struct cmd *self, struct cmd_q *cmdq)
window_set_name(w, name);
free(name);
layout_init(w, wp);
+ wp->flags |= PANE_CHANGED;
if (idx == -1)
idx = -1 - options_get_number(dst_s->options, "base-index");
diff --git a/usr.bin/tmux/window.c b/usr.bin/tmux/window.c
index 4a6dfd6bb88..8cf69344f32 100644
--- a/usr.bin/tmux/window.c
+++ b/usr.bin/tmux/window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: window.c,v 1.150 2015/11/24 23:46:16 nicm Exp $ */
+/* $OpenBSD: window.c,v 1.151 2015/12/02 23:09:22 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -579,6 +579,8 @@ window_lost_pane(struct window *w, struct window_pane *wp)
if (w->active == NULL)
w->active = TAILQ_NEXT(wp, entry);
}
+ if (w->active != NULL)
+ w->active->flags |= PANE_CHANGED;
} else if (wp == w->last)
w->last = NULL;
}