Huw Davies : riched20: Use the provided style for the end-of-paragraph run.

Alexandre Julliard julliard at winehq.org
Wed Oct 5 13:43:08 CDT 2016


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

Author: Huw Davies <huw at codeweavers.com>
Date:   Wed Oct  5 10:08:24 2016 +0100

riched20: Use the provided style for the end-of-paragraph run.

Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/riched20/caret.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/dlls/riched20/caret.c b/dlls/riched20/caret.c
index a47930f..26af743 100644
--- a/dlls/riched20/caret.c
+++ b/dlls/riched20/caret.c
@@ -549,7 +549,6 @@ void ME_InsertTextFromCursor(ME_TextEditor *editor, int nCursor,
       pos++;
     } else { /* handle EOLs */
       ME_DisplayItem *tp, *end_run, *run, *prev;
-      ME_Style *tmp_style;
       int eol_len = 0;
 
       /* Find number of CR and LF in end of paragraph run */
@@ -594,13 +593,9 @@ void ME_InsertTextFromCursor(ME_TextEditor *editor, int nCursor,
           run = p->pRun;
         }
 
-        tmp_style = ME_GetInsertStyle(editor, nCursor);
-        /* ME_SplitParagraph increases style refcount */
-        tp = ME_SplitParagraph(editor, run, run->member.run.style, eol_str, eol_len, 0);
+        tp = ME_SplitParagraph(editor, run, style, eol_str, eol_len, 0);
 
         end_run = ME_FindItemBack(tp, diRun);
-        ME_ReleaseStyle(end_run->member.run.style);
-        end_run->member.run.style = tmp_style;
 
         /* Move any cursors that were at the end of the previous run to the beginning of the new para */
         prev = ME_FindItemBack( end_run, diRun );




More information about the wine-cvs mailing list