1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-26 04:46:37 +02:00

core: toggle reverse video attribute in bars for chars < 32 only if not already enabled

This commit is contained in:
Sébastien Helleu
2022-12-04 09:21:24 +01:00
parent f63dba67f2
commit 6ac730cd0b
2 changed files with 7 additions and 2 deletions
+6 -2
View File
@@ -352,10 +352,14 @@ gui_bar_window_print_string (struct t_gui_bar_window *bar_window,
}
else if (((unsigned char)utf_char[0]) < 32)
{
/* display chars < 32 with letter/symbol + reverse video */
/*
* display chars < 32 with letter/symbol
* and set reverse video (if not already enabled)
*/
snprintf (utf_char, sizeof (utf_char), "%c",
'A' + ((unsigned char)utf_char[0]) - 1);
reverse_video = 1;
reverse_video = (gui_window_current_color_attr & A_REVERSE) ?
0 : 1;
}
else
{
+1
View File
@@ -84,6 +84,7 @@ extern int gui_color_pairs_auto_reset;
extern int gui_color_pairs_auto_reset_pending;
extern time_t gui_color_pairs_auto_reset_last;
extern int gui_color_buffer_refresh_needed;
extern int gui_window_current_color_attr;
extern int gui_window_current_emphasis;
/* main functions */