(pos)
| 982 | if (!to) to = from; else to = clipPos(to); |
| 983 | code = splitLines(code); |
| 984 | function adjustPos(pos) { |
| 985 | if (posLess(pos, from)) return pos; |
| 986 | if (!posLess(to, pos)) return end; |
| 987 | var line = pos.line + code.length - (to.line - from.line) - 1; |
| 988 | var ch = pos.ch; |
| 989 | if (pos.line == to.line) |
| 990 | ch += code[code.length-1].length - (to.ch - (to.line == from.line ? from.ch : 0)); |
| 991 | return {line: line, ch: ch}; |
| 992 | } |
| 993 | var end; |
| 994 | replaceRange1(code, from, to, function(end1) { |
| 995 | end = end1; |
no test coverage detected