diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2019-12-11 12:13:38 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2019-12-11 12:13:38 +0000 |
commit | 6451bc50f94a62d5452658e63f4b48c37a8a938d (patch) | |
tree | 111a39d408beb2f3f48f0fe8519987bb2a0d7d73 /usr.bin/tmux/tty.c | |
parent | 9e8a3ae1e4e018fd93d3d9e1e9be965d0d2e6777 (diff) |
Do not set cursor colour to default unless it has been changed, GitHub
issue 2013.
Diffstat (limited to 'usr.bin/tmux/tty.c')
-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)) |