summaryrefslogtreecommitdiff
path: root/public/vendor/codemirror/addon/edit/closebrackets.js
diff options
context:
space:
mode:
authorWu Cheng-Han2015-06-01 18:04:25 +0800
committerWu Cheng-Han2015-06-01 18:04:25 +0800
commitf7f8c901f4bc39c3ed0a2bdfe1cbaa1ee6957999 (patch)
tree1bb09442906fa8e258c670c87491c64b6de27e68 /public/vendor/codemirror/addon/edit/closebrackets.js
parent4e64583a0b6175d2c9a6729ffde1472dd55d389c (diff)
Marked as 0.2.9
Diffstat (limited to 'public/vendor/codemirror/addon/edit/closebrackets.js')
-rwxr-xr-xpublic/vendor/codemirror/addon/edit/closebrackets.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/public/vendor/codemirror/addon/edit/closebrackets.js b/public/vendor/codemirror/addon/edit/closebrackets.js
index 2bbc6f2a..35b5b32c 100755
--- a/public/vendor/codemirror/addon/edit/closebrackets.js
+++ b/public/vendor/codemirror/addon/edit/closebrackets.js
@@ -63,7 +63,7 @@
}
for (var i = ranges.length - 1; i >= 0; i--) {
var cur = ranges[i].head;
- cm.replaceRange("", Pos(cur.line, cur.ch - 1), Pos(cur.line, cur.ch + 1));
+ cm.replaceRange("", Pos(cur.line, cur.ch - 1), Pos(cur.line, cur.ch + 1), "+delete");
}
}
@@ -79,7 +79,7 @@
if (!around || explode.indexOf(around) % 2 != 0) return CodeMirror.Pass;
}
cm.operation(function() {
- cm.replaceSelection("\n\n", null);
+ cm.replaceSelection("\n\n", null, "+input");
cm.execCommand("goCharLeft");
ranges = cm.listSelections();
for (var i = 0; i < ranges.length; i++) {
@@ -144,12 +144,12 @@
var sels = cm.getSelections();
for (var i = 0; i < sels.length; i++)
sels[i] = left + sels[i] + right;
- cm.replaceSelections(sels, "around");
+ cm.replaceSelections(sels, "around", "+input");
} else if (type == "both") {
- cm.replaceSelection(left + right, null);
+ cm.replaceSelection(left + right, null, "+input");
cm.execCommand("goCharLeft");
} else if (type == "addFour") {
- cm.replaceSelection(left + left + left + left, "before");
+ cm.replaceSelection(left + left + left + left, "before", "+input");
cm.execCommand("goCharRight");
}
});