Skip to content

Commit

Permalink
Restore type inference and integer casting changes in VtEngine (micro…
Browse files Browse the repository at this point in the history
…soft#13760)

PR microsoft#13665 reverted this part of paint.cpp to a time before microsoft#13097 and microsoft#12975.
This commit restores those changes.
  • Loading branch information
DHowett authored Aug 17, 2022
1 parent 1e18ab9 commit 8ba43f9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/renderer/vt/paint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -454,12 +454,10 @@ using namespace Microsoft::Console::Types;
// we trimmed the spaces off here, we'd print all the "~"s one after another
// on the same line.
static const TextAttribute defaultAttrs{};
const bool removeSpaces = !lineWrapped && (useEraseChar // we determined earlier that ECH is optimal
const auto removeSpaces = !lineWrapped && (useEraseChar // we determined earlier that ECH is optimal
|| (_clearedAllThisFrame && _lastTextAttributes == defaultAttrs) // OR we cleared the last frame to the default attributes (specifically)
|| (_newBottomLine && printingBottomLine && bgMatched)); // OR we just scrolled a new line onto the bottom of the screen with the correct attributes
const size_t cchActual = removeSpaces ?
(cchLine - numSpaces) :
cchLine;
const auto cchActual = removeSpaces ? nonSpaceLength : cchLine;

const auto columnsActual = removeSpaces ?
(totalWidth - numSpaces) :
Expand Down

0 comments on commit 8ba43f9

Please sign in to comment.