Skip to content

Commit

Permalink
Defer cursor redrawing when reading buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
skyline75489 committed Sep 29, 2019
1 parent 23bea9e commit 7dc6179
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/cascadia/TerminalCore/Terminal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,8 @@ void Terminal::_WriteBuffer(const std::wstring_view& stringView)
auto& cursor = _buffer->GetCursor();
const Viewport bufferSize = _buffer->GetSize();

cursor.StartDeferDrawing();

for (size_t i = 0; i < stringView.size(); i++)
{
wchar_t wch = stringView[i];
Expand Down Expand Up @@ -416,6 +418,8 @@ void Terminal::_WriteBuffer(const std::wstring_view& stringView)
_NotifyScrollEvent();
}
}

cursor.EndDeferDrawing();
}

void Terminal::UserScrollViewport(const int viewTop)
Expand Down

0 comments on commit 7dc6179

Please sign in to comment.