diff options
| author | WormHeamer | 2025-12-28 04:42:17 -0500 |
|---|---|---|
| committer | WormHeamer | 2025-12-28 04:42:17 -0500 |
| commit | 65828c98eec0be762c5dfeb4b246a7033d73fe5b (patch) | |
| tree | afdd31c4fee795662336659c61a4e46bf7c43a35 /main.c | |
| parent | 615601fb355709d611d18f878f77c993c312f6aa (diff) | |
tabs support
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; } } |
