aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--window.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/window.c b/window.c
index 1c9160bc..f81acc4f 100644
--- a/window.c
+++ b/window.c
@@ -1,4 +1,4 @@
-/* $Id: window.c,v 1.140 2010-10-24 01:34:30 tcunha Exp $ */
+/* $Id: window.c,v 1.141 2010-12-06 21:53:50 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -322,6 +322,8 @@ window_resize(struct window *w, u_int sx, u_int sy)
void
window_set_active_pane(struct window *w, struct window_pane *wp)
{
+ if (wp == w->active)
+ return;
w->last = w->active;
w->active = wp;
while (!window_pane_visible(w->active)) {
@@ -339,7 +341,7 @@ window_set_active_at(struct window *w, u_int x, u_int y)
struct window_pane *wp;
TAILQ_FOREACH(wp, &w->panes, entry) {
- if (!window_pane_visible(wp))
+ if (wp == w->active || !window_pane_visible(wp))
continue;
if (x < wp->xoff || x >= wp->xoff + wp->sx)
continue;