]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/textctrl.cpp
fixed TREE_ITEM_MENU generation from right mouse clicks: don't pass WM_RBUTTONDOWN...
[wxWidgets.git] / src / motif / textctrl.cpp
index b604bab9e4d8955a282b1e60c95cb718f333fecf..06e42ff6c7272a8a9020a86febdcc4f3049ae640 100644 (file)
@@ -392,7 +392,7 @@ void wxTextCtrl::SetSelection(long from, long to)
 
 void wxTextCtrl::WriteText(const wxString& text)
 {
-    long textPosition = GetInsertionPoint() + strlen (text);
+    long textPosition = GetInsertionPoint() + text.length();
     XmTextInsert ((Widget) m_mainWidget, GetInsertionPoint(),
                   wxConstCast(text.c_str(), char));
     XtVaSetValues ((Widget) m_mainWidget, XmNcursorPosition, textPosition, NULL);