1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-28 13:56:37 +02:00

fset: add empty string instead of "null" when editing an option with NULL value

This commit is contained in:
Sébastien Helleu
2017-06-02 21:05:56 +02:00
parent e2a68f9b4c
commit 826cd0bd7c
+2 -3
View File
@@ -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 " */