fix indicator when auto save is turned on

This commit is contained in:
Benjamin Pasero 2019-11-12 18:41:43 +01:00
parent 21c09314a8
commit 2d71ad39e0

View file

@ -42,11 +42,11 @@ export class DirtyFilesIndicator extends Disposable implements IWorkbenchContrib
}
private onWorkingCopyDidChangeDirty(copy: IWorkingCopy): void {
if (!!(copy.capabilities & WorkingCopyCapabilities.AutoSave) && this.autoSaveConfigurationService.getAutoSaveMode() === AutoSaveMode.AFTER_SHORT_DELAY) {
return; // do not indicate changes to working copies that are auto saved after short delay
const gotDirty = copy.isDirty();
if (gotDirty && !!(copy.capabilities & WorkingCopyCapabilities.AutoSave) && this.autoSaveConfigurationService.getAutoSaveMode() === AutoSaveMode.AFTER_SHORT_DELAY) {
return; // do not indicate dirty of working copies that are auto saved after short delay
}
const gotDirty = copy.isDirty();
if (gotDirty || this.hasDirtyCount) {
this.updateActivityBadge();
}