summaryrefslogtreecommitdiffstats
path: root/tty.c
diff options
context:
space:
mode:
authornicm <nicm>2022-08-15 08:54:03 +0000
committernicm <nicm>2022-08-15 08:54:03 +0000
commit03149bf7f62e2c92d0e60087c52604d2dd51794f (patch)
treef7983fc30be68d04d49b36e14c12d22391946f51 /tty.c
parent497021d0db40790cc9a98bb1d70ae091d170831e (diff)
Add a Nobr terminfo capability to tell tmux the terminal does not use
bright colours for bold (makes a difference to how tmux applies palette differences). From Damien Tardy-Panis in GitHub issue 3301.
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/tty.c b/tty.c
index a7ad536f..1394075d 100644
--- a/tty.c
+++ b/tty.c
@@ -2690,12 +2690,14 @@ tty_check_fg(struct tty *tty, struct colour_palette *palette,
/*
* Perform substitution if this pane has a palette. If the bright
- * attribute is set, use the bright entry in the palette by changing to
- * the aixterm colour.
+ * attribute is set and Nobr is not present, use the bright entry in
+ * the palette by changing to the aixterm colour
*/
if (~gc->flags & GRID_FLAG_NOPALETTE) {
c = gc->fg;
- if (c < 8 && gc->attr & GRID_ATTR_BRIGHT)
+ if (c < 8 &&
+ gc->attr & GRID_ATTR_BRIGHT &&
+ !tty_term_has(tty->term, TTYC_NOBR))
c += 90;
if ((c = colour_palette_get(palette, c)) != -1)
gc->fg = c;