(cm)
| 5008 | // 'simulates' scrolling that position into view in a cheap way, so |
| 5009 | // that the effect of intermediate scroll commands is not ignored. |
| 5010 | function resolveScrollToPos(cm) { |
| 5011 | var range$$1 = cm.curOp.scrollToPos |
| 5012 | if (range$$1) { |
| 5013 | cm.curOp.scrollToPos = null |
| 5014 | var from = estimateCoords(cm, range$$1.from), |
| 5015 | to = estimateCoords(cm, range$$1.to) |
| 5016 | scrollToCoordsRange(cm, from, to, range$$1.margin) |
| 5017 | } |
| 5018 | } |
| 5019 | |
| 5020 | function scrollToCoordsRange(cm, from, to, margin) { |
| 5021 | var sPos = calculateScrollPos(cm, { |
no test coverage detected