don't have API editor for model that are too large for ext host sync'ing, fixes #4373

This commit is contained in:
Johannes Rieken
2016-03-18 13:08:04 +01:00
parent 45320c110e
commit a1e140c8ab

View File

@@ -412,7 +412,7 @@ export class MainThreadEditorsTracker {
private _doUpdateMapping(): void {
let allModels = this._modelService.getModels();
// Same filter as in extHostDocuments
allModels.filter((model) => !model.isTooLargeForHavingARichMode());
allModels = allModels.filter((model) => !model.isTooLargeForHavingARichMode());
let allModelsMap: { [modelUri:string]: EditorCommon.IModel; } = Object.create(null);
allModels.forEach((model) => {
allModelsMap[model.getAssociatedResource().toString()] = model;
@@ -572,7 +572,7 @@ export class MainThreadEditorsTracker {
allCodeEditors.forEach((codeEditor) => {
let model = codeEditor.getModel();
if (!model) {
if (!model || model.isTooLargeForHavingARichMode()) {
return;
}