Module: wine Branch: master Commit: 930f8f5af615dc427f6acbdadc082a741aebdd72 URL: http://source.winehq.org/git/wine.git/?a=commit;h=930f8f5af615dc427f6acbdadc...
Author: Dylan Smith dylan.ah.smith@gmail.com Date: Fri Oct 3 00:49:39 2008 -0400
richedit: Removed invalid assertion.
The assertion was not valid, because it neglected to take into account the situation where a line break is forced with a MERF_ENDROW run (caused by \line control word or pressing Shift-Enter). This means that spaces can cause a line wrap after a forced line break as well as after a paragraph break, so we cannot assert that it is the first row in the paragraph.
---
dlls/riched20/wrap.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/riched20/wrap.c b/dlls/riched20/wrap.c index 6f6e32c..d6a2492 100644 --- a/dlls/riched20/wrap.c +++ b/dlls/riched20/wrap.c @@ -416,9 +416,11 @@ static ME_DisplayItem *ME_WrapHandleRun(ME_WrapContext *wc, ME_DisplayItem *p) { if (run->nFlags & MERF_STARTWHITE) { - /* we had only spaces so far, so we must be on the first line of the - * paragraph, since no other lines of the paragraph start with spaces. */ - assert(!wc->nRow); + /* We had only spaces so far, so we must be on the first line of the + * paragraph (or the first line after MERF_ENDROW forced the line + * break within the paragraph), since no other lines of the paragraph + * start with spaces. */ + /* The lines will only contain spaces, and the rest of the run will * overflow onto the next line. */ wc->bOverflown = TRUE;