Wrap before the very edge of the screen
parent
8ef0af34ef
commit
c18dc35377
2
ui.c
2
ui.c
|
@ -234,7 +234,7 @@ static void styleAdd(WINDOW *win, const char *str) {
|
||||||
if (*str == ' ') {
|
if (*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)) {
|
||||||
waddch(win, '\n');
|
waddch(win, '\n');
|
||||||
str = word;
|
str = word;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue