Fix off by one error in wxTextCtrl::GetLineLength() in wxOSX.
The trailing new line shouldn't be counted in the line length. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68464 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
d641b2d2a0
commit
2d5c15163a
@ -775,9 +775,10 @@ int wxTextWidgetImpl::GetLineLength(long lineNo) const
|
||||
count = 0;
|
||||
for (size_t j = i; j < content.length(); j++)
|
||||
{
|
||||
count++;
|
||||
if (content[j] == '\n')
|
||||
return count;
|
||||
|
||||
count++;
|
||||
}
|
||||
|
||||
return count;
|
||||
|
Loading…
Reference in New Issue
Block a user