Show More
@@ -2194,20 +2194,6 b' var CodeMirror = (function() {' | |||||
2194 | cm.indentLine(cm.getCursor().line); |
|
2194 | cm.indentLine(cm.getCursor().line); | |
2195 | }, |
|
2195 | }, | |
2196 | toggleOverwrite: function(cm) {cm.toggleOverwrite();} |
|
2196 | toggleOverwrite: function(cm) {cm.toggleOverwrite();} | |
2197 | ,delSpaceToPrevTabStop : function(cm){ |
|
|||
2198 | var from = cm.getCursor(true), to = cm.getCursor(false), sel = !posEq(from, to); |
|
|||
2199 | if (!posEq(from, to)) {cm.replaceRange("", from, to); return} |
|
|||
2200 | var cur = cm.getCursor(), line = cm.getLine(cur.line); |
|
|||
2201 | var tabsize = cm.getOption('tabSize'); |
|
|||
2202 | var chToPrevTabStop = cur.ch-(Math.ceil(cur.ch/tabsize)-1)*tabsize; |
|
|||
2203 | var from = {ch:cur.ch-chToPrevTabStop,line:cur.line} |
|
|||
2204 | var select = cm.getRange(from,cur) |
|
|||
2205 | if( select.match(/^\ +$/) != null){ |
|
|||
2206 | cm.replaceRange("",from,cur) |
|
|||
2207 | } else { |
|
|||
2208 | cm.deleteH(-1,"char") |
|
|||
2209 | } |
|
|||
2210 | } |
|
|||
2211 | }; |
|
2197 | }; | |
2212 |
|
2198 | |||
2213 | var keyMap = CodeMirror.keyMap = {}; |
|
2199 | var keyMap = CodeMirror.keyMap = {}; |
General Comments 0
You need to be logged in to leave comments.
Login now