Fix 2 clicks to show collapsed comments (#154365)

Fixes #153924
This commit is contained in:
Alex Ross 2022-07-07 17:40:22 +02:00 committed by GitHub
parent 4dc272701b
commit 1b8ac1d09d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -382,6 +382,7 @@ export class CommentController implements IEditorContribution {
this._commentingRangeDecorator.update(this.editor, []);
this._commentThreadRangeDecorator.update(this.editor, []);
dispose(this._commentWidgets);
this._commentWidgets = [];
}
}));

View file

@ -234,7 +234,7 @@ export class CommentsPanel extends ViewPane {
const commentToReveal = element instanceof ResourceWithCommentThreads ? element.commentThreads[0].comment.uniqueIdInThread : element.comment.uniqueIdInThread;
if (threadToReveal && isCodeEditor(editor)) {
const controller = CommentController.get(editor);
controller?.revealCommentThread(threadToReveal, commentToReveal, false);
controller?.revealCommentThread(threadToReveal, commentToReveal, true);
}
return true;