MCPcopy Index your code
hub / github.com/csev/py4e / clipLine

Function clipLine

tools/pythonauto/static/codemirror/codemirror.js:2545–2545  ·  view source on GitHub ↗
(doc, n)

Source from the content-addressed store, hash-verified

2543 // SELECTION
2544
2545 function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1));}
2546 function clipPos(doc, pos) {
2547 if (pos.line < doc.first) return Pos(doc.first, 0);
2548 var last = doc.first + doc.size - 1;

Callers 2

changeLineFunction · 0.70
codemirror.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected