changeset 186:ff3688e747c3

Add a nasty hack to draw edit line correctly after startup... still a mystery why the windows get fucked up temporarily. Something printing to stderr/out?
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 16 Nov 2010 02:06:52 +0200
parents 73bdf1ede348
children c73003485c2d
files nnchat.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/nnchat.c	Tue Nov 16 00:57:59 2010 +0200
+++ b/nnchat.c	Tue Nov 16 02:06:52 2010 +0200
@@ -817,6 +817,7 @@
     nn_editbuf_t *editBuf = nn_editbuf_new(NN_TMPBUF_SIZE);
     nn_editbuf_t *histBuf[SET_MAX_HISTORY+2];
     int histPos = 0, histMax = 0;
+    BOOL first = TRUE;
 
     cfgitem_t *tmpcfg;
     char *homeDir = NULL;
@@ -1218,10 +1219,11 @@
             }
             } while (c != ERR && !exitProg && ++cnt < 10);
             
-            if (update) {
+            if (update || first) {
                 /* Update edit line */
                 printEditBuf(setPrvMode ? setTarget : "", editBuf);
                 updateStatus(insertMode);
+                first = FALSE; /* a nasty hack ... */
             }
         } /* !optDaemon */