beef prevention

This commit is contained in:
Dustin Howett 2021-01-05 15:59:07 -08:00
parent 99d9bac51d
commit 227ce8ff20

View file

@ -1953,6 +1953,12 @@ HRESULT TextBuffer::Reflow(TextBuffer& oldBuffer,
const short cOldColsTotal = oldBuffer.GetLineWidth(iOldRow);
const CharRow& charRow = row.GetCharRow();
short iRight = gsl::narrow_cast<short>(charRow.MeasureRight());
if (iRight == 0 && !row.WasWrapForced())
{
// don't beef it if iRight=0 on iterator
newBuffer.NewlineCursor();
continue;
}
// If we're starting a new row, try and preserve the line rendition
// from the row in the original buffer.