From: Vadim Zeitlin Date: Sun, 16 Sep 2007 10:55:35 +0000 (+0000) Subject: removed apparent off by 1 bug in the end line calculation in ShowPosition() (part... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/99b4164c2c8eff4441548f9d93dbdcd7891cfb90?ds=inline removed apparent off by 1 bug in the end line calculation in ShowPosition() (part of patch 1716763) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48719 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/univ/textctrl.cpp b/src/univ/textctrl.cpp index 605ac422cd..42d6364c2b 100644 --- a/src/univ/textctrl.cpp +++ b/src/univ/textctrl.cpp @@ -1965,7 +1965,7 @@ void wxTextCtrl::ShowPosition(wxTextPos pos) { // finding the last line is easy if each line has exactly // one row - yEnd = yStart + rectText.height / GetLineHeight() - 1; + yEnd = yStart + rectText.height / GetLineHeight(); } if ( yEnd < y ) @@ -2418,7 +2418,7 @@ void wxTextCtrl::UpdateTextRect() WData().m_rowFirstInvalid = 0; // increase timestamp: this means that the lines which had been - // laid out before will be relayd out the next time LayoutLines() + // laid out before will be relaid out the next time LayoutLines() // is called because their timestamp will be smaller than the // current one WData().m_timestamp++;