提交 933e0c06 编写于 作者: B Benjamin Pasero

"Deleted from disk" indicator is removed once any new file event kicks in (fixes #29950)

上级 a76af8a6
......@@ -134,7 +134,11 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil
private onFileChanges(e: FileChangesEvent): void {
// Track ADD and DELETES for updates of this model to orphan-mode
const newInOrphanModeGuess = e.contains(this.resource, FileChangeType.DELETED) && !e.contains(this.resource, FileChangeType.ADDED);
const modelFileDeleted = e.contains(this.resource, FileChangeType.DELETED);
const modelFileAdded = e.contains(this.resource, FileChangeType.ADDED);
if (modelFileDeleted || modelFileAdded) {
const newInOrphanModeGuess = modelFileDeleted && !modelFileAdded;
if (this.inOrphanMode !== newInOrphanModeGuess) {
let checkOrphanedPromise: TPromise<boolean>;
if (newInOrphanModeGuess) {
......@@ -161,6 +165,7 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil
});
}
}
}
private setOrphaned(orphaned: boolean): void {
if (this.inOrphanMode !== orphaned) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册