0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.0855: GUI tests fail because the test doesn't use a modifier

Problem:    GUI tests fail because the test doesn't use a modifier.
Solution:   Add "\{xxx}" to be able to encode a modifier.
This commit is contained in:
Bram Moolenaar
2020-05-30 21:52:54 +02:00
parent 363d6148df
commit ebe9d34aa0
13 changed files with 60 additions and 43 deletions

View File

@@ -1285,15 +1285,24 @@ get_string_tv(char_u **arg, typval_T *rettv, int evaluate)
++name;
break;
// Special key, e.g.: "\<C-W>"
case '<': extra = trans_special(&p, name, TRUE, TRUE,
TRUE, NULL);
if (extra != 0)
// Special key, e.g.: "\<C-W>" or "\{C-W}"
case '<':
case '{':
{
name += extra;
if (name >= rettv->vval.v_string + len)
iemsg("get_string_tv() used more space than allocated");
break;
int flags = FSK_KEYCODE | FSK_IN_STRING;
if (*p == '<')
flags |= FSK_SIMPLIFY;
else
flags |= FSK_CURLY;
extra = trans_special(&p, name, flags, NULL);
if (extra != 0)
{
name += extra;
if (name >= rettv->vval.v_string + len)
iemsg("get_string_tv() used more space than allocated");
break;
}
}
// FALLTHROUGH