summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm>2019-12-11 12:13:37 +0000
committernicm <nicm>2019-12-11 12:13:37 +0000
commitf733d3f3ebd144d0d0e1c11a544eb093637590e6 (patch)
tree3a650c61431a908aeb8e6e9e1e55072803a7a97b
parent55eb3e4773b8e73d7073c53aa5a61a017631b519 (diff)
Do not set cursor colour to default unless it has been changed, GitHub
issue 2013.
-rw-r--r--tty.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tty.c b/tty.c
index 594f02fa..2d7acb17 100644
--- a/tty.c
+++ b/tty.c
@@ -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))