diff src/misc2.c @ 20927:9328feafbbf5 v8.2.1015

patch 8.2.1015: popup filter gets key with modifier prepended Commit: https://github.com/vim/vim/commit/20298ce679dbf21c07c8fe2161724a12424f1e69 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jun 19 21:46:52 2020 +0200 patch 8.2.1015: popup filter gets key with modifier prepended Problem: Popup filter gets key with modifier prepended when using modifyOtherKeys. Solution: Remove the shift modifier when it is included in the key, also when the Alt or Meta modifier is used.
author Bram Moolenaar <Bram@vim.org>
date Fri, 19 Jun 2020 22:00:04 +0200
parents d9a2e5dcfd9f
children d64520bfafa0
line wrap: on
line diff
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -2929,9 +2929,11 @@ extract_modifiers(int key, int *modp, in
     if ((modifiers & MOD_MASK_SHIFT) && ASCII_ISALPHA(key))
     {
 	key = TOUPPER_ASC(key);
-	// With <C-S-a> and <A-S-a> we keep the shift modifier.
-	// With <S-a> and <S-A> we don't keep the shift modifier.
-	if (simplify || modifiers == MOD_MASK_SHIFT)
+	// With <C-S-a> we keep the shift modifier.
+	// With <S-a>, <A-S-a> and <S-A> we don't keep the shift modifier.
+	if (simplify || modifiers == MOD_MASK_SHIFT
+		|| modifiers == (MOD_MASK_SHIFT | MOD_MASK_ALT)
+		|| modifiers == (MOD_MASK_SHIFT | MOD_MASK_META))
 	    modifiers &= ~MOD_MASK_SHIFT;
     }