Skip to content

Commit

Permalink
Break if an early exit can not be found in InsertAttrRuns (#3262)
Browse files Browse the repository at this point in the history
  • Loading branch information
skyline75489 authored and miniksa committed Nov 4, 2019
1 parent de9231a commit a4c24f8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/buffer/out/AttrRow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,13 @@ void ATTR_ROW::ReplaceAttrs(const TextAttribute& toBeReplacedAttr, const TextAtt

// Advance one run in the _list.
lowerBound = upperBound;

// The lowerBound is larger than iStart, which means we fail to find an early exit at the run
// where the insertion happens. We can just break out.
if (lowerBound > iStart)
{
break;
}
}
}
}
Expand Down

0 comments on commit a4c24f8

Please sign in to comment.