Merge from vscode 071a5cf16fc999727acc31c790d78f750fa4b166 (#5261)

This commit is contained in:
Anthony Dresser
2019-04-30 07:54:56 -07:00
committed by GitHub
parent 02916aeffa
commit aacc0eca67
24 changed files with 564 additions and 238 deletions

View File

@@ -322,15 +322,17 @@ export class CommentService extends Disposable implements ICommentService {
}
}
let commentControlResult: Promise<ICommentInfo>[] = [];
let commentControlResult: Promise<ICommentInfo | null>[] = [];
this._commentControls.forEach(control => {
commentControlResult.push(control.getDocumentComments(resource, CancellationToken.None));
commentControlResult.push(control.getDocumentComments(resource, CancellationToken.None)
.catch(e => {
console.log(e);
return null;
}));
});
let ret = [...await Promise.all(result), ...await Promise.all(commentControlResult)];
return ret;
return Promise.all([...result, ...commentControlResult]);
}
async getCommentingRanges(resource: URI): Promise<IRange[]> {