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

@ -1215,8 +1215,8 @@ highlight_set_cterm_color(
target.key = 0;
target.value = (char *)arg;
target.length = 0; // not used, see cmp_keyvalue_value_i()
entry = (keyvalue_T *)bsearch(&target, &color_name_tab, ARRAY_LENGTH(color_name_tab), sizeof(color_name_tab[0]), cmp_keyvalue_value_i);
target.length = 0; // not used, see cmp_keyvalue_value_ni()
entry = (keyvalue_T *)bsearch(&target, &color_name_tab, ARRAY_LENGTH(color_name_tab), sizeof(color_name_tab[0]), cmp_keyvalue_value_ni);
if (entry == NULL)
{
semsg(_(e_color_name_or_number_not_recognized_str), key_start);
@ -2542,8 +2542,8 @@ gui_get_color_cmn(char_u *name)
target.key = 0;
target.value = (char *)name;
target.length = 0; // not used, see cmp_keyvalue_value_i()
entry = (keyvalue_T *)bsearch(&target, &rgb_tab, ARRAY_LENGTH(rgb_tab), sizeof(rgb_tab[0]), cmp_keyvalue_value_i);
target.length = 0; // not used, see cmp_keyvalue_value_ni()
entry = (keyvalue_T *)bsearch(&target, &rgb_tab, ARRAY_LENGTH(rgb_tab), sizeof(rgb_tab[0]), cmp_keyvalue_value_ni);
if (entry != NULL)
return gui_adjust_rgb((guicolor_T)entry->key);