aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--st.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/st.c b/st.c
index d169ddf..4b7e4eb 100644
--- a/st.c
+++ b/st.c
@@ -1214,7 +1214,6 @@ csihandle(void) {
1214 DEFAULT(escseq.arg[1], 1); 1214 DEFAULT(escseq.arg[1], 1);
1215 tmoveto(escseq.arg[1]-1, escseq.arg[0]-1); 1215 tmoveto(escseq.arg[1]-1, escseq.arg[0]-1);
1216 break; 1216 break;
1217 /* XXX: (CSI n I) CHT -- Cursor Forward Tabulation <n> tab stops */
1218 case 'J': /* ED -- Clear screen */ 1217 case 'J': /* ED -- Clear screen */
1219 sel.bx = -1; 1218 sel.bx = -1;
1220 switch(escseq.arg[0]) { 1219 switch(escseq.arg[0]) {
@@ -1429,8 +1428,11 @@ csireset(void) {
1429 1428
1430void 1429void
1431tputtab(void) { 1430tputtab(void) {
1432 int space = TAB - term.c.x % TAB; 1431 unsigned x;
1433 tmoveto(term.c.x + space, term.c.y); 1432
1433 for (x = term.c.x + 1; x < term.col && !term.tabs[x]; ++x)
1434 /* nothing */ ;
1435 tmoveto(x, term.c.y);
1434} 1436}
1435 1437
1436void 1438void
@@ -1491,6 +1493,10 @@ tputc(char *c) {
1491 tnewline(1); /* always go to first col */ 1493 tnewline(1); /* always go to first col */
1492 term.esc = 0; 1494 term.esc = 0;
1493 break; 1495 break;
1496 case 'H': /* HTS -- Horizontal tab stop */
1497 term.tabs[term.c.x] = 1;
1498 term.esc = 0;
1499 break;
1494 case 'M': /* RI -- Reverse index */ 1500 case 'M': /* RI -- Reverse index */
1495 if(term.c.y == term.top) 1501 if(term.c.y == term.top)
1496 tscrolldown(term.top, 1); 1502 tscrolldown(term.top, 1);