line-start-position in text%
Returns the first position of the given line. Lines are numbered starting with 0.
Calling this method may force the recalculation of location
information if a maximum width is set for the editor, even if the editor currently has delayed refreshing (see
refresh-delayed?).
To calculate lines, if the following are true:
the editor is not displayed (see Basic Organization),
a maximum width is set for the editor, and
the editor has never been viewed
then this method ignores the editor's maximum width and any automatic line breaks it might imply. If the first two of the above conditions are true and the editor was formerly displayed, this method uses the line breaks from the most recent display of the editor. (Insertions or deletions since the display shift line breaks within the editor in the same way as items.)
See also paragraph-start-position, which
operates on paragraphs (determined by explicit newline characters)
instead of lines (determined by both explicit newline
characters and automatic line-wrapping).
( -> exact non-negative integer
send a-text line-start-position line visible?)
line : exact non-negative integer
visible? = : boolean#t
If there are fewer than line - 1 lines, the start of the
last line is returned. If line is less than 0, then
the start of the first line is returned.
If the line starts with invisible items and visible? is not
#f, the first position past the invisible items is
returned.