(from, to, newText, selFrom, selTo)
| 639 | // Replace the range from from to to by the strings in newText. |
| 640 | // Afterwards, set the selection to selFrom, selTo. |
| 641 | function updateLines(from, to, newText, selFrom, selTo) { |
| 642 | if (suppressEdits) return; |
| 643 | if (history) { |
| 644 | var old = []; |
| 645 | doc.iter(from.line, to.line + 1, function(line) { old.push(line.text); }); |
| 646 | history.addChange(from.line, newText.length, old); |
| 647 | while (history.done.length > options.undoDepth) history.done.shift(); |
| 648 | } |
| 649 | updateLinesNoUndo(from, to, newText, selFrom, selTo); |
| 650 | } |
| 651 | function unredoHelper(from, to) { |
| 652 | if (!from.length) return; |
| 653 | var set = from.pop(), out = []; |
no test coverage detected