From 9081c1956fea3f8fb06c601115811632a4d4757b Mon Sep 17 00:00:00 2001 From: Tamir Bahar Date: Thu, 26 Sep 2024 21:09:19 +0300 Subject: [PATCH 1/2] Only highlight if there's more than one node. --- src/vscode/extension.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vscode/extension.ts b/src/vscode/extension.ts index 690eb3d..59e55d0 100644 --- a/src/vscode/extension.ts +++ b/src/vscode/extension.ts @@ -234,7 +234,10 @@ export async function activate(context: vscode.ExtensionContext) { } // TODO: Highlighting in the DOT is a cute trick, but might become less effective on larger functions. // So it works for now, but I'll probably need to replace it with CSS so that I only render once per function. - const nodeToHighlight = highlightCurrentNode + + // Only highlight if there's more than one node to the graph. + const shouldHighlight = highlightCurrentNode && cfg.graph.order > 1; + const nodeToHighlight = shouldHighlight ? getValue(cfg.offsetToNode, offset) : undefined; const dot = graphToDot(cfg, false, nodeToHighlight); From 8a1067a538c5c9c5919111fb0bd03f90e108fad4 Mon Sep 17 00:00:00 2001 From: Tamir Bahar Date: Thu, 26 Sep 2024 21:11:47 +0300 Subject: [PATCH 2/2] Prep for release 0.0.6 --- CHANGELOG.md | 2 ++ package.json | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index df34d67..fe989b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how ## [Unreleased] +## [0.0.6] - 2024-09-26 + ### Added - The CFG view now highlights (in black) the node matching the cursor position. diff --git a/package.json b/package.json index 51b4100..baf430b 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "//": "START EXTENSION ATTRIBUTES", "publisher": "tamir-bahar", "name": "function-graph-overview", - "version": "0.0.5", + "version": "0.0.6", "description": "Function Graph Overview", "displayName": "Function Graph Overview", "icon": "./media/icon.png", @@ -109,4 +109,4 @@ "engines": { "vscode": "^1.86.0" } -} +} \ No newline at end of file