Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Highlight not working in vscode insiders #685

Closed
Elias-Graf opened this issue Oct 18, 2022 · 2 comments · Fixed by #686
Closed

Highlight not working in vscode insiders #685

Elias-Graf opened this issue Oct 18, 2022 · 2 comments · Fixed by #686

Comments

@Elias-Graf
Copy link
Contributor

The highlight stopped working (since a few versions, actually) in the insider build.

I've verified it on my OSX system, and on my Windows machine.

  • Code insider version: 1.73.0-insider
  • todo-tree version: most recent according to the extension store (v0.0.219).

I've observed the following error in the "Extension Host" output:

2022-10-18 08:55:51.208 [error] TypeError: Class constructor Qt cannot be invoked without 'new'
	at p (/Users/elias/.vscode-insiders/extensions/gruntfuggly.todo-tree-0.0.219/dist/extension.js:99:15596)
	at /Users/elias/.vscode-insiders/extensions/gruntfuggly.todo-tree-0.0.219/dist/extension.js:99:18900
	at Array.forEach (<anonymous>)
	at Timeout.k [as _onTimeout] (/Users/elias/.vscode-insiders/extensions/gruntfuggly.todo-tree-0.0.219/dist/extension.js:99:18873)
	at listOnTimeout (node:internal/timers:561:11)
	at process.processTimers (node:internal/timers:502:7)
@Elias-Graf
Copy link
Contributor Author

The issue seem to be missing new keywords here:

todo-tree/src/highlights.js

Lines 103 to 104 in 2993e2e

lightBackgroundColour = vscode.ThemeColor( 'editor.foreground' );
lightForegroundColour = new vscode.ThemeColor( 'editor.background' );

and here:

todo-tree/src/highlights.js

Lines 109 to 110 in 2993e2e

darkBackgroundColour = vscode.ThemeColor( 'editor.foreground' );
darkForegroundColour = new vscode.ThemeColor( 'editor.background' );

Maybe that was previously allowed, but apparently not any more. Adding those two new fixes the issue. I currently don't have time to test this on multiple builds (stable etc.), but I can do that later today and submit a pull request.

@Elias-Graf
Copy link
Contributor Author

I'm actually not sure what caused this incompatibility, maybe this commit: microsoft/vscode@65c18df? I'm sadly not versed enough in those "hacky" / old JavaScript things to make a definitive statement.

Anyway, since the line below the added keyword already seemed to use new anyway, it shouldn't be an issue. Additionally, I tested it on the newest insider and release version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant