hokein created this revision. hokein added a reviewer: jvikstrom. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang.
We miss a few places where we need to add them to the subscriptions. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D66881 Files: clang-tools-extra/clangd/clients/clangd-vscode/src/extension.ts Index: clang-tools-extra/clangd/clients/clangd-vscode/src/extension.ts =================================================================== --- clang-tools-extra/clangd/clients/clangd-vscode/src/extension.ts +++ clang-tools-extra/clangd/clients/clangd-vscode/src/extension.ts @@ -133,9 +133,10 @@ vscode.window.showTextDocument(doc); })); const status = new FileStatus(); + context.subscriptions.push(vscode.Disposable.from(status)); context.subscriptions.push(vscode.window.onDidChangeActiveTextEditor( () => { status.updateStatus(); })); - clangdClient.onDidChangeState(({newState}) => { + context.subscriptions.push(clangdClient.onDidChangeState(({ newState }) => { if (newState == vscodelc.State.Running) { // clangd starts or restarts after crash. clangdClient.onNotification( @@ -150,7 +151,7 @@ status.clear(); semanticHighlightingFeature.dispose(); } - }) + })); // An empty place holder for the activate command, otherwise we'll get an // "command is not registered" error. context.subscriptions.push(vscode.commands.registerCommand(
Index: clang-tools-extra/clangd/clients/clangd-vscode/src/extension.ts =================================================================== --- clang-tools-extra/clangd/clients/clangd-vscode/src/extension.ts +++ clang-tools-extra/clangd/clients/clangd-vscode/src/extension.ts @@ -133,9 +133,10 @@ vscode.window.showTextDocument(doc); })); const status = new FileStatus(); + context.subscriptions.push(vscode.Disposable.from(status)); context.subscriptions.push(vscode.window.onDidChangeActiveTextEditor( () => { status.updateStatus(); })); - clangdClient.onDidChangeState(({newState}) => { + context.subscriptions.push(clangdClient.onDidChangeState(({ newState }) => { if (newState == vscodelc.State.Running) { // clangd starts or restarts after crash. clangdClient.onNotification( @@ -150,7 +151,7 @@ status.clear(); semanticHighlightingFeature.dispose(); } - }) + })); // An empty place holder for the activate command, otherwise we'll get an // "command is not registered" error. context.subscriptions.push(vscode.commands.registerCommand(
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits