X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/56d74412d9bc8d61c389ddb3919f2a03e610a376..9e03e02d0ca493bc65f083600f1427d2ac8028ff:/src/mac/carbon/textctrl.cpp diff --git a/src/mac/carbon/textctrl.cpp b/src/mac/carbon/textctrl.cpp index 9e5abb2531..58e7befd83 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 ) ; @@ -2762,7 +2767,8 @@ wxMacMLTEHIViewControl::wxMacMLTEHIViewControl( wxTextCtrl *wxPeer, wxString st = str ; wxMacConvertNewlines10To13( &st ) ; - HIRect hr = { bounds.left , bounds.top , bounds.right - bounds.left , bounds.bottom- bounds.top } ; + HIRect hr = { { bounds.left , bounds.top} , + { bounds.right - bounds.left , bounds.bottom - bounds.top} } ; m_scrollView = NULL ; TXNFrameOptions frameOptions = FrameOptionsFromWXStyle( style ) ;