about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2017-11-09 15:09:59 +0100
committerLeah Neukirchen <leah@vuxu.org>2017-11-09 15:09:59 +0100
commitd46f65d38cd819424bfa053f436409b9cd2b51cd (patch)
treef1651fedd4d29378a0e1835d26d42aa09301abd4
parentc1fcb246bbe093c4cc9d71b40bd9f34684a724e8 (diff)
downloadmblaze-d46f65d38cd819424bfa053f436409b9cd2b51cd.tar.gz
mblaze-d46f65d38cd819424bfa053f436409b9cd2b51cd.tar.xz
mblaze-d46f65d38cd819424bfa053f436409b9cd2b51cd.zip
mflow: flowed: ensure progress by printing at least one word each time
Even if this overflows the line length...
-rw-r--r--mflow.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mflow.c b/mflow.c
index 0ee140f..d7f8370 100644
--- a/mflow.c
+++ b/mflow.c
@@ -76,7 +76,8 @@ flowed(int quotes, char *line, ssize_t linelen)
 		}
 
 		if (column + (eow - line) > maxcolumn &&
-		    eow - line < maxcolumn) {
+		    eow - line < maxcolumn &&
+		    column - quotes > 1) {
 			putchar('\n');
 			column = 0;
 			done = 0;