]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/stc/stc.h
Add a test for eol-native file existence in the release script.
[wxWidgets.git] / include / wx / stc / stc.h
index 1edf28158efae43e5eadce80305d0586b8ac9d33..a5c8ed8001bfe712f2e3caeef2dde58cf4be1817 100644 (file)
@@ -4557,8 +4557,8 @@ public:
     }
     virtual void Replace(long from, long to, const wxString& text)
     {
     }
     virtual void Replace(long from, long to, const wxString& text)
     {
-        SetTargetStart(from);
-        SetTargetEnd(to);
+        SetTargetStart((int)from);
+        SetTargetEnd((int)to);
         ReplaceTarget(text);
     }
 
         ReplaceTarget(text);
     }
 
@@ -4577,7 +4577,10 @@ public:
 
     */
 
 
     */
 
-    virtual void SetInsertionPoint(long pos) { SetCurrentPos(pos); }
+    virtual void SetInsertionPoint(long pos)
+    {
+        SetCurrentPos(int(pos == -1 ? GetLastPosition() : pos));
+    }
     virtual long GetInsertionPoint() const { return GetCurrentPos(); }
     virtual long GetLastPosition() const { return GetTextLength(); }
 
     virtual long GetInsertionPoint() const { return GetCurrentPos(); }
     virtual long GetLastPosition() const { return GetTextLength(); }
 
@@ -4589,8 +4592,8 @@ public:
         }
         else
         {
         }
         else
         {
-            SetSelectionStart(from);
-            SetSelectionEnd(to);
+            SetSelectionStart((int)from);
+            SetSelectionEnd((int)to);
         }
     }
 
         }
     }
 
@@ -4616,9 +4619,9 @@ public:
         long f, t;
         GetSelection(&f, &t);
         if ( from )
         long f, t;
         GetSelection(&f, &t);
         if ( from )
-            *from = f;
+            *from = (int)f;
         if ( to )
         if ( to )
-            *to = t;
+            *to = (int)t;
     }
 #endif
 
     }
 #endif
 
@@ -4670,14 +4673,14 @@ public:
 
     virtual long XYToPosition(long x, long y) const
     {
 
     virtual long XYToPosition(long x, long y) const
     {
-        long pos = PositionFromLine(y);
+        long pos = PositionFromLine((int)y);
         pos += x;
         return pos;
     }
 
     virtual bool PositionToXY(long pos, long *x, long *y) const
     {
         pos += x;
         return pos;
     }
 
     virtual bool PositionToXY(long pos, long *x, long *y) const
     {
-        long l = LineFromPosition(pos);
+        int l = LineFromPosition((int)pos);
         if ( l == -1 )
             return false;
 
         if ( l == -1 )
             return false;
 
@@ -4690,7 +4693,7 @@ public:
         return true;
     }
 
         return true;
     }
 
-    virtual void ShowPosition(long pos) { GotoPos(pos); }
+    virtual void ShowPosition(long pos) { GotoPos((int)pos); }
 
     // FIXME-VC6: can't use wxWindow here because of "error C2603: illegal
     //            access declaration: 'wxWindow' is not a direct base of
 
     // FIXME-VC6: can't use wxWindow here because of "error C2603: illegal
     //            access declaration: 'wxWindow' is not a direct base of