From 8751ac72a369874742c6c1bb3abdd0f1515c6fb0 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Thu, 10 Oct 2013 12:03:47 +0000 Subject: 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. --- usr.bin/tmux/layout.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 @@ -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) { -- cgit v1.2.3