richedit: Fixed regression that caused endless loop.

This commit is contained in:
Dylan Smith 2008-07-17 11:55:19 -04:00 committed by Alexandre Julliard
parent f296f27e96
commit e86a1d623a
1 changed files with 6 additions and 1 deletions

View File

@ -338,7 +338,12 @@ static ME_DisplayItem *ME_WrapHandleRun(ME_WrapContext *wc, ME_DisplayItem *p)
/* TAB: we can split before */
if (run->nFlags & MERF_TAB) {
wc->bOverflown = TRUE;
return p;
if (wc->pRowStart == p)
/* Don't split before the start of the run, or we will get an
* endless loop. */
return p->next;
else
return p;
}
/* graphics: we can split before, if run's width is smaller than row's width */
if ((run->nFlags & MERF_GRAPHICS) && run->nWidth <= wc->nAvailWidth) {