vim-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.
ebe9d34aa0

Change macros to enums to use them in unit tests.
This commit is contained in:
zeertzjq
2022-04-26 15:05:56 +08:00
parent 6832b626ea
commit abe91e1efe
12 changed files with 83 additions and 56 deletions

View File

@@ -4963,9 +4963,17 @@ static int get_string_tv(char_u **arg, typval_T *rettv, int evaluate)
++name;
break;
// Special key, e.g.: "\<C-W>"
// Special key, e.g.: "\<C-W>" or "\{C-W}"
case '<':
extra = trans_special((const char_u **)&p, STRLEN(p), name, true, true, true, NULL);
case '{': {
int flags = FSK_KEYCODE | FSK_IN_STRING;
if (*p == '<') {
flags |= FSK_SIMPLIFY;
} else {
flags |= FSK_CURLY;
}
extra = trans_special((const char_u **)&p, STRLEN(p), name, flags, NULL);
if (extra != 0) {
name += extra;
if (name >= rettv->vval.v_string + len) {
@@ -4973,6 +4981,7 @@ static int get_string_tv(char_u **arg, typval_T *rettv, int evaluate)
}
break;
}
}
FALLTHROUGH;
default: