aboutsummaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
Diffstat (limited to 'st.c')
-rw-r--r--st.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/st.c b/st.c
index ef0fd17..79fb161 100644
--- a/st.c
+++ b/st.c
@@ -559,6 +559,17 @@ escreset(void) {
559} 559}
560 560
561void 561void
562tputtab(void) {
563 int space = TAB - term.c.x % TAB;
564
565 if(term.c.x + space >= term.col)
566 space--;
567
568 for(; space > 0; space--)
569 tputc(' ');
570}
571
572void
562tputc(char c) { 573tputc(char c) {
563 static int inesc = 0; 574 static int inesc = 0;
564 575
@@ -574,6 +585,9 @@ tputc(char c) {
574 tsetchar(c); 585 tsetchar(c);
575 tcursor(CSright); 586 tcursor(CSright);
576 break; 587 break;
588 case '\t':
589 tputtab();
590 break;
577 case '\b': 591 case '\b':
578 tcursor(CSleft); 592 tcursor(CSleft);
579 break; 593 break;