1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-30 06:46:38 +02:00

script: add completion with languages and extensions, support search by language/extension in /script search

This commit is contained in:
Sébastien Helleu
2015-12-09 07:40:16 +01:00
parent 03a6209f73
commit e734914380
22 changed files with 211 additions and 15 deletions
+21 -1
View File
@@ -948,13 +948,33 @@ script_repo_match_filter (struct t_script_repo *script)
if (!has_tag)
{
match = 0;
if (script->name_with_extension
&& weechat_strcasestr (script->name_with_extension, words[i]))
&& weechat_strcasestr (script->name_with_extension,
words[i]))
{
match = 1;
}
if (!match
&& (weechat_strcasecmp (script_language[script->language],
words[i]) == 0))
{
match = 1;
}
if (!match
&& (weechat_strcasecmp (script_extension[script->language],
words[i]) == 0))
{
match = 1;
}
if (!match && script->description
&& weechat_strcasestr (script->description, words[i]))
{
match = 1;
}
if (!match)
{