From 4e64583a0b6175d2c9a6729ffde1472dd55d389c Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Fri, 15 May 2015 12:58:13 +0800 Subject: Marked as 0.2.8 --- public/vendor/codemirror/keymap/sublime.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'public/vendor/codemirror/keymap/sublime.js') diff --git a/public/vendor/codemirror/keymap/sublime.js b/public/vendor/codemirror/keymap/sublime.js index 441456f5..4f7a6f31 100755 --- a/public/vendor/codemirror/keymap/sublime.js +++ b/public/vendor/codemirror/keymap/sublime.js @@ -258,7 +258,7 @@ var actual = line - offset; if (line == obj.end) head = Pos(actual, cm.getLine(actual).length + 1); if (actual < cm.lastLine()) { - cm.replaceRange(" ", Pos(actual), Pos(actual + 1, /^\s*/.exec(cm.getLine(actual + 1))[0].length)); + cm.replaceRange(" ", Pos(actual), Pos(actual + 1, /^\s*/.exec(cm.getLine(actual + 1))[0].length), "+joinLines"); ++offset; } } @@ -274,9 +274,9 @@ for (var i = 0; i < rangeCount; i++) { var range = cm.listSelections()[i]; if (range.empty()) - cm.replaceRange(cm.getLine(range.head.line) + "\n", Pos(range.head.line, 0)); + cm.replaceRange(cm.getLine(range.head.line) + "\n", Pos(range.head.line, 0), null, "+duplicateLine"); else - cm.replaceRange(cm.getRange(range.from(), range.to()), range.from()); + cm.replaceRange(cm.getRange(range.from(), range.to()), range.from(), null, "+duplicateLine"); } cm.scrollIntoView(); }); @@ -311,7 +311,7 @@ if (au != bu) { a = au; b = bu; } return a < b ? -1 : a == b ? 0 : 1; }); - cm.replaceRange(lines, start, end); + cm.replaceRange(lines, start, end, "+sortLines"); if (selected) ranges.push({anchor: start, head: end}); } if (selected) cm.setSelections(ranges, 0); @@ -402,7 +402,7 @@ if (at && CodeMirror.cmpPos(range.head, at) > 0) continue; var word = wordAt(cm, range.head); at = word.from; - cm.replaceRange(mod(word.word), word.from, word.to); + cm.replaceRange(mod(word.word), word.from, word.to, "case"); } }); } @@ -452,7 +452,7 @@ var from = cm.getCursor(), to = found; if (CodeMirror.cmpPos(from, to) > 0) { var tmp = to; to = from; from = tmp; } cm.state.sublimeKilled = cm.getRange(from, to); - cm.replaceRange("", from, to); + cm.replaceRange("", from, to, "+delete"); } }; cmds[map[cK + ctrl + "X"] = "swapWithSublimeMark"] = function(cm) { -- cgit v1.2.3