Fix race on resize in terminal ui
This commit is contained in:
parent
86025f88c4
commit
b3025b87d0
|
@ -162,6 +162,9 @@ void TerminalUI::Window::draw(DisplayCoord pos,
|
|||
ConstArrayView<DisplayAtom> atoms,
|
||||
const Face& default_face)
|
||||
{
|
||||
if (pos.line >= lines.size()) // We might receive an out of date draw command after a resize
|
||||
return;
|
||||
|
||||
lines[(size_t)pos.line].resize(pos.column);
|
||||
for (const DisplayAtom& atom : atoms)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user