(chunk, n)
| 2969 | return n + i; |
| 2970 | } |
| 2971 | function heightAtLine(chunk, n) { |
| 2972 | var h = 0; |
| 2973 | outer: do { |
| 2974 | for (var i = 0, e = chunk.children.length; i < e; ++i) { |
| 2975 | var child = chunk.children[i], sz = child.chunkSize(); |
| 2976 | if (n < sz) { chunk = child; continue outer; } |
| 2977 | n -= sz; |
| 2978 | h += child.height; |
| 2979 | } |
| 2980 | return h; |
| 2981 | } while (!chunk.lines); |
| 2982 | for (var i = 0; i < n; ++i) h += chunk.lines[i].height; |
| 2983 | return h; |
| 2984 | } |
| 2985 | |
| 2986 | // The history object 'chunks' changes that are made close together |
| 2987 | // and at almost the same time into bigger undoable units. |
no outgoing calls
no test coverage detected