commit a65bf6577f4e58f4bdac60f2f161142644c3967e
parent be995971a9ec7796ab458e4239f5a09ed1703495
Author: hhvn <dev@hhvn.uk>
Date: Tue, 28 Jun 2022 18:51:06 +0100
Handle tab characters in draw_line (for type 0)
Diffstat:
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/zygo.c b/zygo.c
@@ -689,8 +689,11 @@ draw_line(Elem *e, int nwidth) {
getyx(stdscr, y, x);
for (p = mbdesc; *p; p++) {
- x++;
- if (x == COLS) {
+ if (*p == L'\t')
+ x += 8;
+ else
+ x++;
+ if (x >= COLS) {
attron(A_REVERSE);
printw("%s", toolong);
goto end;