comparison src/typval.c @ 20603:c2570baa2e4c v8.2.0855

patch 8.2.0855: GUI tests fail because the test doesn't use a modifier Commit: https://github.com/vim/vim/commit/ebe9d34aa07037cff2188a8dd424ee1f59cbb0bf Author: Bram Moolenaar <Bram@vim.org> Date: Sat May 30 21:52:54 2020 +0200 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.
author Bram Moolenaar <Bram@vim.org>
date Sat, 30 May 2020 22:00:04 +0200
parents f502455965c0
children 8bce783af0cb
comparison
equal deleted inserted replaced
20602:67dccb63d65c 20603:c2570baa2e4c
1283 *name = (*name << 3) + *p++ - '0'; 1283 *name = (*name << 3) + *p++ - '0';
1284 } 1284 }
1285 ++name; 1285 ++name;
1286 break; 1286 break;
1287 1287
1288 // Special key, e.g.: "\<C-W>" 1288 // Special key, e.g.: "\<C-W>" or "\{C-W}"
1289 case '<': extra = trans_special(&p, name, TRUE, TRUE, 1289 case '<':
1290 TRUE, NULL); 1290 case '{':
1291 if (extra != 0)
1292 { 1291 {
1293 name += extra; 1292 int flags = FSK_KEYCODE | FSK_IN_STRING;
1294 if (name >= rettv->vval.v_string + len) 1293
1295 iemsg("get_string_tv() used more space than allocated"); 1294 if (*p == '<')
1296 break; 1295 flags |= FSK_SIMPLIFY;
1296 else
1297 flags |= FSK_CURLY;
1298 extra = trans_special(&p, name, flags, NULL);
1299 if (extra != 0)
1300 {
1301 name += extra;
1302 if (name >= rettv->vval.v_string + len)
1303 iemsg("get_string_tv() used more space than allocated");
1304 break;
1305 }
1297 } 1306 }
1298 // FALLTHROUGH 1307 // FALLTHROUGH
1299 1308
1300 default: MB_COPY_CHAR(p, name); 1309 default: MB_COPY_CHAR(p, name);
1301 break; 1310 break;