X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/56d74412d9bc8d61c389ddb3919f2a03e610a376..de1b0aeb6ca71f915479d07e040b1d65e5096951:/src/mac/carbon/textctrl.cpp diff --git a/src/mac/carbon/textctrl.cpp b/src/mac/carbon/textctrl.cpp index 9e5abb2531..14e76f18f7 100644 --- a/src/mac/carbon/textctrl.cpp +++ b/src/mac/carbon/textctrl.cpp @@ -1389,6 +1389,11 @@ void wxMacUnicodeTextControl::GetSelection( long* from, long* to) const void wxMacUnicodeTextControl::SetSelection( long from , long to ) { ControlEditTextSelectionRec sel ; + if ((from == -1) && (to == -1)) + { + from = 0 ; + to = 32767 ; // sel has 16 bit signed values, max is 32767 + } sel.selStart = from ; sel.selEnd = to ; SetData( 0 , kControlEditTextSelectionTag, &sel ) ;