MCPcopy
hub / github.com/witheve/Eve / kill

Function kill

src/codemirror.js:8956–8967  ·  view source on GitHub ↗
(cm, from, to, mayGrow, text)

Source from the content-addressed store, hash-verified

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

Callers 3

killToFunction · 0.85
killRegionFunction · 0.85
codemirror.jsFile · 0.85

Calls 6

posEqFunction · 0.85
growRingTopFunction · 0.85
addToRingFunction · 0.85
getRangeMethod · 0.80
isCleanMethod · 0.80
replaceRangeMethod · 0.80

Tested by

no test coverage detected