From b6061a70d78cfce7318b503891fd0290ad0cccaf Mon Sep 17 00:00:00 2001 From: C. McEnroe Date: Mon, 10 Feb 2020 02:50:32 -0500 Subject: Update line count for words longer than lines --- ui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit 1.4.1-2-gfad0