treat -1 as the last position in wxTextCtrl::SetInsertionPoint

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77809 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-09-23 17:41:36 +00:00
parent 0005984a4c
commit f172294263

View File

@@ -1304,6 +1304,9 @@ void wxTextCtrl::AppendText(const wxString& text)
void wxTextCtrl::SetInsertionPoint(wxTextPos pos)
{
if ( pos == -1 )
pos = GetLastPosition();
wxCHECK_RET( pos >= 0 && pos <= GetLastPosition(),
wxT("insertion point position out of range") );