From b8aa42d9527f48bb54ecc59230c046a3b2dbe588 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 17 Feb 2017 17:24:14 +0100 Subject: [PATCH] Restrict lines rendered by CodeMirror again Setting it to anything but the default value only makes sense if one wants to utilize the browser-search, but this comes with a significant performance penalty when dealing with very large documents. CodeMirror offers an own search that works perfectly smooth with these documents, without crippling the browser performance. --- wcfsetup/install/files/acp/templates/codemirror.tpl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wcfsetup/install/files/acp/templates/codemirror.tpl b/wcfsetup/install/files/acp/templates/codemirror.tpl index fc11194be1..9f31a56a2a 100644 --- a/wcfsetup/install/files/acp/templates/codemirror.tpl +++ b/wcfsetup/install/files/acp/templates/codemirror.tpl @@ -43,8 +43,7 @@ indentWithTabs: true, lineNumbers: true, indentUnit: 4, - readOnly: {if !$editable|isset || $editable}false{else}true{/if}, - viewportMargin: Infinity + readOnly: {if !$editable|isset || $editable}false{else}true{/if} }; [].forEach.call(elements, function (element) { -- 2.20.1