Skip to content

Commit

Permalink
fix(klighd-vscode): sync with editor is not toggled
Browse files Browse the repository at this point in the history
A rename proposed for #13 caused this problem, since "in" checks are not correctly refactored.
  • Loading branch information
christoph-fricke committed Sep 23, 2021
1 parent 1801b9a commit 93c621b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions applications/klighd-vscode/src/klighd-extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,17 +227,15 @@ export class KLighDExtension extends SprottyLspVscodeExtension {
this.context.subscriptions.push(
commands.registerCommand(command.diagramSync, () => {
const activeWebview = this.findActiveWebview();
if (activeWebview && "toggleEditorSync" in activeWebview) {
(activeWebview as KLighDWebview).setSyncWithEditor(true);
}

(activeWebview as KLighDWebview)?.setSyncWithEditor?.(true);
})
);
this.context.subscriptions.push(
commands.registerCommand(command.diagramNoSync, () => {
const activeWebview = this.findActiveWebview();
if (activeWebview && "toggleEditorSync" in activeWebview) {
(activeWebview as KLighDWebview).setSyncWithEditor(false);
}

(activeWebview as KLighDWebview)?.setSyncWithEditor?.(false);
})
);
}
Expand Down

0 comments on commit 93c621b

Please sign in to comment.