Skip to content

Commit

Permalink
Enable Monaco automaticLayout (go-gitea#21515)
Browse files Browse the repository at this point in the history
  • Loading branch information
silverwind authored Oct 20, 2022
1 parent fbcf1ab commit fe442db
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions web_src/js/features/codeeditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const baseOptions = {
rulers: false,
scrollbar: {horizontalScrollbarSize: 6, verticalScrollbarSize: 6},
scrollBeyondLastLine: false,
automaticLayout: true,
};

function getEditorconfig(input) {
Expand Down Expand Up @@ -111,10 +112,6 @@ export async function createMonaco(textarea, filename, editorOpts) {
textarea.dispatchEvent(new Event('change')); // seems to be needed for jquery-are-you-sure
});

window.addEventListener('resize', () => {
editor.layout();
});

exportEditor(editor);

const loading = document.querySelector('.editor-loading');
Expand Down

0 comments on commit fe442db

Please sign in to comment.