Re: [Clip] What is the difference between GetRow and GetRowStart?
- joy8388608 wrote:
> ^$GetRow$Quite, but you only quoted part of the explanations. It seems ^$GetRow$
> Returns line index of cursor in current document.
> Returns the cursor line index in the current document.
and ^$GetRowStart$ really are the same thing. They all, including
^$GetRowEnd$, return the line number of the cursor position if nothing
is selected. If something is, the selection, or rather its start, takes
precedence over the cursor in the case of the older ^$GetRow$.
As the selection can cover more than one line, the more specific
^$GetRowStart$ and ^$GetRowEnd$ were defined two subversions later.
It is probably best to use the simple ^$GetRow$ for the cursor and the
other two for selections. I'd say the selection in ^$GetRow$ was
retained for compatibility so as not to break older and proven clips and
the cursor is used with the other two as a fallback when nothing is
selected rather than throwing an error. Two quite reasonable decisions,
I'd say, but they do result in some ambiguity.