Dylan Smith : richedit: Fixed position of runs in some situations during wrapping.

Alexandre Julliard julliard at winehq.org
Thu Jul 10 14:07:30 CDT 2008


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

Author: Dylan Smith <dylan.ah.smith at gmail.com>
Date:   Thu Jul 10 10:17:39 2008 -0400

richedit: Fixed position of runs in some situations during wrapping.

Runs that are skipped over still need to affect the wrapping position,
otherwise they won't affect further run positions.

---

 dlls/riched20/wrap.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/dlls/riched20/wrap.c b/dlls/riched20/wrap.c
index 34fbf09..614c6ac 100644
--- a/dlls/riched20/wrap.c
+++ b/dlls/riched20/wrap.c
@@ -296,7 +296,7 @@ static ME_DisplayItem *ME_WrapHandleRun(ME_WrapContext *wc, ME_DisplayItem *p)
 
     if (run->nFlags & MERF_WHITESPACE) {
       p->member.run.nFlags |= MERF_SKIPPED;
-      /* wc->pt.x += run->nWidth; */
+      wc->pt.x += run->nWidth;
       /* skip runs consisting of only whitespaces */
       return p->next;
     }
@@ -358,8 +358,9 @@ static ME_DisplayItem *ME_WrapHandleRun(ME_WrapContext *wc, ME_DisplayItem *p)
     pp = ME_SplitByBacktracking(wc, p, loc);
     if (pp == wc->pRowStart)
     {
-      /* we had only spaces so far, entire content can be omitted */
-      wc->pt.x = 0;
+      /* we have a row that starts with spaces, or a single large character
+       * which we cannot split. */
+      wc->pt.x += run->nWidth;
       return p->next;
     }
     if (p != pp) /* found a suitable split point */




More information about the wine-cvs mailing list