Commit 891164f1 authored by Phil Hughes's avatar Phil Hughes

set `renderSideBySide` when creating diff instance

parent bc64e20c
......@@ -69,6 +69,7 @@ export default class Editor {
occurrencesHighlight: false,
renderLineHighlight: 'none',
hideCursorInOverviewRuler: true,
renderSideBySide: this.renderSideBySide(domElement),
})),
);
......@@ -177,11 +178,15 @@ export default class Editor {
if (!this.isDiffEditorType) return;
this.instance.updateOptions({
renderSideBySide: this.instance.getDomNode().offsetWidth >= 700,
renderSideBySide: this.renderSideBySide(this.instance.getDomNode()),
});
}
get isDiffEditorType() {
return this.instance.getEditorType() === 'vs.editor.IDiffEditor';
}
renderSideBySide(domElement) {
return domElement.offsetWidth >= 700;
}
}
......@@ -77,6 +77,7 @@ describe('Multi-file editor library', () => {
renderLineHighlight: 'none',
hideCursorInOverviewRuler: true,
wordWrap: 'on',
renderSideBySide: true,
});
});
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment