提交 0b6bef4b 编写于 作者: A Alex Dima

Better handling of untracked files w.r.t. dirtyDiff

上级 23458241
......@@ -102,7 +102,7 @@ class EditorWorkerClient {
let modelUrl = resource.toString();
let model = this._modelService.getModel(resource);
if (!model) {
throw new Error('Uknown model!');
return;
}
if (model.isTooLargeForHavingARichMode()) {
return;
......
......@@ -231,6 +231,12 @@ class DirtyDiffModelDecorator {
return; // disposed
}
if (!contents) {
// untracked file
this.modelService.destroyModel(this._originalContentsURI);
return this.triggerDiff();
}
let rawText = TextModel.toRawText(contents);
let originalModel = this.modelService.getModel(this._originalContentsURI);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册