From 3a0c15e939a5a02f91142f34829a61ee74203dd6 Mon Sep 17 00:00:00 2001 From: Krzysztof Foltman Date: Fri, 4 Aug 2006 23:40:06 +0200 Subject: [PATCH] riched20: Ensure text is wrapped before invalidating selection. --- dlls/riched20/caret.c | 1 + dlls/riched20/paint.c | 1 + 2 files changed, 2 insertions(+) diff --git a/dlls/riched20/caret.c b/dlls/riched20/caret.c index da52288b506..51248220f15 100644 --- a/dlls/riched20/caret.c +++ b/dlls/riched20/caret.c @@ -118,6 +118,7 @@ ME_GetCursorCoordinates(ME_TextEditor *editor, ME_Cursor *pCursor, assert(!pCursor->nOffset || !editor->bCaretAtEnd); assert(height && x && y); + assert(!(ME_GetParagraph(pCursorRun)->member.para.nFlags & MEPF_REWRAP)); if (pCursorRun->type == diRun) { ME_DisplayItem *row = ME_FindItemBack(pCursorRun, diStartRowOrParagraph); diff --git a/dlls/riched20/paint.c b/dlls/riched20/paint.c index f26583c3243..899f2d00f56 100644 --- a/dlls/riched20/paint.c +++ b/dlls/riched20/paint.c @@ -505,6 +505,7 @@ ME_InvalidateFromOfs(ME_TextEditor *editor, int nCharOfs) void ME_InvalidateSelection(ME_TextEditor *editor) { + ME_WrapMarkedParagraphs(editor); if (ME_IsSelection(editor) || editor->nLastSelStart != editor->nLastSelEnd) { int x, y, height;