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
This commit is contained in:
Maxime Coste 2017-08-16 00:40:45 +07:00
parent b58f72315c
commit 8a2b8a9498

View File

@ -209,7 +209,8 @@ public:
// Hack to parse keys sent by terminals using the 8th bit to mark the // 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 // meta key. In normal mode, give priority to a potential alt-key than
// the accentuated character. // 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.modifiers |= Key::Modifiers::Alt;
key.key &= 0x7f; key.key &= 0x7f;