From: Miroslav Lichvar Date: Tue, 8 Jul 2008 14:53:14 +0000 (+0200) Subject: redraw textbox in SetText() X-Git-Tag: r0-52-10~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f6b2c8b41d393f390e33a131bcbcded9b060e61;p=thirdparty%2Fnewt.git redraw textbox in SetText() --- diff --git a/textbox.c b/textbox.c index 873a23c..6b83516 100644 --- a/textbox.c +++ b/textbox.c @@ -100,6 +100,7 @@ newtComponent newtTextbox(int left, int top, int width, int height, int flags) { co->ops = &textboxOps; + co->isMapped = 0; co->height = height; co->top = top; co->left = left; @@ -330,6 +331,8 @@ void newtTextboxSetText(newtComponent co, const char * text) { free(expanded); + textboxDraw(co); + newtTrashScreen(); } @@ -350,6 +353,9 @@ static void textboxDraw(newtComponent c) { struct textbox * tb = c->data; int size; + if (!c->isMapped) + return; + if (tb->sb) { size = tb->numLines - c->height; if (tb->isActive) {