(op)
| 3832 | } |
| 3833 | |
| 3834 | function endOperation_R2(op) { |
| 3835 | var cm = op.cm, display = cm.display; |
| 3836 | if (op.updatedDisplay) { updateHeightsInViewport(cm); } |
| 3837 | |
| 3838 | op.barMeasure = measureForScrollbars(cm); |
| 3839 | |
| 3840 | // If the max line changed since it was last measured, measure it, |
| 3841 | // and ensure the document's width matches it. |
| 3842 | // updateDisplay_W2 will use these properties to do the actual resizing |
| 3843 | if (display.maxLineChanged && !cm.options.lineWrapping) { |
| 3844 | op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3; |
| 3845 | cm.display.sizerWidth = op.adjustWidthTo; |
| 3846 | op.barMeasure.scrollWidth = |
| 3847 | Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth); |
| 3848 | op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm)); |
| 3849 | } |
| 3850 | |
| 3851 | if (op.updatedDisplay || op.selectionChanged) |
| 3852 | { op.preparedSelection = display.input.prepareSelection(); } |
| 3853 | } |
| 3854 | |
| 3855 | function endOperation_W2(op) { |
| 3856 | var cm = op.cm; |
no test coverage detected