From 0c0d817cc272fdcab713036916157765fdf4fe21 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Thu, 2 Jun 2022 13:49:27 +1200 Subject: [PATCH] Add scrollPastEnd to CodeMirror --- shared/naturalcrit/codeEditor/codeEditor.jsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/shared/naturalcrit/codeEditor/codeEditor.jsx b/shared/naturalcrit/codeEditor/codeEditor.jsx index 42076ed76..e09ea34a9 100644 --- a/shared/naturalcrit/codeEditor/codeEditor.jsx +++ b/shared/naturalcrit/codeEditor/codeEditor.jsx @@ -30,6 +30,8 @@ if(typeof navigator !== 'undefined'){ // require('codemirror/addon/edit/trailingspace.js'); //Active line highlighting // require('codemirror/addon/selection/active-line.js'); + //Scroll past last line + require('codemirror/addon/scroll/scrollpastend.js'); //Auto-closing //XML code folding is a requirement of the auto-closing tag feature and is not enabled require('codemirror/addon/fold/xml-fold.js'); @@ -98,7 +100,10 @@ const CodeEditor = createClass({ indentWithTabs : true, tabSize : 2, historyEventDelay : 250, + scrollPastEnd : true, extraKeys : { + // 'Alt-Left' : this.moveSource, + // 'Alt-Right' : this.moveBrew, 'Ctrl-B' : this.makeBold, 'Cmd-B' : this.makeBold, 'Ctrl-I' : this.makeItalic,