Handle non-alignment tabs in line wrapping
parent
f0fe44f355
commit
05f94f1b8b
3
buffer.c
3
buffer.c
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue