diff options
author | nicm <nicm> | 2019-04-24 20:32:31 +0000 |
---|---|---|
committer | nicm <nicm> | 2019-04-24 20:32:31 +0000 |
commit | 6aa0bedad281cef0e9411f3530052d09bbc583f1 (patch) | |
tree | b9f1b7c95fd821b894568dd7571f8e1b6937dca2 | |
parent | c6e39976c63813168619e7607484887830ffd0f0 (diff) | |
download | rtmux-6aa0bedad281cef0e9411f3530052d09bbc583f1.tar.gz rtmux-6aa0bedad281cef0e9411f3530052d09bbc583f1.tar.bz2 rtmux-6aa0bedad281cef0e9411f3530052d09bbc583f1.zip |
Use bg not fg when adjusting for aixterm, from Ailin Nemui.
-rw-r--r-- | tty.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -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; } |