Skip to content

Commit

Permalink
Remove some unused/obsolete XtermEngine code (microsoft#17287)
Browse files Browse the repository at this point in the history
## Summary of the Pull Request

The dirty view calculation in the `XtermEngine::StartPaint` method was
originally used to detect a full frame paint that would require a clear
screen, but that code was removed as part of PR microsoft#4741, making this
calculation obsolete.

The `performedSoftWrap` variable in the `XtermEngine::_MoveCursor`
method was assumedly a remanent of some WIP code that was mistakenly
committed in PR microsoft#5181. The variable was never actually used.

## Validation Steps Performed

All the unit tests still pass and nothing seems obviously broken in
manual testing.

## PR Checklist
- [x] Closes microsoft#17280
  • Loading branch information
j4james committed May 20, 2024
1 parent 4a243f0 commit e826203
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/renderer/vt/XtermEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,20 +81,6 @@ XtermEngine::XtermEngine(_In_ wil::unique_hfile hPipe,
_clearedAllThisFrame = true;
_firstPaint = false;
}
else
{
std::span<const til::rect> dirty;
RETURN_IF_FAILED(GetDirtyArea(dirty));

// If we have 0 or 1 dirty pieces in the area, set as appropriate.
auto dirtyView = dirty.empty() ? Viewport::Empty() : Viewport::FromExclusive(til::at(dirty, 0));

// If there's more than 1, union them all up with the 1 we already have.
for (size_t i = 1; i < dirty.size(); ++i)
{
dirtyView = Viewport::Union(dirtyView, Viewport::FromExclusive(til::at(dirty, i)));
}
}

return S_OK;
}
Expand Down Expand Up @@ -246,7 +232,6 @@ XtermEngine::XtermEngine(_In_ wil::unique_hfile hPipe,
auto hr = S_OK;
const auto originalPos = _lastText;
_trace.TraceMoveCursor(_lastText, coord);
auto performedSoftWrap = false;
if (coord.x != _lastText.x || coord.y != _lastText.y)
{
if (coord.x == 0 && coord.y == 0)
Expand All @@ -272,7 +257,6 @@ XtermEngine::XtermEngine(_In_ wil::unique_hfile hPipe,

if (previousLineWrapped)
{
performedSoftWrap = true;
_trace.TraceWrapped();
hr = S_OK;
}
Expand Down

0 comments on commit e826203

Please sign in to comment.