=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/tty.c,v retrieving revision 1.431 retrieving revision 1.432 diff -c -r1.431 -r1.432 *** src/usr.bin/tmux/tty.c 2023/06/26 07:17:40 1.431 --- src/usr.bin/tmux/tty.c 2023/07/13 06:03:48 1.432 *************** *** 1,4 **** ! /* $OpenBSD: tty.c,v 1.431 2023/06/26 07:17:40 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: tty.c,v 1.432 2023/07/13 06:03:48 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 2815,2823 **** } /* Underscore colour is set as RGB so convert. */ ! gc->us = colour_force_rgb (gc->us); ! if (gc->us == -1) gc->us = 8; } static void --- 2815,2824 ---- } /* Underscore colour is set as RGB so convert. */ ! if ((c = colour_force_rgb (gc->us)) == -1) gc->us = 8; + else + gc->us = c; } static void *************** *** 2892,2898 **** u_char r, g, b; /* Clear underline colour. */ ! if (gc->us == 0) { tty_putcode(tty, TTYC_OL); goto save; } --- 2893,2899 ---- u_char r, g, b; /* Clear underline colour. */ ! if (COLOUR_DEFAULT(gc->us)) { tty_putcode(tty, TTYC_OL); goto save; }