From a02b930596c98353bbc73fbbe898e99fe9133242 Mon Sep 17 00:00:00 2001 From: Kvaz1r Date: Mon, 26 Jul 2021 11:06:51 +0300 Subject: [PATCH] Fix HitTestSingleLine(Beyond) --- src/univ/textctrl.cpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/univ/textctrl.cpp b/src/univ/textctrl.cpp index d9fc2e365e..24f190a1a7 100644 --- a/src/univ/textctrl.cpp +++ b/src/univ/textctrl.cpp @@ -2884,16 +2884,7 @@ wxTextCtrlHitTestResult wxTextCtrl::HitTestLine(const wxString& line, dc.GetTextExtent(line, &width, NULL); if ( x >= width ) { - // clicking beyond the end of line is equivalent to clicking at - // the end of it, so return the last line column col = line.length(); - if ( col ) - { - // unless the line is empty and so doesn't have any column at all - - // in this case return 0, what else can we do? - col--; - } - res = wxTE_HT_BEYOND; } else if ( x < 0 )