]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/stc/stc.h
Applied rowspan patch #15276 (dghart)
[wxWidgets.git] / include / wx / stc / stc.h
index f71fe5f77282604ff97863738aae0b7cb34a221d..c406e6a6876c267b288a163e47d042b3280d73bf 100644 (file)
@@ -4577,7 +4577,10 @@ public:
 
     */
 
-    virtual void SetInsertionPoint(long pos) { SetCurrentPos(pos); }
+    virtual void SetInsertionPoint(long pos)
+    {
+        SetCurrentPos(pos == -1 ? GetLastPosition() : pos);
+    }
     virtual long GetInsertionPoint() const { return GetCurrentPos(); }
     virtual long GetLastPosition() const { return GetTextLength(); }
 
@@ -4628,7 +4631,7 @@ public:
     // implement wxTextAreaBase pure virtual methods
     // ---------------------------------------------
 
-    virtual int GetLineLength(long n) const { return GetLine(n).length(); }
+    virtual int GetLineLength(long lineNo) const { return static_cast<int>(GetLineText(lineNo).length()); }
     virtual wxString GetLineText(long lineNo) const
     {
         wxString text = GetLine(static_cast<int>(lineNo));