summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2013-10-10 12:03:46 +0000
committernicm <nicm@openbsd.org>2013-10-10 12:03:46 +0000
commit7818211b0c8d74335f60fc5998f46c945080eac6 (patch)
treeed2989bb6a9b92cf0d52316f2df1aae246a2a462
parentDon't treat TMUX_TMPDIR as a potential file (diff)
downloadwireguard-openbsd-7818211b0c8d74335f60fc5998f46c945080eac6.tar.xz
wireguard-openbsd-7818211b0c8d74335f60fc5998f46c945080eac6.zip
layout-resize-pane-mouse: Consider visible panes only
When a pane is maximized, and text is selected, we end up checking if a pane switch is needed. This therefore means we might end up selecting panes which aren't visible. By Thomas Adam.
-rw-r--r--usr.bin/tmux/layout.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/tmux/layout.c b/usr.bin/tmux/layout.c
index 888e6ba6573..9c7243cb0cb 100644
--- a/usr.bin/tmux/layout.c
+++ b/usr.bin/tmux/layout.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: layout.c,v 1.18 2013/03/24 09:57:59 nicm Exp $ */
+/* $OpenBSD: layout.c,v 1.19 2013/10/10 12:03:46 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -533,6 +533,9 @@ layout_resize_pane_mouse(struct client *c)
pane_border = 0;
if (m->event & MOUSE_EVENT_DRAG && m->flags & MOUSE_RESIZE_PANE) {
TAILQ_FOREACH(wp, &w->panes, entry) {
+ if (!window_pane_visible(wp))
+ continue;
+
if (wp->xoff + wp->sx == m->lx &&
wp->yoff <= 1 + m->ly &&
wp->yoff + wp->sy >= m->ly) {