(from, to, newText, selFrom, selTo)
| 839 | // Replace the range from from to to by the strings in newText. |
| 840 | // Afterwards, set the selection to selFrom, selTo. |
| 841 | function updateLines(from, to, newText, selFrom, selTo) { |
| 842 | if (suppressEdits) return; |
| 843 | if (history) { |
| 844 | var old = []; |
| 845 | doc.iter(from.line, to.line + 1, function(line) { old.push(line.text); }); |
| 846 | history.addChange(from.line, newText.length, old); |
| 847 | while (history.done.length > options.undoDepth) history.done.shift(); |
| 848 | } |
| 849 | updateLinesNoUndo(from, to, newText, selFrom, selTo); |
| 850 | } |
| 851 | function unredoHelper(from, to) { |
| 852 | if (!from.length) return; |
| 853 | var set = from.pop(), out = []; |
no test coverage detected