[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. Fixes absence of scrollbar in Blitz3D Demo.

Alex Villacís Lasso alex at karlalex.palosanto.com
Sun Apr 27 22:25:47 CDT 2008


---
 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;
-- 
1.5.4.1


--------------020806050506020801040008--



More information about the wine-patches mailing list