summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/command.c15
-rw-r--r--src/common/completion.c6
2 files changed, 19 insertions, 2 deletions
diff --git a/src/common/command.c b/src/common/command.c
index 29e600112..b87640f6f 100644
--- a/src/common/command.c
+++ b/src/common/command.c
@@ -1698,7 +1698,21 @@ weechat_cmd_set (char *arguments)
if (value)
{
value[0] = '\0';
+
+ /* remove spaces before '=' */
+ pos = value - 1;
+ while ((pos > option) && (pos[0] == ' '))
+ {
+ pos[0] = '\0';
+ pos--;
+ }
+
+ /* skip spaces after '=' */
value++;
+ while (value[0] && (value[0] == ' '))
+ {
+ value++;
+ }
}
}
@@ -1775,6 +1789,7 @@ weechat_cmd_set (char *arguments)
if (config_option_set_value (ptr_option, value) == 0)
{
(void) (ptr_option->handler_change());
+ irc_display_prefix (NULL, PREFIX_INFO);
gui_printf_color (NULL, COLOR_WIN_CHAT_DARK, "[");
gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL,
"%s", config_get_section (ptr_option));
diff --git a/src/common/completion.c b/src/common/completion.c
index e28c4286f..1ca4ad225 100644
--- a/src/common/completion.c
+++ b/src/common/completion.c
@@ -199,9 +199,11 @@ completion_build_list (t_completion *completion, void *channel)
{
for (j = 0; weechat_options[i][j].option_name; j++)
{
+ snprintf (option_name, sizeof (option_name), "%s =",
+ weechat_options[i][j].option_name);
weelist_add (&completion->completion_list,
&completion->last_completion,
- weechat_options[i][j].option_name);
+ option_name);
}
}
}
@@ -210,7 +212,7 @@ completion_build_list (t_completion *completion, void *channel)
{
for (i = 0; weechat_options[CONFIG_SECTION_SERVER][i].option_name; i++)
{
- snprintf (option_name, sizeof (option_name), "%s.%s",
+ snprintf (option_name, sizeof (option_name), "%s.%s =",
ptr_server->name,
weechat_options[CONFIG_SECTION_SERVER][i].option_name);
weelist_add (&completion->completion_list,