When having a document that ends without a trailing newline 'textDocument/rename' reports a document change that contains a position outside of the document as the end position. For example a document just containing of:
foo=12
Ttriggering a rename on the beginning of foo with the replacement bar results in the following edits:
"edits": [ { "newText": "bar = 12", "range": { "end": { "character": 0, "line": 1 }, "start": { "character": 0, "line": 0 } } } ],
But the document just has one line, line 1 is out of the document scope. Expected would be
"end": { "character": 6, "line": 0 }
When having a document that ends without a trailing newline 'textDocument/rename' reports a document change that contains a position outside of the document as the end position. For example a document just containing of:
foo=12
Ttriggering a rename on the beginning of foo with the replacement bar results in the following edits:
"edits": [ { "newText": "bar = 12", "range": { "end": { "character": 0, "line": 1 }, "start": { "character": 0, "line": 0 } } } ],
But the document just has one line, line 1 is out of the document scope. Expected would be
"end": { "character": 6, "line": 0 }