diff --git a/edit/codemirror-editing-hooks.js b/edit/codemirror-editing-hooks.js index 5f2d16c0..d8af16d0 100644 --- a/edit/codemirror-editing-hooks.js +++ b/edit/codemirror-editing-hooks.js @@ -156,11 +156,11 @@ onDOMscriptReady('/codemirror.js').then(() => { } function nextEditor(cm) { - nextPrevEditor(cm, 1); + return nextPrevEditor(cm, 1); } function prevEditor(cm) { - nextPrevEditor(cm, -1); + return nextPrevEditor(cm, -1); } function nextPrevEditor(cm, direction) { diff --git a/edit/sections.js b/edit/sections.js index 93d5b956..15be1684 100644 --- a/edit/sections.js +++ b/edit/sections.js @@ -331,7 +331,7 @@ function nextPrevEditorOnKeydown(cm, event) { } event.preventDefault(); event.stopPropagation(); - cm = CodeMirror.commands.prevEditor.call(cm); + cm = CodeMirror.commands.prevEditor(cm); cm.setCursor(cm.doc.size - 1, key === 37 ? 1e20 : ch); break; case 39: @@ -347,7 +347,7 @@ function nextPrevEditorOnKeydown(cm, event) { } event.preventDefault(); event.stopPropagation(); - cm = CodeMirror.commands.nextEditor.call(cm); + cm = CodeMirror.commands.nextEditor(cm); cm.setCursor(0, 0); break; }