Skip to content

Commit

Permalink
chore(package) v12.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
coderaiser committed Apr 26, 2020
1 parent 37aed52 commit b64bee6
Show file tree
Hide file tree
Showing 24 changed files with 210 additions and 50 deletions.
9 changes: 9 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
2020.04.26, v12.0.7

fix:
- (dword) jssha: default

feature:
- (package) codemirror v5.53.2


2020.04.16, v12.0.6

feature:
Expand Down
12 changes: 12 additions & 0 deletions modules/codemirror/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Alexander Schepanovski
Alexander Shvets
Alexander Solovyov
Alexandre Bique
Alex Churchill
alexey-k
Alex Piggott
Aliaksei Chapyzhenka
Expand Down Expand Up @@ -97,6 +98,8 @@ Bastian Müller
belhaj
Bem Jones-Bey
benbro
Benedikt Meurer
benhormann
Beni Cherniavsky-Paskin
Benjamin DeCoste
Benjamin Young
Expand All @@ -123,6 +126,7 @@ Brandon Wamboldt
Bret Little
Brett Zamir
Brian Grinstead
BrianHung
Brian Sletten
brrd
Bruce Mitchener
Expand All @@ -134,6 +138,7 @@ Calin Barbat
callodacity
Camilo Roca
Casey Klebba
cBiscuit87
César González Íñiguez
Chad Jolly
Chandra Sekhar Pydi
Expand Down Expand Up @@ -170,6 +175,7 @@ ComFreek
Cristian Prieto
Curran Kelleher
Curtis Gagliardi
d8888
dagsta
daines
Dale Jung
Expand Down Expand Up @@ -255,6 +261,7 @@ Filype Pereira
finalfantasia
flack
Florian Felten
Fons van der Plas
Forbes Lindesay
ForbesLindesay
Ford_Lawnmower
Expand Down Expand Up @@ -321,6 +328,7 @@ Hugues Malphettes
Ian Beck
Ian Davies
Ian Dickinson
ianhi
Ian Rose
Ian Wehrman
Ian Wetherbee
Expand Down Expand Up @@ -521,6 +529,7 @@ mats cronqvist
Matt Gaide
Matthew Bauer
Matthew Beale
Matthew Casperson
matthewhayes
Matthew Rathbone
Matthew Suozzo
Expand All @@ -541,6 +550,7 @@ Max Xiantu
mbarkhau
McBrainy
mce2
Mélanie Chauvel
melpon
meshuamam
Metatheos
Expand Down Expand Up @@ -690,6 +700,7 @@ Robert Crossfield
Robert Martin
Roberto Abdelkader Martínez Pérez
robertop23
Roberto Vidal
Robert Plummer
Roman Janusz
Rrandom
Expand Down Expand Up @@ -790,6 +801,7 @@ thomasmaclean
Thomas Schmid
Tim Alby
Tim Baumann
Tim Gates
Timothy Farrell
Timothy Gu
Timothy Hatcher
Expand Down
30 changes: 30 additions & 0 deletions modules/codemirror/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
## 5.53.2 (2020-04-21)

### Bug fixes

[show-hint addon](https://codemirror.net/doc/manual.html#addon_show-hint): Fix a regression that broke completion picking.

## 5.53.0 (2020-04-21)

### Bug fixes

Fix a bug where the editor layout could remain confused after a call to `refresh` when line wrapping was enabled.

[dialog addon](https://codemirror.net/doc/manual.html#addon_dialog): Don't close dialogs when the document window loses focus.

[merge addon](https://codemirror.net/doc/manual.html#addon_merge): Compensate for editor top position when aligning lines.

[vim bindings](https://codemirror.net/demo/vim.html): Improve EOL handling.

[emacs bindings](https://codemirror.net/demo/emacs.html): Include default keymap as a fallback.

[julia mode](https://codemirror.net/mode/julia/): Fix an infinite loop bug.

[show-hint addon](https://codemirror.net/doc/manual.html#addon_show-hint): Scroll cursor into view when picking a completion.

### New features

New option: [`screenReaderLabel`](https://codemirror.net/doc/manual.html#option_screenReaderLabel) to add a label to the editor.

New mode: [wast](https://codemirror.net/mode/wast/).

## 5.52.2 (2020-03-20)

### Bug fixes
Expand Down
4 changes: 3 additions & 1 deletion modules/codemirror/addon/dialog/dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@
if (e.keyCode == 13) callback(inp.value, e);
});

if (options.closeOnBlur !== false) CodeMirror.on(inp, "blur", close);
if (options.closeOnBlur !== false) CodeMirror.on(dialog, "focusout", function (evt) {
if (evt.relatedTarget !== null) close();
});
} else if (button = dialog.getElementsByTagName("button")[0]) {
CodeMirror.on(button, "click", function() {
close();
Expand Down
5 changes: 4 additions & 1 deletion modules/codemirror/addon/hint/javascript-hint.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,15 @@
base = base[context.pop().string];
if (base != null) gatherCompletions(base);
} else {
// If not, just look in the global object and any local scope
// If not, just look in the global object, any local scope, and optional additional-context
// (reading into JS mode internals to get at the local and global variables)
for (var v = token.state.localVars; v; v = v.next) maybeAdd(v.name);
for (var c = token.state.context; c; c = c.prev)
for (var v = c.vars; v; v = v.next) maybeAdd(v.name)
for (var v = token.state.globalVars; v; v = v.next) maybeAdd(v.name);
if (options && options.additionalContext != null)
for (var key in options.additionalContext)
maybeAdd(key);
if (!options || options.useGlobalScope !== false)
gatherCompletions(global);
forEach(keywords, maybeAdd);
Expand Down
27 changes: 19 additions & 8 deletions modules/codemirror/addon/hint/show-hint.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,16 @@
},

pick: function(data, i) {
var completion = data.list[i];
if (completion.hint) completion.hint(this.cm, data, completion);
else this.cm.replaceRange(getText(completion), completion.from || data.from,
completion.to || data.to, "complete");
CodeMirror.signal(data, "pick", completion);
var completion = data.list[i], self = this;
this.cm.operation(function() {
if (completion.hint)
completion.hint(self.cm, data, completion);
else
self.cm.replaceRange(getText(completion), completion.from || data.from,
completion.to || data.to, "complete");
CodeMirror.signal(data, "pick", completion);
self.cm.scrollIntoView();
})
this.close();
},

Expand All @@ -99,9 +104,14 @@
this.debounce = 0;
}

var identStart = this.startPos;
if(this.data) {
identStart = this.data.from;
}

var pos = this.cm.getCursor(), line = this.cm.getLine(pos.line);
if (pos.line != this.startPos.line || line.length - pos.ch != this.startLen - this.startPos.ch ||
pos.ch < this.startPos.ch || this.cm.somethingSelected() ||
pos.ch < identStart.ch || this.cm.somethingSelected() ||
(!pos.ch || this.options.closeCharacters.test(line.charAt(pos.ch - 1)))) {
this.close();
} else {
Expand Down Expand Up @@ -370,10 +380,11 @@

scrollToActive: function() {
var node = this.hints.childNodes[this.selectedHint]
var firstNode = this.hints.firstChild;
if (node.offsetTop < this.hints.scrollTop)
this.hints.scrollTop = node.offsetTop - 3;
this.hints.scrollTop = node.offsetTop - firstNode.offsetTop;
else if (node.offsetTop + node.offsetHeight > this.hints.scrollTop + this.hints.clientHeight)
this.hints.scrollTop = node.offsetTop + node.offsetHeight - this.hints.clientHeight + 3;
this.hints.scrollTop = node.offsetTop + node.offsetHeight - this.hints.clientHeight + firstNode.offsetTop;
},

screenAmount: function() {
Expand Down
16 changes: 10 additions & 6 deletions modules/codemirror/addon/merge/merge.js
Original file line number Diff line number Diff line change
Expand Up @@ -443,22 +443,26 @@
aligners[i].clear();
aligners.length = 0;

var cm = [dv.edit, dv.orig], scroll = [];
var cm = [dv.edit, dv.orig], scroll = [], offset = []
if (other) cm.push(other.orig);
for (var i = 0; i < cm.length; i++)
for (var i = 0; i < cm.length; i++) {
scroll.push(cm[i].getScrollInfo().top);
offset.push(-cm[i].getScrollerElement().getBoundingClientRect().top)
}

if (offset[0] != offset[1] || cm.length == 3 && offset[1] != offset[2])
alignLines(cm, offset, [0, 0, 0], aligners)
for (var ln = 0; ln < linesToAlign.length; ln++)
alignLines(cm, linesToAlign[ln], aligners);
alignLines(cm, offset, linesToAlign[ln], aligners);

for (var i = 0; i < cm.length; i++)
cm[i].scrollTo(null, scroll[i]);
}

function alignLines(cm, lines, aligners) {
var maxOffset = 0, offset = [];
function alignLines(cm, cmOffset, lines, aligners) {
var maxOffset = -1e8, offset = [];
for (var i = 0; i < cm.length; i++) if (lines[i] != null) {
var off = cm[i].heightAtLine(lines[i], "local");
var off = cm[i].heightAtLine(lines[i], "local") - cmOffset[i];
offset[i] = off;
maxOffset = Math.max(maxOffset, off);
}
Expand Down
8 changes: 6 additions & 2 deletions modules/codemirror/addon/runmode/runmode-standalone.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,18 @@ CodeMirror.defineMIME("text/plain", "null");

CodeMirror.runMode = function (string, modespec, callback, options) {
var mode = CodeMirror.getMode({ indentUnit: 2 }, modespec);
var ie = /MSIE \d/.test(navigator.userAgent);
var ie_lt9 = ie && (document.documentMode == null || document.documentMode < 9);

if (callback.nodeType == 1) {
if (callback.appendChild) {
var tabSize = (options && options.tabSize) || 4;
var node = callback, col = 0;
node.innerHTML = "";
callback = function (text, style) {
if (text == "\n") {
node.appendChild(document.createElement("br"));
// Emitting LF or CRLF on IE8 or earlier results in an incorrect display.
// Emitting a carriage return makes everything ok.
node.appendChild(document.createTextNode(ie_lt9 ? '\r' : text));
col = 0;
return;
}
Expand Down
2 changes: 1 addition & 1 deletion modules/codemirror/addon/search/searchcursor.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@
var result = this.matches(reverse, this.doc.clipPos(reverse ? this.pos.from : this.pos.to))

// Implements weird auto-growing behavior on null-matches for
// backwards-compatiblity with the vim code (unfortunately)
// backwards-compatibility with the vim code (unfortunately)
while (result && CodeMirror.cmpPos(result.from, result.to) == 0) {
if (reverse) {
if (result.from.ch) result.from = Pos(result.from.line, result.from.ch - 1)
Expand Down
3 changes: 2 additions & 1 deletion modules/codemirror/keymap/emacs.js
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,8 @@
"Ctrl-X H": "selectAll",

"Ctrl-Q Tab": repeated("insertTab"),
"Ctrl-U": addPrefixMap
"Ctrl-U": addPrefixMap,
"fallthrough": "default"
});

var prefixMap = {"Ctrl-G": clearPrefix};
Expand Down
2 changes: 2 additions & 0 deletions modules/codemirror/keymap/sublime.js
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,7 @@
"Cmd-K Cmd-C": "showInCenter",
"Cmd-K Cmd-G": "clearBookmarks",
"Cmd-K Cmd-Backspace": "delLineLeft",
"Cmd-K Cmd-1": "foldAll",
"Cmd-K Cmd-0": "unfoldAll",
"Cmd-K Cmd-J": "unfoldAll",
"Ctrl-Shift-Up": "addCursorToPrevLine",
Expand Down Expand Up @@ -689,6 +690,7 @@
"Ctrl-K Ctrl-C": "showInCenter",
"Ctrl-K Ctrl-G": "clearBookmarks",
"Ctrl-K Ctrl-Backspace": "delLineLeft",
"Ctrl-K Ctrl-1": "foldAll",
"Ctrl-K Ctrl-0": "unfoldAll",
"Ctrl-K Ctrl-J": "unfoldAll",
"Ctrl-Alt-Up": "addCursorToPrevLine",
Expand Down
Loading

0 comments on commit b64bee6

Please sign in to comment.