don't return \n from GetLineText() neither
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23334 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1291,6 +1291,13 @@ wxString wxTextCtrl::GetLineText(long lineNo) const
|
||||
}
|
||||
#endif // wxUSE_RICHEDIT
|
||||
|
||||
// remove the '\n' at the end, if any (this is how this function is
|
||||
// supposed to work according to the docs)
|
||||
if ( buf[len - 1] == _T('\n') )
|
||||
{
|
||||
len--;
|
||||
}
|
||||
|
||||
buf[len] = 0;
|
||||
tmp.SetLength(len);
|
||||
}
|
||||
|
Reference in New Issue
Block a user