Dylan Smith : richedit: Ensure caret is seen if moved past end of view over trailing spaces.

Alexandre Julliard julliard at winehq.org
Fri Jun 27 07:41:53 CDT 2008


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

Author: Dylan Smith <dylan.ah.smith at gmail.com>
Date:   Thu Jun 26 16:17:41 2008 -0400

richedit: Ensure caret is seen if moved past end of view over trailing spaces.

---

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

diff --git a/dlls/riched20/caret.c b/dlls/riched20/caret.c
index a3a3d61..462b98a 100644
--- a/dlls/riched20/caret.c
+++ b/dlls/riched20/caret.c
@@ -236,6 +236,10 @@ ME_MoveCaret(ME_TextEditor *editor)
   ME_GetCursorCoordinates(editor, &editor->pCursors[0], &x, &y, &height);
   if(editor->bHaveFocus)
   {
+    RECT rect;
+
+    GetClientRect(editor->hWnd, &rect);
+    x = min(x, rect.right-2);
     CreateCaret(editor->hWnd, NULL, 0, height);
     SetCaretPos(x, y);
   }




More information about the wine-cvs mailing list