summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-07-17 16:04:07 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-07-17 16:04:07 (EDT)
commitcb08171e0f572fa2ba7e5dcafe1eb27dba1b124a (patch)
treeddddb58cbbfbe41825e4db84762bdde18c72e28f
parent807706f08f4ddff2c66f4592c0db0cd261dd6227 (diff)
text_new(): Reset width after newlines
-rw-r--r--src/text.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/text.c b/src/text.c
index 68d86eb..7c395e3 100644
--- a/src/text.c
+++ b/src/text.c
@@ -58,6 +58,7 @@ text_new(const char *string)
}
} else if (*string == '\n') {
text->width = MAX(text->width, width);
+ width = 0;
++text->height;
} else {
++width;