fix cross-section cursor navigation via keyboard
This commit is contained in:
parent
526fa46edf
commit
5faff66fab
|
@ -156,11 +156,11 @@ onDOMscriptReady('/codemirror.js').then(() => {
|
||||||
}
|
}
|
||||||
|
|
||||||
function nextEditor(cm) {
|
function nextEditor(cm) {
|
||||||
nextPrevEditor(cm, 1);
|
return nextPrevEditor(cm, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
function prevEditor(cm) {
|
function prevEditor(cm) {
|
||||||
nextPrevEditor(cm, -1);
|
return nextPrevEditor(cm, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
function nextPrevEditor(cm, direction) {
|
function nextPrevEditor(cm, direction) {
|
||||||
|
|
|
@ -331,7 +331,7 @@ function nextPrevEditorOnKeydown(cm, event) {
|
||||||
}
|
}
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
cm = CodeMirror.commands.prevEditor.call(cm);
|
cm = CodeMirror.commands.prevEditor(cm);
|
||||||
cm.setCursor(cm.doc.size - 1, key === 37 ? 1e20 : ch);
|
cm.setCursor(cm.doc.size - 1, key === 37 ? 1e20 : ch);
|
||||||
break;
|
break;
|
||||||
case 39:
|
case 39:
|
||||||
|
@ -347,7 +347,7 @@ function nextPrevEditorOnKeydown(cm, event) {
|
||||||
}
|
}
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
cm = CodeMirror.commands.nextEditor.call(cm);
|
cm = CodeMirror.commands.nextEditor(cm);
|
||||||
cm.setCursor(0, 0);
|
cm.setCursor(0, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user