about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-02-10 02:50:32 -0500
committerJune McEnroe <june@causal.agency>2020-02-10 02:50:32 -0500
commitb6061a70d78cfce7318b503891fd0290ad0cccaf (patch)
tree7c98af699340aead01c5be7e01f6b94f99cdb03c
parentSimplify mark, heat, unread tracking (diff)
downloadcatgirl-b6061a70d78cfce7318b503891fd0290ad0cccaf.tar.gz
catgirl-b6061a70d78cfce7318b503891fd0290ad0cccaf.zip
Update line count for words longer than lines
-rw-r--r--ui.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui.c b/ui.c
index c331a7c..7c933f6 100644
--- a/ui.c
+++ b/ui.c
@@ -454,7 +454,7 @@ static int wordWrap(WINDOW *win, const char *str) {
 			getyx(win, y, x);
 			const char *word = &str[strspn(str, " ")];
 			if (width - x - 1 <= wordWidth(word)) {
-				lines++;
+				lines += 1 + (align + wordWidth(word)) / width;
 				waddch(win, '\n');
 				getyx(win, y, x);
 				wmove(win, y, align);