trivial speed-ups for the single editor case
This commit is contained in:
parent
d10e83d15c
commit
31fd551264
|
@ -455,6 +455,9 @@ function removeAreaAndSetDirty(area) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function makeSectionVisible(cm) {
|
function makeSectionVisible(cm) {
|
||||||
|
if (editors.length === 1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const section = cm.getSection();
|
const section = cm.getSection();
|
||||||
const bounds = section.getBoundingClientRect();
|
const bounds = section.getBoundingClientRect();
|
||||||
if (
|
if (
|
||||||
|
|
|
@ -146,6 +146,8 @@ function createSourceEditor(style) {
|
||||||
CodeMirror.commands.nextEditor = cm => nextPrevMozDocument(cm, 1);
|
CodeMirror.commands.nextEditor = cm => nextPrevMozDocument(cm, 1);
|
||||||
CodeMirror.commands.toggleStyle = toggleStyle;
|
CodeMirror.commands.toggleStyle = toggleStyle;
|
||||||
CodeMirror.commands.save = save;
|
CodeMirror.commands.save = save;
|
||||||
|
|
||||||
|
CodeMirror.closestVisible = () => cm;
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateMeta() {
|
function updateMeta() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user