marijnh/CodeMirror — pull request #1556 by aslushnikov (2013-05-30 10:02:07+00:00)
Title: Export visibleLines to public api

#### Problem
The only way to figure out a first visible line number (or a bottom visible line number)
is to call `codeMirror.coordsChar({left: 0, top: 0}, "local")`. (please correct me if I'm wrong).
The problem is, however, that this method is pretty expensive because of a `measureLineInner` call, so in case of calling it multiple times in a `scroll` event handler on a file with multiple long lines - scrolling gets laggy.

The `visibleLines` method seems to be a natural solution for the problem.