aboutsummaryrefslogtreecommitdiff
path: root/tty.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2019-04-24 22:09:57 +0100
committerThomas Adam <thomas@xteddy.org>2019-04-24 22:09:57 +0100
commit4ab208ecc8071e7f2052b726fe11fc84d6945bab (patch)
tree45f35aea92e31d773d39765b6db89fb846245b9e /tty.c
parentc86936613366fe1a0d7a4a2d4ae628d04cd3b866 (diff)
parent6aa0bedad281cef0e9411f3530052d09bbc583f1 (diff)
downloadrtmux-4ab208ecc8071e7f2052b726fe11fc84d6945bab.tar.gz
rtmux-4ab208ecc8071e7f2052b726fe11fc84d6945bab.tar.bz2
rtmux-4ab208ecc8071e7f2052b726fe11fc84d6945bab.zip
Merge branch 'obsd-master'
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/tty.c b/tty.c
index 9ed2b3a9..ff72b7da 100644
--- a/tty.c
+++ b/tty.c
@@ -2361,7 +2361,7 @@ tty_check_bg(struct tty *tty, struct window_pane *wp, struct grid_cell *gc)
if (gc->bg & 8) {
gc->bg &= 7;
if (colours >= 16)
- gc->fg += 90;
+ gc->bg += 90;
}
}
return;
@@ -2388,8 +2388,7 @@ tty_colours_fg(struct tty *tty, const struct grid_cell *gc)
/* Is this an aixterm bright colour? */
if (gc->fg >= 90 && gc->fg <= 97) {
- xsnprintf(s, sizeof s, "\033[%dm", gc->fg);
- tty_puts(tty, s);
+ tty_putcode1(tty, TTYC_SETAF, gc->fg - 90 + 8);
goto save_fg;
}
@@ -2417,8 +2416,7 @@ tty_colours_bg(struct tty *tty, const struct grid_cell *gc)
/* Is this an aixterm bright colour? */
if (gc->bg >= 90 && gc->bg <= 97) {
- xsnprintf(s, sizeof s, "\033[%dm", gc->bg + 10);
- tty_puts(tty, s);
+ tty_putcode1(tty, TTYC_SETAB, gc->bg - 90 + 8);
goto save_bg;
}