From 826cd0bd7cf3c8f06b582b5d67b51af7ea65808c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Fri, 2 Jun 2017 21:05:56 +0200 Subject: fset: add empty string instead of "null" when editing an option with NULL value --- src/plugins/fset/fset-option.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/plugins') 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 " */ -- cgit v1.2.3