Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clearing marks #17144

Merged
merged 9 commits into from May 2, 2024
4 changes: 2 additions & 2 deletions src/buffer/out/textBuffer.cpp
Expand Up @@ -1183,14 +1183,14 @@ void TextBuffer::ClearScrollback(const til::CoordType start, const til::CoordTyp
return;
}

ClearMarksInRange(til::point{ 0, start }, til::point{ _width, start + height });

if (height <= 0)
{
_decommit();
zadjii-msft marked this conversation as resolved.
Show resolved Hide resolved
return;
}

ClearMarksInRange(til::point{ 0, 0 }, til::point{ _width, height });

// Our goal is to move the viewport to the absolute start of the underlying memory buffer so that we can
// MEM_DECOMMIT the remaining memory. _firstRow is used to make the TextBuffer behave like a circular buffer.
// The start parameter is relative to the _firstRow. The trick to get the content to the absolute start
Expand Down