]> granicus.if.org Git - vim/commitdiff
patch 9.0.0453: on an AZERTY keyboard digit keys get the shift modifier v9.0.0453
authorBram Moolenaar <Bram@vim.org>
Mon, 12 Sep 2022 19:35:28 +0000 (20:35 +0100)
committerBram Moolenaar <Bram@vim.org>
Mon, 12 Sep 2022 19:35:28 +0000 (20:35 +0100)
Problem:    On an AZERTY keyboard digit keys get the shift modifier.
Solution:   Remove the shift modifier from digit keys. (closes #11109)

src/misc2.c
src/version.c

index 165a08080c075531a24d0fc218baabfb351e3780..841940225da39876865636c39367a2a65da2f412 100644 (file)
@@ -1540,7 +1540,8 @@ may_adjust_key_for_ctrl(int modifiers, int key)
  * When Ctrl is also used <C-H> and <C-S-H> are different, but <C-S-{> should
  * be <C-{>.  Same for <C-S-}> and <C-S-|>.
  * Also for <A-S-a> and <M-S-a>.
- * This includes all printable ASCII characters except numbers and a-z.
+ * This includes all printable ASCII characters except a-z.
+ * Digits are included because with AZERTY the Shift key is used to get them.
  */
     int
 may_remove_shift_modifier(int modifiers, int key)
@@ -1550,6 +1551,7 @@ may_remove_shift_modifier(int modifiers, int key)
                || modifiers == (MOD_MASK_SHIFT | MOD_MASK_META))
            && ((key >= '!' && key <= '/')
                || (key >= ':' && key <= 'Z')
+               || vim_isdigit(key)
                || (key >= '[' && key <= '`')
                || (key >= '{' && key <= '~')))
        return modifiers & ~MOD_MASK_SHIFT;
index 26b8bf3a43745b85423d956159d0e3e083cef542..9701d6d8201203f8550784b661876c3861040c3b 100644 (file)
@@ -703,6 +703,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    453,
 /**/
     452,
 /**/