Mercurial > hg > nnchat
comparison nnchat.c @ 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 |
comparison
equal
deleted
inserted
replaced
185:73bdf1ede348 | 186:ff3688e747c3 |
---|---|
815 time_t prevTime; | 815 time_t prevTime; |
816 char *tmpStr; | 816 char *tmpStr; |
817 nn_editbuf_t *editBuf = nn_editbuf_new(NN_TMPBUF_SIZE); | 817 nn_editbuf_t *editBuf = nn_editbuf_new(NN_TMPBUF_SIZE); |
818 nn_editbuf_t *histBuf[SET_MAX_HISTORY+2]; | 818 nn_editbuf_t *histBuf[SET_MAX_HISTORY+2]; |
819 int histPos = 0, histMax = 0; | 819 int histPos = 0, histMax = 0; |
820 BOOL first = TRUE; | |
820 | 821 |
821 cfgitem_t *tmpcfg; | 822 cfgitem_t *tmpcfg; |
822 char *homeDir = NULL; | 823 char *homeDir = NULL; |
823 | 824 |
824 memset(histBuf, 0, sizeof(histBuf)); | 825 memset(histBuf, 0, sizeof(histBuf)); |
1216 } | 1217 } |
1217 break; | 1218 break; |
1218 } | 1219 } |
1219 } while (c != ERR && !exitProg && ++cnt < 10); | 1220 } while (c != ERR && !exitProg && ++cnt < 10); |
1220 | 1221 |
1221 if (update) { | 1222 if (update || first) { |
1222 /* Update edit line */ | 1223 /* Update edit line */ |
1223 printEditBuf(setPrvMode ? setTarget : "", editBuf); | 1224 printEditBuf(setPrvMode ? setTarget : "", editBuf); |
1224 updateStatus(insertMode); | 1225 updateStatus(insertMode); |
1226 first = FALSE; /* a nasty hack ... */ | |
1225 } | 1227 } |
1226 } /* !optDaemon */ | 1228 } /* !optDaemon */ |
1227 | 1229 |
1228 if (++updateCount > 10) { | 1230 if (++updateCount > 10) { |
1229 time_t tmpTime = time(NULL); | 1231 time_t tmpTime = time(NULL); |