From f0be4e39ece40d760cb5953dff458336d2f02399 Mon Sep 17 00:00:00 2001 From: Alex Alabuzhev Date: Tue, 4 Feb 2025 20:20:30 +0000 Subject: [PATCH] Remove the workaround for WT-17833 The bug existed only in Preview and only from 1.22.2362.0 (2024/08/27) till 1.22.2702.0 (2024/09/28), so it should be safe to do so --- far/changelog | 6 ++++++ far/console.cpp | 30 ------------------------------ far/vbuild.m4 | 2 +- 3 files changed, 7 insertions(+), 31 deletions(-) diff --git a/far/changelog b/far/changelog index 844c999b26..17b3754f80 100644 --- a/far/changelog +++ b/far/changelog @@ -1,3 +1,9 @@ +-------------------------------------------------------------------------------- +drkns 2025-02-04 20:18:36+00:00 - build 6430 + +1. Remove the workaround for WT-17833. + The bug existed only in Preview and only from 1.22.2362.0 (2024/08/27) till 1.22.2702.0 (2024/09/28), so it should be safe to do so. + -------------------------------------------------------------------------------- drkns 2025-02-03 18:07:40+00:00 - build 6429 diff --git a/far/console.cpp b/far/console.cpp index 8c7762f81b..0e2d500e5a 100644 --- a/far/console.cpp +++ b/far/console.cpp @@ -559,31 +559,6 @@ namespace console_detail std::optional m_ConsoleMode; }; - class scoped_vt_input - { - public: - NONCOPYABLE(scoped_vt_input); - - scoped_vt_input(): - m_ConsoleMode(::console.UpdateMode(::console.GetInputHandle(), ENABLE_VIRTUAL_TERMINAL_INPUT, ENABLE_LINE_INPUT)) - { - } - - ~scoped_vt_input() - { - if (m_ConsoleMode) - ::console.SetMode(::console.GetInputHandle(), *m_ConsoleMode); - } - - explicit operator bool() const - { - return m_ConsoleMode.has_value(); - } - - private: - std::optional m_ConsoleMode; - }; - static string query_vt(string_view const Command) { // A VT query works as follows: @@ -615,13 +590,8 @@ namespace console_detail // Fortunately, it seems that user input is queued before and/or after the responses, // but does not interlace with them. - // We also need to enable VT input, otherwise it will only work in a real console. // Are you not entertained? - scoped_vt_input const VtInput; - if (!VtInput) - throw far_exception(L"scoped_vt_input"sv); - const auto Dummy = CSI L"0c"sv; if (!::console.Write(concat(Dummy, Command, Dummy))) diff --git a/far/vbuild.m4 b/far/vbuild.m4 index 7b44e6c407..c0025c2f19 100644 --- a/far/vbuild.m4 +++ b/far/vbuild.m4 @@ -1 +1 @@ -6429 +6430