patch 9.1.0073: Looping over modifier_keys_table unnecessarily

Commit: 
https://github.com/vim/vim/commit/0c989e4a3ae50085aa8c6bed5d6701760191bc1d
Author: zeertzjq <[email protected]>
Date:   Sat Feb 3 18:04:05 2024 +0100

    patch 9.1.0073: Looping over modifier_keys_table unnecessarily
    
    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 <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/src/misc2.c b/src/misc2.c
index 57ee287a4..611e021cc 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -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
diff --git a/src/version.c b/src/version.c
index 653533c3d..0dfa2d8e3 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    73,
 /**/
     72,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1rWJba-00BY08-Ps%40256bit.org.

Raspunde prin e-mail lui