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:
@@ -775,9 +775,10 @@ int wxTextWidgetImpl::GetLineLength(long lineNo) const
|
|||||||
count = 0;
|
count = 0;
|
||||||
for (size_t j = i; j < content.length(); j++)
|
for (size_t j = i; j < content.length(); j++)
|
||||||
{
|
{
|
||||||
count++;
|
|
||||||
if (content[j] == '\n')
|
if (content[j] == '\n')
|
||||||
return count;
|
return count;
|
||||||
|
|
||||||
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return count;
|
return count;
|
||||||
|
Reference in New Issue
Block a user