]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/stc/stc.h
synchronize GTK2 minimum version in docs
[wxWidgets.git] / include / wx / stc / stc.h
index 0ac137cae1f90d58a0a3a0a6d971c1208a5dbb5b..7956d13f8e886806e0230bd0571ee948371187d9 100644 (file)
@@ -4200,16 +4200,15 @@ public:
 
     virtual bool PositionToXY(long pos, long *x, long *y) const
     {
+        long l = LineFromPosition(pos);
+        if ( l == -1 )
+            return false;
+
         if ( x )
-            *x = -1; // TODO
+            *x = pos - PositionFromLine(l);
 
         if ( y )
-        {
-            long l = LineFromPosition(pos);
-            if ( l == -1 )
-                return false;
             *y = l;
-        }
 
         return true;
     }