Don't redraw status line unless it has actually changed. Stops extraneous

updates between clock/#() changes and doesn't require manual status-interval 0
when no updates are occuring.
This commit is contained in:
Nicholas Marriott
2009-02-10 00:18:06 +00:00
parent cc5a0ab0e4
commit b37399304f
5 changed files with 80 additions and 31 deletions

View File

@ -1,4 +1,4 @@
/* $Id: server.c,v 1.118 2009-02-08 16:26:43 nicm Exp $ */
/* $Id: server.c,v 1.119 2009-02-10 00:18:06 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -464,7 +464,7 @@ server_check_redraw(struct client *c)
{
struct session *s;
char title[512];
int flags;
int flags, redraw;
if (c == NULL || c->session == NULL)
return;
@ -487,11 +487,13 @@ server_check_redraw(struct client *c)
if (c->flags & (CLIENT_REDRAW|CLIENT_STATUS)) {
if (c->message_string != NULL)
status_message_redraw(c);
redraw = status_message_redraw(c);
else if (c->prompt_string != NULL)
status_prompt_redraw(c);
redraw = status_prompt_redraw(c);
else
status_redraw(c);
redraw = status_redraw(c);
if (!redraw)
c->flags &= ~CLIENT_STATUS;
}
if (c->flags & CLIENT_REDRAW) {