summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--st.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/st.c b/st.c
index 683493d..b9f66e7 100644
--- a/st.c
+++ b/st.c
@@ -86,8 +86,8 @@ enum escape_state {
86 86
87typedef struct { 87typedef struct {
88 Glyph attr; /* current char attributes */ 88 Glyph attr; /* current char attributes */
89 int x; /* terminal column */ 89 int x;
90 int y; /* terminal row */ 90 int y;
91 char state; 91 char state;
92} TCursor; 92} TCursor;
93 93
@@ -2175,16 +2175,12 @@ tstrsequence(uchar c)
2175void 2175void
2176tcontrolcode(uchar ascii) 2176tcontrolcode(uchar ascii)
2177{ 2177{
2178 size_t i;
2179
2180 switch (ascii) { 2178 switch (ascii) {
2181 case '\t': /* HT */ 2179 case '\t': /* HT */
2182 tputtab(1); 2180 tputtab(1);
2183 return; 2181 return;
2184 case '\b': /* BS */ 2182 case '\b': /* BS */
2185 for (i = 1; term.c.x && term.line[term.c.y][term.c.x - i].u == 0; ++i) 2183 tmoveto(term.c.x-1, term.c.y);
2186 ;
2187 tmoveto(term.c.x - i, term.c.y);
2188 return; 2184 return;
2189 case '\r': /* CR */ 2185 case '\r': /* CR */
2190 tmoveto(0, term.c.y); 2186 tmoveto(0, term.c.y);