aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tty-term.c17
-rw-r--r--tty.c14
2 files changed, 10 insertions, 21 deletions
diff --git a/tty-term.c b/tty-term.c
index 596b293a..9305c5d5 100644
--- a/tty-term.c
+++ b/tty-term.c
@@ -1,4 +1,4 @@
-/* $Id: tty-term.c,v 1.37 2009-11-26 09:19:05 nicm Exp $ */
+/* $Id: tty-term.c,v 1.38 2009-11-28 14:42:21 tcunha Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -392,21 +392,6 @@ tty_term_find(char *name, int fd, const char *overrides, char **cause)
xasprintf(cause, "terminal does not support cud1 or cud");
goto error;
}
- if (!tty_term_has(term, TTYC_IL1) && !tty_term_has(term, TTYC_IL)) {
- xasprintf(cause, "terminal does not support il1 or il");
- goto error;
- }
- if (!tty_term_has(term, TTYC_DL1) && !tty_term_has(term, TTYC_DL)) {
- xasprintf(cause, "terminal does not support dl1 or dl");
- goto error;
- }
- if (!tty_term_has(term, TTYC_ICH1) &&
- !tty_term_has(term, TTYC_ICH) && (!tty_term_has(term, TTYC_SMIR) ||
- !tty_term_has(term, TTYC_RMIR))) {
- xasprintf(cause,
- "terminal does not support ich1 or ich or smir and rmir");
- goto error;
- }
/* Figure out if we have 256 or 88 colours. */
if (tty_term_number(term, TTYC_COLORS) == 256)
diff --git a/tty.c b/tty.c
index b163552e..7ae8d86c 100644
--- a/tty.c
+++ b/tty.c
@@ -1,4 +1,4 @@
-/* $Id: tty.c,v 1.175 2009-11-19 22:23:27 tcunha Exp $ */
+/* $Id: tty.c,v 1.176 2009-11-28 14:42:21 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -574,12 +574,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
@@ -611,7 +613,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;
}
@@ -631,7 +634,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;
}