1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-01 23:36:37 +02:00

core: fix option weechat.look.color_real_white not applied when color is "white" on 16+ colors terminals (closes #1742)

This commit is contained in:
Sébastien Helleu
2026-05-23 12:01:21 +02:00
parent 4c38ce050b
commit c71978c0b3
2 changed files with 7 additions and 3 deletions
+6 -3
View File
@@ -373,7 +373,8 @@ gui_window_set_weechat_color (WINDOW *window, int num_color)
* if not real white, we use default terminal foreground instead of
* white if bold attribute is set
*/
if ((fg == COLOR_WHITE) && (gui_color[num_color]->attributes & A_BOLD)
if (((fg == COLOR_WHITE + 8)
|| ((fg == COLOR_WHITE) && (gui_color[num_color]->attributes & A_BOLD)))
&& !CONFIG_BOOLEAN(config_look_color_real_white))
{
fg = -1;
@@ -443,7 +444,8 @@ gui_window_set_custom_color_fg (WINDOW *window, int fg)
* if not real white, we use default terminal foreground instead of
* white if bold attribute is set
*/
if ((fg == COLOR_WHITE) && (attributes & A_BOLD)
if (((fg == COLOR_WHITE + 8)
|| ((fg == COLOR_WHITE) && (attributes & A_BOLD)))
&& !CONFIG_BOOLEAN(config_look_color_real_white))
{
fg = -1;
@@ -536,7 +538,8 @@ gui_window_set_custom_color_fg_bg (WINDOW *window, int fg, int bg,
* if not real white, we use default terminal foreground instead of
* white if bold attribute is set
*/
if ((fg == COLOR_WHITE) && (attributes & A_BOLD)
if (((fg == COLOR_WHITE + 8)
|| ((fg == COLOR_WHITE) && (attributes & A_BOLD)))
&& !CONFIG_BOOLEAN(config_look_color_real_white))
{
fg = -1;