]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/textctrl.cpp
if the wxTextCtrl is empty set by SetInsertionPointEnd to 0 and not to -1.
[wxWidgets.git] / src / gtk1 / textctrl.cpp
index d7e77bbc56dfee85284411259025410585384801..7373c0ad2cf85c440300b569a76a0fdb60f98133 100644 (file)
@@ -414,7 +414,7 @@ void wxTextCtrl::SetInsertionPointEnd()
     pos = gtk_text_get_length( GTK_TEXT(m_text) );
   else
     pos = GTK_ENTRY(m_text)->text_length;
-  SetInsertionPoint( pos-1 );
+  SetInsertionPoint((pos-1)>0 ? (pos-1):0);
 }
 
 void wxTextCtrl::SetEditable( bool editable )