(cm, n)
| 2123 | // Find the view element corresponding to a given line. Return null |
| 2124 | // when the line isn't visible. |
| 2125 | function findViewIndex(cm, n) { |
| 2126 | if (n >= cm.display.viewTo) return null; |
| 2127 | n -= cm.display.viewFrom; |
| 2128 | if (n < 0) return null; |
| 2129 | var view = cm.display.view; |
| 2130 | for (var i = 0; i < view.length; i++) { |
| 2131 | n -= view[i].size; |
| 2132 | if (n < 0) return i; |
| 2133 | } |
| 2134 | } |
| 2135 | |
| 2136 | function viewCuttingPoint(cm, oldN, newN, dir) { |
| 2137 | var index = findViewIndex(cm, oldN), diff, view = cm.display.view; |
no outgoing calls
no test coverage detected
searching dependent graphs…