Handle non-alignment tabs in line wrapping

weechat-hashes
C. McEnroe 2020-09-06 22:43:50 -04:00
parent f0fe44f355
commit 05f94f1b8b
1 changed files with 3 additions and 0 deletions

View File

@ -128,6 +128,9 @@ static int flow(struct Lines *hard, int cols, const struct Line *soft) {
// zero-width, so just remove them entirely. // zero-width, so just remove them entirely.
memmove(str, &str[n], strlen(&str[n]) + 1); memmove(str, &str[n], strlen(&str[n]) + 1);
continue; continue;
} else if (wc == L'\t') {
// XXX: Assuming TABSIZE = 8.
width += 8 - (width % 8);
} else if (wc < L' ') { } else if (wc < L' ') {
// XXX: ncurses will render these as "^A". // XXX: ncurses will render these as "^A".
width += 2; width += 2;