nicollasricas / vscode-deck

Enables Stream Deck integration with Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=nicollasr.vscode-streamdeck
MIT License
81 stars 11 forks source link

Restart only when extension configuration updated #46

Open notherno opened 1 year ago

notherno commented 1 year ago

What I changed

Compare changes of ExtensionConfiguration object and call extensionController.configurationChanged only when ExtensionConfiguration is updated.

This change includes a refactor of ExtensionConfiguration.

Why

VS Code's ConfigurationChangeEvent is triggered every time when the configuration of workspace updates.

This may cause the unintentional extension restart, for example: workbench.action.zoomIn triggers this kind of event and the extension restarts when executed by a button-press.

Restarts of the extension is necessary when the configuration of the extension, thus this change compares a change of ExtensionConfiguration and trigger restarts only when the extension configuration is updated.

Related issues

fixes https://github.com/nicollasricas/vscode-deck/issues/36