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