diff options
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -191,6 +191,9 @@ void draw(void *ctx) { if (c == '\n') { x = 0; y++; + } else if (c == '\t') { + x++; + x += (-x & 7); } else if (c) { vui_chr(x++, y, c); } @@ -274,7 +277,7 @@ int main(int argc, const char **argv) { cur = txt_insert_c(&txt, cur, '\n'); break; default: - if (c >= ' ' && c <= KEY_UTF8_MAX) cur = txt_insert_c(&txt, cur, c); + if ((c == '\t' || c >= ' ') && c <= KEY_UTF8_MAX) cur = txt_insert_c(&txt, cur, c); break; } } |
