--- st.c | 68 +++++++++++++++++++++++++++++++++--------------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff -r 585c4d175633 -r 05f9b1e75c64 st.c --- a/st.c Wed Sep 26 20:53:46 2012 +0200 +++ b/st.c Wed Sep 26 20:55:18 2012 +0200 _AT_@ -1668,6 +1668,32 @@ if(iofd != -1) write(iofd, c, len); + switch(ascii) { + case '\t': + tputtab(1); + return; + case '\b': + tmoveto(term.c.x-1, term.c.y); + return; + case '\r': + tmoveto(0, term.c.y); + return; + case '\f': + case '\v': + case '\n': + /* go to first col if the mode is set */ + tnewline(IS_SET(MODE_CRLF)); + return; + case '\a': + if(!(xw.state & WIN_FOCUSED)) + xseturgency(1); + return; + case '\033': + csireset(); + term.esc = ESC_START; + return; + } + if(term.esc & ESC_START) { if(term.esc & ESC_CSI) { csiescseq.buf[csiescseq.len++] = ascii; _AT_@ -1791,40 +1817,14 @@ } else { if(sel.bx != -1 && BETWEEN(term.c.y, sel.by, sel.ey)) sel.bx = -1; - switch(ascii) { - case '\t': - tputtab(1); - break; - case '\b': - tmoveto(term.c.x-1, term.c.y); - break; - case '\r': - tmoveto(0, term.c.y); - break; - case '\f': - case '\v': - case '\n': - /* go to first col if the mode is set */ - tnewline(IS_SET(MODE_CRLF)); - break; - case '\a': - if(!(xw.state & WIN_FOCUSED)) - xseturgency(1); - break; - case '\033': - csireset(); - term.esc = ESC_START; - break; - default: - if(ascii >= '\020' || term.c.attr.mode & ATTR_GFX) { - if(IS_SET(MODE_WRAP) && term.c.state & CURSOR_WRAPNEXT) - tnewline(1); /* always go to first col */ - tsetchar(c); - if(term.c.x+1 < term.col) - tmoveto(term.c.x+1, term.c.y); - else - term.c.state |= CURSOR_WRAPNEXT; - } + if(ascii >= '\020' || term.c.attr.mode & ATTR_GFX) { + if(IS_SET(MODE_WRAP) && term.c.state & CURSOR_WRAPNEXT) + tnewline(1); /* always go to first col */ + tsetchar(c); + if(term.c.x+1 < term.col) + tmoveto(term.c.x+1, term.c.y); + else + term.c.state |= CURSOR_WRAPNEXT; } } }Received on Wed Sep 26 2012 - 20:58:50 CEST
This archive was generated by hypermail 2.3.0 : Wed Sep 26 2012 - 21:00:20 CEST