diff options
Diffstat (limited to 'st.c')
| -rw-r--r-- | st.c | 20 |
1 files changed, 10 insertions, 10 deletions
| @@ -1663,7 +1663,7 @@ tputtab(bool forward) { | |||
| 1663 | 1663 | ||
| 1664 | void | 1664 | void |
| 1665 | tputc(char *c, int len) { | 1665 | tputc(char *c, int len) { |
| 1666 | char ascii = *c; | 1666 | uchar ascii = *c; |
| 1667 | 1667 | ||
| 1668 | if(iofd != -1) | 1668 | if(iofd != -1) |
| 1669 | write(iofd, c, len); | 1669 | write(iofd, c, len); |
| @@ -1792,8 +1792,6 @@ tputc(char *c, int len) { | |||
| 1792 | if(sel.bx != -1 && BETWEEN(term.c.y, sel.by, sel.ey)) | 1792 | if(sel.bx != -1 && BETWEEN(term.c.y, sel.by, sel.ey)) |
| 1793 | sel.bx = -1; | 1793 | sel.bx = -1; |
| 1794 | switch(ascii) { | 1794 | switch(ascii) { |
| 1795 | case '\0': /* padding character, do nothing */ | ||
| 1796 | break; | ||
| 1797 | case '\t': | 1795 | case '\t': |
| 1798 | tputtab(1); | 1796 | tputtab(1); |
| 1799 | break; | 1797 | break; |
| @@ -1818,13 +1816,15 @@ tputc(char *c, int len) { | |||
| 1818 | term.esc = ESC_START; | 1816 | term.esc = ESC_START; |
| 1819 | break; | 1817 | break; |
| 1820 | default: | 1818 | default: |
| 1821 | if(IS_SET(MODE_WRAP) && term.c.state & CURSOR_WRAPNEXT) | 1819 | if(ascii >= '\020' || term.c.attr.mode & ATTR_GFX) { |
| 1822 | tnewline(1); /* always go to first col */ | 1820 | if(IS_SET(MODE_WRAP) && term.c.state & CURSOR_WRAPNEXT) |
| 1823 | tsetchar(c); | 1821 | tnewline(1); /* always go to first col */ |
| 1824 | if(term.c.x+1 < term.col) | 1822 | tsetchar(c); |
| 1825 | tmoveto(term.c.x+1, term.c.y); | 1823 | if(term.c.x+1 < term.col) |
| 1826 | else | 1824 | tmoveto(term.c.x+1, term.c.y); |
| 1827 | term.c.state |= CURSOR_WRAPNEXT; | 1825 | else |
| 1826 | term.c.state |= CURSOR_WRAPNEXT; | ||
| 1827 | } | ||
| 1828 | } | 1828 | } |
| 1829 | } | 1829 | } |
| 1830 | } | 1830 | } |
