X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ab52bac815bed0189bb0ba3b52a15e093c354533..059d234d4176165d975048eaa5436ef40af7d037:/src/richtext/richtextctrl.cpp diff --git a/src/richtext/richtextctrl.cpp b/src/richtext/richtextctrl.cpp index ed5f8a08a7..622a4ef502 100644 --- a/src/richtext/richtextctrl.cpp +++ b/src/richtext/richtextctrl.cpp @@ -692,23 +692,7 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event) if (event.GetEventType() == wxEVT_KEY_DOWN) { - if (event.GetKeyCode() == WXK_LEFT || - event.GetKeyCode() == WXK_RIGHT || - event.GetKeyCode() == WXK_UP || - event.GetKeyCode() == WXK_DOWN || - event.GetKeyCode() == WXK_HOME || - event.GetKeyCode() == WXK_PAGEUP || - event.GetKeyCode() == WXK_PAGEDOWN || - event.GetKeyCode() == WXK_END || - - event.GetKeyCode() == WXK_NUMPAD_LEFT || - event.GetKeyCode() == WXK_NUMPAD_RIGHT || - event.GetKeyCode() == WXK_NUMPAD_UP || - event.GetKeyCode() == WXK_NUMPAD_DOWN || - event.GetKeyCode() == WXK_NUMPAD_HOME || - event.GetKeyCode() == WXK_NUMPAD_PAGEUP || - event.GetKeyCode() == WXK_NUMPAD_PAGEDOWN || - event.GetKeyCode() == WXK_NUMPAD_END) + if (event.IsKeyInCategory(WXK_CATEGORY_NAVIGATION)) { KeyboardNavigate(event.GetKeyCode(), flags); return; @@ -2532,6 +2516,8 @@ void wxRichTextCtrl::SetInsertionPoint(long pos) m_caretPosition = pos - 1; PositionCaret(); + + SetDefaultStyleToCursorStyle(); } void wxRichTextCtrl::SetInsertionPointEnd()