diff --git a/dlls/riched20/caret.c b/dlls/riched20/caret.c index 02c375c..5584dc5 100644 --- a/dlls/riched20/caret.c +++ b/dlls/riched20/caret.c @@ -237,6 +237,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); }