diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2017-05-30 21:10:20 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2017-06-25 16:35:27 +0200 |
commit | 3515134b190220eb5c3dc693cc6e94e46037d341 (patch) | |
tree | f935d66e6b2ae21285359450c55fb55fa4b09841 /src/plugins/fset/fset-buffer.c | |
parent | ef19c4ed90e69bb70fe1db4e7267c7999d629198 (diff) | |
download | weechat-3515134b190220eb5c3dc693cc6e94e46037d341.zip |
fset: add ${description}, add options fset.color.description and fset.color.description_selected
Diffstat (limited to 'src/plugins/fset/fset-buffer.c')
-rw-r--r-- | src/plugins/fset/fset-buffer.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/plugins/fset/fset-buffer.c b/src/plugins/fset/fset-buffer.c index 12d930a55..3f708eb90 100644 --- a/src/plugins/fset/fset-buffer.c +++ b/src/plugins/fset/fset-buffer.c @@ -278,6 +278,22 @@ fset_buffer_display_line (int y, struct t_fset_option *fset_option) weechat_hashtable_set (fset_buffer_hashtable_extra_vars, "max", str_field); + /* description */ + ptr_field = weechat_hdata_string (fset_hdata_fset_option, + fset_option, "description"); + snprintf (str_field, sizeof (str_field), "%s", ptr_field); + weechat_hashtable_set (fset_buffer_hashtable_extra_vars, + "__description", str_field); + snprintf (str_field, sizeof (str_field), + "%s%s", + weechat_color (weechat_config_string (fset_config_color_description[selected_line])), + ptr_field); + weechat_hashtable_set (fset_buffer_hashtable_extra_vars, + "_description", str_field); + fset_buffer_fills_field (str_field, sizeof (str_field), "description", 64); + weechat_hashtable_set (fset_buffer_hashtable_extra_vars, + "description", str_field); + /* set other variables depending on the value */ weechat_hashtable_set (fset_buffer_hashtable_extra_vars, "value_undef", |