mirror of
https://github.com/tmux/tmux.git
synced 2026-10-10 12:14:43 +00:00
Unzoom before creating a floating pane (for now).
This commit is contained in:
7
layout.c
7
layout.c
@@ -580,6 +580,7 @@ layout_resize_adjust(struct window *w, struct layout_cell *lc,
|
|||||||
enum layout_type type, int change)
|
enum layout_type type, int change)
|
||||||
{
|
{
|
||||||
struct layout_cell *lcchild;
|
struct layout_cell *lcchild;
|
||||||
|
int changed;
|
||||||
|
|
||||||
/* Adjust the cell size. */
|
/* Adjust the cell size. */
|
||||||
if (type == LAYOUT_LEFTRIGHT)
|
if (type == LAYOUT_LEFTRIGHT)
|
||||||
@@ -613,6 +614,7 @@ layout_resize_adjust(struct window *w, struct layout_cell *lc,
|
|||||||
* until no further change is possible.
|
* until no further change is possible.
|
||||||
*/
|
*/
|
||||||
while (change != 0) {
|
while (change != 0) {
|
||||||
|
changed = 0;
|
||||||
TAILQ_FOREACH(lcchild, &lc->cells, entry) {
|
TAILQ_FOREACH(lcchild, &lc->cells, entry) {
|
||||||
if (change == 0)
|
if (change == 0)
|
||||||
break;
|
break;
|
||||||
@@ -622,13 +624,17 @@ layout_resize_adjust(struct window *w, struct layout_cell *lc,
|
|||||||
if (change > 0) {
|
if (change > 0) {
|
||||||
layout_resize_adjust(w, lcchild, type, 1);
|
layout_resize_adjust(w, lcchild, type, 1);
|
||||||
change--;
|
change--;
|
||||||
|
changed = 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (layout_resize_check(w, lcchild, type) > 0) {
|
if (layout_resize_check(w, lcchild, type) > 0) {
|
||||||
layout_resize_adjust(w, lcchild, type, -1);
|
layout_resize_adjust(w, lcchild, type, -1);
|
||||||
change++;
|
change++;
|
||||||
|
changed = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!changed)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1663,6 +1669,7 @@ layout_get_floating_cell(struct cmdq_item *item, struct args *args,
|
|||||||
cause) != 0)
|
cause) != 0)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
|
||||||
|
window_push_zoom(wp->window, 1, args_has(args, 'Z'));
|
||||||
lcnew = layout_floating_pane(w, wp, sx, sy, ox, oy);
|
lcnew = layout_floating_pane(w, wp, sx, sy, ox, oy);
|
||||||
return (lcnew);
|
return (lcnew);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user