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
This seems like an off-by-one error possibly caused by using 1-based indexing instead of 0. Note that the language-server specification says that offset (0-based) should be used for "line" and "character":
A position inside a document (see Position definition below) is expressed as a zero-based line and character offset. The offsets are based on a UTF-16 string representation. So a string of the form a𐐀b the character offset of the character a is 0, the character offset of 𐐀 is 1 and the character offset of b is 3 since 𐐀 is represented using two code units in UTF-16.
#394 is related but this is slightly different since a hover is being returned for two lines above at the end of the line rather than no hover being returned at all.
The text was updated successfully, but these errors were encountered:
This is a result of out considering white space as being associated with the preceding token rather than an off by one error. In the above example we'd consider the position (4,0) to be that between the second \n and s below and the hover request handler associates it with the token to the left (including the trailing white space). It probably should ignore the white space aspect of the token (it's a trivial change, #426).
Save the following in a file:
When associating a language server with the file and hovering over the
first character in line 5 (the "s" in "size"), one sees the following:
This seems like an off-by-one error possibly caused by using 1-based indexing instead of 0. Note that the language-server specification says that offset (0-based) should be used for "line" and "character":
#394 is related but this is slightly different since a hover is being returned for two lines above at the end of the line rather than no hover being returned at all.
The text was updated successfully, but these errors were encountered: