mirror of
https://github.com/tmux/tmux.git
synced 2025-04-13 14:58:50 +00:00
Merge branch 'obsd-master'
This commit is contained in:
commit
8c9bbc3749
@ -474,7 +474,6 @@ screen_redraw_pane(struct client *c, struct window_pane *wp)
|
|||||||
tty_sync_start(&c->tty);
|
tty_sync_start(&c->tty);
|
||||||
|
|
||||||
screen_redraw_draw_pane(&ctx, wp);
|
screen_redraw_draw_pane(&ctx, wp);
|
||||||
wp->flags &= ~PANE_REDRAW;
|
|
||||||
|
|
||||||
tty_reset(&c->tty);
|
tty_reset(&c->tty);
|
||||||
tty_sync_end(&c->tty);
|
tty_sync_end(&c->tty);
|
||||||
@ -564,7 +563,6 @@ screen_redraw_draw_panes(struct screen_redraw_ctx *ctx)
|
|||||||
TAILQ_FOREACH(wp, &w->panes, entry) {
|
TAILQ_FOREACH(wp, &w->panes, entry) {
|
||||||
if (window_pane_visible(wp))
|
if (window_pane_visible(wp))
|
||||||
screen_redraw_draw_pane(ctx, wp);
|
screen_redraw_draw_pane(ctx, wp);
|
||||||
wp->flags &= ~PANE_REDRAW;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1368,6 +1368,7 @@ server_client_loop(void)
|
|||||||
if (resize)
|
if (resize)
|
||||||
server_client_check_resize(wp);
|
server_client_check_resize(wp);
|
||||||
}
|
}
|
||||||
|
wp->flags &= ~PANE_REDRAW;
|
||||||
}
|
}
|
||||||
check_window_name(w);
|
check_window_name(w);
|
||||||
}
|
}
|
||||||
@ -1677,8 +1678,11 @@ server_client_check_redraw(struct client *c)
|
|||||||
{
|
{
|
||||||
struct session *s = c->session;
|
struct session *s = c->session;
|
||||||
struct tty *tty = &c->tty;
|
struct tty *tty = &c->tty;
|
||||||
|
struct window *w = c->session->curw->window;
|
||||||
struct window_pane *wp;
|
struct window_pane *wp;
|
||||||
int needed, flags, mode = tty->mode, new_flags = 0;
|
int needed, flags, mode = tty->mode, new_flags = 0;
|
||||||
|
int redraw;
|
||||||
|
u_int bit = 0;
|
||||||
struct timeval tv = { .tv_usec = 1000 };
|
struct timeval tv = { .tv_usec = 1000 };
|
||||||
static struct event ev;
|
static struct event ev;
|
||||||
size_t left;
|
size_t left;
|
||||||
@ -1703,7 +1707,7 @@ server_client_check_redraw(struct client *c)
|
|||||||
if (c->flags & CLIENT_ALLREDRAWFLAGS)
|
if (c->flags & CLIENT_ALLREDRAWFLAGS)
|
||||||
needed = 1;
|
needed = 1;
|
||||||
else {
|
else {
|
||||||
TAILQ_FOREACH(wp, &c->session->curw->window->panes, entry) {
|
TAILQ_FOREACH(wp, &w->panes, entry) {
|
||||||
if (wp->flags & PANE_REDRAW) {
|
if (wp->flags & PANE_REDRAW) {
|
||||||
needed = 1;
|
needed = 1;
|
||||||
break;
|
break;
|
||||||
@ -1720,6 +1724,22 @@ server_client_check_redraw(struct client *c)
|
|||||||
log_debug("redraw timer started");
|
log_debug("redraw timer started");
|
||||||
evtimer_add(&ev, &tv);
|
evtimer_add(&ev, &tv);
|
||||||
}
|
}
|
||||||
|
if (new_flags & CLIENT_REDRAWPANES) {
|
||||||
|
c->redraw_panes = 0;
|
||||||
|
TAILQ_FOREACH(wp, &w->panes, entry) {
|
||||||
|
if (wp->flags & PANE_REDRAW)
|
||||||
|
c->redraw_panes |= (1 << bit);
|
||||||
|
if (++bit == 64) {
|
||||||
|
/*
|
||||||
|
* If more that 64 panes, give up and
|
||||||
|
* just redraw the window.
|
||||||
|
*/
|
||||||
|
new_flags &= CLIENT_REDRAWPANES;
|
||||||
|
new_flags |= CLIENT_REDRAWWINDOW;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
c->flags |= new_flags;
|
c->flags |= new_flags;
|
||||||
return;
|
return;
|
||||||
} else if (needed)
|
} else if (needed)
|
||||||
@ -1733,13 +1753,18 @@ server_client_check_redraw(struct client *c)
|
|||||||
* If not redrawing the entire window, check whether each pane
|
* If not redrawing the entire window, check whether each pane
|
||||||
* needs to be redrawn.
|
* needs to be redrawn.
|
||||||
*/
|
*/
|
||||||
TAILQ_FOREACH(wp, &c->session->curw->window->panes, entry) {
|
TAILQ_FOREACH(wp, &w->panes, entry) {
|
||||||
if (wp->flags & PANE_REDRAW) {
|
redraw = 0;
|
||||||
|
if (wp->flags & PANE_REDRAW)
|
||||||
|
redraw = 1;
|
||||||
|
else if (c->flags & CLIENT_REDRAWPANES)
|
||||||
|
redraw = !!(c->redraw_panes & (1 << bit));
|
||||||
|
if (!redraw)
|
||||||
|
continue;
|
||||||
log_debug("%s: redrawing pane %%%u", __func__, wp->id);
|
log_debug("%s: redrawing pane %%%u", __func__, wp->id);
|
||||||
tty_update_mode(tty, mode, NULL);
|
tty_update_mode(tty, mode, NULL);
|
||||||
screen_redraw_pane(c, wp);
|
screen_redraw_pane(c, wp);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
c->flags &= ~CLIENT_REDRAWPANES;
|
c->flags &= ~CLIENT_REDRAWPANES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user