diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index c3d56aaee2..255544eeda 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -1192,8 +1192,7 @@ long wxTextCtrl::XYToPosition(long x, long y ) const { if ( IsSingleLine() ) { - - if ( y != 0 || x >= GTKGetEntryTextLength(GTK_ENTRY(m_text)) ) + if ( y != 0 || x > GTKGetEntryTextLength(GTK_ENTRY(m_text)) ) return -1; return x;