mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-09 19:11:28 -05:00
fixes #15878
This commit is contained in:
@@ -44,7 +44,7 @@ export class GitContentProvider implements IWorkbenchContribution, ITextModelCon
|
||||
const treeish = gitModel.getStatus().find(path, StatusType.INDEX) ? '~' : 'HEAD';
|
||||
|
||||
return this.gitService.buffer(path, treeish)
|
||||
.then(contents => this.modelService.createModel(contents, null, uri))
|
||||
.then(contents => this.modelService.createModel(contents || '', null, uri))
|
||||
.then(model => {
|
||||
const trigger = () => {
|
||||
this.throttler.queue(() => {
|
||||
|
||||
@@ -114,12 +114,13 @@ class DirtyDiffModelDecorator {
|
||||
}
|
||||
|
||||
private diff(): winjs.Promise {
|
||||
if (!this.model || this.model.isDisposed()) {
|
||||
return winjs.TPromise.as<any>([]); // disposed
|
||||
}
|
||||
return this.originalURIPromise.then(originalURI => {
|
||||
if (!this.model || this.model.isDisposed()) {
|
||||
return winjs.TPromise.as<any>([]); // disposed
|
||||
}
|
||||
|
||||
return this.originalURIPromise
|
||||
.then(originalURI => this.editorWorkerService.computeDirtyDiff(originalURI, this.model.uri, true));
|
||||
this.editorWorkerService.computeDirtyDiff(originalURI, this.model.uri, true);
|
||||
});
|
||||
}
|
||||
|
||||
private static changesToDecorations(diff: common.IChange[]): common.IModelDeltaDecoration[] {
|
||||
|
||||
Reference in New Issue
Block a user