richedit: Removed unnecessary calls to ME_WrapMarkedParagraphs.

These calls to ME_WrapMarkedParagraphs never do anything, and don't make
sense to be called in these places. These places are for ME_MoveCaret,
and ME_ArrowHome, which both don't involve any text being modified, and
all (direct and indirect) calls to these functions are done after the
text has already been wrapped.
This commit is contained in:
Dylan Smith 2009-02-06 01:09:36 -05:00 committed by Alexandre Julliard
parent a490e155dc
commit ea9e062b6c
2 changed files with 1 additions and 4 deletions

View File

@ -237,8 +237,6 @@ ME_MoveCaret(ME_TextEditor *editor)
{
int x, y, height;
if (ME_WrapMarkedParagraphs(editor))
ME_UpdateScrollBar(editor);
ME_GetCursorCoordinates(editor, &editor->pCursors[0], &x, &y, &height);
if(editor->bHaveFocus && !ME_IsSelection(editor))
{
@ -1420,7 +1418,6 @@ static void ME_ArrowPageDown(ME_TextEditor *editor, ME_Cursor *pCursor)
static void ME_ArrowHome(ME_TextEditor *editor, ME_Cursor *pCursor)
{
ME_DisplayItem *pRow = ME_FindItemBack(pCursor->pRun, diStartRow);
ME_WrapMarkedParagraphs(editor);
if (pRow) {
ME_DisplayItem *pRun;
if (editor->bCaretAtEnd && !pCursor->nOffset) {

View File

@ -44,7 +44,7 @@ void ME_PaintContent(ME_TextEditor *editor, HDC hDC, BOOL bOnlyNew, const RECT *
editor->nSequence++;
ME_InitContext(&c, editor, hDC);
SetBkMode(hDC, TRANSPARENT);
ME_MoveCaret(editor); /* Calls ME_WrapMarkedParagraphs */
ME_MoveCaret(editor);
item = editor->pBuffer->pFirst->next;
/* This context point is an offset for the paragraph positions stored
* during wrapping. It shouldn't be modified during painting. */