summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--buffer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/buffer.c b/buffer.c
index fd69cd3..711d5fd 100644
--- a/buffer.c
+++ b/buffer.c
@@ -33,6 +33,7 @@
 #include <sysexits.h>
 #include <time.h>
 #include <wchar.h>
+#include <wctype.h>
 
 #include "chat.h"
 
@@ -160,10 +161,10 @@ static int flow(struct Lines *hard, int cols, const struct Line *soft) {
 		if (!line->str) err(EX_OSERR, "malloc");
 
 		struct Cat cat = { line->str, cap, 0 };
+		catf(&cat, "%*s%n", align, "", &width);
 		styleCat(&cat, style);
 		str = &line->str[cat.len];
-		catf(&cat, "%*s%n%s", align, "", &width, &wrap[n]);
-		str += width;
+		catf(&cat, "%s", &wrap[n]);
 
 		*wrap = '\0';
 		wrap = NULL;
7:59:02 -0500'>2019-11-06Mention Darwin and GNU/Linux in READMEJune McEnroe 2019-11-06Assume LibreSSL from brew on DarwinJune McEnroe 2019-11-06Remove -DNO_EXPLICIT_BZERO from Darwin.mkJune McEnroe 2019-11-06Don't install rc scripts or dirs on LinuxJune McEnroeoe :target persists after you click on something else. 2019-12-18Copy cgit auxiliary binaries properlyJune McEnroe 2019-12-18Add git.causal.agency cgit configJune McEnroe 2019-12-18Bail from hi if input is binaryJune McEnroe NULs in the input cause an infinite loop in htmlEscape, not to mention regexes obviously not working, etc. 2019-12-16Post "cgit setup"June McEnroe