aboutsummaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
Diffstat (limited to 'st.c')
-rw-r--r--st.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/st.c b/st.c
index f8d2257..6e34f1e 100644
--- a/st.c
+++ b/st.c
@@ -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
503void 503void
504tinsertblank(int n) { 504tinsertblank(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
517void 517void
@@ -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);