richedit: Fixed position of runs in some situations during wrapping.

Runs that are skipped over still need to affect the wrapping position,
otherwise they won't affect further run positions.
This commit is contained in:
Dylan Smith 2008-07-10 10:17:39 -04:00 committed by Alexandre Julliard
parent 49468e1824
commit feda29bb0c
1 changed files with 4 additions and 3 deletions

View File

@ -296,7 +296,7 @@ static ME_DisplayItem *ME_WrapHandleRun(ME_WrapContext *wc, ME_DisplayItem *p)
if (run->nFlags & MERF_WHITESPACE) {
p->member.run.nFlags |= MERF_SKIPPED;
/* wc->pt.x += run->nWidth; */
wc->pt.x += run->nWidth;
/* skip runs consisting of only whitespaces */
return p->next;
}
@ -358,8 +358,9 @@ static ME_DisplayItem *ME_WrapHandleRun(ME_WrapContext *wc, ME_DisplayItem *p)
pp = ME_SplitByBacktracking(wc, p, loc);
if (pp == wc->pRowStart)
{
/* we had only spaces so far, entire content can be omitted */
wc->pt.x = 0;
/* we have a row that starts with spaces, or a single large character
* which we cannot split. */
wc->pt.x += run->nWidth;
return p->next;
}
if (p != pp) /* found a suitable split point */