linePos subcommand ?-w win? ?{pos1 ?pos2?}?
Return the beginning or end positions of the line(s) containing the range specified by the last argument. The value of the last argument can be a single position or a list of two positions representing an interval. If it is not specified, the command applies to the current insertion position of the document. The provided positions pos1 and pos2 are adjusted if necessary to ensure that their range is within the bounds of the document. If pos1 only is specified, pos2 is assumed equal to pos1. Different positions can be obtained depending on the specified subcommand. Possible values are:
startPosition of the first character of the line containing the beginning of the range.
endPosition of the first character of the terminator of the line containing the end of the range.
nextPosition of the first character past the terminator of the line containing the end of the range.
rangeInterval of positions representing the line(s) containing the range, including the line termination characters.
allAll three positions: start, end and next in that order.
A line is delimited by any of these characters, the longest possible sequence being preferred to any shorter: