]> git.ipfire.org Git - thirdparty/newt.git/commitdiff
1) charge a penalty for lines which aren't half full
authorewt <ewt>
Fri, 12 Sep 1997 16:19:01 +0000 (16:19 +0000)
committerewt <ewt>
Fri, 12 Sep 1997 16:19:01 +0000 (16:19 +0000)
textbox.c

index e3f0aad9a8e5ba6713df00c3ce28c4d99a888d77..ac8e51dbf216660899374892573b1282560f4119 100644 (file)
--- 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 {