mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 18:19:12 +01:00
dispose empty comment thread when collapse.
This commit is contained in:
@@ -173,6 +173,14 @@ export class ExtHostComments implements ExtHostCommentsShape {
|
||||
return Promise.resolve(commentControllerHandle);
|
||||
}
|
||||
|
||||
$deleteCommentThread(commentControllerHandle: number, commentThreadHandle: number) {
|
||||
const commentController = this._commentControllers.get(commentControllerHandle);
|
||||
|
||||
if (commentController) {
|
||||
commentController.$deleteCommentThread(commentThreadHandle);
|
||||
}
|
||||
}
|
||||
|
||||
$provideCommentingRanges(commentControllerHandle: number, uriComponents: UriComponents, token: CancellationToken): Promise<IRange[] | undefined> {
|
||||
const commentController = this._commentControllers.get(commentControllerHandle);
|
||||
|
||||
@@ -764,6 +772,16 @@ class ExtHostCommentController implements vscode.CommentController {
|
||||
return commentThread;
|
||||
}
|
||||
|
||||
$deleteCommentThread(threadHandle: number) {
|
||||
let thread = this._threads.get(threadHandle);
|
||||
|
||||
if (thread) {
|
||||
thread.dispose();
|
||||
}
|
||||
|
||||
this._threads.delete(threadHandle);
|
||||
}
|
||||
|
||||
$onCommentWidgetInputChange(uriComponents: UriComponents, range: IRange, input: string) {
|
||||
if (!this.inputBox) {
|
||||
this.inputBox = new ExtHostCommentInputBox(this._proxy, this.handle, URI.revive(uriComponents), extHostTypeConverter.Range.to(range), input);
|
||||
|
||||
Reference in New Issue
Block a user