From 0f688656a487fdb2e7d0772de82dd6941418bf67 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 2 Nov 2021 19:43:16 +1100 Subject: [PATCH] Fix DECRPM parsing for 2026 As discovered in #4320 the previous code was buggy and would enable synchronized output on any response. --- src/terminal_ui.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/terminal_ui.cc b/src/terminal_ui.cc index faceb16e..71c35ef7 100644 --- a/src/terminal_ui.cc +++ b/src/terminal_ui.cc @@ -811,7 +811,7 @@ Optional TerminalUI::get_next_key() if (private_mode == '?' and next_char() == 'y') // DECRPM { if (params[0] == 2026) - m_synchronized.supported = (params[0] != 0); + m_synchronized.supported = (params[1] == 1 or params[1] == 2); return {Key::Invalid}; } switch (params[0])