[PATCH 1/5] riched20: Use the provided style for the end-of-paragraph run.
Huw Davies
huw at codeweavers.com
Wed Oct 5 04:08:24 CDT 2016
Signed-off-by: Huw Davies <huw at codeweavers.com>
---
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 );
--
2.8.2
More information about the wine-patches
mailing list