(doc, n)
| 2090 | // Most of the external API clips given positions to make sure they |
| 2091 | // actually exist within the document. |
| 2092 | function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1));} |
| 2093 | function clipPos(doc, pos) { |
| 2094 | if (pos.line < doc.first) return Pos(doc.first, 0); |
| 2095 | var last = doc.first + doc.size - 1; |
no outgoing calls
no test coverage detected