X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6f67e6d2e46f53606af07f8a861901ce44fd18b1..7344108e8a129a3f9b4df5ab0f98a1713db03b89:/include/wx/stc/stc.h diff --git a/include/wx/stc/stc.h b/include/wx/stc/stc.h index 0ac137cae1..7956d13f8e 100644 --- a/include/wx/stc/stc.h +++ b/include/wx/stc/stc.h @@ -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; }