From 65828c98eec0be762c5dfeb4b246a7033d73fe5b Mon Sep 17 00:00:00 2001 From: WormHeamer Date: Sun, 28 Dec 2025 04:42:17 -0500 Subject: tabs support --- main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 3f171ad..0866310 100644 --- a/main.c +++ b/main.c @@ -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; } } -- cgit v1.2.3