diff --git a/src/plugins/trigger/trigger-buffer.c b/src/plugins/trigger/trigger-buffer.c index 355ffc1cb..0e5256d49 100644 --- a/src/plugins/trigger/trigger-buffer.c +++ b/src/plugins/trigger/trigger-buffer.c @@ -54,7 +54,8 @@ trigger_buffer_hashtable_map_cb (void *data, if (strcmp (value_type, "string") == 0) { - value_no_color = weechat_string_remove_color ((const char *)value, NULL); + value_no_color = (weechat_config_boolean (trigger_config_look_monitor_strip_colors)) ? + weechat_string_remove_color ((const char *)value, NULL) : NULL; weechat_printf_tags (trigger_buffer, "no_trigger", "\t %s: \"%s\"", (char *)key, diff --git a/src/plugins/trigger/trigger-config.c b/src/plugins/trigger/trigger-config.c index f0e7977fa..5be4cc96a 100644 --- a/src/plugins/trigger/trigger-config.c +++ b/src/plugins/trigger/trigger-config.c @@ -33,7 +33,7 @@ struct t_config_section *trigger_config_section_trigger = NULL; /* trigger config, look section */ -struct t_config_option *trigger_config_look_test; +struct t_config_option *trigger_config_look_monitor_strip_colors; /* trigger config, color section */ @@ -545,11 +545,11 @@ trigger_config_init () return 0; } - trigger_config_look_test = weechat_config_new_option ( + trigger_config_look_monitor_strip_colors = weechat_config_new_option ( trigger_config_file, ptr_section, - "test", "boolean", - "", - NULL, 0, 0, "on", NULL, 0, NULL, NULL, + "monitor_strip_colors", "boolean", + N_("strip colors in hashtable values displayed on monitor buffer"), + NULL, 0, 0, "off", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL); /* color */ diff --git a/src/plugins/trigger/trigger-config.h b/src/plugins/trigger/trigger-config.h index 34550f82e..6a940bd5f 100644 --- a/src/plugins/trigger/trigger-config.h +++ b/src/plugins/trigger/trigger-config.h @@ -26,6 +26,8 @@ extern struct t_config_file *trigger_config_file; extern struct t_config_section *trigger_config_section_trigger; +extern struct t_config_option *trigger_config_look_monitor_strip_colors; + extern struct t_config_option *trigger_config_color_flag_command; extern struct t_config_option *trigger_config_color_flag_conditions; extern struct t_config_option *trigger_config_color_flag_regex;