summaryrefslogtreecommitdiffstats
path: root/tty.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2012-09-05 09:59:41 +0000
committerNicholas Marriott <nicm@openbsd.org>2012-09-05 09:59:41 +0000
commitb433886840ec4dba4b8b921b741b6a448a226d30 (patch)
tree73da72aefa364b53883ccd2ee0b7b77461a27710 /tty.c
parent59c760dfcd9da4ce2a4e5b68e66416f77b4d5e5f (diff)
We can't tell what the terminal has done with a DCS string, so reset the
cursor and attributes afterwards.
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tty.c b/tty.c
index 01b3a93d..0270af93 100644
--- a/tty.c
+++ b/tty.c
@@ -1046,6 +1046,12 @@ tty_cmd_rawstring(struct tty *tty, const struct tty_ctx *ctx)
for (i = 0; i < ctx->num; i++)
tty_putc(tty, str[i]);
+
+ tty->cx = tty->cy = UINT_MAX;
+ tty->rupper = tty->rlower = UINT_MAX;
+
+ tty_reset(tty);
+ tty_cursor(tty, 0, 0);
}
void