update CodeMirror 5.58.3
This commit is contained in:
parent
1bd366beb9
commit
420480887e
8204
package-lock.json
generated
8204
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
|
@ -6,7 +6,7 @@
|
|||
"repository": "openstyles/stylus",
|
||||
"author": "Stylus Team",
|
||||
"dependencies": {
|
||||
"codemirror": "^5.58.2",
|
||||
"codemirror": "^5.58.3",
|
||||
"db-to-cloud": "^0.4.5",
|
||||
"jsonlint": "^1.6.3",
|
||||
"less-bundle": "github:openstyles/less-bundle#v0.1.0",
|
||||
|
|
2
vendor/codemirror/README.md
vendored
2
vendor/codemirror/README.md
vendored
|
@ -1,4 +1,4 @@
|
|||
## codemirror v5.58.2
|
||||
## codemirror v5.58.3
|
||||
|
||||
Following files are copied from npm (node_modules):
|
||||
|
||||
|
|
24
vendor/codemirror/lib/codemirror.js
vendored
24
vendor/codemirror/lib/codemirror.js
vendored
|
@ -3285,19 +3285,22 @@
|
|||
}
|
||||
|
||||
function ensureFocus(cm) {
|
||||
if (!cm.state.focused) { cm.display.input.focus(); onFocus(cm); }
|
||||
if (!cm.hasFocus()) {
|
||||
cm.display.input.focus();
|
||||
if (!cm.state.focused) { onFocus(cm); }
|
||||
}
|
||||
}
|
||||
|
||||
function delayBlurEvent(cm) {
|
||||
cm.state.delayingBlurEvent = true;
|
||||
setTimeout(function () { if (cm.state.delayingBlurEvent) {
|
||||
cm.state.delayingBlurEvent = false;
|
||||
onBlur(cm);
|
||||
if (cm.state.focused) { onBlur(cm); }
|
||||
} }, 100);
|
||||
}
|
||||
|
||||
function onFocus(cm, e) {
|
||||
if (cm.state.delayingBlurEvent) { cm.state.delayingBlurEvent = false; }
|
||||
if (cm.state.delayingBlurEvent && !cm.state.draggingText) { cm.state.delayingBlurEvent = false; }
|
||||
|
||||
if (cm.options.readOnly == "nocursor") { return }
|
||||
if (!cm.state.focused) {
|
||||
|
@ -5769,7 +5772,7 @@
|
|||
changeLine(doc, handle, "widget", function (line) {
|
||||
var widgets = line.widgets || (line.widgets = []);
|
||||
if (widget.insertAt == null) { widgets.push(widget); }
|
||||
else { widgets.splice(Math.min(widgets.length - 1, Math.max(0, widget.insertAt)), 0, widget); }
|
||||
else { widgets.splice(Math.min(widgets.length, Math.max(0, widget.insertAt)), 0, widget); }
|
||||
widget.line = line;
|
||||
if (cm && !lineIsHidden(doc, line)) {
|
||||
var aboveVisible = heightAtLine(line) < doc.scrollTop;
|
||||
|
@ -7378,6 +7381,10 @@
|
|||
var dragEnd = operation(cm, function (e) {
|
||||
if (webkit) { display.scroller.draggable = false; }
|
||||
cm.state.draggingText = false;
|
||||
if (cm.state.delayingBlurEvent) {
|
||||
if (cm.hasFocus()) { cm.state.delayingBlurEvent = false; }
|
||||
else { delayBlurEvent(cm); }
|
||||
}
|
||||
off(display.wrapper.ownerDocument, "mouseup", dragEnd);
|
||||
off(display.wrapper.ownerDocument, "mousemove", mouseMove);
|
||||
off(display.scroller, "dragstart", dragStart);
|
||||
|
@ -7401,15 +7408,15 @@
|
|||
if (webkit) { display.scroller.draggable = true; }
|
||||
cm.state.draggingText = dragEnd;
|
||||
dragEnd.copy = !behavior.moveOnDrag;
|
||||
// IE's approach to draggable
|
||||
if (display.scroller.dragDrop) { display.scroller.dragDrop(); }
|
||||
on(display.wrapper.ownerDocument, "mouseup", dragEnd);
|
||||
on(display.wrapper.ownerDocument, "mousemove", mouseMove);
|
||||
on(display.scroller, "dragstart", dragStart);
|
||||
on(display.scroller, "drop", dragEnd);
|
||||
|
||||
delayBlurEvent(cm);
|
||||
cm.state.delayingBlurEvent = true;
|
||||
setTimeout(function () { return display.input.focus(); }, 20);
|
||||
// IE's approach to draggable
|
||||
if (display.scroller.dragDrop) { display.scroller.dragDrop(); }
|
||||
}
|
||||
|
||||
function rangeForUnit(cm, pos, unit) {
|
||||
|
@ -7422,6 +7429,7 @@
|
|||
|
||||
// Normal selection, as opposed to text dragging.
|
||||
function leftButtonSelect(cm, event, start, behavior) {
|
||||
if (ie) { delayBlurEvent(cm); }
|
||||
var display = cm.display, doc = cm.doc;
|
||||
e_preventDefault(event);
|
||||
|
||||
|
@ -9782,7 +9790,7 @@
|
|||
|
||||
addLegacyProps(CodeMirror);
|
||||
|
||||
CodeMirror.version = "5.58.2";
|
||||
CodeMirror.version = "5.58.3";
|
||||
|
||||
return CodeMirror;
|
||||
|
||||
|
|
3
vendor/codemirror/mode/stylus/stylus.js
vendored
3
vendor/codemirror/mode/stylus/stylus.js
vendored
|
@ -722,6 +722,9 @@
|
|||
return indent;
|
||||
},
|
||||
electricChars: "}",
|
||||
blockCommentStart: "/*",
|
||||
blockCommentEnd: "*/",
|
||||
blockCommentContinue: " * ",
|
||||
lineComment: "//",
|
||||
fold: "indent"
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user