summaryrefslogtreecommitdiff
path: root/src/input_handler.cc
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2017-08-16 00:40:45 +0700
committerMaxime Coste <mawww@kakoune.org>2017-08-16 00:40:45 +0700
commit8a2b8a94980441ee5a6271ac50d15e4081562b0b (patch)
treedf3693347a7c23a2f00de75001b0cf1b83c0dbdd /src/input_handler.cc
parentb58f72315cbf7ee8921659dd129fd2f6a221bcfc (diff)
Do not consider the 8th bit to mean Alt on keys that are mouse events
Fix handling of mouse events for columns 128 to 223, we are still limited by ncurses for columns > 223. Fixes #1532
Diffstat (limited to 'src/input_handler.cc')
-rw-r--r--src/input_handler.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/input_handler.cc b/src/input_handler.cc
index 74102279..797719f9 100644
--- a/src/input_handler.cc
+++ b/src/input_handler.cc
@@ -209,7 +209,8 @@ public:
// Hack to parse keys sent by terminals using the 8th bit to mark the
// meta key. In normal mode, give priority to a potential alt-key than
// the accentuated character.
- if (key.key >= 127 and key.key < 256)
+ if (not (key.modifiers & Key::Modifiers::MouseEvent) and
+ key.key >= 127 and key.key < 256)
{
key.modifiers |= Key::Modifiers::Alt;
key.key &= 0x7f;