|
|
|
@ -7772,7 +7772,7 @@
|
|
|
|
|
for (var i = newBreaks.length - 1; i >= 0; i--)
|
|
|
|
|
{ replaceRange(cm.doc, val, newBreaks[i], Pos(newBreaks[i].line, newBreaks[i].ch + val.length)); }
|
|
|
|
|
});
|
|
|
|
|
option("specialChars", /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g, function (cm, val, old) {
|
|
|
|
|
option("specialChars", /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g, function (cm, val, old) {
|
|
|
|
|
cm.state.specialChars = new RegExp(val.source + (val.test("\t") ? "" : "|\t"), "g");
|
|
|
|
|
if (old != Init) { cm.refresh(); }
|
|
|
|
|
});
|
|
|
|
@ -9368,6 +9368,7 @@
|
|
|
|
|
// Used to work around IE issue with selection being forgotten when focus moves away from textarea
|
|
|
|
|
this.hasSelection = false;
|
|
|
|
|
this.composing = null;
|
|
|
|
|
this.resetting = false;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
TextareaInput.prototype.init = function (display) {
|
|
|
|
@ -9500,8 +9501,9 @@
|
|
|
|
|
// Reset the input to correspond to the selection (or to be empty,
|
|
|
|
|
// when not typing and nothing is selected)
|
|
|
|
|
TextareaInput.prototype.reset = function (typing) {
|
|
|
|
|
if (this.contextMenuPending || this.composing) { return }
|
|
|
|
|
if (this.contextMenuPending || this.composing && typing) { return }
|
|
|
|
|
var cm = this.cm;
|
|
|
|
|
this.resetting = true;
|
|
|
|
|
if (cm.somethingSelected()) {
|
|
|
|
|
this.prevInput = "";
|
|
|
|
|
var content = cm.getSelection();
|
|
|
|
@ -9512,6 +9514,7 @@
|
|
|
|
|
this.prevInput = this.textarea.value = "";
|
|
|
|
|
if (ie && ie_version >= 9) { this.hasSelection = null; }
|
|
|
|
|
}
|
|
|
|
|
this.resetting = false;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
TextareaInput.prototype.getField = function () { return this.textarea };
|
|
|
|
@ -9573,7 +9576,7 @@
|
|
|
|
|
// possible when it is clear that nothing happened. hasSelection
|
|
|
|
|
// will be the case when there is a lot of text in the textarea,
|
|
|
|
|
// in which case reading its value would be expensive.
|
|
|
|
|
if (this.contextMenuPending || !cm.state.focused ||
|
|
|
|
|
if (this.contextMenuPending || this.resetting || !cm.state.focused ||
|
|
|
|
|
(hasSelection(input) && !prevInput && !this.composing) ||
|
|
|
|
|
cm.isReadOnly() || cm.options.disableInput || cm.state.keySeq)
|
|
|
|
|
{ return false }
|
|
|
|
@ -9860,7 +9863,7 @@
|
|
|
|
|
|
|
|
|
|
addLegacyProps(CodeMirror);
|
|
|
|
|
|
|
|
|
|
CodeMirror.version = "5.65.7";
|
|
|
|
|
CodeMirror.version = "5.65.8";
|
|
|
|
|
|
|
|
|
|
return CodeMirror;
|
|
|
|
|
|
|
|
|
|