summary refs log tree commit diff
path: root/ui.c
diff options
context:
space:
mode:
authorC. McEnroe2020-02-10 02:50:32 -0500
committerC. McEnroe2020-02-10 02:50:32 -0500
commitb6061a70d78cfce7318b503891fd0290ad0cccaf (patch)
tree7c98af699340aead01c5be7e01f6b94f99cdb03c /ui.c
parent05fc01b2483dfa203a4f905f294b04325e4111eb (diff)
Update line count for words longer than lines
Diffstat (limited to 'ui.c')
-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);