changeset 20553:2c808d01a9fd v8.2.0830

patch 8.2.0830: Motif: can't map "!" Commit: https://github.com/vim/vim/commit/80a20df86a1ceefa3506cc578ba0ba35da979e38 Author: Bram Moolenaar <Bram@vim.org> Date: Tue May 26 22:14:27 2020 +0200 patch 8.2.0830: Motif: can't map "!" Problem: Motif: can't map "!". (Ben Jackson) Solution: Remove the shift modifier if it's already included in the key. (closes #6147)
author Bram Moolenaar <Bram@vim.org>
date Tue, 26 May 2020 22:15:03 +0200
parents 74e3316c1d5a
children 296fd130e061
files src/gui_x11.c src/version.c
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/gui_x11.c
+++ b/src/gui_x11.c
@@ -948,6 +948,11 @@ gui_x11_key_hit_cb(
     {
 	string[0] = key;
 	len = 1;
+
+	// Remove the SHIFT modifier for keys where it's already included,
+	// e.g., '(', '!' and '*'.
+	if (!ASCII_ISALPHA(key) && key > 0x20 && key < 0x7f)
+	    modifiers &= ~MOD_MASK_SHIFT;
     }
 
     if (modifiers != 0)
--- a/src/version.c
+++ b/src/version.c
@@ -747,6 +747,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    830,
+/**/
     829,
 /**/
     828,