Skip to content

Commit

Permalink
Bugfix: TextBuffer Line Wrapping from VTRenderer (#2797)
Browse files Browse the repository at this point in the history
* Bugfix: line selection copy

* Revert clipboard change
Change VT renderer to do erase line instead of a ton of erase chars

* revert TerminalApi change
  • Loading branch information
carlos-zamora authored and miniksa committed Sep 23, 2019
1 parent b096a57 commit 8afc5b2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/renderer/vt/paint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,14 +475,22 @@ using namespace Microsoft::Console::Types;

if (useEraseChar)
{
RETURN_IF_FAILED(_EraseCharacter(sNumSpaces));
// ECH doesn't actually move the cursor itself. However, we think that
// the cursor *should* be at the end of the area we just erased. Stash
// that position as our new deferred position. If we don't move the
// cursor somewhere else before the end of the frame, we'll move the
// cursor to the deferred position at the end of the frame, or right
// before we need to print new text.
_deferredCursorPos = { _lastText.X + sNumSpaces, _lastText.Y };

if (_deferredCursorPos.X < _lastViewport.RightInclusive())
{
RETURN_IF_FAILED(_EraseCharacter(sNumSpaces));
}
else
{
RETURN_IF_FAILED(_EraseLine());
}
}
else if (_newBottomLine)
{
Expand Down

0 comments on commit 8afc5b2

Please sign in to comment.