You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a region object represents a text region, it MAY contain a property named endColumn, which SHALL have an integer value equal to the column number of the last character in the region.
This specifies that the endColumn is "inclusive". However, in 3.22.2 Text regions, there are multiple references that suggest the endColumn should be "exclusive", i.e. it should point to the next column after the region.
Two examples from 3.22.2:
If endLine is the same as startLine and endColumn is the same as startColumn, the length of the region SHALL be taken to be 0.
This only makes sense if the endColumn is exclusive - if it's inclusive, you cannot represent regions of one character.
EXAMPLE 1: Suppose a text file contains the following line, on line 5:
abcde
Then the region with startLine = 5, startColumn = 3, endLine = 5, and endColumn = 6 represent the three characters cde. This is the case whether or not the line ends with a newline sequence.
endColumn is clearly specified as the column after the region here.
I am assuming that the definition in endColumn is wrong - it seems to be more consistent, and make more sense for it to be exclusive.
The text was updated successfully, but these errors were encountered:
3.22.7 endColumn property states:
This specifies that the
endColumn
is "inclusive". However, in 3.22.2 Text regions, there are multiple references that suggest theendColumn
should be "exclusive", i.e. it should point to the next column after the region.Two examples from 3.22.2:
This only makes sense if the
endColumn
is exclusive - if it's inclusive, you cannot represent regions of one character.endColumn
is clearly specified as the column after the region here.I am assuming that the definition in
endColumn
is wrong - it seems to be more consistent, and make more sense for it to be exclusive.The text was updated successfully, but these errors were encountered: