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

patch 8.2.0867: using \{xxx} for encoding a modifier is not nice

Problem:    Using \{xxx} for encoding a modifier is not nice.
Solution:   Use \<*xxx> instead, since it's the same as \<xxx> but producing a
            different code.
This commit is contained in:
Bram Moolenaar
2020-05-31 22:06:51 +02:00
parent 494e9069cb
commit fccd93f091
8 changed files with 20 additions and 21 deletions

View File

@@ -1285,16 +1285,13 @@ get_string_tv(char_u **arg, typval_T *rettv, int evaluate)
++name;
break;
// Special key, e.g.: "\<C-W>" or "\{C-W}"
// Special key, e.g.: "\<C-W>"
case '<':
case '{':
{
int flags = FSK_KEYCODE | FSK_IN_STRING;
if (*p == '<')
if (p[1] != '*')
flags |= FSK_SIMPLIFY;
else
flags |= FSK_CURLY;
extra = trans_special(&p, name, flags, NULL);
if (extra != 0)
{