1
0
forked from aniani/vim

patch 9.1.0709: GUIEnter event not found in Turkish locale

Problem:   GUIEnter not found in Turkish locale
           (James McCoy, after v9.1.0256, the issue was there before,
            but v9.1.0256 made it more apparent)
Solution:  explicitly compare autocommand events by ASCII value and
           ignoring locale, because according to the documentation,
           events are case insensitive (:h autocommand-events)

fixes: #15574
closes: #15603

Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Christian Brabandt
2024-09-02 09:59:18 +02:00
parent bd69b39514
commit 84e3175c4e
7 changed files with 55 additions and 17 deletions

View File

@@ -3090,17 +3090,7 @@ cmp_keyvalue_value_n(const void *a, const void *b)
return STRNCMP(kv1->value, kv2->value, MAX(kv1->length, kv2->length));
}
// compare two keyvalue_T structs by case insensitive value
int
cmp_keyvalue_value_i(const void *a, const void *b)
{
keyvalue_T *kv1 = (keyvalue_T *)a;
keyvalue_T *kv2 = (keyvalue_T *)b;
return STRICMP(kv1->value, kv2->value);
}
// compare two keyvalue_T structs by case insensitive value
// compare two keyvalue_T structs by case insensitive ASCII value
// with length
int
cmp_keyvalue_value_ni(const void *a, const void *b)
@@ -3108,6 +3098,6 @@ cmp_keyvalue_value_ni(const void *a, const void *b)
keyvalue_T *kv1 = (keyvalue_T *)a;
keyvalue_T *kv2 = (keyvalue_T *)b;
return STRNICMP(kv1->value, kv2->value, MAX(kv1->length, kv2->length));
return vim_strnicmp_asc(kv1->value, kv2->value, MAX(kv1->length, kv2->length));
}