From: Vadim Zeitlin Date: Sat, 8 Dec 2012 13:27:55 +0000 (+0000) Subject: Also account for EOL chars correctly in wxStyledTextCtrl::GetLineLength(). X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/223862cbd39bf964c146c90cb055c5409c07d07d Also account for EOL chars correctly in wxStyledTextCtrl::GetLineLength(). Make GetLineLength() consistent with GetLineText() after the changes of r73140. Closes #13646. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73150 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/stc/stc.h b/include/wx/stc/stc.h index f71fe5f772..1edf28158e 100644 --- a/include/wx/stc/stc.h +++ b/include/wx/stc/stc.h @@ -4628,7 +4628,7 @@ public: // implement wxTextAreaBase pure virtual methods // --------------------------------------------- - virtual int GetLineLength(long n) const { return GetLine(n).length(); } + virtual int GetLineLength(long lineNo) const { return static_cast(GetLineText(lineNo).length()); } virtual wxString GetLineText(long lineNo) const { wxString text = GetLine(static_cast(lineNo)); diff --git a/src/stc/stc.h.in b/src/stc/stc.h.in index e4b3a05406..1c980ab3cc 100644 --- a/src/stc/stc.h.in +++ b/src/stc/stc.h.in @@ -370,7 +370,7 @@ public: // implement wxTextAreaBase pure virtual methods // --------------------------------------------- - virtual int GetLineLength(long n) const { return GetLine(n).length(); } + virtual int GetLineLength(long lineNo) const { return static_cast(GetLineText(lineNo).length()); } virtual wxString GetLineText(long lineNo) const { wxString text = GetLine(static_cast(lineNo));