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:
parent
a490e155dc
commit
ea9e062b6c
|
@ -237,8 +237,6 @@ ME_MoveCaret(ME_TextEditor *editor)
|
||||||
{
|
{
|
||||||
int x, y, height;
|
int x, y, height;
|
||||||
|
|
||||||
if (ME_WrapMarkedParagraphs(editor))
|
|
||||||
ME_UpdateScrollBar(editor);
|
|
||||||
ME_GetCursorCoordinates(editor, &editor->pCursors[0], &x, &y, &height);
|
ME_GetCursorCoordinates(editor, &editor->pCursors[0], &x, &y, &height);
|
||||||
if(editor->bHaveFocus && !ME_IsSelection(editor))
|
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)
|
static void ME_ArrowHome(ME_TextEditor *editor, ME_Cursor *pCursor)
|
||||||
{
|
{
|
||||||
ME_DisplayItem *pRow = ME_FindItemBack(pCursor->pRun, diStartRow);
|
ME_DisplayItem *pRow = ME_FindItemBack(pCursor->pRun, diStartRow);
|
||||||
ME_WrapMarkedParagraphs(editor);
|
|
||||||
if (pRow) {
|
if (pRow) {
|
||||||
ME_DisplayItem *pRun;
|
ME_DisplayItem *pRun;
|
||||||
if (editor->bCaretAtEnd && !pCursor->nOffset) {
|
if (editor->bCaretAtEnd && !pCursor->nOffset) {
|
||||||
|
|
|
@ -44,7 +44,7 @@ void ME_PaintContent(ME_TextEditor *editor, HDC hDC, BOOL bOnlyNew, const RECT *
|
||||||
editor->nSequence++;
|
editor->nSequence++;
|
||||||
ME_InitContext(&c, editor, hDC);
|
ME_InitContext(&c, editor, hDC);
|
||||||
SetBkMode(hDC, TRANSPARENT);
|
SetBkMode(hDC, TRANSPARENT);
|
||||||
ME_MoveCaret(editor); /* Calls ME_WrapMarkedParagraphs */
|
ME_MoveCaret(editor);
|
||||||
item = editor->pBuffer->pFirst->next;
|
item = editor->pBuffer->pFirst->next;
|
||||||
/* This context point is an offset for the paragraph positions stored
|
/* This context point is an offset for the paragraph positions stored
|
||||||
* during wrapping. It shouldn't be modified during painting. */
|
* during wrapping. It shouldn't be modified during painting. */
|
||||||
|
|
Loading…
Reference in New Issue