Skip to content

Commit

Permalink
Merge pull request #17 from kieler/cfr/broken-sync
Browse files Browse the repository at this point in the history
fix(klighd-vscode): sync with editor is not toggled
  • Loading branch information
christoph-fricke authored Sep 25, 2021
2 parents 1801b9a + 93c621b commit 3e1fa08
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 3e1fa08

Please sign in to comment.