mirror of
https://github.com/tmux/tmux.git
synced 2025-03-31 20:58:47 +00:00
Compare to see if pane status line has actually changed, not just size, and
do not draw if pane is not visible.
This commit is contained in:
parent
e83ebf50de
commit
e0add119ea
@ -269,8 +269,9 @@ screen_redraw_make_pane_status(struct client *c, struct window *w,
|
|||||||
const char *fmt;
|
const char *fmt;
|
||||||
struct format_tree *ft;
|
struct format_tree *ft;
|
||||||
char *out;
|
char *out;
|
||||||
size_t outlen, old_size = wp->status_size;
|
size_t outlen;
|
||||||
struct screen_write_ctx ctx;
|
struct screen_write_ctx ctx;
|
||||||
|
struct screen old;
|
||||||
|
|
||||||
if (wp == w->active)
|
if (wp == w->active)
|
||||||
style_apply(&gc, w->options, "pane-active-border-style");
|
style_apply(&gc, w->options, "pane-active-border-style");
|
||||||
@ -282,7 +283,7 @@ screen_redraw_make_pane_status(struct client *c, struct window *w,
|
|||||||
ft = format_create(NULL, 0);
|
ft = format_create(NULL, 0);
|
||||||
format_defaults(ft, c, NULL, NULL, wp);
|
format_defaults(ft, c, NULL, NULL, wp);
|
||||||
|
|
||||||
screen_free(&wp->status_screen);
|
memcpy(&old, &wp->status_screen, sizeof old);
|
||||||
screen_init(&wp->status_screen, wp->sx, 1, 0);
|
screen_init(&wp->status_screen, wp->sx, 1, 0);
|
||||||
wp->status_screen.mode = 0;
|
wp->status_screen.mode = 0;
|
||||||
|
|
||||||
@ -301,7 +302,13 @@ screen_redraw_make_pane_status(struct client *c, struct window *w,
|
|||||||
format_free(ft);
|
format_free(ft);
|
||||||
|
|
||||||
wp->status_size = outlen;
|
wp->status_size = outlen;
|
||||||
return (wp->status_size != old_size);
|
|
||||||
|
if (grid_compare(wp->status_screen.grid, old.grid) == 0) {
|
||||||
|
screen_free(&old);
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
screen_free(&old);
|
||||||
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Draw pane status. */
|
/* Draw pane status. */
|
||||||
@ -317,6 +324,8 @@ screen_redraw_draw_pane_status(struct client *c, int pane_status)
|
|||||||
|
|
||||||
spos = options_get_number(oo, "status-position");
|
spos = options_get_number(oo, "status-position");
|
||||||
TAILQ_FOREACH(wp, &w->panes, entry) {
|
TAILQ_FOREACH(wp, &w->panes, entry) {
|
||||||
|
if (!window_pane_visible(wp))
|
||||||
|
continue;
|
||||||
if (pane_status == CELL_STATUS_TOP)
|
if (pane_status == CELL_STATUS_TOP)
|
||||||
yoff = wp->yoff - 1;
|
yoff = wp->yoff - 1;
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user