unbind 'display' listeners on first run
This commit is contained in:
parent
306b21b75e
commit
a53fb162a8
|
@ -65,9 +65,7 @@
|
||||||
const textHeight = cm.display.cachedTextHeight;
|
const textHeight = cm.display.cachedTextHeight;
|
||||||
const height = cm.display.lastWrapHeight;
|
const height = cm.display.lastWrapHeight;
|
||||||
if (!height || !textHeight) return;
|
if (!height || !textHeight) return;
|
||||||
const numLines = Math.ceil(height / textHeight);
|
maxRenderChunkSize = Math.max(20, Math.ceil(height / textHeight));
|
||||||
if (numLines >= maxRenderChunkSize) return;
|
|
||||||
maxRenderChunkSize = numLines;
|
|
||||||
cm.off('update', CM_EVENTS.update);
|
cm.off('update', CM_EVENTS.update);
|
||||||
},
|
},
|
||||||
mousedown(cm, event) {
|
mousedown(cm, event) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user