summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/tty.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2009-11-26 14:46:08 +0000
committernicm <nicm@openbsd.org>2009-11-26 14:46:08 +0000
commit7037456a63647564b42d8c892bddc557da93d63b (patch)
tree517c5d8833b5e6ed8a83bb0ad95504a73750038f /usr.bin/tmux/tty.c
parentmagical fix for a fault which reliably brings my firewalls down. i think (diff)
downloadwireguard-openbsd-7037456a63647564b42d8c892bddc557da93d63b.tar.xz
wireguard-openbsd-7037456a63647564b42d8c892bddc557da93d63b.zip
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;
}