handle tabulation (still not perfect)
Aurélien Aptel aurelien.aptel@gmail.com
M
st.c
→
st.c
@@ -559,6 +559,17 @@ memset(&escseq, 0, sizeof(escseq));
} void +tputtab(void) { + int space = TAB - term.c.x % TAB; + + if(term.c.x + space >= term.col) + space--; + + for(; space > 0; space--) + tputc(' '); +} + +void tputc(char c) { static int inesc = 0;@@ -574,6 +585,9 @@ default:
tsetchar(c); tcursor(CSright); break; + case '\t': + tputtab(); + break; case '\b': tcursor(CSleft); break;