(cm)
| 3529 | // 'simulates' scrolling that position into view in a cheap way, so |
| 3530 | // that the effect of intermediate scroll commands is not ignored. |
| 3531 | function resolveScrollToPos(cm) { |
| 3532 | var range = cm.curOp.scrollToPos; |
| 3533 | if (range) { |
| 3534 | cm.curOp.scrollToPos = null; |
| 3535 | var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to); |
| 3536 | scrollToCoordsRange(cm, from, to, range.margin); |
| 3537 | } |
| 3538 | } |
| 3539 | |
| 3540 | function scrollToCoordsRange(cm, from, to, margin) { |
| 3541 | var sPos = calculateScrollPos(cm, { |
no test coverage detected