]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0073: Looping over modifier_keys_table unnecessarily v9.1.0073
authorzeertzjq <zeertzjq@outlook.com>
Sat, 3 Feb 2024 17:04:05 +0000 (18:04 +0100)
committerChristian Brabandt <cb@256bit.org>
Sat, 3 Feb 2024 17:05:38 +0000 (18:05 +0100)
Problem:  Looping over modifier_keys_table[] unnecessarily with only
          MOD_MASK_ALT or MOD_MASK_CMD, as modifier_keys_table[] only
          contains MOD_MASK_SHIFT and MOD_MASK_CTRL, and the loop won't
          do anything.
Solution: Remove MOD_MASK_ALT and MOD_MASK_CMD from the condition.
          (zeertzjq)

closes: #13963

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/misc2.c
src/version.c

index 57ee287a4bf2fb93c64045f1e09f339bc85c3b64..611e021ccb3f66f3248a5d81de765034f65230eb 100644 (file)
@@ -1130,11 +1130,7 @@ simplify_key(int key, int *modifiers)
     int            key0;
     int            key1;
 
-    if (!(*modifiers & (MOD_MASK_SHIFT | MOD_MASK_CTRL | MOD_MASK_ALT
-#ifdef FEAT_GUI_GTK
-           | MOD_MASK_CMD
-#endif
-    )))
+    if (!(*modifiers & (MOD_MASK_SHIFT | MOD_MASK_CTRL)))
        return key;
 
     // TAB is a special case
index 653533c3dcd36dc4de8115198c0b8b1878971113..0dfa2d8e327accf282fb5b8bf8103fcc636e613f 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    73,
 /**/
     72,
 /**/