mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
Do not allow the opposite pane to resize when dragging with the mouse
because it is not possible to keep the mouse on the border when the minimum size is reached.
This commit is contained in:
@ -111,13 +111,13 @@ cmd_resize_pane_exec(struct cmd *self, struct cmd_q *cmdq)
|
||||
}
|
||||
|
||||
if (args_has(self->args, 'L'))
|
||||
layout_resize_pane(wp, LAYOUT_LEFTRIGHT, -adjust);
|
||||
layout_resize_pane(wp, LAYOUT_LEFTRIGHT, -adjust, 1);
|
||||
else if (args_has(self->args, 'R'))
|
||||
layout_resize_pane(wp, LAYOUT_LEFTRIGHT, adjust);
|
||||
layout_resize_pane(wp, LAYOUT_LEFTRIGHT, adjust, 1);
|
||||
else if (args_has(self->args, 'U'))
|
||||
layout_resize_pane(wp, LAYOUT_TOPBOTTOM, -adjust);
|
||||
layout_resize_pane(wp, LAYOUT_TOPBOTTOM, -adjust, 1);
|
||||
else if (args_has(self->args, 'D'))
|
||||
layout_resize_pane(wp, LAYOUT_TOPBOTTOM, adjust);
|
||||
layout_resize_pane(wp, LAYOUT_TOPBOTTOM, adjust, 1);
|
||||
server_redraw_window(wl->window);
|
||||
|
||||
return (CMD_RETURN_NORMAL);
|
||||
@ -155,12 +155,12 @@ cmd_resize_pane_mouse_update(struct client *c, struct mouse_event *m)
|
||||
|
||||
if (wp->xoff + wp->sx == m->lx &&
|
||||
wp->yoff <= 1 + ly && wp->yoff + wp->sy >= ly) {
|
||||
layout_resize_pane(wp, LAYOUT_LEFTRIGHT, m->x - m->lx);
|
||||
layout_resize_pane(wp, LAYOUT_LEFTRIGHT, m->x - m->lx, 0);
|
||||
found = 1;
|
||||
}
|
||||
if (wp->yoff + wp->sy == ly &&
|
||||
wp->xoff <= 1 + m->lx && wp->xoff + wp->sx >= m->lx) {
|
||||
layout_resize_pane(wp, LAYOUT_TOPBOTTOM, y - ly);
|
||||
layout_resize_pane(wp, LAYOUT_TOPBOTTOM, y - ly, 0);
|
||||
found = 1;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user