mirror of
https://github.com/tmux/tmux.git
synced 2024-11-16 17:39:09 +00:00
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.
This commit is contained in:
parent
bda970b3b1
commit
21bca549d3
3
layout.c
3
layout.c
@ -533,6 +533,9 @@ layout_resize_pane_mouse(struct client *c)
|
|||||||
pane_border = 0;
|
pane_border = 0;
|
||||||
if (m->event & MOUSE_EVENT_DRAG && m->flags & MOUSE_RESIZE_PANE) {
|
if (m->event & MOUSE_EVENT_DRAG && m->flags & MOUSE_RESIZE_PANE) {
|
||||||
TAILQ_FOREACH(wp, &w->panes, entry) {
|
TAILQ_FOREACH(wp, &w->panes, entry) {
|
||||||
|
if (!window_pane_visible(wp))
|
||||||
|
continue;
|
||||||
|
|
||||||
if (wp->xoff + wp->sx == m->lx &&
|
if (wp->xoff + wp->sx == m->lx &&
|
||||||
wp->yoff <= 1 + m->ly &&
|
wp->yoff <= 1 + m->ly &&
|
||||||
wp->yoff + wp->sy >= m->ly) {
|
wp->yoff + wp->sy >= m->ly) {
|
||||||
|
Loading…
Reference in New Issue
Block a user