-
Notifications
You must be signed in to change notification settings - Fork 76
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
bugfix: Don't run command without clicking and fix infinite recursion #1414
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -569,9 +569,9 @@ function launchMetals( | |
commands.executeCommand(workbenchCommands.focusDiagnostics) | ||
); | ||
|
||
registerCommand(ClientCommands.RunDoctor, () => | ||
commands.executeCommand(ClientCommands.RunDoctor) | ||
); | ||
registerCommand(ClientCommands.RunDoctor, async () => { | ||
await doctorProvider.runDoctor(); | ||
}); | ||
|
||
registerCommand(ClientCommands.ToggleLogs, () => { | ||
if (channelOpen) { | ||
|
@@ -722,13 +722,7 @@ function launchMetals( | |
item.tooltip = params.tooltip; | ||
} | ||
if (params.command) { | ||
const command = params.command; | ||
item.command = params.command; | ||
commands.getCommands().then((values) => { | ||
if (values.includes(command)) { | ||
commands.executeCommand(command); | ||
} | ||
}); | ||
Comment on lines
-727
to
-731
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we use this callback, e.g. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So, this was supposed to only invoke the command if anyone clicks on the status, so I am not sure why this was done and why it only started to pop up. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But, I think we set it to status if we don't care to show it right away, otherwise we should invoke a command instead There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
} else { | ||
item.command = undefined; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how did this work before fix? 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Every time when I look at vscode's commands I have no idea what's going on. I mix server commands with client ones. Might be good idea to have some doc for clarification + some abstraction to execute server commands. to have something better than
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It didn't work before, but it seems no once clicked the status bar 😅