Alex Villacís Lasso : richedit: Paragraph may have multiple rows, which should possibly update nHeight.
Module: wine Branch: master Commit: d2a8461585f2b2ba53be7a38dcee3964c0abb966 URL: http://source.winehq.org/git/wine.git/?a=commit;h=d2a8461585f2b2ba53be7a38dc... Author: Alex Villacís Lasso <a_villacis(a)palosanto.com> Date: Sun Apr 27 22:25:47 2008 -0500 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 files changed, 8 insertions(+), 0 deletions(-) diff --git a/dlls/riched20/wrap.c b/dlls/riched20/wrap.c index 43d3d79..4767074 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;
participants (1)
-
Alexandre Julliard