]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.0830: Motif: can't map "!" v8.2.0830
authorBram Moolenaar <Bram@vim.org>
Tue, 26 May 2020 20:14:27 +0000 (22:14 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 26 May 2020 20:14:27 +0000 (22:14 +0200)
Problem:    Motif: can't map "!". (Ben Jackson)
Solution:   Remove the shift modifier if it's already included in the key.
            (closes #6147)

src/gui_x11.c
src/version.c

index c03b2104439fe17adf7d2261b1bbb89d9425fce2..1eec793e5a8e207ca00f983e4b5fef3e4448afc9 100644 (file)
@@ -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)
index f91ff1a99d74c8474e78c55b8a0eae7d44fd361e..f088e61227c50e85c11f4b9b4351aab0dfd5d66e 100644 (file)
@@ -746,6 +746,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    830,
 /**/
     829,
 /**/