summaryrefslogtreecommitdiffstats
path: root/tty.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-11-26 14:46:08 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-11-26 14:46:08 +0000
commitd31d4c05cff725db571d4463da4106638304e29b (patch)
treebecea166674c93c72b9d1ecfb56595e124ebd818 /tty.c
parent094bca5ac3024957700ff5c0af74fbec18a79172 (diff)
Emulate il1, dl1, ich1 to run (albeit slowly) with vt100 feature set.
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/tty.c b/tty.c
index a3aeda5d..84931e78 100644
--- a/tty.c
+++ b/tty.c
@@ -569,12 +569,14 @@ tty_cmd_insertcharacter(struct tty *tty, const struct tty_ctx *ctx)
if (tty_term_has(tty->term, TTYC_ICH) ||
tty_term_has(tty->term, TTYC_ICH1))
tty_emulate_repeat(tty, TTYC_ICH, TTYC_ICH1, ctx->num);
- else {
+ else if (tty_term_has(tty->term, TTYC_SMIR) &&
+ tty_term_has(tty->term, TTYC_RMIR)) {
tty_putcode(tty, TTYC_SMIR);
for (i = 0; i < ctx->num; i++)
tty_putc(tty, ' ');
tty_putcode(tty, TTYC_RMIR);
- }
+ } else
+ tty_draw_line(tty, wp->screen, ctx->ocy, wp->xoff, wp->yoff);
}
void
@@ -606,7 +608,8 @@ tty_cmd_insertline(struct tty *tty, const struct tty_ctx *ctx)
struct screen *s = wp->screen;
if (wp->xoff != 0 || screen_size_x(s) < tty->sx ||
- !tty_term_has(tty->term, TTYC_CSR)) {
+ !tty_term_has(tty->term, TTYC_CSR) ||
+ !tty_term_has(tty->term, TTYC_IL1)) {
tty_redraw_region(tty, ctx);
return;
}
@@ -626,7 +629,8 @@ tty_cmd_deleteline(struct tty *tty, const struct tty_ctx *ctx)
struct screen *s = wp->screen;
if (wp->xoff != 0 || screen_size_x(s) < tty->sx ||
- !tty_term_has(tty->term, TTYC_CSR)) {
+ !tty_term_has(tty->term, TTYC_CSR) ||
+ !tty_term_has(tty->term, TTYC_DL1)) {
tty_redraw_region(tty, ctx);
return;
}