diff options
| -rw-r--r-- | st.c | 5 |
1 files changed, 4 insertions, 1 deletions
| @@ -2673,13 +2673,16 @@ tputc(char *c, int len) { | |||
| 2673 | if(IS_SET(MODE_WRAP) && (term.c.state & CURSOR_WRAPNEXT)) { | 2673 | if(IS_SET(MODE_WRAP) && (term.c.state & CURSOR_WRAPNEXT)) { |
| 2674 | gp->mode |= ATTR_WRAP; | 2674 | gp->mode |= ATTR_WRAP; |
| 2675 | tnewline(1); | 2675 | tnewline(1); |
| 2676 | gp = &term.line[term.c.y][term.c.x]; | ||
| 2676 | } | 2677 | } |
| 2677 | 2678 | ||
| 2678 | if(IS_SET(MODE_INSERT) && term.c.x+1 < term.col) | 2679 | if(IS_SET(MODE_INSERT) && term.c.x+1 < term.col) |
| 2679 | memmove(gp+1, gp, (term.col - term.c.x - 1) * sizeof(Glyph)); | 2680 | memmove(gp+1, gp, (term.col - term.c.x - 1) * sizeof(Glyph)); |
| 2680 | 2681 | ||
| 2681 | if(term.c.x+width > term.col) | 2682 | if(term.c.x+width > term.col) { |
| 2682 | tnewline(1); | 2683 | tnewline(1); |
| 2684 | gp = &term.line[term.c.y][term.c.x]; | ||
| 2685 | } | ||
| 2683 | 2686 | ||
| 2684 | tsetchar(c, &term.c.attr, term.c.x, term.c.y); | 2687 | tsetchar(c, &term.c.attr, term.c.x, term.c.y); |
| 2685 | 2688 | ||
