Returns the line number of the line containing a given position.
See section for a discussion of at-eol?.