X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6502dc68233119829d31d1e21fd71c58e8f0d84a..c3e57ac4ac9222d84ac208a493b57fb24e474a6a:/src/msw/textentry.cpp diff --git a/src/msw/textentry.cpp b/src/msw/textentry.cpp index 4ea98d5bb0..9c5a0fc93e 100644 --- a/src/msw/textentry.cpp +++ b/src/msw/textentry.cpp @@ -243,6 +243,11 @@ bool wxTextEntry::CanRedo() const void wxTextEntry::SetInsertionPoint(long pos) { + // calling DoSetSelection(-1, -1) would select everything which is not what + // we want here + if ( pos == -1 ) + pos = GetLastPosition(); + // be careful to call DoSetSelection() which is overridden in wxTextCtrl // and not just SetSelection() here DoSetSelection(pos, pos);