From 3e675fa75e2aa7805ad8b9924f407fa8af94ba27 Mon Sep 17 00:00:00 2001 From: Kvaz1r Date: Mon, 26 Jul 2021 11:10:20 +0300 Subject: [PATCH] Fix HitTestSingleLine(Scrolled) --- src/univ/textctrl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/univ/textctrl.cpp b/src/univ/textctrl.cpp index 24f190a1a7..c8f6884599 100644 --- a/src/univ/textctrl.cpp +++ b/src/univ/textctrl.cpp @@ -2459,7 +2459,7 @@ void wxTextCtrl::UpdateLastVisible() return; // use (efficient) HitTestLine to find the last visible character - wxString text = m_value.Mid((size_t)SData().m_colStart /* to the end */); + wxString text = m_value;//m_value.Mid((size_t)SData().m_colStart /* to the end */); wxTextCoord col; switch ( HitTestLine(text, m_rectText.width, &col) ) { @@ -3379,7 +3379,7 @@ void wxTextCtrl::ScrollText(wxTextCoord col) SData().m_colStart = col; // after changing m_colStart, recalc the last visible position: we need - // to recalc the last visible position beore scrolling in order to make + // to recalc the last visible position before scrolling in order to make // it appear exactly at the right edge of the text area after scrolling UpdateLastVisible();