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:
25
src/typval.c
25
src/typval.c
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user