diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2013-10-10 12:03:47 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2013-10-10 12:03:47 +0000 |
commit | 8751ac72a369874742c6c1bb3abdd0f1515c6fb0 (patch) | |
tree | 3c212fff1c4cc250f4c0625144263d4ab21935a1 /usr.bin/tmux | |
parent | b7c03fa9d1013400ab642624bbdf7344154c5177 (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.c | 5 |
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) { |