From eccf3433eaf4201812fcd9b539b2cf7790f3bd0b Mon Sep 17 00:00:00 2001 From: Alex Ross Date: Wed, 27 Apr 2022 12:09:13 +0200 Subject: [PATCH] Fix comments view not always opening on first file Fixes #148208 --- .../contrib/comments/browser/commentsEditorContribution.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts b/src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts index 5d80b0e5dfd..3a6c877b2fa 100644 --- a/src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts +++ b/src/vs/workbench/contrib/comments/browser/commentsEditorContribution.ts @@ -633,9 +633,7 @@ export class CommentController implements IEditorContribution { this._commentThreadRangeDecorator.update(this.editor, commentInfo); })); - this.beginCompute().then(() => { - return this.openCommentsView(); - }); + this.beginCompute(); } private async openCommentsView() { @@ -656,6 +654,7 @@ export class CommentController implements IEditorContribution { const zoneWidget = this.instantiationService.createInstance(ReviewZoneWidget, this.editor, owner, thread, pendingComment); zoneWidget.display(thread.range.endLineNumber); this._commentWidgets.push(zoneWidget); + this.openCommentsView(); } private onEditorMouseDown(e: IEditorMouseEvent): void {