]> git.saurik.com Git - wxWidgets.git/blobdiff - src/stc/stc.cpp
don't cache the result of IsAlwaysConnected() and don't call IsOnline() unnecessarily...
[wxWidgets.git] / src / stc / stc.cpp
index bda10615e501e2fd396dc8fc2bc84a7aa6fcb48a..e44ed9856feacf1cc5c033f4d43feff9824e096e 100644 (file)
@@ -951,7 +951,8 @@ int wxStyledTextCtrl::FindText(int minPos, int maxPos,
                      TextToFind  ft;
                      ft.chrg.cpMin = minPos;
                      ft.chrg.cpMax = maxPos;
-                     ft.lpstrText = (char*)(const char*)wx2stc(text);
+                     wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text);
+                     ft.lpstrText = (char*)(const char*)buf;
 
                      return SendMsg(2150, flags, (long)&ft);
 }
@@ -1876,6 +1877,7 @@ void wxStyledTextCtrl::OnSize(wxSizeEvent& evt) {
 }
 
 void wxStyledTextCtrl::OnMouseLeftDown(wxMouseEvent& evt) {
+    SetFocus();
     wxPoint pt = evt.GetPosition();
     m_swx->DoButtonDown(Point(pt.x, pt.y), m_stopWatch.Time(),
                       evt.ShiftDown(), evt.ControlDown(), evt.AltDown());
@@ -1910,7 +1912,8 @@ void wxStyledTextCtrl::OnMouseWheel(wxMouseEvent& evt) {
     m_swx->DoMouseWheel(evt.GetWheelRotation(),
                         evt.GetWheelDelta(),
                         evt.GetLinesPerAction(),
-                        evt.ControlDown());
+                        evt.ControlDown(),
+                        evt.IsPageScroll());
 }