(op)
| 2971 | } |
| 2972 | |
| 2973 | function endOperation_R2(op) { |
| 2974 | var cm = op.cm, display = cm.display; |
| 2975 | if (op.updatedDisplay) updateHeightsInViewport(cm); |
| 2976 | |
| 2977 | op.barMeasure = measureForScrollbars(cm); |
| 2978 | |
| 2979 | // If the max line changed since it was last measured, measure it, |
| 2980 | // and ensure the document's width matches it. |
| 2981 | // updateDisplay_W2 will use these properties to do the actual resizing |
| 2982 | if (display.maxLineChanged && !cm.options.lineWrapping) { |
| 2983 | op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3; |
| 2984 | cm.display.sizerWidth = op.adjustWidthTo; |
| 2985 | op.barMeasure.scrollWidth = |
| 2986 | Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth); |
| 2987 | op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm)); |
| 2988 | } |
| 2989 | |
| 2990 | if (op.updatedDisplay || op.selectionChanged) |
| 2991 | op.preparedSelection = display.input.prepareSelection(); |
| 2992 | } |
| 2993 | |
| 2994 | function endOperation_W2(op) { |
| 2995 | var cm = op.cm; |
no test coverage detected