1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

fset: allow long type name in type filter

This commit is contained in:
Sébastien Helleu
2023-07-08 09:51:29 +02:00
parent 481e8f197d
commit 5b2cf75f6e
3 changed files with 11 additions and 4 deletions
+1
View File
@@ -19,6 +19,7 @@ New features::
* core: add variables "_chat_focused_line_bol" and "_chat_focused_line_eol" in focus data (issue #1955)
* api: add info "buffer" (issue #1962)
* buflist: increase max number of buflist items from 3 to 5 (issue #1703)
* fset: allow long type name in type filter
* irc: display commands 716/717 in private buffer (if present) (issue #146)
* trigger: add options `-o`, `-ol`, `-i` and `-il` in command `/trigger list` (issue #1953)
+2 -1
View File
@@ -676,7 +676,8 @@ fset_command_init ()
" * show all options (no filter)\n"
" xxx show only options with \"xxx\" in name\n"
" f:xxx show only configuration file \"xxx\"\n"
" t:xxx show only type \"xxx\" (bool/int/str/col/enum)\n"
" t:xxx show only type \"xxx\" (bool/int/str/col/enum "
"or boolean/integer/string/color/enum)\n"
" d show only changed options\n"
" d:xxx show only changed options with \"xxx\" in "
"name\n"
+8 -3
View File
@@ -344,9 +344,14 @@ fset_option_match_filter (struct t_fset_option *fset_option, const char *filter)
else if (strncmp (filter, "t:", 2) == 0)
{
/* filter by type */
return (weechat_strcasecmp (
fset_option_type_string_short[fset_option->type],
filter + 2) == 0) ? 1 : 0;
return (
(weechat_strcasecmp (
fset_option_type_string_short[fset_option->type],
filter + 2) == 0)
|| (weechat_strcasecmp (
fset_option_type_string[fset_option->type],
filter + 2) == 0)) ?
1 : 0;
}
else if (strncmp (filter, "d==", 3) == 0)
{