(doc, n)
| 21 | // Most of the external API clips given positions to make sure they |
| 22 | // actually exist within the document. |
| 23 | export function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1))} |
| 24 | export function clipPos(doc, pos) { |
| 25 | if (pos.line < doc.first) return Pos(doc.first, 0) |
| 26 | let last = doc.first + doc.size - 1 |
no test coverage detected