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 Oct 1, 2019
1 parent abf3ee5 commit 3d42d9d
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 @@ -363,6 +363,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 @@ -463,6 +465,8 @@ void Terminal::_WriteBuffer(const std::wstring_view& stringView)
_NotifyScrollEvent();
}
}

cursor.EndDeferDrawing();
}

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

0 comments on commit 3d42d9d

Please sign in to comment.