MCPcopy Index your code
hub / github.com/csev/py4e / replaceRange1

Function replaceRange1

tools/pythonauto/static/codemirrorepl/codemirrorepl.js:1007–1011  ·  view source on GitHub ↗
(code, from, to, computeSel)

Source from the content-addressed store, hash-verified

1005 });
1006 }
1007 function replaceRange1(code, from, to, computeSel) {
1008 var endch = code.length == 1 ? code[0].length + from.ch : code[code.length-1].length;
1009 var newSel = computeSel({line: from.line + code.length - 1, ch: endch});
1010 updateLines(from, to, code, newSel.from, newSel.to);
1011 }
1012
1013 function getRange(from, to) {
1014 var l1 = from.line, l2 = to.line;

Callers 2

replaceRangeFunction · 0.85
replaceSelectionFunction · 0.85

Calls 1

updateLinesFunction · 0.85

Tested by

no test coverage detected