Alex Villacís Lasso : richedit: Paragraph may have multiple rows, which should possibly update nHeight.

Alexandre Julliard julliard at winehq.org
Tue Apr 29 08:54:47 CDT 2008


Module: wine
Branch: master
Commit: d2a8461585f2b2ba53be7a38dcee3964c0abb966
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d2a8461585f2b2ba53be7a38dcee3964c0abb966

Author: Alex Villacís Lasso <a_villacis at 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;




More information about the wine-cvs mailing list