changeset 30235:2403a1b53826 v9.0.0453

patch 9.0.0453: on an AZERTY keyboard digit keys get the shift modifier Commit: https://github.com/vim/vim/commit/83a19c5fda0556330860899bfb484addf9178cd0 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Sep 12 20:35:28 2022 +0100 patch 9.0.0453: on an AZERTY keyboard digit keys get the shift modifier Problem: On an AZERTY keyboard digit keys get the shift modifier. Solution: Remove the shift modifier from digit keys. (closes https://github.com/vim/vim/issues/11109)
author Bram Moolenaar <Bram@vim.org>
date Mon, 12 Sep 2022 21:45:03 +0200
parents d990abafc973
children 43ac83cc45ab
files src/misc2.c src/version.c
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -1540,7 +1540,8 @@ may_adjust_key_for_ctrl(int modifiers, i
  * 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,
 		|| modifiers == (MOD_MASK_SHIFT | MOD_MASK_META))
 	    && ((key >= '!' && key <= '/')
 		|| (key >= ':' && key <= 'Z')
+		|| vim_isdigit(key)
 		|| (key >= '[' && key <= '`')
 		|| (key >= '{' && key <= '~')))
 	return modifiers & ~MOD_MASK_SHIFT;
--- 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 */
 /**/
+    453,
+/**/
     452,
 /**/
     451,