Only treat the first tab as the alignment point

master
C. McEnroe 2020-02-07 23:56:41 -05:00
parent 71b0536536
commit 0705f09310
1 changed files with 8 additions and 3 deletions

5
ui.c
View File

@ -384,9 +384,14 @@ static void wordWrap(WINDOW *win, const char *str) {
struct Style style = Reset;
while (*str) {
if (*str == '\t') {
if (align) {
waddch(win, '\t');
str++;
} else {
waddch(win, ' ');
getyx(win, y, align);
str++;
}
} else if (*str == ' ') {
getyx(win, y, x);
const char *word = &str[strspn(str, " ")];