Skip to content

Commit

Permalink
UIA: retrieve full buffer size sometimes
Browse files Browse the repository at this point in the history
  • Loading branch information
carlos-zamora committed Jun 9, 2020
1 parent f327618 commit 1fd8967
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/types/UiaTextRangeBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@ const COORD UiaTextRangeBase::GetEndpoint(TextPatternRangeEndpoint endpoint) con
// - true if range is degenerate, false otherwise.
bool UiaTextRangeBase::SetEndpoint(TextPatternRangeEndpoint endpoint, const COORD val) noexcept
{
const auto bufferSize = _getBufferSize();
// GH#6402: Get the actual buffer size here, instead of the one
// constructed by the virtual bottom.
const auto bufferSize = _pData->GetTextBuffer().GetSize();
switch (endpoint)
{
case TextPatternRangeEndpoint_End:
Expand Down Expand Up @@ -393,7 +395,9 @@ IFACEMETHODIMP UiaTextRangeBase::GetBoundingRectangles(_Outptr_result_maybenull_
// set of coords.
std::vector<double> coords;

const auto bufferSize = _getBufferSize();
// GH#6402: Get the actual buffer size here, instead of the one
// constructed by the virtual bottom.
const auto bufferSize = _pData->GetTextBuffer().GetSize();

// these viewport vars are converted to the buffer coordinate space
const auto viewport = bufferSize.ConvertToOrigin(_pData->GetViewport());
Expand Down

0 comments on commit 1fd8967

Please sign in to comment.