(display, doc, viewPort)
| 373 | } |
| 374 | |
| 375 | function visibleLines(display, doc, viewPort) { |
| 376 | var top = display.scroller.scrollTop, height = display.wrapper.clientHeight; |
| 377 | if (typeof viewPort == "number") top = viewPort; |
| 378 | else if (viewPort) {top = viewPort.top; height = viewPort.bottom - viewPort.top;} |
| 379 | top = Math.floor(top - paddingTop(display)); |
| 380 | var bottom = Math.ceil(top + height); |
| 381 | return {from: lineAtHeight(doc, top), to: lineAtHeight(doc, bottom)}; |
| 382 | } |
| 383 | |
| 384 | // LINE NUMBERS |
| 385 |
no test coverage detected