diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2017-06-02 21:05:56 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2017-06-25 16:35:27 +0200 |
commit | 826cd0bd7cf3c8f06b582b5d67b51af7ea65808c (patch) | |
tree | a94a0856437d179b3d9ea9f2c5abb9bf9b489509 /src/plugins | |
parent | e2a68f9b4c4894b33990a17e18e7f1588253bbf5 (diff) | |
download | weechat-826cd0bd7cf3c8f06b582b5d67b51af7ea65808c.zip |
fset: add empty string instead of "null" when editing an option with NULL value
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/fset/fset-option.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/plugins/fset/fset-option.c b/src/plugins/fset/fset-option.c index 51a64f2fc..b1978af9b 100644 --- a/src/plugins/fset/fset-option.c +++ b/src/plugins/fset/fset-option.c @@ -984,14 +984,13 @@ fset_option_set (struct t_fset_option *fset_option, return; use_mute = weechat_config_boolean (fset_config_look_use_mute); - add_quotes = (fset_option->value - && (fset_option->type == FSET_OPTION_TYPE_STRING)) ? 1 : 0; + add_quotes = (fset_option->type == FSET_OPTION_TYPE_STRING) ? 1 : 0; snprintf (str_input, sizeof (str_input), "%s/set %s %s%s%s", (use_mute) ? "/mute " : "", fset_option->name, (add_quotes) ? "\"" : "", - (fset_option->value) ? fset_option->value : FSET_OPTION_VALUE_NULL, + (fset_option->value) ? fset_option->value : "", (add_quotes) ? "\"" : ""); weechat_buffer_set (buffer, "input", str_input); input_pos = ((use_mute) ? 6 : 0) + /* "/mute " */ |