1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +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
+1
View File
@@ -19,6 +19,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
### Fixed
- core: fix option weechat.look.color_real_white not applied when color is "white" on 16+ colors terminals ([#1742](https://github.com/weechat/weechat/issues/1742))
- fset: remove error displayed in core buffer when clicking with the mouse below the last option displayed
## Version 4.9.0 (2026-03-29)
+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;