summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2005-03-05 19:19:37 +0000
committerSebastien Helleu <flashcode@flashtux.org>2005-03-05 19:19:37 +0000
commitac446e9c1f9c182ceaea0ad1f5a68b879e37cfa2 (patch)
tree850fd9a0cebe7c82c1441111c413d16bdb604013
parent951ec2e7befae3f6f163e39d51c3c297a2816f94 (diff)
downloadweechat-ac446e9c1f9c182ceaea0ad1f5a68b879e37cfa2.zip
Nick completion with nothing as base word is disabled
-rw-r--r--src/common/completion.c9
-rw-r--r--weechat/src/common/completion.c9
2 files changed, 18 insertions, 0 deletions
diff --git a/src/common/completion.c b/src/common/completion.c
index 75be644a6..03546ae45 100644
--- a/src/common/completion.c
+++ b/src/common/completion.c
@@ -558,6 +558,15 @@ completion_find_context (t_completion *completion, void *channel, char *buffer,
}
}
+ /* nick completion with nothing as base word is disabled,
+ in order to prevent completion when pasting messages with [tab] inside */
+ if ((completion->context == COMPLETION_NICK)
+ && ((!completion->base_word) || (!completion->base_word[0])))
+ {
+ completion->context = COMPLETION_NULL;
+ return;
+ }
+
if (!completion->completion_list && channel &&
(((t_irc_channel *)channel)->type == CHAT_PRIVATE)
&& (completion->context == COMPLETION_NICK))
diff --git a/weechat/src/common/completion.c b/weechat/src/common/completion.c
index 75be644a6..03546ae45 100644
--- a/weechat/src/common/completion.c
+++ b/weechat/src/common/completion.c
@@ -558,6 +558,15 @@ completion_find_context (t_completion *completion, void *channel, char *buffer,
}
}
+ /* nick completion with nothing as base word is disabled,
+ in order to prevent completion when pasting messages with [tab] inside */
+ if ((completion->context == COMPLETION_NICK)
+ && ((!completion->base_word) || (!completion->base_word[0])))
+ {
+ completion->context = COMPLETION_NULL;
+ return;
+ }
+
if (!completion->completion_list && channel &&
(((t_irc_channel *)channel)->type == CHAT_PRIVATE)
&& (completion->context == COMPLETION_NICK))