Fix highlight region end column calculation (#1210)
This commit is contained in:
@@ -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
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user