aboutsummaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
authorAurélien Aptel <aurelien.aptel@gmail.com>2010-08-22 19:46:46 +0200
committerAurélien Aptel <aurelien.aptel@gmail.com>2010-08-22 19:46:46 +0200
commitd1084bfdab23d3a5560bab3e1f1b97f353115078 (patch)
tree9441bd9b362384260de3cc1d1a9415462a319fbb /st.c
parent66efdff768c305b785234a918c67a687d437380d (diff)
downloadst-d1084bfdab23d3a5560bab3e1f1b97f353115078.tar.gz
st-d1084bfdab23d3a5560bab3e1f1b97f353115078.tar.bz2
added F1-12 key, fixed DCH and ICH.
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) {
return;
}
memmove(&term.line[term.c.y][dst], &term.line[term.c.y][src], size * sizeof(Glyph));
- tclearregion(term.col-size, term.c.y, term.col-1, term.c.y);
+ tclearregion(term.col-n, term.c.y, term.col-1, term.c.y);
}
void
tinsertblank(int n) {
int src = term.c.x;
int dst = src + n;
- int size = term.col - n - src;
+ int size = term.col - dst;
if(dst >= term.col) {
tclearregion(term.c.x, term.c.y, term.col-1, term.c.y);
return;
}
memmove(&term.line[term.c.y][dst], &term.line[term.c.y][src], size * sizeof(Glyph));
- tclearregion(src, term.c.y, dst, term.c.y);
+ tclearregion(src, term.c.y, dst - 1, term.c.y);
}
void
@@ -1173,7 +1173,7 @@ xcursor(int mode) {
if(term.line[term.c.y][term.c.x].state & GLYPH_SET)
g.c = term.line[term.c.y][term.c.x].c;
-
+
/* remove the old cursor */
if(term.line[oldy][oldx].state & GLYPH_SET)
xdraws(&term.line[oldy][oldx].c, term.line[oldy][oldx], oldx, oldy, 1);