Unregister comment controller when it is disposed

This commit is contained in:
Rachel Macfarlane
2019-03-18 14:48:52 -07:00
parent 4eb16c20fc
commit 37cb23d3dd
4 changed files with 16 additions and 0 deletions

View File

@@ -121,6 +121,7 @@ export interface CommentProviderFeatures {
export interface MainThreadCommentsShape extends IDisposable {
$registerCommentController(handle: number, id: string, label: string): void;
$unregisterCommentController(handle: number): void;
$updateCommentControllerFeatures(handle: number, features: CommentProviderFeatures): void;
$createCommentThread(handle: number, commentThreadHandle: number, threadId: string, resource: UriComponents, range: IRange, comments: modes.Comment[], acceptInputCommand: modes.Command | undefined, additionalCommands: modes.Command[], collapseState: modes.CommentThreadCollapsibleState): modes.CommentThread2 | undefined;
$deleteCommentThread(handle: number, commentThreadHandle: number): void;

View File

@@ -564,6 +564,8 @@ class ExtHostCommentController implements vscode.CommentController {
this._threads.forEach(value => {
value.dispose();
});
this._proxy.$unregisterCommentController(this.handle);
}
}