|
|
@@ -114,9 +114,6 @@ export default class CodeMirrorEditor extends AbstractEditor {
|
|
|
componentDidMount() {
|
|
|
// ensure to be able to resolve 'this' to use 'codemirror.commands.save'
|
|
|
this.getCodeMirror().codeMirrorEditor = this;
|
|
|
-
|
|
|
- // initialize caret line
|
|
|
- this.setCaretLine(0);
|
|
|
}
|
|
|
|
|
|
componentWillReceiveProps(nextProps) {
|
|
|
@@ -182,6 +179,8 @@ export default class CodeMirrorEditor extends AbstractEditor {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ console.log('setCaretLine');
|
|
|
+
|
|
|
const editor = this.getCodeMirror();
|
|
|
const linePosition = Math.max(0, line);
|
|
|
|