1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

Merge pull request #1155 from vague666/bind_shenanigans

rewrite how /bind searches for bindings when listing them
This commit is contained in:
ailin-nemui 2020-07-04 20:37:36 +02:00 committed by GitHub
commit 6684e5cc41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -770,9 +770,8 @@ static void cmd_show_keys(const char *searchkey, int full)
for (key = rec->keys; key != NULL; key = key->next) {
KEY_REC *rec = key->data;
if ((len == 0 ||
(full ? strncmp(rec->key, searchkey, len) == 0 :
g_ascii_strncasecmp(rec->key, searchkey, len) == 0)) &&
if ((len == 0 || (full ? strncmp(rec->key, searchkey, len) == 0 :
strstr(rec->key, searchkey) != NULL)) &&
(!full || rec->key[len] == '\0')) {
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_BIND_LIST,
rec->key, rec->info->id, rec->data == NULL ? "" : rec->data);