From b37399304f9fa310d0790dee8a8325d79cc9af39 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Tue, 10 Feb 2009 00:18:06 +0000 Subject: 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. --- server.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'server.c') diff --git a/server.c b/server.c index 29aed79f..d7ef46f7 100644 --- a/server.c +++ b/server.c @@ -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 @@ -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) { -- cgit