diff options
author | Aurélien Aptel <aurelien.aptel@gmail.com> | 2009-05-14 01:03:17 +0200 |
---|---|---|
committer | Aurélien Aptel <aurelien.aptel@gmail.com> | 2009-05-14 01:03:17 +0200 |
commit | 9364de4c646a228b030c31e9703490812d04bf50 (patch) | |
tree | be28de4081f44d4e6e266122bd1362c8adb4fd24 /st.c | |
parent | 28abdd24c728b88e3ed9028d798a036a5ae87e32 (diff) | |
download | st-9364de4c646a228b030c31e9703490812d04bf50.tar.gz st-9364de4c646a228b030c31e9703490812d04bf50.tar.bz2 |
handle tabulation (still not perfect)
Diffstat (limited to 'st.c')
-rw-r--r-- | st.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -559,6 +559,17 @@ escreset(void) { } 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 @@ tputc(char c) { tsetchar(c); tcursor(CSright); break; + case '\t': + tputtab(); + break; case '\b': tcursor(CSleft); break; |