summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/tty.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2020-04-16 15:14:25 +0000
committernicm <nicm@openbsd.org>2020-04-16 15:14:25 +0000
commit25e90a40b474210a11f711498a4ceca61561fadb (patch)
tree7c566d0d1098419ad6706d6c1182f1c3b2e0fb1e /usr.bin/tmux/tty.c
parentIt is unclear why data is memcpy-ed into a char buf[2] that is used as (diff)
downloadwireguard-openbsd-25e90a40b474210a11f711498a4ceca61561fadb.tar.xz
wireguard-openbsd-25e90a40b474210a11f711498a4ceca61561fadb.zip
Send secondary device attributes instead of primary which gives us a bit
more useful information on some terminals.
Diffstat (limited to 'usr.bin/tmux/tty.c')
-rw-r--r--usr.bin/tmux/tty.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c
index 38c81ecea9a..87d6d098f54 100644
--- a/usr.bin/tmux/tty.c
+++ b/usr.bin/tmux/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.350 2020/04/16 14:25:35 nicm Exp $ */
+/* $OpenBSD: tty.c,v 1.351 2020/04/16 15:14:25 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -364,7 +364,7 @@ tty_send_requests(struct tty *tty)
if (tty_term_flag(tty->term, TTYC_XT)) {
if (~tty->flags & TTY_HAVEDA)
- tty_puts(tty, "\033[c");
+ tty_puts(tty, "\033[>c");
if (~tty->flags & TTY_HAVEDSR)
tty_puts(tty, "\033[1337n");
} else
@@ -1175,8 +1175,7 @@ tty_clear_area(struct tty *tty, struct window_pane *wp, u_int py, u_int ny,
* background colour isn't default (because it doesn't work
* after SGR 0).
*/
- if ((tty_get_flags(tty) & TERM_DECFRA) &&
- !COLOUR_DEFAULT(bg)) {
+ if ((tty_get_flags(tty) & TERM_DECFRA) && !COLOUR_DEFAULT(bg)) {
xsnprintf(tmp, sizeof tmp, "\033[32;%u;%u;%u;%u$x",
py + 1, px + 1, py + ny, px + nx);
tty_puts(tty, tmp);