(chunk, n)
| 2769 | return n + i; |
| 2770 | } |
| 2771 | function heightAtLine(chunk, n) { |
| 2772 | var h = 0; |
| 2773 | outer: do { |
| 2774 | for (var i = 0, e = chunk.children.length; i < e; ++i) { |
| 2775 | var child = chunk.children[i], sz = child.chunkSize(); |
| 2776 | if (n < sz) { chunk = child; continue outer; } |
| 2777 | n -= sz; |
| 2778 | h += child.height; |
| 2779 | } |
| 2780 | return h; |
| 2781 | } while (!chunk.lines); |
| 2782 | for (var i = 0; i < n; ++i) h += chunk.lines[i].height; |
| 2783 | return h; |
| 2784 | } |
| 2785 | |
| 2786 | // The history object 'chunks' changes that are made close together |
| 2787 | // and at almost the same time into bigger undoable units. |
no outgoing calls
no test coverage detected