From: ewt Date: Fri, 12 Sep 1997 16:19:01 +0000 (+0000) Subject: 1) charge a penalty for lines which aren't half full X-Git-Tag: r0-12~26 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=74c9edf77e3ba7ca7b71311cd611e6f11e724be4;p=thirdparty%2Fnewt.git 1) charge a penalty for lines which aren't half full --- diff --git a/textbox.c b/textbox.c index e3f0aad..ac8e51d 100644 --- a/textbox.c +++ b/textbox.c @@ -97,6 +97,9 @@ static void doReflow(char * text, char ** resultPtr, int width, int * badness, strcat(result, "\n"); height++; } + + if (end - text < (width / 2)) + howbad += (width / 2) - (end - text); text = end; if (*text) text++; } else {