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:
Vadim Zeitlin
2003-08-31 21:09:27 +00:00
parent 60ab0c52e3
commit 8f387d13ff

View File

@@ -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);
}