From 4b4adb1cc924ba086a89b309869690903b776d6c Mon Sep 17 00:00:00 2001 From: silverwind Date: Wed, 19 Oct 2022 22:12:37 +0200 Subject: [PATCH] Enable Monaco automaticLayout (#21516) Enable [`automaticLayout`](https://microsoft.github.io/monaco-editor/api/interfaces/monaco.editor.IDiffEditorOptions.html#automaticLayout) for monaco so it can reflow itself. Fixes: https://github.com/go-gitea/gitea/issues/21508 --- web_src/js/features/codeeditor.js | 1 + 1 file changed, 1 insertion(+) diff --git a/web_src/js/features/codeeditor.js b/web_src/js/features/codeeditor.js index a22043c9d4..e848fb53c7 100644 --- a/web_src/js/features/codeeditor.js +++ b/web_src/js/features/codeeditor.js @@ -17,6 +17,7 @@ const baseOptions = { rulers: false, scrollbar: {horizontalScrollbarSize: 6, verticalScrollbarSize: 6}, scrollBeyondLastLine: false, + automaticLayout: true, }; function getEditorconfig(input) {