diff --git a/dlls/riched20/caret.c b/dlls/riched20/caret.c index 02c375c..fbf0010 100644 --- a/dlls/riched20/caret.c +++ b/dlls/riched20/caret.c @@ -1346,7 +1346,6 @@ ME_ArrowKey(ME_TextEditor *editor, int nVKey, BOOL extend, BOOL ctrl) BOOL success = FALSE; ME_CheckCharOffsets(editor); - editor->nUDArrowX = -1; switch(nVKey) { case VK_LEFT: editor->bCaretAtEnd = 0; diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 60db1bf..1c9d01b 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -1538,16 +1538,19 @@ ME_KeyDown(ME_TextEditor *editor, WORD nKey) { case VK_LEFT: case VK_RIGHT: - case VK_UP: - case VK_DOWN: case VK_HOME: case VK_END: + editor->nUDArrowX = -1; + /* fall through */ + case VK_UP: + case VK_DOWN: case VK_PRIOR: case VK_NEXT: ME_ArrowKey(editor, nKey, shift_is_down, ctrl_is_down); return TRUE; case VK_BACK: case VK_DELETE: + editor->nUDArrowX = -1; /* FIXME backspace and delete aren't the same, they act different wrt paragraph style of the merged paragraph */ if (GetWindowLongW(editor->hWnd, GWL_STYLE) & ES_READONLY) return FALSE; @@ -1564,6 +1567,8 @@ ME_KeyDown(ME_TextEditor *editor, WORD nKey) return TRUE; default: + if (nKey != VK_SHIFT && nKey != VK_CONTROL && nKey && nKey != VK_MENU) + editor->nUDArrowX = -1; if (ctrl_is_down) { if (nKey == 'W')