CodeMirror 5.56
This commit is contained in:
parent
d18314357f
commit
157af4e96c
6
package-lock.json
generated
6
package-lock.json
generated
|
@ -1917,9 +1917,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"codemirror": {
|
"codemirror": {
|
||||||
"version": "5.54.0",
|
"version": "5.56.0",
|
||||||
"resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.54.0.tgz",
|
"resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.56.0.tgz",
|
||||||
"integrity": "sha512-Pgf3surv4zvw+KaW3doUU7pGjF0BPU8/sj7eglWJjzni46U/DDW8pu3nZY0QgQKUcICDXRkq8jZmq0y6KhxM3Q=="
|
"integrity": "sha512-MfKVmYgifXjQpLSgpETuih7A7WTTIsxvKfSLGseTY5+qt0E1UD1wblZGM6WLenORo8sgmf+3X+WTe2WF7mufyw=="
|
||||||
},
|
},
|
||||||
"collection-visit": {
|
"collection-visit": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"repository": "openstyles/stylus",
|
"repository": "openstyles/stylus",
|
||||||
"author": "Stylus Team",
|
"author": "Stylus Team",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"codemirror": "^5.54.0",
|
"codemirror": "^5.56.0",
|
||||||
"db-to-cloud": "^0.4.5",
|
"db-to-cloud": "^0.4.5",
|
||||||
"jsonlint": "^1.6.3",
|
"jsonlint": "^1.6.3",
|
||||||
"less-bundle": "github:openstyles/less-bundle#v0.1.0",
|
"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.54.0
|
## codemirror v5.56.0
|
||||||
|
|
||||||
Following files are copied from npm (node_modules):
|
Following files are copied from npm (node_modules):
|
||||||
|
|
||||||
|
|
12
vendor/codemirror/addon/hint/show-hint.js
vendored
12
vendor/codemirror/addon/hint/show-hint.js
vendored
|
@ -379,12 +379,14 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
scrollToActive: function() {
|
scrollToActive: function() {
|
||||||
var node = this.hints.childNodes[this.selectedHint]
|
var margin = this.completion.options.scrollMargin || 0;
|
||||||
|
var node1 = this.hints.childNodes[Math.max(0, this.selectedHint - margin)];
|
||||||
|
var node2 = this.hints.childNodes[Math.min(this.data.list.length - 1, this.selectedHint + margin)];
|
||||||
var firstNode = this.hints.firstChild;
|
var firstNode = this.hints.firstChild;
|
||||||
if (node.offsetTop < this.hints.scrollTop)
|
if (node1.offsetTop < this.hints.scrollTop)
|
||||||
this.hints.scrollTop = node.offsetTop - firstNode.offsetTop;
|
this.hints.scrollTop = node1.offsetTop - firstNode.offsetTop;
|
||||||
else if (node.offsetTop + node.offsetHeight > this.hints.scrollTop + this.hints.clientHeight)
|
else if (node2.offsetTop + node2.offsetHeight > this.hints.scrollTop + this.hints.clientHeight)
|
||||||
this.hints.scrollTop = node.offsetTop + node.offsetHeight - this.hints.clientHeight + firstNode.offsetTop;
|
this.hints.scrollTop = node2.offsetTop + node2.offsetHeight - this.hints.clientHeight + firstNode.offsetTop;
|
||||||
},
|
},
|
||||||
|
|
||||||
screenAmount: function() {
|
screenAmount: function() {
|
||||||
|
|
2
vendor/codemirror/keymap/vim.js
vendored
2
vendor/codemirror/keymap/vim.js
vendored
|
@ -3203,7 +3203,7 @@
|
||||||
vim.visualMode = false;
|
vim.visualMode = false;
|
||||||
vim.visualLine = false;
|
vim.visualLine = false;
|
||||||
vim.visualBlock = false;
|
vim.visualBlock = false;
|
||||||
CodeMirror.signal(cm, "vim-mode-change", {mode: "normal"});
|
if (!vim.insertMode) CodeMirror.signal(cm, "vim-mode-change", {mode: "normal"});
|
||||||
clearFakeCursor(vim);
|
clearFakeCursor(vim);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
12
vendor/codemirror/lib/codemirror.js
vendored
12
vendor/codemirror/lib/codemirror.js
vendored
|
@ -2960,7 +2960,7 @@
|
||||||
var x, y, space = display.lineSpace.getBoundingClientRect();
|
var x, y, space = display.lineSpace.getBoundingClientRect();
|
||||||
// Fails unpredictably on IE[67] when mouse is dragged around quickly.
|
// Fails unpredictably on IE[67] when mouse is dragged around quickly.
|
||||||
try { x = e.clientX - space.left; y = e.clientY - space.top; }
|
try { x = e.clientX - space.left; y = e.clientY - space.top; }
|
||||||
catch (e) { return null }
|
catch (e$1) { return null }
|
||||||
var coords = coordsChar(cm, x, y), line;
|
var coords = coordsChar(cm, x, y), line;
|
||||||
if (forRect && coords.xRel > 0 && (line = getLine(cm.doc, coords.line).text).length == coords.ch) {
|
if (forRect && coords.xRel > 0 && (line = getLine(cm.doc, coords.line).text).length == coords.ch) {
|
||||||
var colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length;
|
var colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length;
|
||||||
|
@ -6545,7 +6545,7 @@
|
||||||
cm.display.input.focus();
|
cm.display.input.focus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(e){}
|
catch(e$1){}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7597,7 +7597,7 @@
|
||||||
mY = e.touches[0].clientY;
|
mY = e.touches[0].clientY;
|
||||||
} else {
|
} else {
|
||||||
try { mX = e.clientX; mY = e.clientY; }
|
try { mX = e.clientX; mY = e.clientY; }
|
||||||
catch(e) { return false }
|
catch(e$1) { return false }
|
||||||
}
|
}
|
||||||
if (mX >= Math.floor(cm.display.gutters.getBoundingClientRect().right)) { return false }
|
if (mX >= Math.floor(cm.display.gutters.getBoundingClientRect().right)) { return false }
|
||||||
if (prevent) { e_preventDefault(e); }
|
if (prevent) { e_preventDefault(e); }
|
||||||
|
@ -7697,7 +7697,7 @@
|
||||||
for (var i = newBreaks.length - 1; i >= 0; i--)
|
for (var i = newBreaks.length - 1; i >= 0; i--)
|
||||||
{ replaceRange(cm.doc, val, newBreaks[i], Pos(newBreaks[i].line, newBreaks[i].ch + val.length)); }
|
{ replaceRange(cm.doc, val, newBreaks[i], Pos(newBreaks[i].line, newBreaks[i].ch + val.length)); }
|
||||||
});
|
});
|
||||||
option("specialChars", /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g, function (cm, val, old) {
|
option("specialChars", /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g, function (cm, val, old) {
|
||||||
cm.state.specialChars = new RegExp(val.source + (val.test("\t") ? "" : "|\t"), "g");
|
cm.state.specialChars = new RegExp(val.source + (val.test("\t") ? "" : "|\t"), "g");
|
||||||
if (old != Init) { cm.refresh(); }
|
if (old != Init) { cm.refresh(); }
|
||||||
});
|
});
|
||||||
|
@ -8117,7 +8117,7 @@
|
||||||
{ from = Pos(from.line, from.ch - deleted); }
|
{ from = Pos(from.line, from.ch - deleted); }
|
||||||
else if (cm.state.overwrite && !paste) // Handle overwrite
|
else if (cm.state.overwrite && !paste) // Handle overwrite
|
||||||
{ to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length)); }
|
{ to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length)); }
|
||||||
else if (paste && lastCopied && lastCopied.lineWise && lastCopied.text.join("\n") == inserted)
|
else if (paste && lastCopied && lastCopied.lineWise && lastCopied.text.join("\n") == textLines.join("\n"))
|
||||||
{ from = to = Pos(from.line, 0); }
|
{ from = to = Pos(from.line, 0); }
|
||||||
}
|
}
|
||||||
var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i$1 % multiPaste.length] : textLines,
|
var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i$1 % multiPaste.length] : textLines,
|
||||||
|
@ -9771,7 +9771,7 @@
|
||||||
|
|
||||||
addLegacyProps(CodeMirror);
|
addLegacyProps(CodeMirror);
|
||||||
|
|
||||||
CodeMirror.version = "5.54.0";
|
CodeMirror.version = "5.56.0";
|
||||||
|
|
||||||
return CodeMirror;
|
return CodeMirror;
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,8 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
||||||
return ret("meta", "meta");
|
return ret("meta", "meta");
|
||||||
} else if (ch == "#" && stream.eatWhile(wordRE)) {
|
} else if (ch == "#" && stream.eatWhile(wordRE)) {
|
||||||
return ret("variable", "property")
|
return ret("variable", "property")
|
||||||
} else if (ch == "<" && stream.match("!--") || ch == "-" && stream.match("->")) {
|
} else if (ch == "<" && stream.match("!--") ||
|
||||||
|
(ch == "-" && stream.match("->") && !/\S/.test(stream.string.slice(0, stream.start)))) {
|
||||||
stream.skipToEnd()
|
stream.skipToEnd()
|
||||||
return ret("comment", "comment")
|
return ret("comment", "comment")
|
||||||
} else if (isOperatorChar.test(ch)) {
|
} else if (isOperatorChar.test(ch)) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user