Only treat the first tab as the alignment point
This commit is contained in:
parent
71b0536536
commit
0705f09310
5
ui.c
5
ui.c
@ -384,9 +384,14 @@ static void wordWrap(WINDOW *win, const char *str) {
|
|||||||
struct Style style = Reset;
|
struct Style style = Reset;
|
||||||
while (*str) {
|
while (*str) {
|
||||||
if (*str == '\t') {
|
if (*str == '\t') {
|
||||||
|
if (align) {
|
||||||
|
waddch(win, '\t');
|
||||||
|
str++;
|
||||||
|
} else {
|
||||||
waddch(win, ' ');
|
waddch(win, ' ');
|
||||||
getyx(win, y, align);
|
getyx(win, y, align);
|
||||||
str++;
|
str++;
|
||||||
|
}
|
||||||
} else if (*str == ' ') {
|
} else if (*str == ' ') {
|
||||||
getyx(win, y, x);
|
getyx(win, y, x);
|
||||||
const char *word = &str[strspn(str, " ")];
|
const char *word = &str[strspn(str, " ")];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user