summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm>2020-01-29 15:07:49 +0000
committernicm <nicm>2020-01-29 15:07:49 +0000
commit531daba584f55fed87ec87986a7f0b497c14626f (patch)
tree761bb4e78c4bdab36b98e87f53a1e8c72f2e2f12
parent7a15d10bf4abb28e0a85e0090de9c13f80f83aaa (diff)
Do not send DA and DSR again if already have a response.
-rw-r--r--input.c1
-rw-r--r--tty.c6
2 files changed, 5 insertions, 2 deletions
diff --git a/input.c b/input.c
index d7071bfe..ea9320d1 100644
--- a/input.c
+++ b/input.c
@@ -773,6 +773,7 @@ input_save_state(struct input_ctx *ictx)
ictx->old_mode = s->mode;
}
+/* Restore screen state. */
static void
input_restore_state(struct input_ctx *ictx)
{
diff --git a/tty.c b/tty.c
index 54c3be30..3bab556d 100644
--- a/tty.c
+++ b/tty.c
@@ -338,8 +338,10 @@ tty_start_tty(struct tty *tty)
tty->flags |= TTY_FOCUS;
tty_puts(tty, "\033[?1004h");
}
- tty_puts(tty, "\033[c\033[1337n"); /* DA and DSR */
-
+ if (~tty->flags & TTY_HAVEDA)
+ tty_puts(tty, "\033[c");
+ if (~tty->flags & TTY_HAVEDSR)
+ tty_puts(tty, "\033[1337n");
} else
tty->flags |= (TTY_HAVEDA|TTY_HAVEDSR);