comparison src/terminal.c @ 18301:506bf60a30a0 v8.1.2145

patch 8.1.2145: cannot map <C-H> when modifyOtherKeys is enabled Commit: https://github.com/vim/vim/commit/459fd785e4a8d044147a3f83a5fca8748528aa84 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Oct 13 16:43:39 2019 +0200 patch 8.1.2145: cannot map <C-H> when modifyOtherKeys is enabled Problem: Cannot map <C-H> when modifyOtherKeys is enabled. Solution: Add the <C-H> mapping twice, both with modifier and as 0x08. Use only the first one when modifyOtherKeys has been detected.
author Bram Moolenaar <Bram@vim.org>
date Sun, 13 Oct 2019 16:45:04 +0200
parents e8d1f3209dcd
children 527b7084c556
comparison
equal deleted inserted replaced
18300:e502ed410b63 18301:506bf60a30a0
770 char_u *buf = NULL; 770 char_u *buf = NULL;
771 char_u *keys; 771 char_u *keys;
772 772
773 p = skiptowhite(cmd); 773 p = skiptowhite(cmd);
774 *p = NUL; 774 *p = NUL;
775 keys = replace_termcodes(ep + 1, &buf, TRUE, TRUE, TRUE); 775 keys = replace_termcodes(ep + 1, &buf,
776 REPTERM_FROM_PART | REPTERM_DO_LT | REPTERM_SPECIAL, NULL);
776 opt.jo_set2 |= JO2_EOF_CHARS; 777 opt.jo_set2 |= JO2_EOF_CHARS;
777 opt.jo_eof_chars = vim_strsave(keys); 778 opt.jo_eof_chars = vim_strsave(keys);
778 vim_free(buf); 779 vim_free(buf);
779 *p = ' '; 780 *p = ' ';
780 } 781 }
1370 other = TRUE; 1371 other = TRUE;
1371 break; 1372 break;
1372 } 1373 }
1373 1374
1374 // add modifiers for the typed key 1375 // add modifiers for the typed key
1375 mod |= mod_mask; 1376 if (mod_mask & MOD_MASK_SHIFT)
1377 mod |= VTERM_MOD_SHIFT;
1378 if (mod_mask & MOD_MASK_CTRL)
1379 mod |= VTERM_MOD_CTRL;
1380 if (mod_mask & (MOD_MASK_ALT | MOD_MASK_META))
1381 mod |= VTERM_MOD_ALT;
1376 1382
1377 /* 1383 /*
1378 * Convert special keys to vterm keys: 1384 * Convert special keys to vterm keys:
1379 * - Write keys to vterm: vterm_keyboard_key() 1385 * - Write keys to vterm: vterm_keyboard_key()
1380 * - Write output to channel. 1386 * - Write output to channel.