Skip to content

Commit

Permalink
Fix potential cursor redrawing crash
Browse files Browse the repository at this point in the history
  • Loading branch information
skyline75489 committed Oct 2, 2019
1 parent abf3ee5 commit 405d183
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/buffer/out/AttrRow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,11 @@ void ATTR_ROW::ReplaceAttrs(const TextAttribute& toBeReplacedAttr, const TextAtt
// and update the count for the correct length of the new run now that we've filled it up.

newRun.erase(pNewRunPos, newRun.end());
_list.swap(newRun);
_list.resize(newRun.size());
for (size_t i = 0; i < _list.size(); i++)
{
_list.at(i) = newRun.at(i);
}

return S_OK;
}
Expand Down

0 comments on commit 405d183

Please sign in to comment.