Commit 1bdcae33 authored by Jérome Perrin's avatar Jérome Perrin

monaco_editor: don't use automaticLayout for now

In monaco 0.20.0 "peek references" is not properly displayed when
automaticLayout is true. This is fixed on master branch so next release
should be OK.

For now, use a resize event handler to re-layout the editor when size
change, then we don't need the automaticLayout.
parent 6b8e263b
......@@ -31,10 +31,19 @@
{
/* because Alt+Click is LeftClick on ChromeOS */
multiCursorModifier: 'ctrlCmd',
automaticLayout: true,
autoIndent: true,
/*
until we update monaco to > 0.20.0 we cannot use automaticLayout and have a workaround
resize event handler.
https://github.com/microsoft/monaco-editor/issues/1884
*/
// automaticLayout: true,
}
);
window.addEventListener('resize', () => {
editor.layout();
});
editor.addAction({
id: 'save',
label: 'Save',
......
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