Correct me if I'm wrong here. Let's consider an example of file with 2 lines:
ABC
DEFG
now I delete newline between C and D so it looks like:
ABCDEFG
that means the character at index 3 of line index 0 is replaced with empty string. It looks like proper values for this operation (according to a discussion in Clarification needed for TextDocumentContentChangeEvent · Issue #53 · microsoft/language-server-protocol · GitHub) are:
{
'range': {
'start': {'line': 0, 'character': 3},
'end': {'line': 1, 'character': 0}
},
'rangeLength': 1,
'text': ''
}
it is less intuitive and harder to calculate.
Now... the sourcekit-lsp will accept these values:
{
'range': {
'start': {'line': 0, 'character': 3},
'end': {'line': 0, 'character': 4}
},
'rangeLength': 1,
'text': ''
}
and will work just fine. I'm ok with that tbh, however, the question is... is this accidental behavior or not? Some servers declare that it just ignore an end range value - it looks to me that this is the case (didn't check the sources) for sourcekit-lsp as well.