summaryrefslogtreecommitdiff
path: root/src/gui_x11.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-05-26 22:14:27 +0200
committerBram Moolenaar <Bram@vim.org>2020-05-26 22:14:27 +0200
commit80a20df86a1ceefa3506cc578ba0ba35da979e38 (patch)
treeed153f7b2bc1e83a7aec501869dc0791f686321a /src/gui_x11.c
parent388a5d4f20b4b64341d1604aa238cab85827b892 (diff)
downloadvim-git-80a20df86a1ceefa3506cc578ba0ba35da979e38.tar.gz
patch 8.2.0830: Motif: can't map "!"v8.2.0830
Problem: Motif: can't map "!". (Ben Jackson) Solution: Remove the shift modifier if it's already included in the key. (closes #6147)
Diffstat (limited to 'src/gui_x11.c')
-rw-r--r--src/gui_x11.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui_x11.c b/src/gui_x11.c
index c03b21044..1eec793e5 100644
--- 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)