diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2022-08-15 08:54:04 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2022-08-15 08:54:04 +0000 |
commit | d21a39daf814f6ff4f7bb45bf07226e59ad6061f (patch) | |
tree | e64a8ca984e64c9f1ada2b7d9ee9bbeb2ad68fc1 /usr.bin/tmux/tty.c | |
parent | 0980307844bc1ea172529aae0c1d82decc0cf6ee (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 'usr.bin/tmux/tty.c')
-rw-r--r-- | usr.bin/tmux/tty.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c index 4077b9ad528..77ffddb008e 100644 --- a/usr.bin/tmux/tty.c +++ b/usr.bin/tmux/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.423 2022/08/02 11:09:26 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.424 2022/08/15 08:54:03 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -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; |