From f7ab129e5352f641dd6a0868468c9b8465bf972f Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 12 Dec 2018 19:10:28 +1100 Subject: [PATCH] Remove support for 8-bit CSI as it breaks utf8 input Fixes #2630 --- src/ncurses_ui.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ncurses_ui.cc b/src/ncurses_ui.cc index 2e5ba92e..653f5c95 100644 --- a/src/ncurses_ui.cc +++ b/src/ncurses_ui.cc @@ -702,11 +702,11 @@ Optional NCursesUI::get_next_key() return {}; }; - if (c < 256 and (c == 27 or (c & 0x80))) + if (c == 27) { wtimeout(m_window, 0); - const int new_c = (c & 0x80) ? (c & ~0x80) : wgetch(m_window); - if (new_c == '[' or c == 0x9b) // potential CSI + const int new_c = wgetch(m_window); + if (new_c == '[') // potential CSI { if (auto key = parse_csi()) return key;