# HG changeset patch # User Ben Schmidt # Date 1332200581 -39600 # Node ID e3d4c5986628a40ede3a6595c705a1a63af860c9 # Parent 1a3c00132077b2ebd2aab6374439fd1b0f17b844 Ensure we don't wrap prematurely and insert an unwanted blank line. This could happen when the space was inserted between lines: it could trigger wrapping before there was actually an overflow. diff -r 1a3c00132077 -r e3d4c5986628 src/prepstdreply.c --- a/src/prepstdreply.c Tue Mar 13 12:06:42 2012 +1100 +++ b/src/prepstdreply.c Tue Mar 20 10:43:01 2012 +1100 @@ -1273,7 +1273,8 @@ inhibitbreak = 0; while (*pos != '\0') { if (txt->wrapwidth != 0 && width >= txt->wrapwidth && - !peeking && linebreak > wrapindentlen) + !peeking && linebreak > wrapindentlen && + linebreak < len) break; if ((unsigned char)*pos > 0xbf && txt->skip == NULL && txt->wrapmode == WRAP_CHAR && @@ -1458,7 +1459,8 @@ if (txt->wrapwidth != 0 && !peeking) { if (width < txt->wrapwidth || - linebreak <= wrapindentlen) { + linebreak <= wrapindentlen || + linebreak >= len) { prev = line; continue; }