X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/07601f59450069025a45bd25de6961c8544f6449..6ceef8efe9e38313dba9f7c8a64efcb344a0056e:/src/msw/textctrl.cpp diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 4ba1eafe20..53f74e07fd 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -5,8 +5,8 @@ // Modified by: // Created: 04/01/98 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -914,6 +914,14 @@ void wxTextCtrl::SetInsertionPoint(long pos) void wxTextCtrl::SetInsertionPointEnd() { + // we must not do anything if the caret is already there because calling + // SetInsertionPoint() thaws the controls if Freeze() had been called even + // if it doesn't actually move the caret anywhere and so the simple fact of + // doing it results in horrible flicker when appending big amounts of text + // to the control in a few chunks (see DoAddText() test in the text sample) + if ( GetInsertionPoint() == GetLastPosition() ) + return; + long pos; #if wxUSE_RICHEDIT