mirror of
https://github.com/tmux/tmux.git
synced 2026-10-15 07:44:24 +00:00
Only redraw when features changed.
This commit is contained in:
15
tty.c
15
tty.c
@@ -560,11 +560,15 @@ void
|
|||||||
tty_update_features(struct tty *tty)
|
tty_update_features(struct tty *tty)
|
||||||
{
|
{
|
||||||
struct client *c = tty->client;
|
struct client *c = tty->client;
|
||||||
|
int changed = 0;
|
||||||
|
|
||||||
if (tty_apply_features(tty->term))
|
if (tty_apply_features(tty->term)) {
|
||||||
tty_term_apply_overrides(tty->term);
|
tty_term_apply_overrides(tty->term);
|
||||||
|
changed = 1;
|
||||||
|
}
|
||||||
#ifdef ENABLE_IMAGES
|
#ifdef ENABLE_IMAGES
|
||||||
image_tty_update(tty);
|
if (image_tty_update(tty))
|
||||||
|
changed = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (tty_use_margin(tty))
|
if (tty_use_margin(tty))
|
||||||
@@ -575,13 +579,10 @@ tty_update_features(struct tty *tty)
|
|||||||
tty_puts(tty, tty_term_string(tty->term, TTYC_ENFCS));
|
tty_puts(tty, tty_term_string(tty->term, TTYC_ENFCS));
|
||||||
tty_puts(tty, tty_term_string(tty->term, TTYC_ENESC));
|
tty_puts(tty, tty_term_string(tty->term, TTYC_ENESC));
|
||||||
|
|
||||||
/*
|
if (changed) {
|
||||||
* Features might have changed since the first draw during attach. For
|
|
||||||
* example, this happens when DA responses are received.
|
|
||||||
*/
|
|
||||||
server_redraw_client(c);
|
server_redraw_client(c);
|
||||||
|
|
||||||
tty_invalidate(tty);
|
tty_invalidate(tty);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
Reference in New Issue
Block a user