=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/tty.c,v retrieving revision 1.287 retrieving revision 1.288 diff -u -r1.287 -r1.288 --- src/usr.bin/tmux/tty.c 2017/05/31 10:29:15 1.287 +++ src/usr.bin/tmux/tty.c 2017/06/03 07:15:23 1.288 @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.287 2017/05/31 10:29:15 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.288 2017/06/03 07:15:23 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -1841,10 +1841,18 @@ u_int colours; int c; - /* Perform substitution if this pane has a palette */ - if ((~gc->flags & GRID_FLAG_NOPALETTE) && - (c = window_pane_get_palette(wp, gc->fg)) != -1) - gc->fg = c; + /* + * 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. + */ + if (~gc->flags & GRID_FLAG_NOPALETTE) { + c = gc->fg; + if (gc->fg < 8 && gc->attr & GRID_ATTR_BRIGHT) + c += 90; + if ((c = window_pane_get_palette(wp, c)) != -1) + gc->fg = c; + } /* Is this a 24-bit colour? */ if (gc->fg & COLOUR_FLAG_RGB) { @@ -1894,10 +1902,11 @@ u_int colours; int c; - /* Perform substitution if this pane has a palette */ - if ((~gc->flags & GRID_FLAG_NOPALETTE) && - (c = window_pane_get_palette(wp, gc->bg)) != -1) - gc->bg = c; + /* Perform substitution if this pane has a palette. */ + if (~gc->flags & GRID_FLAG_NOPALETTE) { + if ((c = window_pane_get_palette(wp, gc->bg)) != -1) + gc->bg = c; + } /* Is this a 24-bit colour? */ if (gc->bg & COLOUR_FLAG_RGB) {