From c1d326693c2d16a32f9d55f04647c84561926185 Mon Sep 17 00:00:00 2001 From: Leonard Hecker Date: Mon, 18 Oct 2021 19:20:34 +0200 Subject: [PATCH] Remove debug logging for PSReadline on newlines (#11486) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Up until this commit PSReadline caused OutputDebugString to be called with a complex log message to on every newline. At the time of writing, Visual Studio's Output window is fairly slow and after this change newlines feel a fair bit snappier when running under Visual Studio's debugger. ## Validation Steps Performed * pwsh.exe continues to work correctly ✔️ --- src/host/getset.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/host/getset.cpp b/src/host/getset.cpp index 36f2ebbd8..c4e32b015 100644 --- a/src/host/getset.cpp +++ b/src/host/getset.cpp @@ -387,7 +387,7 @@ void ApiRoutines::GetNumberOfConsoleMouseButtonsImpl(ULONG& buttons) noexcept RETURN_HR_IF(E_INVALIDARG, WI_IsAnyFlagSet(mode, ~(INPUT_MODES | PRIVATE_MODES))); // ECHO on with LINE off is invalid. - RETURN_HR_IF(E_INVALIDARG, WI_IsFlagSet(mode, ENABLE_ECHO_INPUT) && WI_IsFlagClear(mode, ENABLE_LINE_INPUT)); + RETURN_HR_IF_EXPECTED(E_INVALIDARG, WI_IsFlagSet(mode, ENABLE_ECHO_INPUT) && WI_IsFlagClear(mode, ENABLE_LINE_INPUT)); } return S_OK;