git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55732
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
void wxTextEntry::SetInsertionPoint(long pos)
{
void wxTextEntry::SetInsertionPoint(long pos)
{
+ // calling DoSetSelection(-1, -1) would select everything which is not what
+ // we want here
+ if ( pos == -1 )
+ pos = GetLastPosition();
+
// be careful to call DoSetSelection() which is overridden in wxTextCtrl
// and not just SetSelection() here
DoSetSelection(pos, pos);
// be careful to call DoSetSelection() which is overridden in wxTextCtrl
// and not just SetSelection() here
DoSetSelection(pos, pos);