Update line count for words longer than lines

master
C. McEnroe 2020-02-10 02:50:32 -05:00
parent 05fc01b248
commit b6061a70d7
1 changed files with 1 additions and 1 deletions

2
ui.c
View File

@ -454,7 +454,7 @@ static int wordWrap(WINDOW *win, const char *str) {
getyx(win, y, x); getyx(win, y, x);
const char *word = &str[strspn(str, " ")]; const char *word = &str[strspn(str, " ")];
if (width - x - 1 <= wordWidth(word)) { if (width - x - 1 <= wordWidth(word)) {
lines++; lines += 1 + (align + wordWidth(word)) / width;
waddch(win, '\n'); waddch(win, '\n');
getyx(win, y, x); getyx(win, y, x);
wmove(win, y, align); wmove(win, y, align);