]> git.saurik.com Git - wxWidgets.git/blobdiff - src/richtext/richtextctrl.cpp
Removed comment
[wxWidgets.git] / src / richtext / richtextctrl.cpp
index ed5f8a08a7fbfcd6146db528a9421812d62c5ca7..622a4ef50271e3e6f78c4cdf5db4bebf3b5f9a15 100644 (file)
@@ -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()