Repository: microsoft/terminal (language: cpp)

Issue:
Can we get rid of the AdaptDefaults interface?
# Description of the new feature/enhancement

There are three methods in the [`AdaptDefaults`](https://github.com/microsoft/terminal/blob/fb597ed304ec6eef245405c9652e9b8a029b821f/src/terminal/adapter/adaptDefaults.hpp#L21) interface:
* The `Execute` method is never used at all. This is equivalent to the [`ExecuteChar`](https://github.com/microsoft/terminal/blob/62c95b5017e92a780cdc43008e30b4e43d2edc9b/src/cascadia/TerminalCore/ITerminalApi.hpp#L23) method in `ITerminalApi`, which is also not used.
* The `Print` method, which takes a char, is ultimately implemented as a call to `PrintString`, so this could easily be replaced with `PrintString` in the calling code, as is done in the [`TerminalDispatch`](https://github.com/microsoft/terminal/blob/main/src/cascadia/TerminalCore/TerminalDispatch.cpp#L29) implementation.
* The `PrintString` method is all that's left, and that could be moved into the `ConGetSet` interface, the same way we have a `PrintString` method in the `ITerminalApi` interface.

This means the `AdaptDispatch` class only needs to be constructed with a `ConGetSet` parameter, which would more closely match the `TerminalDispatch` class. 

# Proposed technical implementation details (optional)

Most of the details are covered above. Essentially we'd move the `PrintString` method into `ConGetSet` interface and nuke everything else.


Discussion / hints:

Fix patch:
diff --git a/src/cascadia/TerminalCore/ITerminalApi.hpp b/src/cascadia/TerminalCore/ITerminalApi.hpp
index 7b9d4b1b63d..ebff6fd2072 100644
--- a/src/cascadia/TerminalCore/ITerminalApi.hpp
+++ b/src/cascadia/TerminalCore/ITerminalApi.hpp
@@ -20,7 +20,6 @@ namespace Microsoft::Terminal::Core
         ITerminalApi& operator=(ITerminalApi&&) = default;
 
         virtual void PrintString(std::wstring_view string) = 0;
-        virtual void ExecuteChar(wchar_t wch) = 0;
 
         virtual TextAttribute GetTextAttributes() const = 0;
         virtual void SetTextAttributes(const TextAttribute& attrs) = 0;
diff --git a/src/cascadia/TerminalCore/Terminal.hpp b/src/cascadia/TerminalCore/Terminal.hpp
index adec74b2e9a..5a6d328ecf8 100644
--- a/src/cascadia/TerminalCore/Terminal.hpp
+++ b/src/cascadia/TerminalCore/Terminal.hpp
@@ -96,7 +96,6 @@ class Microsoft::Terminal::Core::Terminal final :
 #pragma region ITerminalApi
     // These methods are defined in TerminalApi.cpp
     void PrintString(std::wstring_view stringView) override;
-    void ExecuteChar(wchar_t wch) override;
     TextAttribute GetTextAttributes() const override;
     void SetTextAttributes(const TextAttribute& attrs) override;
     Microsoft::Console::Types::Viewport GetBufferSize() override;
diff --git a/src/cascadia/TerminalCore/TerminalApi.cpp b/src/cascadia/TerminalCore/TerminalApi.cpp
index 4b516e9ee86..6e89bce460a 100644
--- a/src/cascadia/TerminalCore/TerminalApi.cpp
+++ b/src/cascadia/TerminalCore/TerminalApi.cpp
@@ -16,11 +16,6 @@ void Terminal::PrintString(std::wstring_view stringView)
     _WriteBuffer(stringView);
 }
 
-void Terminal::ExecuteChar(wchar_t wch)
-{
-    _WriteBuffer({ &wch, 1 });
-}
-
 TextAttribute Terminal::GetTextAttributes() const
 {
     return _buffer->GetCurrentAttributes();
diff --git a/src/cascadia/TerminalCore/TerminalDispatch.cpp b/src/cascadia/TerminalCore/TerminalDispatch.cpp
index 7984cc28c41..6adf0daed61 100644
--- a/src/cascadia/TerminalCore/TerminalDispatch.cpp
+++ b/src/cascadia/TerminalCore/TerminalDispatch.cpp
@@ -19,11 +19,6 @@ TerminalDispatch::TerminalDispatch(ITerminalApi& terminalApi) noexcept :
 {
 }
 
-void TerminalDispatch::Execute(const wchar_t wchControl)
-{
-    _terminalApi.ExecuteChar(wchControl);
-}
-
 void TerminalDispatch::Print(const wchar_t wchPrintable)
 {
     _terminalApi.PrintString({ &wchPrintable, 1 });
diff --git a/src/cascadia/TerminalCore/TerminalDispatch.hpp b/src/cascadia/TerminalCore/TerminalDispatch.hpp
index c4e7cf24f5b..1ec29bf8e08 100644
--- a/src/cascadia/TerminalCore/TerminalDispatch.hpp
+++ b/src/cascadia/TerminalCore/TerminalDispatch.hpp
@@ -12,7 +12,6 @@ class TerminalDispatch : public Microsoft::Console::VirtualTerminal::TermDispatc
 public:
     TerminalDispatch(::Microsoft::Terminal::Core::ITerminalApi& terminalApi) noexcept;
 
-    void Execute(const wchar_t wchControl) override;
     void Print(const wchar_t wchPrintable) override;
     void PrintString(const std::wstring_view string) override;
 
diff --git a/src/host/outputStream.cpp b/src/host/outputStream.cpp
index f82eefe67fb..19773e283ed 100644
--- a/src/host/outputStream.cpp
+++ b/src/host/outputStream.cpp
@@ -19,21 +19,9 @@ using Microsoft::Console::Interactivity::ServiceLocator;
 using Microsoft::Console::VirtualTerminal::StateMachine;
 using Microsoft::Console::VirtualTerminal::TerminalInput;
 
-WriteBuffer::WriteBuffer(_In_ Microsoft::Console::IIoProvider& io) :
-    _io{ io },
-    _ntstatus{ STATUS_INVALID_DEVICE_STATE }
-{
-}
-
-// Routine Description:
-// - Handles the print action from the state machine
-// Arguments:
-// - wch - The character to be printed.
-// Return Value:
-// - <none>
-void WriteBuffer::Print(const wchar_t wch)
+ConhostInternalGetSet::ConhostInternalGetSet(_In_ IIoProvider& io) :
+    _io{ io }
 {
-    _DefaultCase(wch);
 }
 
 // Routine Description:
@@ -42,40 +30,7 @@ void WriteBuffer::Print(const wchar_t wch)
 // - string - The string to be printed.
 // Return Value:
 // - <none>
-void WriteBuffer::PrintString(const std::wstring_view string)
-{
-    _DefaultStringCase(string);
-}
-
-// Routine Description:
-// - Handles the execute action from the state machine
-// Arguments:
-// - wch - The C0 control character to be executed.
-// Return Value:
-// - <none>
-void WriteBuffer::Execute(const wchar_t wch)
-{
-    _DefaultCase(wch);
-}
-
-// Routine Description:
-// - Default text editing/printing handler for all characters that were not routed elsewhere by other state machine intercepts.
-// Arguments:
-// - wch - The character to be processed by our default text editing/printing mechanisms.
-// Return Value:
-// - <none>
-void WriteBuffer::_DefaultCase(const wchar_t wch)
-{
-    _DefaultStringCase({ &wch, 1 });
-}
-
-// Routine Description:
-// - Default text editing/printing handler for all characters that were not routed elsewhere by other state machine intercepts.
-// Arguments:
-// - string - The string to be processed by our default text editing/printing mechanisms.
-// Return Value:
-// - <none>
-void WriteBuffer::_DefaultStringCase(const std::wstring_view string)
+void ConhostInternalGetSet::PrintString(const std::wstring_view string)
 {
     size_t dwNumBytes = string.size() * sizeof(wchar_t);
 
@@ -88,21 +43,18 @@ void WriteBuffer::_DefaultStringCase(const std::wstring_view string)
     // Defer the cursor drawing while we are iterating the string, for a better performance.
     // We can not waste time displaying a cursor event when we know more text is coming right behind it.
     cursor.StartDeferDrawing();
-    _ntstatus = WriteCharsLegacy(_io.GetActiveOutputBuffer(),
-                                 string.data(),
-                                 string.data(),
-                                 string.data(),
-                                 &dwNumBytes,
-                                 nullptr,
-                                 _io.GetActiveOutputBuffer().GetTextBuffer().GetCursor().GetPosition().X,
-                                 WC_LIMIT_BACKSPACE | WC_DELAY_EOL_WRAP,
-                                 nullptr);
+    const auto ntstatus = WriteCharsLegacy(_io.GetActiveOutputBuffer(),
+                                           string.data(),
+                                           string.data(),
+                                           string.data(),
+                                           &dwNumBytes,
+                                           nullptr,
+                                           _io.GetActiveOutputBuffer().GetTextBuffer().GetCursor().GetPosition().X,
+                                           WC_LIMIT_BACKSPACE | WC_DELAY_EOL_WRAP,
+                                           nullptr);
     cursor.EndDeferDrawing();
-}
 
-ConhostInternalGetSet::ConhostInternalGetSet(_In_ IIoProvider& io) :
-    _io{ io }
-{
+    THROW_IF_NTSTATUS_FAILED(ntstatus);
 }
 
 // Routine Description:
diff --git a/src/host/outputStream.hpp b/src/host/outputStream.hpp
index 53745669622..cff5a4d36bd 100644
--- a/src/host/outputStream.hpp
+++ b/src/host/outputStream.hpp
@@ -14,36 +14,11 @@ Module Name:
 
 #pragma once
 
-#include "../terminal/adapter/adaptDefaults.hpp"
+#include "../terminal/adapter/conGetSet.hpp"
 #include "../types/inc/IInputEvent.hpp"
 #include "../inc/conattrs.hpp"
 #include "IIoProvider.hpp"
 
-class SCREEN_INFORMATION;
-
-// The WriteBuffer class provides helpers for writing text into the TextBuffer that is backing a particular console screen buffer.
-class WriteBuffer : public Microsoft::Console::VirtualTerminal::AdaptDefaults
-{
-public:
-    WriteBuffer(_In_ Microsoft::Console::IIoProvider& io);
-
-    // Implement Adapter callbacks for default cases (non-escape sequences)
-    void Print(const wchar_t wch) override;
-    void PrintString(const std::wstring_view string) override;
-    void Execute(const wchar_t wch) override;
-
-    [[nodiscard]] NTSTATUS GetResult() { return _ntstatus; };
-
-private:
-    void _DefaultCase(const wchar_t wch);
-    void _DefaultStringCase(const std::wstring_view string);
-
-    Microsoft::Console::IIoProvider& _io;
-    NTSTATUS _ntstatus;
-};
-
-#include "../terminal/adapter/conGetSet.hpp"
-
 // The ConhostInternalGetSet is for the Conhost process to call the entrypoints for its own Get/Set APIs.
 // Normally, these APIs are accessible from the outside of the conhost process (like by the process being "hosted") through
 // the kernelbase/32 exposed public APIs and routed by the console driver (condrv) to this console host.
@@ -54,6 +29,8 @@ class ConhostInternalGetSet final : public Microsoft::Console::VirtualTerminal::
 public:
     ConhostInternalGetSet(_In_ Microsoft::Console::IIoProvider& io);
 
+    void PrintString(const std::wstring_view string) override;
+
     void GetConsoleScreenBufferInfoEx(CONSOLE_SCREEN_BUFFER_INFOEX& screenBufferInfo) const override;
     void SetConsoleScreenBufferInfoEx(const CONSOLE_SCREEN_BUFFER_INFOEX& screenBufferInfo) override;
 
diff --git a/src/host/screenInfo.cpp b/src/host/screenInfo.cpp
index ee72405103c..f0f3e03710d 100644
--- a/src/host/screenInfo.cpp
+++ b/src/host/screenInfo.cpp
@@ -255,8 +255,7 @@ void SCREEN_INFORMATION::s_RemoveScreenBuffer(_In_ SCREEN_INFORMATION* const pSc
     try
     {
         auto getset = std::make_unique<ConhostInternalGetSet>(*this);
-        auto defaults = std::make_unique<WriteBuffer>(*this);
-        auto adapter = std::make_unique<AdaptDispatch>(std::move(getset), std::move(defaults));
+        auto adapter = std::make_unique<AdaptDispatch>(std::move(getset));
         auto engine = std::make_unique<OutputStateMachineEngine>(std::move(adapter));
         // Note that at this point in the setup, we haven't determined if we're
         //      in VtIo mode or not yet. We'll set the OutputStateMachine's
diff --git a/src/terminal/adapter/ITermDispatch.hpp b/src/terminal/adapter/ITermDispatch.hpp
index e1c7bfdebb0..f0f48fa2d2f 100644
--- a/src/terminal/adapter/ITermDispatch.hpp
+++ b/src/terminal/adapter/ITermDispatch.hpp
@@ -29,7 +29,6 @@ class Microsoft::Console::VirtualTerminal::ITermDispatch
 #pragma warning(disable : 26432) // suppress rule of 5 violation on interface because tampering with this is fraught with peril
     virtual ~ITermDispatch() = 0;
 
-    virtual void Execute(const wchar_t wchControl) = 0;
     virtual void Print(const wchar_t wchPrintable) = 0;
     virtual void PrintString(const std::wstring_view string) = 0;
 
diff --git a/src/terminal/adapter/adaptDefaults.hpp b/src/terminal/adapter/adaptDefaults.hpp
deleted file mode 100644
index 239c16d20c6..00000000000
--- a/src/terminal/adapter/adaptDefaults.hpp
+++ /dev/null
@@ -1,30 +0,0 @@
-/*++
-Copyright (c) Microsoft Corporation
-Licensed under the MIT license.
-
-Module Name:
-- adaptDefaults.hpp
-
-Abstract:
-- This serves as an abstraction for the default cases in the state machine (which is to just print or execute a simple single character.
-- This can also handle processing of an entire string of printable characters, as an optimization.
-- When using the Windows Console API adapter (AdaptDispatch), this must be passed in to signify where standard actions should go.
-
-Author(s):
-- Michael Niksa (MiNiksa) 30-July-2015
-- Mike Griese (migrie) 07-March-2016
---*/
-#pragma once
-
-namespace Microsoft::Console::VirtualTerminal
-{
-    class AdaptDefaults
-    {
-    public:
-        virtual ~AdaptDefaults() = default;
-        virtual void Print(const wchar_t wch) = 0;
-        // These characters need to be mutable so that they can be processed by the TerminalInput translater.
-        virtual void PrintString(const std::wstring_view string) = 0;
-        virtual void Execute(const wchar_t wch) = 0;
-    };
-}
diff --git a/src/terminal/adapter/adaptDispatch.cpp b/src/terminal/adapter/adaptDispatch.cpp
index 826233cec84..f360680b4db 100644
--- a/src/terminal/adapter/adaptDispatch.cpp
+++ b/src/terminal/adapter/adaptDispatch.cpp
@@ -26,17 +26,14 @@ bool NoOp() noexcept
 }
 
 // Note: AdaptDispatch will take ownership of pConApi and pDefaults
-AdaptDispatch::AdaptDispatch(std::unique_ptr<ConGetSet> pConApi,
-                             std::unique_ptr<AdaptDefaults> pDefaults) :
+AdaptDispatch::AdaptDispatch(std::unique_ptr<ConGetSet> pConApi) :
     _pConApi{ std::move(pConApi) },
-    _pDefaults{ std::move(pDefaults) },
     _usingAltBuffer(false),
     _isOriginModeRelative(false), // by default, the DECOM origin mode is absolute.
     _isDECCOLMAllowed(false), // by default, DECCOLM is not allowed.
     _termOutput()
 {
     THROW_HR_IF_NULL(E_INVALIDARG, _pConApi.get());
-    THROW_HR_IF_NULL(E_INVALIDARG, _pDefaults.get());
     _scrollMargins = { 0 }; // initially, there are no scroll margins.
 }
 
@@ -55,7 +52,7 @@ void AdaptDispatch::Print(const wchar_t wchPrintable)
     // a character is only output if the DEL is translated to something else.
     if (wchTranslated != AsciiChars::DEL)
     {
-        _pDefaults->Print(wchTranslated);
+        _pConApi->PrintString({ &wchTranslated, 1 });
     }
 }
 
@@ -76,11 +73,11 @@ void AdaptDispatch::PrintString(const std::wstring_view string)
         {
             buffer.push_back(_termOutput.TranslateKey(wch));
         }
-        _pDefaults->PrintString(buffer);
+        _pConApi->PrintString(buffer);
     }
     else
     {
-        _pDefaults->PrintString(string);
+        _pConApi->PrintString(string);
     }
 }
 
diff --git a/src/terminal/adapter/adaptDispatch.hpp b/src/terminal/adapter/adaptDispatch.hpp
index 97aefa8aebb..5d559f248bb 100644
--- a/src/terminal/adapter/adaptDispatch.hpp
+++ b/src/terminal/adapter/adaptDispatch.hpp
@@ -17,7 +17,6 @@ Author(s):
 #include "termDispatch.hpp"
 #include "DispatchCommon.hpp"
 #include "conGetSet.hpp"
-#include "adaptDefaults.hpp"
 #include "FontBuffer.hpp"
 #include "terminalOutput.hpp"
 #include "..\..\types\inc\sgrStack.hpp"
@@ -27,16 +26,10 @@ namespace Microsoft::Console::VirtualTerminal
     class AdaptDispatch : public ITermDispatch
     {
     public:
-        AdaptDispatch(std::unique_ptr<ConGetSet> pConApi,
-                      std::unique_ptr<AdaptDefaults> pDefaults);
+        AdaptDispatch(std::unique_ptr<ConGetSet> pConApi);
 
-        void Execute(const wchar_t wchControl) override
-        {
-            _pDefaults->Execute(wchControl);
-        }
-
-        void PrintString(const std::wstring_view string) override;
         void Print(const wchar_t wchPrintable) override;
+        void PrintString(const std::wstring_view string) override;
 
         bool CursorUp(const size_t distance) override; // CUU
         bool CursorDown(const size_t distance) override; // CUD
@@ -200,7 +193,6 @@ namespace Microsoft::Console::VirtualTerminal
         bool _initDefaultTabStops = true;
 
         std::unique_ptr<ConGetSet> _pConApi;
-        std::unique_ptr<AdaptDefaults> _pDefaults;
         TerminalOutput _termOutput;
         std::unique_ptr<FontBuffer> _fontBuffer;
         std::optional<unsigned int> _initialCodePage;
diff --git a/src/terminal/adapter/conGetSet.hpp b/src/terminal/adapter/conGetSet.hpp
index 7eb6e865a45..658b304b726 100644
--- a/src/terminal/adapter/conGetSet.hpp
+++ b/src/terminal/adapter/conGetSet.hpp
@@ -34,6 +34,9 @@ namespace Microsoft::Console::VirtualTerminal
 
     public:
         virtual ~ConGetSet() = default;
+
+        virtual void PrintString(const std::wstring_view string) = 0;
+
         virtual void GetConsoleScreenBufferInfoEx(CONSOLE_SCREEN_BUFFER_INFOEX& screenBufferInfo) const = 0;
         virtual void SetConsoleScreenBufferInfoEx(const CONSOLE_SCREEN_BUFFER_INFOEX& screenBufferInfo) = 0;
         virtual void SetCursorPosition(const COORD position) = 0;
diff --git a/src/terminal/adapter/lib/adapter.vcxproj b/src/terminal/adapter/lib/adapter.vcxproj
index a2c7b78b3ef..034ef8cb345 100644
--- a/src/terminal/adapter/lib/adapter.vcxproj
+++ b/src/terminal/adapter/lib/adapter.vcxproj
@@ -23,7 +23,6 @@
     </ClCompile>
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="..\adaptDefaults.hpp" />
     <ClInclude Include="..\adaptDispatch.hpp" />
     <ClInclude Include="..\charsets.hpp" />
     <ClInclude Include="..\DispatchTypes.hpp" />
diff --git a/src/terminal/adapter/lib/adapter.vcxproj.filters b/src/terminal/adapter/lib/adapter.vcxproj.filters
index 1d76cc8d648..b81bef3ac0c 100644
--- a/src/terminal/adapter/lib/adapter.vcxproj.filters
+++ b/src/terminal/adapter/lib/adapter.vcxproj.filters
@@ -44,9 +44,6 @@
     </ClCompile>
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="..\adaptDefaults.hpp">
-      <Filter>Header Files</Filter>
-    </ClInclude>
     <ClInclude Include="..\adaptDispatch.hpp">
       <Filter>Header Files</Filter>
     </ClInclude>
diff --git a/src/terminal/adapter/termDispatch.hpp b/src/terminal/adapter/termDispatch.hpp
index 95170b54389..0d75258ed30 100644
--- a/src/terminal/adapter/termDispatch.hpp
+++ b/src/terminal/adapter/termDispatch.hpp
@@ -22,7 +22,6 @@ namespace Microsoft::Console::VirtualTerminal
 class Microsoft::Console::VirtualTerminal::TermDispatch : public Microsoft::Console::VirtualTerminal::ITermDispatch
 {
 public:
-    void Execute(const wchar_t wchControl) override = 0;
     void Print(const wchar_t wchPrintable) override = 0;
     void PrintString(const std::wstring_view string) override = 0;
 
diff --git a/src/terminal/adapter/ut_adapter/adapterTest.cpp b/src/terminal/adapter/ut_adapter/adapterTest.cpp
index 9ef4c7aaaf6..96c509f8501 100644
--- a/src/terminal/adapter/ut_adapter/adapterTest.cpp
+++ b/src/terminal/adapter/ut_adapter/adapterTest.cpp
@@ -58,6 +58,10 @@ using namespace Microsoft::Console::VirtualTerminal;
 class TestGetSet final : public ConGetSet
 {
 public:
+    void PrintString(const std::wstring_view /*string*/) override
+    {
+    }
+
     void GetConsoleScreenBufferInfoEx(CONSOLE_SCREEN_BUFFER_INFOEX& sbiex) const override
     {
         Log::Comment(L"GetConsoleScreenBufferInfoEx MOCK returning data...");
@@ -643,21 +647,6 @@ class TestGetSet final : public ConGetSet
     HANDLE _hCon;
 };
 
-class DummyAdapter : public AdaptDefaults
-{
-    void Print(const wchar_t /*wch*/) override
-    {
-    }
-
-    void PrintString(const std::wstring_view /*string*/) override
-    {
-    }
-
-    void Execute(const wchar_t /*wch*/) override
-    {
-    }
-};
-
 class AdapterTest
 {
 public:
@@ -671,11 +660,9 @@ class AdapterTest
         fSuccess = api.get() != nullptr;
         if (fSuccess)
         {
-            auto adapter = std::make_unique<DummyAdapter>();
-
             // give AdaptDispatch ownership of _testGetSet
             _testGetSet = api.get(); // keep a copy for us but don't manage its lifetime anymore.
-            _pDispatch = std::make_unique<AdaptDispatch>(std::move(api), std::move(adapter));
+            _pDispatch = std::make_unique<AdaptDispatch>(std::move(api));
             fSuccess = _pDispatch != nullptr;
         }
         return fSuccess;
diff --git a/src/terminal/parser/ft_fuzzwrapper/echoDispatch.cpp b/src/terminal/parser/ft_fuzzwrapper/echoDispatch.cpp
index a72c7b80fb3..73099ddf2aa 100644
--- a/src/terminal/parser/ft_fuzzwrapper/echoDispatch.cpp
+++ b/src/terminal/parser/ft_fuzzwrapper/echoDispatch.cpp
@@ -17,8 +17,3 @@ void EchoDispatch::PrintString(const std::wstring_view string)
     const std::wstring nullTermString(string); // string_view not guaranteed null terminated, but wprintf needs it.
     wprintf(L"PrintString: \"%s\" (%zd chars)\r\n", nullTermString.data(), nullTermString.size());
 }
-
-void EchoDispatch::Execute(const wchar_t wchControl)
-{
-    wprintf(L"Execute: 0x%x\r\n", wchControl);
-}
diff --git a/src/terminal/parser/ft_fuzzwrapper/echoDispatch.hpp b/src/terminal/parser/ft_fuzzwrapper/echoDispatch.hpp
index ac144a31ade..f026dfd2373 100644
--- a/src/terminal/parser/ft_fuzzwrapper/echoDispatch.hpp
+++ b/src/terminal/parser/ft_fuzzwrapper/echoDispatch.hpp
@@ -14,7 +14,6 @@ namespace Microsoft
             public:
                 void Print(const wchar_t wchPrintable) override;
                 void PrintString(const std::wstring_view string) override;
-                void Execute(const wchar_t wchControl) override;
             };
         }
     }
diff --git a/src/terminal/parser/ut_parser/OutputEngineTest.cpp b/src/terminal/parser/ut_parser/OutputEngineTest.cpp
index 83ba7dfc767..f45b68fde2e 100644
--- a/src/terminal/parser/ut_parser/OutputEngineTest.cpp
+++ b/src/terminal/parser/ut_parser/OutputEngineTest.cpp
@@ -36,10 +36,6 @@ namespace Microsoft
 class DummyDispatch final : public TermDispatch
 {
 public:
-    virtual void Execute(const wchar_t /*wchControl*/) override
-    {
-    }
-
     virtual void Print(const wchar_t /*wchPrintable*/) override
     {
     }
@@ -986,10 +982,6 @@ class Microsoft::Console::VirtualTerminal::OutputEngineTest final
 class StatefulDispatch final : public TermDispatch
 {
 public:
-    virtual void Execute(const wchar_t /*wchControl*/) override
-    {
-    }
-
     virtual void Print(const wchar_t wchPrintable) override
     {
         _printString += wchPrintable;


Test patch: