riched20: Ensure text is wrapped before invalidating selection.

This commit is contained in:
Krzysztof Foltman 2006-08-04 23:40:06 +02:00 committed by Alexandre Julliard
parent 539442c7f8
commit 3a0c15e939
2 changed files with 2 additions and 0 deletions

View File

@ -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);

View File

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