diff options
Diffstat (limited to 'st.c')
| -rw-r--r-- | st.c | 8 |
1 files changed, 4 insertions, 4 deletions
| @@ -497,21 +497,21 @@ tdeletechar(int n) { | |||
| 497 | return; | 497 | return; |
| 498 | } | 498 | } |
| 499 | memmove(&term.line[term.c.y][dst], &term.line[term.c.y][src], size * sizeof(Glyph)); | 499 | memmove(&term.line[term.c.y][dst], &term.line[term.c.y][src], size * sizeof(Glyph)); |
| 500 | tclearregion(term.col-size, term.c.y, term.col-1, term.c.y); | 500 | tclearregion(term.col-n, term.c.y, term.col-1, term.c.y); |
| 501 | } | 501 | } |
| 502 | 502 | ||
| 503 | void | 503 | void |
| 504 | tinsertblank(int n) { | 504 | tinsertblank(int n) { |
| 505 | int src = term.c.x; | 505 | int src = term.c.x; |
| 506 | int dst = src + n; | 506 | int dst = src + n; |
| 507 | int size = term.col - n - src; | 507 | int size = term.col - dst; |
| 508 | 508 | ||
| 509 | if(dst >= term.col) { | 509 | if(dst >= term.col) { |
| 510 | tclearregion(term.c.x, term.c.y, term.col-1, term.c.y); | 510 | tclearregion(term.c.x, term.c.y, term.col-1, term.c.y); |
| 511 | return; | 511 | return; |
| 512 | } | 512 | } |
| 513 | memmove(&term.line[term.c.y][dst], &term.line[term.c.y][src], size * sizeof(Glyph)); | 513 | memmove(&term.line[term.c.y][dst], &term.line[term.c.y][src], size * sizeof(Glyph)); |
| 514 | tclearregion(src, term.c.y, dst, term.c.y); | 514 | tclearregion(src, term.c.y, dst - 1, term.c.y); |
| 515 | } | 515 | } |
| 516 | 516 | ||
| 517 | void | 517 | void |
| @@ -1173,7 +1173,7 @@ xcursor(int mode) { | |||
| 1173 | 1173 | ||
| 1174 | if(term.line[term.c.y][term.c.x].state & GLYPH_SET) | 1174 | if(term.line[term.c.y][term.c.x].state & GLYPH_SET) |
| 1175 | g.c = term.line[term.c.y][term.c.x].c; | 1175 | g.c = term.line[term.c.y][term.c.x].c; |
| 1176 | 1176 | ||
| 1177 | /* remove the old cursor */ | 1177 | /* remove the old cursor */ |
| 1178 | if(term.line[oldy][oldx].state & GLYPH_SET) | 1178 | if(term.line[oldy][oldx].state & GLYPH_SET) |
| 1179 | xdraws(&term.line[oldy][oldx].c, term.line[oldy][oldx], oldx, oldy, 1); | 1179 | xdraws(&term.line[oldy][oldx].c, term.line[oldy][oldx], oldx, oldy, 1); |
