提交 a808ce94 编写于 作者: S Sandeep Somavarapu

Fix #16492

上级 c04b0754
......@@ -60,6 +60,7 @@ export class MarkersPanel extends Panel {
private messageBox: HTMLElement;
private markerFocusContextKey: IContextKey<boolean>;
private currentFileGotAddedToMarkersData: boolean = false;
constructor(
@IInstantiationService private instantiationService: IInstantiationService,
......@@ -223,14 +224,29 @@ export class MarkersPanel extends Panel {
}
private onMarkerChanged(changedResources: URI[]) {
this.currentFileGotAddedToMarkersData = this.currentFileGotAddedToMarkersData || this.isCurrentFileGotAddedToMarkersData(changedResources);
this.updateResources(changedResources);
this.delayedRefresh.trigger(() => {
this.refreshPanel();
this.updateRangeHighlights();
this.autoReveal();
if (this.currentFileGotAddedToMarkersData) {
this.autoReveal();
this.currentFileGotAddedToMarkersData = false;
}
});
}
private isCurrentFileGotAddedToMarkersData(changedResources: URI[]) {
if (!this.currentActiveFile) {
return false;
}
const resourceForCurrentActiveFile = this.getResourceForCurrentActiveFile();
if (resourceForCurrentActiveFile) {
return false;
}
return changedResources.some(r => r.toString() === this.currentActiveFile.toString());
}
private onEditorsChanged(): void {
this.currentActiveFile = toResource(this.editorService.getActiveEditorInput(), { filter: 'file' });
this.autoReveal();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册