summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/completion.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/common/completion.c b/src/common/completion.c
index 58818c6ed..fd9cee347 100644
--- a/src/common/completion.c
+++ b/src/common/completion.c
@@ -54,10 +54,8 @@
void
completion_init (t_completion *completion, void *server, void *channel)
{
- if (server)
- completion->server = server;
- if (channel)
- completion->channel = channel;
+ completion->server = server;
+ completion->channel = channel;
completion->context = COMPLETION_NULL;
completion->base_command = NULL;
completion->base_command_arg = 0;
@@ -964,7 +962,7 @@ completion_find_context (t_completion *completion, char *buffer, int size, int p
/* look for context */
completion_free (completion);
- completion_init (completion, NULL, NULL);
+ completion_init (completion, completion->server, completion->channel);
command = ((buffer[0] == '/') && (buffer[1] != '/')) ? 1 : 0;
command_arg = 0;
i = 0;