Converts (X, Y) position of the caret to zero-based text position.
function CaretPosToStrPos(const p: TPoint): integer;
TCustomSyntaxMemo Methods