Fix modifiers support with mouse events

This commit is contained in:
Maxime Coste 2019-09-07 22:33:06 +10:00
parent 04b5d44b3c
commit a440869573
2 changed files with 3 additions and 3 deletions

View File

@ -92,7 +92,8 @@ struct MouseHandler
Buffer& buffer = context.buffer(); Buffer& buffer = context.buffer();
BufferCoord cursor; BufferCoord cursor;
auto& selections = context.selections(); auto& selections = context.selections();
switch (key.modifiers) constexpr auto modifiers = Key::Modifiers::Control | Key::Modifiers::Alt | Key::Modifiers::Shift;
switch ((key.modifiers & ~modifiers).value)
{ {
case Key::Modifiers::MousePressRight: case Key::Modifiers::MousePressRight:
m_dragging = false; m_dragging = false;

View File

@ -1318,7 +1318,6 @@ void NCursesUI::enable_mouse(bool enabled)
fputs("\033[?1002l", stdout); fputs("\033[?1002l", stdout);
fputs("\033[?1000l", stdout); fputs("\033[?1000l", stdout);
fputs("\033[?1004l", stdout); fputs("\033[?1004l", stdout);
if (m_builtin_key_parser)
fputs("\033[?1006l", stdout); fputs("\033[?1006l", stdout);
} }
fflush(stdout); fflush(stdout);