Dylan Smith : richedit: Removed unnecessary calls to ME_WrapMarkedParagraphs.

Alexandre Julliard julliard at winehq.org
Fri Feb 6 09:56:03 CST 2009


Module: wine
Branch: master
Commit: ea9e062b6c460b17ddc3b820dee80960b74b9369
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ea9e062b6c460b17ddc3b820dee80960b74b9369

Author: Dylan Smith <dylan.ah.smith at gmail.com>
Date:   Fri Feb  6 01:09:36 2009 -0500

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.

---

 dlls/riched20/caret.c |    3 ---
 dlls/riched20/paint.c |    2 +-
 2 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/dlls/riched20/caret.c b/dlls/riched20/caret.c
index 7bdd0a7..e901095 100644
--- a/dlls/riched20/caret.c
+++ b/dlls/riched20/caret.c
@@ -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) {
diff --git a/dlls/riched20/paint.c b/dlls/riched20/paint.c
index 30548fe..03ece7b 100644
--- a/dlls/riched20/paint.c
+++ b/dlls/riched20/paint.c
@@ -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. */




More information about the wine-cvs mailing list