diff options
author | Wu Cheng-Han | 2015-05-15 12:58:13 +0800 |
---|---|---|
committer | Wu Cheng-Han | 2015-05-15 12:58:13 +0800 |
commit | 4e64583a0b6175d2c9a6729ffde1472dd55d389c (patch) | |
tree | 75253f2425f2e4f5906ed4fd30eca29a906ee47a /public/vendor/codemirror/keymap | |
parent | 2d36d7ce84c636faac17cef3d3a7c22568df38fe (diff) |
Marked as 0.2.8
Diffstat (limited to 'public/vendor/codemirror/keymap')
-rwxr-xr-x | public/vendor/codemirror/keymap/sublime.js | 12 |
1 files changed, 6 insertions, 6 deletions
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) { |