Fix highlight region end column calculation (#1210)

This commit is contained in:
Charis Kyriakou
2022-03-16 09:47:09 +00:00
committed by GitHub
parent 46a1dd57f4
commit 8cc2f598eb
2 changed files with 5 additions and 2 deletions

View File

@@ -169,7 +169,10 @@ function getHighlightedRegion(region: sarif.Region): HighlightedRegion {
startLine,
startColumn,
endLine,
endColumn
// parseSarifRegion currently shifts the end column by 1 to account
// for the way vscode counts columns so we need to shift it back.
endColumn: endColumn + 1
};
}

View File

@@ -579,7 +579,7 @@ describe('SARIF processing', () => {
startLine: 35,
startColumn: 20,
endLine: 35,
endColumn: 59
endColumn: 60
}
});
expect(message.tokens[2].t).to.equal('text');