Remove inappropriate assertion

New line is not always marked by 2-character (\r\n) sequence. It can be
also 1-character (\r) for RichText controls or even no mark at all (for
wrapped line).
This commit is contained in:
Artur Wieczorek
2017-08-28 18:49:50 +02:00
parent 5d79ab82ce
commit 70fe9f3291

View File

@@ -1557,7 +1557,8 @@ bool wxTextCtrl::PositionToXY(long pos, long *x, long *y) const
// so we need to take into account new line characters which were
// not counted by EM_LINELENGTH.
long lineLengthFull = charIndexNextLn - charIndex;
wxASSERT(lineLengthFull - lineLength == 2); // In case.
// (lineLengthFull - lineLength) can be 0 (for wrapped line),
// 1 (for \r new line mark) or 2 (for \r\n new line mark).
if ( pos > lineLengthFull )
{
return false;