(from, to, className)
| 1630 | }; |
| 1631 | |
| 1632 | function markText(from, to, className) { |
| 1633 | from = clipPos(from); to = clipPos(to); |
| 1634 | var tm = new TextMarker(); |
| 1635 | if (!posLess(from, to)) return tm; |
| 1636 | function add(line, from, to, className) { |
| 1637 | getLine(line).addMark(new MarkedText(from, to, className, tm)); |
| 1638 | } |
| 1639 | if (from.line == to.line) add(from.line, from.ch, to.ch, className); |
| 1640 | else { |
| 1641 | add(from.line, from.ch, null, className); |
| 1642 | for (var i = from.line + 1, e = to.line; i < e; ++i) |
| 1643 | add(i, null, null, className); |
| 1644 | add(to.line, null, to.ch, className); |
| 1645 | } |
| 1646 | changes.push({from: from.line, to: to.line + 1}); |
| 1647 | return tm; |
| 1648 | } |
| 1649 | |
| 1650 | function setBookmark(pos) { |
| 1651 | pos = clipPos(pos); |
no test coverage detected