From c0921af52cbd3f8a483effe642d4d3db3f17036a Mon Sep 17 00:00:00 2001 From: Leonard Hecker Date: Wed, 6 Sep 2023 22:26:40 +0200 Subject: [PATCH 1/2] ConPTY: Avoid WINDOW_BUFFER_SIZE_EVENT when the viewport moves --- src/host/outputStream.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/host/outputStream.cpp b/src/host/outputStream.cpp index 222868aad7a..a48e189f00d 100644 --- a/src/host/outputStream.cpp +++ b/src/host/outputStream.cpp @@ -95,9 +95,11 @@ til::rect ConhostInternalGetSet::GetViewport() const void ConhostInternalGetSet::SetViewportPosition(const til::point position) { auto& info = _io.GetActiveOutputBuffer(); - const auto dimensions = info.GetViewport().Dimensions(); - const auto windowRect = til::rect{ position, dimensions }.to_inclusive_rect(); - THROW_IF_FAILED(ServiceLocator::LocateGlobals().api->SetConsoleWindowInfoImpl(info, true, windowRect)); + THROW_IF_FAILED(info.SetViewportOrigin(true, position, false)); + // SetViewportOrigin() only updates the virtual bottom (the bottom coordinate of the area + // in the text buffer a VT client writes its output into) when it's moving downwards. + // But this function is meant to truly move the viewport no matter what. Otherwise `tput reset` breaks. + info.UpdateBottom(); } // Method Description: From 39fcbd6feee98d84a07a3c497cf51782aad5d45c Mon Sep 17 00:00:00 2001 From: Leonard Hecker Date: Wed, 6 Sep 2023 22:32:36 +0200 Subject: [PATCH 2/2] Fix spel --- .github/actions/spelling/expect/expect.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/spelling/expect/expect.txt b/.github/actions/spelling/expect/expect.txt index 2826e125a02..af587b42b67 100644 --- a/.github/actions/spelling/expect/expect.txt +++ b/.github/actions/spelling/expect/expect.txt @@ -1908,6 +1908,7 @@ touchpad Tpp Tpqrst tprivapi +tput tracelog tracelogging traceloggingprovider