comparison src/term.c @ 18295:43e9523f6d84 v8.1.2142

patch 8.1.2142: some key mappings do not work with modifyOtherKeys Commit: https://github.com/vim/vim/commit/d1e2f3984ae0b4e22ba6977eedcf05285819eea9 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Oct 12 18:22:50 2019 +0200 patch 8.1.2142: some key mappings do not work with modifyOtherKeys Problem: Some key mappings do not work with modifyOtherKeys. Solution: Remove the Shift modifier if it is already included in the key.
author Bram Moolenaar <Bram@vim.org>
date Sat, 12 Oct 2019 18:30:04 +0200
parents e8d1f3209dcd
children a9cf41bcb5d6
comparison
equal deleted inserted replaced
18294:98c9b8a53e77 18295:43e9523f6d84
4845 if (trail == 'u') 4845 if (trail == 'u')
4846 key = arg[0]; 4846 key = arg[0];
4847 else 4847 else
4848 key = arg[2]; 4848 key = arg[2];
4849 4849
4850 modifiers = decode_modifiers(arg[1]);
4851
4852 // Some keys already have Shift included, pass them as
4853 // normal keys.
4854 if (modifiers == MOD_MASK_SHIFT
4855 && ((key >= '@' && key <= 'Z')
4856 || key == '^' || key == '_'
4857 || (key >= '{' && key <= '~')))
4858 modifiers = 0;
4859
4850 // insert modifiers with KS_MODIFIER 4860 // insert modifiers with KS_MODIFIER
4851 modifiers = decode_modifiers(arg[1]);
4852 new_slen = modifiers2keycode(modifiers, &key, string); 4861 new_slen = modifiers2keycode(modifiers, &key, string);
4853 slen = csi_len; 4862 slen = csi_len;
4854 4863
4855 if (has_mbyte) 4864 if (has_mbyte)
4856 new_slen += (*mb_char2bytes)(key, string + new_slen); 4865 new_slen += (*mb_char2bytes)(key, string + new_slen);