(cm, from, to, mayGrow, text)
| 8954 | var lastKill = null; |
| 8955 | |
| 8956 | function kill(cm, from, to, mayGrow, text) { |
| 8957 | if (text == null) text = cm.getRange(from, to); |
| 8958 | |
| 8959 | if (mayGrow && lastKill && lastKill.cm == cm && posEq(from, lastKill.pos) && cm.isClean(lastKill.gen)) |
| 8960 | growRingTop(text); |
| 8961 | else |
| 8962 | addToRing(text); |
| 8963 | cm.replaceRange("", from, to, "+delete"); |
| 8964 | |
| 8965 | if (mayGrow) lastKill = {cm: cm, pos: from, gen: cm.changeGeneration()}; |
| 8966 | else lastKill = null; |
| 8967 | } |
| 8968 | |
| 8969 | // Boundaries of various units |
| 8970 |
no test coverage detected