提交 0c97949d 编写于 作者: P Peng Lyu

Fix Microsoft/vscode-pull-request-github#182. Remove all decorations when...

Fix Microsoft/vscode-pull-request-github#182. Remove all decorations when there is no comment avail.
上级 01a50ac5
......@@ -64,6 +64,10 @@ export const overviewRulerCommentingRangeForeground = registerColor('editorGutte
class CommentingRangeDecoration {
private _decorationId: string;
get id(): string {
return this._decorationId;
}
constructor(private _editor: ICodeEditor, private _ownerId: number, private _range: IRange, private _reply: modes.Command, commentingOptions: ModelDecorationOptions) {
const startLineNumber = _range.startLineNumber;
const endLineNumber = _range.endLineNumber;
......@@ -133,6 +137,9 @@ class CommentingRangeDecorator {
});
}
let oldDecorations = this.commentingRangeDecorations.map(decoration => decoration.id);
editor.deltaDecorations(oldDecorations, []);
this.commentingRangeDecorations = commentingRangeDecorations;
}
......@@ -496,6 +503,8 @@ export class ReviewController implements IEditorContribution {
zone.dispose();
});
this._commentWidgets = [];
this._commentInfos.forEach(info => {
info.threads.forEach(thread => {
let zoneWidget = new ReviewZoneWidget(this.instantiationService, this.modeService, this.modelService, this.themeService, this.commentService, this.openerService, this.editor, info.owner, thread, {});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册