riched20: Paint the selection while it's being extended by dragging

Phil Krylov phil at newstar.rinet.ru
Sun Jan 29 16:48:16 CST 2006


ChangeLog:

Paint the selection while it's being extended using the mouse in rich edit
control.


---

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

ef32e03e1fe9a7641ec8aa0e61dc7a784e5c71f9
diff --git a/dlls/riched20/caret.c b/dlls/riched20/caret.c
index 1bb9457..fbaac9f 100644
--- a/dlls/riched20/caret.c
+++ b/dlls/riched20/caret.c
@@ -751,15 +751,18 @@ void ME_MouseMove(ME_TextEditor *editor,
   y += ME_GetYScrollPos(editor);
 
   tmp_cursor = editor->pCursors[0];
-  if (!ME_FindPixelPos(editor, x, y, &editor->pCursors[0],
&editor->bCaretAtEnd))
+  if (!ME_FindPixelPos(editor, x, y, &tmp_cursor, &editor->bCaretAtEnd))
     /* return */;
   
   if (tmp_cursor.pRun == editor->pCursors[0].pRun && 
       tmp_cursor.nOffset == editor->pCursors[0].nOffset)
     return;
   
+  ME_InvalidateSelection(editor);
+  editor->pCursors[0] = tmp_cursor;
   HideCaret(editor->hWnd);
   ME_MoveCaret(editor);
+  ME_InvalidateSelection(editor);
   ME_Repaint(editor);
   ShowCaret(editor->hWnd);
   ME_SendSelChange(editor);
-- 
1.0.GIT



More information about the wine-patches mailing list