From c86e8c51cbdcdfa4b96c19e56c38571b35d12178 Mon Sep 17 00:00:00 2001 From: Charlie Humphreys Date: Wed, 10 Nov 2021 10:26:55 -0600 Subject: [PATCH] Remove code added for debugging purposes #629 --- shared/naturalcrit/codeEditor/codeEditor.jsx | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/shared/naturalcrit/codeEditor/codeEditor.jsx b/shared/naturalcrit/codeEditor/codeEditor.jsx index 2bc2b043e..6d352e854 100644 --- a/shared/naturalcrit/codeEditor/codeEditor.jsx +++ b/shared/naturalcrit/codeEditor/codeEditor.jsx @@ -43,10 +43,8 @@ const CodeEditor = createClass({ const newDoc = CodeMirror.Doc(this.props.value, this.props.language); this.codeMirror.swapDoc(newDoc); }, - getSnapshotBeforeUpdate : function() { - return _.uniq(this.codeMirror.getAllMarks().filter((mark)=>mark.__isFold).map((mark)=>mark.find().from)); - }, - componentDidUpdate : function(prevProps, prevState, snapshot) { + + componentDidUpdate : function(prevProps) { if(prevProps.view !== this.props.view){ //view changed; swap documents let newDoc; @@ -66,12 +64,6 @@ const CodeEditor = createClass({ } else if(this.codeMirror?.getValue() != this.props.value) { //update editor contents if brew.text is changed from outside this.codeMirror.setValue(this.props.value); } - - setTimeout(()=>{ - snapshot.forEach((fold)=>{ - this.codeMirror.foldCode(fold, { scanUp: false }, 'fold'); - }); - }, 0); }, buildEditor : function() {