mirror of
https://github.com/tmate-io/tmate.git
synced 2025-08-15 08:12:46 +02:00
Get rid of the PANE_HIDDEN flag in favour of a function, and moving the
decision for whether or not a pane should be drawn out of the layout code and into the redraw code. This is needed for the new layout design, getting it in now to make that easier to work on.
This commit is contained in:
15
resize.c
15
resize.c
@ -48,6 +48,7 @@ recalculate_sizes(void)
|
||||
struct session *s;
|
||||
struct client *c;
|
||||
struct window *w;
|
||||
struct window_pane *wp;
|
||||
u_int i, j, ssx, ssy, has, limit;
|
||||
int flag;
|
||||
|
||||
@ -132,6 +133,20 @@ recalculate_sizes(void)
|
||||
"window size %u,%u (was %u,%u)", ssx, ssy, w->sx, w->sy);
|
||||
|
||||
window_resize(w, ssx, ssy);
|
||||
|
||||
/*
|
||||
* If the current pane is now not visible, move to the next
|
||||
* that is.
|
||||
*/
|
||||
wp = w->active;
|
||||
while (!window_pane_visible(w->active)) {
|
||||
w->active = TAILQ_PREV(w->active, window_panes, entry);
|
||||
if (w->active == NULL)
|
||||
w->active = TAILQ_LAST(&w->panes, window_panes);
|
||||
if (w->active == wp)
|
||||
break;
|
||||
}
|
||||
|
||||
server_redraw_window(w);
|
||||
layout_refresh(w, 0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user