summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/tty.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2009-11-26 14:46:09 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2009-11-26 14:46:09 +0000
commit3ac24027442f927c579e0de8877dae094eecc6df (patch)
treeb35de547010a9edf2074966dfe1cb29f5888747d /usr.bin/tmux/tty.c
parentf85ba28744732fd5ddab334ded1b3bafbb6c951e (diff)
Emulate il1, dl1, ich1 to run (albeit slowly) with vt100 feature set.
Diffstat (limited to 'usr.bin/tmux/tty.c')
-rw-r--r--usr.bin/tmux/tty.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c
index c7dd4bc8fd7..d4feadac19b 100644
--- a/usr.bin/tmux/tty.c
+++ b/usr.bin/tmux/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.71 2009/11/18 17:02:17 nicm Exp $ */
+/* $OpenBSD: tty.c,v 1.72 2009/11/26 14:46:08 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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;
}