Got tasks and launch setup all gucci, and the error squiggle goes to the end ofthe line now 👌

This commit is contained in:
Noah Santschi-Cooney 2018-06-12 23:49:52 +01:00
parent fef2130bb9
commit 8c3f0e3e2c
No known key found for this signature in database
GPG key ID: 3B22282472C8AE48
4 changed files with 57 additions and 77 deletions

View file

@ -82,7 +82,7 @@ function lint(text: string, uri: string) {
function calcRange(lineNum: number, uri: string): Range {
const line = documents.get(uri).getText().split('\n')[lineNum - 1]
return Range.create(lineNum - 1, line.length - line.leftTrim().length, lineNum - 1, prepareLine(line).length)
return Range.create(lineNum - 1, line.length - line.leftTrim().length, lineNum - 1, prepareLine(line).length + 1)
}
function prepareLine(line: string): string {