diff options
author | 2019-12-11 12:13:37 +0000 | |
---|---|---|
committer | 2019-12-11 12:13:37 +0000 | |
commit | 0e5545a9ff93da4fdd9e698955138dcc19f9cd9c (patch) | |
tree | 37d88e73ffd9420ee43caa59dd10bf18794b0ba9 | |
parent | use sockaddr_storage to store the address used to generate mcast entries. (diff) | |
download | wireguard-openbsd-0e5545a9ff93da4fdd9e698955138dcc19f9cd9c.tar.xz wireguard-openbsd-0e5545a9ff93da4fdd9e698955138dcc19f9cd9c.zip |
Do not set cursor colour to default unless it has been changed, GitHub
issue 2013.
-rw-r--r-- | usr.bin/tmux/tty.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c index fdc4f690b17..a626d754459 100644 --- a/usr.bin/tmux/tty.c +++ b/usr.bin/tmux/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.335 2019/11/28 09:56:25 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.336 2019/12/11 12:13:37 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -335,7 +335,8 @@ tty_start_tty(struct tty *tty) tty->flags |= TTY_STARTED; tty_invalidate(tty); - tty_force_cursor_colour(tty, ""); + if (*tty->ccolour != '\0') + tty_force_cursor_colour(tty, ""); tty->mouse_drag_flag = 0; tty->mouse_drag_update = NULL; @@ -381,7 +382,8 @@ tty_stop_tty(struct tty *tty) } if (tty->mode & MODE_BRACKETPASTE) tty_raw(tty, "\033[?2004l"); - tty_raw(tty, tty_term_string(tty->term, TTYC_CR)); + if (*tty->ccolour != '\0') + tty_raw(tty, tty_term_string(tty->term, TTYC_CR)); tty_raw(tty, tty_term_string(tty->term, TTYC_CNORM)); if (tty_term_has(tty->term, TTYC_KMOUS)) |