From bfcb29ff9c4a7de70671f02d0195782919988751 Mon Sep 17 00:00:00 2001 From: Sean Robertson Date: Tue, 5 Oct 2021 10:50:13 +1300 Subject: [PATCH] Reduce CodeMirror codeEditor `historyEventDelay` to 250 --- shared/naturalcrit/codeEditor/codeEditor.jsx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/shared/naturalcrit/codeEditor/codeEditor.jsx b/shared/naturalcrit/codeEditor/codeEditor.jsx index 5d00cc04c..9cf4fe0e2 100644 --- a/shared/naturalcrit/codeEditor/codeEditor.jsx +++ b/shared/naturalcrit/codeEditor/codeEditor.jsx @@ -40,13 +40,14 @@ const CodeEditor = createClass({ buildEditor : function() { this.codeMirror = CodeMirror(this.refs.editor, { - value : this.props.value, - lineNumbers : true, - lineWrapping : this.props.wrap, - mode : this.props.language, //TODO: CSS MODE DOESN'T SEEM TO LOAD PROPERLY - indentWithTabs : true, - tabSize : 2, - extraKeys : { + value : this.props.value, + lineNumbers : true, + lineWrapping : this.props.wrap, + mode : this.props.language, //TODO: CSS MODE DOESN'T SEEM TO LOAD PROPERLY + indentWithTabs : true, + tabSize : 2, + historyEventDelay : 250, + extraKeys : { 'Ctrl-B' : this.makeBold, 'Cmd-B' : this.makeBold, 'Ctrl-I' : this.makeItalic,