Skip to content

Commit b59c844

Browse files
committed
fix/col number indication for related information
1 parent 0438765 commit b59c844

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/extension.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,13 +320,14 @@ async function runCppcheckOnFileXML(
320320
const loc = locations[locations.length - i].$;
321321
const msg = loc.info;
322322
const lLine = Number(loc.line) - 1;
323+
const lCol = Number(loc.col) - 1;
323324

324325
if (msg === null || msg === undefined || isNaN(lLine) || lLine < 0 || lLine >= document.lineCount) {
325326
continue;
326327
}
327328

328329
const relatedRange = new vscode.Range(
329-
lLine, 0,
330+
lLine, lCol,
330331
lLine, document.lineAt(lLine).text.length
331332
);
332333

0 commit comments

Comments
 (0)