diff --git a/CHANGELOG.md b/CHANGELOG.md index 2205784..dfab2f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +## [0.17.2] + +- Fixed the heat map visualisation when using the MOJO binary format with + Python versions earlier than 3.11. + ## [0.17.1] - Fixed a visualisation bug that caused some frames to be aggregated incorrectly diff --git a/package.json b/package.json index a961d78..fc43f12 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "displayName": "Austin VS Code", "publisher": "p403n1x87", "description": "Austin extension for VS Code", - "version": "0.17.1", + "version": "0.17.2", "engines": { "vscode": "^1.57.0" }, diff --git a/src/view.ts b/src/view.ts index b7e8786..39842a7 100644 --- a/src/view.ts +++ b/src/view.ts @@ -72,10 +72,11 @@ function setLineHeat(frame: FrameObject, own: number, total: number, overallTota if (!columnDelta) { editor.setDecorations(lineDecorator, [new vscode.Range( editor.document.lineAt(frame.line - 1).range.start, - editor.document.lineAt((frame.lineEnd ? frame.lineEnd : frame.line) - 1).range.end + editor.document.lineAt((frame.lineEnd ? Math.max(frame.lineEnd, frame.line) : frame.line) - 1).range.end )]); } else { + // If we have column data we must have full line data too. let start = new vscode.Position(Math.max(frame.line - 1, 0), Math.max(frame.column! - 1, 0)); let end = new vscode.Position(Math.max(frame.lineEnd! - 1, 0), Math.max(frame.columnEnd! - 1, 0)); editor.setDecorations(lineDecorator, [new vscode.Range(start, end)]); @@ -166,7 +167,7 @@ export function setLinesHeat(locations: Map