summaryrefslogtreecommitdiff
path: root/usr.bin/tmux
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2013-10-10 12:03:47 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2013-10-10 12:03:47 +0000
commit8751ac72a369874742c6c1bb3abdd0f1515c6fb0 (patch)
tree3c212fff1c4cc250f4c0625144263d4ab21935a1 /usr.bin/tmux
parentb7c03fa9d1013400ab642624bbdf7344154c5177 (diff)
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.
Diffstat (limited to 'usr.bin/tmux')
-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) {