Dylan Smith : richedit: Ensure caret is seen if moved past end of view over trailing spaces.
Module: wine Branch: master Commit: fad2b57cd75578438223ed69133eb06320532498 URL: http://source.winehq.org/git/wine.git/?a=commit;h=fad2b57cd75578438223ed6913... Author: Dylan Smith <dylan.ah.smith(a)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); }
participants (1)
-
Alexandre Julliard