From fad2b57cd75578438223ed69133eb06320532498 Mon Sep 17 00:00:00 2001 From: Dylan Smith Date: Thu, 26 Jun 2008 16:17:41 -0400 Subject: [PATCH] richedit: Ensure caret is seen if moved past end of view over trailing spaces. --- dlls/riched20/caret.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/riched20/caret.c b/dlls/riched20/caret.c index a3a3d61a1ca..462b98a3c5f 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); } -- 2.11.4.GIT