From d2a8461585f2b2ba53be7a38dcee3964c0abb966 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alex=20Villac=C3=ADs=20Lasso?= Date: Sun, 27 Apr 2008 22:25:47 -0500 Subject: [PATCH] richedit: Paragraph may have multiple rows, which should possibly update nHeight. Otherwise, a paragraph with multiple rows might fail to make the scrollbar appear when displaying text. --- dlls/riched20/wrap.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dlls/riched20/wrap.c b/dlls/riched20/wrap.c index 43d3d791819..47670748e09 100644 --- a/dlls/riched20/wrap.c +++ b/dlls/riched20/wrap.c @@ -508,6 +508,14 @@ BOOL ME_WrapMarkedParagraphs(ME_TextEditor *editor) { ME_DestroyContext(&c, editor->hWnd); + /* Each paragraph may contain multiple rows, which should be scrollable, even + if the containing paragraph has nYPos == 0 */ + item = editor->pBuffer->pFirst; + while ((item = ME_FindItemFwd(item, diStartRow)) != NULL) { + assert(item->type == diStartRow); + editor->nHeight = max(editor->nHeight, item->member.row.nYPos); + } + if (bModified || editor->nTotalLength < editor->nLastTotalLength) ME_InvalidateMarkedParagraphs(editor); return bModified; -- 2.11.4.GIT