From b59c844144116668a03d50127f4c6da33ddf49cf Mon Sep 17 00:00:00 2001 From: davidramnero Date: Mon, 15 Dec 2025 22:44:42 +0100 Subject: [PATCH] fix/col number indication for related information --- src/extension.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/extension.ts b/src/extension.ts index 8d507dc..971dc01 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -320,13 +320,14 @@ async function runCppcheckOnFileXML( const loc = locations[locations.length - i].$; const msg = loc.info; const lLine = Number(loc.line) - 1; + const lCol = Number(loc.col) - 1; if (msg === null || msg === undefined || isNaN(lLine) || lLine < 0 || lLine >= document.lineCount) { continue; } const relatedRange = new vscode.Range( - lLine, 0, + lLine, lCol, lLine, document.lineAt(lLine).text.length );