Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/actions/spelling/expect/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1908,6 +1908,7 @@ touchpad
Tpp
Tpqrst
tprivapi
tput
tracelog
tracelogging
traceloggingprovider
Expand Down
8 changes: 5 additions & 3 deletions src/host/outputStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down