CodeMirror 5.63.3
This commit is contained in:
parent
4243815349
commit
37a174b092
14
package-lock.json
generated
14
package-lock.json
generated
|
@ -9,7 +9,7 @@
|
||||||
"version": "1.5.22",
|
"version": "1.5.22",
|
||||||
"license": "GPL-3.0-only",
|
"license": "GPL-3.0-only",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"codemirror": "5.63.1",
|
"codemirror": "5.63.3",
|
||||||
"db-to-cloud": "^0.6.0",
|
"db-to-cloud": "^0.6.0",
|
||||||
"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",
|
||||||
|
@ -2365,9 +2365,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/codemirror": {
|
"node_modules/codemirror": {
|
||||||
"version": "5.63.1",
|
"version": "5.63.3",
|
||||||
"resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.63.1.tgz",
|
"resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.63.3.tgz",
|
||||||
"integrity": "sha512-baivaNZreZOGh1/tYyTvCupC9NeWk7qlZeGUDi4nFKj/J0JU8FYKZND4QqLw70P7HOttlCt4JJAOj9GoIhHEkA=="
|
"integrity": "sha512-1C+LELr+5grgJYqwZKqxrcbPsHFHapVaVAloBsFBASbpLnQqLw1U8yXJ3gT5D+rhxIiSpo+kTqN+hQ+9ialIXw=="
|
||||||
},
|
},
|
||||||
"node_modules/collection-visit": {
|
"node_modules/collection-visit": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
|
@ -13938,9 +13938,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"codemirror": {
|
"codemirror": {
|
||||||
"version": "5.63.1",
|
"version": "5.63.3",
|
||||||
"resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.63.1.tgz",
|
"resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.63.3.tgz",
|
||||||
"integrity": "sha512-baivaNZreZOGh1/tYyTvCupC9NeWk7qlZeGUDi4nFKj/J0JU8FYKZND4QqLw70P7HOttlCt4JJAOj9GoIhHEkA=="
|
"integrity": "sha512-1C+LELr+5grgJYqwZKqxrcbPsHFHapVaVAloBsFBASbpLnQqLw1U8yXJ3gT5D+rhxIiSpo+kTqN+hQ+9ialIXw=="
|
||||||
},
|
},
|
||||||
"collection-visit": {
|
"collection-visit": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
"codemirror": "WARNING! Always use an exact version and test it for a while before releasing"
|
"codemirror": "WARNING! Always use an exact version and test it for a while before releasing"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"codemirror": "5.63.1",
|
"codemirror": "5.63.3",
|
||||||
"db-to-cloud": "^0.6.0",
|
"db-to-cloud": "^0.6.0",
|
||||||
"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",
|
||||||
|
|
3
vendor/codemirror/README.md
vendored
3
vendor/codemirror/README.md
vendored
|
@ -1,4 +1,4 @@
|
||||||
## codemirror v5.63.1
|
## codemirror v5.63.3
|
||||||
|
|
||||||
Following files are copied from npm (node_modules):
|
Following files are copied from npm (node_modules):
|
||||||
|
|
||||||
|
@ -27,7 +27,6 @@ Following files are copied from npm (node_modules):
|
||||||
* keymap\emacs.js
|
* keymap\emacs.js
|
||||||
* keymap\sublime.js
|
* keymap\sublime.js
|
||||||
* keymap\vim.js
|
* keymap\vim.js
|
||||||
* lib\#codemirror.js#
|
|
||||||
* lib\codemirror.css
|
* lib\codemirror.css
|
||||||
* lib\codemirror.js
|
* lib\codemirror.js
|
||||||
* mode\css
|
* mode\css
|
||||||
|
|
31
vendor/codemirror/addon/search/searchcursor.js
vendored
31
vendor/codemirror/addon/search/searchcursor.js
vendored
|
@ -202,6 +202,7 @@
|
||||||
|
|
||||||
function SearchCursor(doc, query, pos, options) {
|
function SearchCursor(doc, query, pos, options) {
|
||||||
this.atOccurrence = false
|
this.atOccurrence = false
|
||||||
|
this.afterEmptyMatch = false
|
||||||
this.doc = doc
|
this.doc = doc
|
||||||
pos = pos ? doc.clipPos(pos) : Pos(0, 0)
|
pos = pos ? doc.clipPos(pos) : Pos(0, 0)
|
||||||
this.pos = {from: pos, to: pos}
|
this.pos = {from: pos, to: pos}
|
||||||
|
@ -237,21 +238,29 @@
|
||||||
findPrevious: function() {return this.find(true)},
|
findPrevious: function() {return this.find(true)},
|
||||||
|
|
||||||
find: function(reverse) {
|
find: function(reverse) {
|
||||||
var result = this.matches(reverse, this.doc.clipPos(reverse ? this.pos.from : this.pos.to))
|
var head = this.doc.clipPos(reverse ? this.pos.from : this.pos.to);
|
||||||
|
if (this.afterEmptyMatch && this.atOccurrence) {
|
||||||
// Implements weird auto-growing behavior on null-matches for
|
// do not return the same 0 width match twice
|
||||||
// backwards-compatibility with the vim code (unfortunately)
|
head = Pos(head.line, head.ch)
|
||||||
while (result && CodeMirror.cmpPos(result.from, result.to) == 0) {
|
|
||||||
if (reverse) {
|
if (reverse) {
|
||||||
if (result.from.ch) result.from = Pos(result.from.line, result.from.ch - 1)
|
head.ch--;
|
||||||
else if (result.from.line == this.doc.firstLine()) result = null
|
if (head.ch < 0) {
|
||||||
else result = this.matches(reverse, this.doc.clipPos(Pos(result.from.line - 1)))
|
head.line--;
|
||||||
|
head.ch = (this.doc.getLine(head.line) || "").length;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (result.to.ch < this.doc.getLine(result.to.line).length) result.to = Pos(result.to.line, result.to.ch + 1)
|
head.ch++;
|
||||||
else if (result.to.line == this.doc.lastLine()) result = null
|
if (head.ch > (this.doc.getLine(head.line) || "").length) {
|
||||||
else result = this.matches(reverse, Pos(result.to.line + 1, 0))
|
head.ch = 0;
|
||||||
|
head.line++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (CodeMirror.cmpPos(head, this.doc.clipPos(head)) != 0) {
|
||||||
|
return this.atOccurrence = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var result = this.matches(reverse, head)
|
||||||
|
this.afterEmptyMatch = result && CodeMirror.cmpPos(result.from, result.to) == 0
|
||||||
|
|
||||||
if (result) {
|
if (result) {
|
||||||
this.pos = result
|
this.pos = result
|
||||||
|
|
27
vendor/codemirror/keymap/vim.js
vendored
27
vendor/codemirror/keymap/vim.js
vendored
|
@ -4305,7 +4305,7 @@
|
||||||
ignoreCase = (/^[^A-Z]*$/).test(regexPart);
|
ignoreCase = (/^[^A-Z]*$/).test(regexPart);
|
||||||
}
|
}
|
||||||
var regexp = new RegExp(regexPart,
|
var regexp = new RegExp(regexPart,
|
||||||
(ignoreCase || forceIgnoreCase) ? 'i' : undefined);
|
(ignoreCase || forceIgnoreCase) ? 'im' : 'm');
|
||||||
return regexp;
|
return regexp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4461,7 +4461,14 @@
|
||||||
var cursor = cm.getSearchCursor(query, pos);
|
var cursor = cm.getSearchCursor(query, pos);
|
||||||
for (var i = 0; i < repeat; i++) {
|
for (var i = 0; i < repeat; i++) {
|
||||||
var found = cursor.find(prev);
|
var found = cursor.find(prev);
|
||||||
if (i == 0 && found && cursorEqual(cursor.from(), pos)) { found = cursor.find(prev); }
|
if (i == 0 && found && cursorEqual(cursor.from(), pos)) {
|
||||||
|
var lastEndPos = prev ? cursor.from() : cursor.to();
|
||||||
|
found = cursor.find(prev);
|
||||||
|
if (found && !found[0] && cursorEqual(cursor.from(), lastEndPos)) {
|
||||||
|
if (cm.getLine(lastEndPos.line).length == lastEndPos.ch)
|
||||||
|
found = cursor.find(prev);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!found) {
|
if (!found) {
|
||||||
// SearchCursor may have returned null because it hit EOF, wrap
|
// SearchCursor may have returned null because it hit EOF, wrap
|
||||||
// around and try again.
|
// around and try again.
|
||||||
|
@ -5114,12 +5121,6 @@
|
||||||
regexPart = new RegExp(regexPart).source; //normalize not escaped characters
|
regexPart = new RegExp(regexPart).source; //normalize not escaped characters
|
||||||
}
|
}
|
||||||
replacePart = tokens[1];
|
replacePart = tokens[1];
|
||||||
// If the pattern ends with $ (line boundary assertion), change $ to \n.
|
|
||||||
// Caveat: this workaround cannot match on the last line of the document.
|
|
||||||
if (/(^|[^\\])(\\\\)*\$$/.test(regexPart)) {
|
|
||||||
regexPart = regexPart.slice(0, -1) + '\\n';
|
|
||||||
replacePart = (replacePart || '') + '\n';
|
|
||||||
}
|
|
||||||
if (replacePart !== undefined) {
|
if (replacePart !== undefined) {
|
||||||
if (getOption('pcre')) {
|
if (getOption('pcre')) {
|
||||||
replacePart = unescapeRegexReplace(replacePart.replace(/([^\\])&/g,"$1$$&"));
|
replacePart = unescapeRegexReplace(replacePart.replace(/([^\\])&/g,"$1$$&"));
|
||||||
|
@ -5309,10 +5310,18 @@
|
||||||
lineEnd += modifiedLineNumber - unmodifiedLineNumber;
|
lineEnd += modifiedLineNumber - unmodifiedLineNumber;
|
||||||
joined = modifiedLineNumber < unmodifiedLineNumber;
|
joined = modifiedLineNumber < unmodifiedLineNumber;
|
||||||
}
|
}
|
||||||
|
function findNextValidMatch() {
|
||||||
|
var lastMatchTo = lastPos && copyCursor(searchCursor.to());
|
||||||
|
var match = searchCursor.findNext();
|
||||||
|
if (match && !match[0] && lastMatchTo && cursorEqual(searchCursor.from(), lastMatchTo)) {
|
||||||
|
match = searchCursor.findNext();
|
||||||
|
}
|
||||||
|
return match;
|
||||||
|
}
|
||||||
function next() {
|
function next() {
|
||||||
// The below only loops to skip over multiple occurrences on the same
|
// The below only loops to skip over multiple occurrences on the same
|
||||||
// line when 'global' is not true.
|
// line when 'global' is not true.
|
||||||
while(searchCursor.findNext() &&
|
while(findNextValidMatch() &&
|
||||||
isInRange(searchCursor.from(), lineStart, lineEnd)) {
|
isInRange(searchCursor.from(), lineStart, lineEnd)) {
|
||||||
if (!global && searchCursor.from().line == modifiedLineNumber && !joined) {
|
if (!global && searchCursor.from().line == modifiedLineNumber && !joined) {
|
||||||
continue;
|
continue;
|
||||||
|
|
6
vendor/codemirror/lib/codemirror.js
vendored
6
vendor/codemirror/lib/codemirror.js
vendored
|
@ -4501,7 +4501,7 @@
|
||||||
function onScrollWheel(cm, e) {
|
function onScrollWheel(cm, e) {
|
||||||
var delta = wheelEventDelta(e), dx = delta.x, dy = delta.y;
|
var delta = wheelEventDelta(e), dx = delta.x, dy = delta.y;
|
||||||
var pixelsPerUnit = wheelPixelsPerUnit;
|
var pixelsPerUnit = wheelPixelsPerUnit;
|
||||||
if (event.deltaMode === 0) {
|
if (e.deltaMode === 0) {
|
||||||
dx = e.deltaX;
|
dx = e.deltaX;
|
||||||
dy = e.deltaY;
|
dy = e.deltaY;
|
||||||
pixelsPerUnit = 1;
|
pixelsPerUnit = 1;
|
||||||
|
@ -8235,7 +8235,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function hiddenTextarea() {
|
function hiddenTextarea() {
|
||||||
var te = elt("textarea", null, null, "position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none");
|
var te = elt("textarea", null, null, "position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none");
|
||||||
var div = elt("div", [te], null, "overflow: hidden; position: relative; width: 3px; height: 0px;");
|
var div = elt("div", [te], null, "overflow: hidden; position: relative; width: 3px; height: 0px;");
|
||||||
// The textarea is kept positioned near the cursor to prevent the
|
// The textarea is kept positioned near the cursor to prevent the
|
||||||
// fact that it'll be scrolled into view on input from scrolling
|
// fact that it'll be scrolled into view on input from scrolling
|
||||||
|
@ -9832,7 +9832,7 @@
|
||||||
|
|
||||||
addLegacyProps(CodeMirror);
|
addLegacyProps(CodeMirror);
|
||||||
|
|
||||||
CodeMirror.version = "5.63.1";
|
CodeMirror.version = "5.63.3";
|
||||||
|
|
||||||
return CodeMirror;
|
return CodeMirror;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user