(display, doc, viewPort)
| 345 | } |
| 346 | |
| 347 | function visibleLines(display, doc, viewPort) { |
| 348 | var top = display.scroller.scrollTop, height = display.wrapper.clientHeight; |
| 349 | if (typeof viewPort == "number") top = viewPort; |
| 350 | else if (viewPort) {top = viewPort.top; height = viewPort.bottom - viewPort.top;} |
| 351 | top = Math.floor(top - paddingTop(display)); |
| 352 | var bottom = Math.ceil(top + height); |
| 353 | return {from: lineAtHeight(doc, top), to: lineAtHeight(doc, bottom)}; |
| 354 | } |
| 355 | |
| 356 | // LINE NUMBERS |
| 357 |
no test coverage detected