added editor options to redcue EE conflicts

This commit is contained in:
Phil Hughes 2017-11-29 10:26:35 +00:00
parent d22bb0397b
commit 1880809d8e
No known key found for this signature in database
GPG key ID: 32245528C52E0F9F
3 changed files with 19 additions and 0 deletions

View file

@ -2,6 +2,7 @@ import DecorationsController from './decorations/controller';
import DirtyDiffController from './diff/controller';
import Disposable from './common/disposable';
import ModelManager from './common/model_manager';
import editorOptions from './editor_options';
export default class Editor {
static create(monaco) {
@ -49,6 +50,15 @@ export default class Editor {
this.currentModel = model;
this.instance.updateOptions(editorOptions.reduce((acc, obj) => {
Object.keys(obj).forEach((key) => {
Object.assign(acc, {
[key]: obj[key](model),
});
});
return acc;
}, {}));
this.dirtyDiffController.reDecorate(model);
}

View file

@ -0,0 +1,2 @@
export default [{
}];

View file

@ -0,0 +1,7 @@
import editorOptions from '~/repo/lib/editor_options';
describe('Multi-file editor library editor options', () => {
it('returns an array', () => {
expect(editorOptions).toEqual(jasmine.any(Array));
});
});