Bugfix: EraseInLine off-by-one error (#2879)

This commit is contained in:
Carlos Zamora 2019-09-24 13:05:39 -07:00 committed by GitHub
parent f5071439a3
commit a862f3196f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -265,11 +265,11 @@ bool Terminal::EraseInLine(const ::Microsoft::Console::VirtualTerminal::Dispatch
break;
case DispatchTypes::EraseType::ToEnd:
startPos.X = cursorPos.X;
nlength = viewport.RightInclusive() - startPos.X;
nlength = viewport.RightExclusive() - startPos.X;
break;
case DispatchTypes::EraseType::All:
startPos.X = viewport.Left();
nlength = viewport.RightInclusive() - startPos.X;
nlength = viewport.RightExclusive() - startPos.X;
break;
case DispatchTypes::EraseType::Scrollback:
return false;