1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-23 15:19:42 +02:00

CodeMirror dependency upgraded to v5.32.0

For handling Markdown and Code section types
This commit is contained in:
Harvey Kandola 2017-12-18 13:10:51 +00:00
parent 3337db6b27
commit 0336f84a83
351 changed files with 3408 additions and 1945 deletions

7
gui/public/codemirror/addon/selection/mark-selection.js vendored Executable file → Normal file
View file

@ -34,11 +34,12 @@
});
function onCursorActivity(cm) {
cm.operation(function() { update(cm); });
if (cm.state.markedSelection)
cm.operation(function() { update(cm); });
}
function onChange(cm) {
if (cm.state.markedSelection.length)
if (cm.state.markedSelection && cm.state.markedSelection.length)
cm.operation(function() { clear(cm); });
}
@ -85,7 +86,7 @@
if (!array.length) return coverRange(cm, from, to);
var coverStart = array[0].find(), coverEnd = array[array.length - 1].find();
if (!coverStart || !coverEnd || to.line - from.line < CHUNK_SIZE ||
if (!coverStart || !coverEnd || to.line - from.line <= CHUNK_SIZE ||
cmp(from, coverEnd.to) >= 0 || cmp(to, coverStart.from) <= 0)
return reset(cm);