(op)
| 3099 | } |
| 3100 | |
| 3101 | function endOperation_R2(op) { |
| 3102 | var cm = op.cm, display = cm.display; |
| 3103 | if (op.updatedDisplay) updateHeightsInViewport(cm); |
| 3104 | |
| 3105 | op.barMeasure = measureForScrollbars(cm); |
| 3106 | |
| 3107 | // If the max line changed since it was last measured, measure it, |
| 3108 | // and ensure the document's width matches it. |
| 3109 | // updateDisplay_W2 will use these properties to do the actual resizing |
| 3110 | if (display.maxLineChanged && !cm.options.lineWrapping) { |
| 3111 | op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3; |
| 3112 | cm.display.sizerWidth = op.adjustWidthTo; |
| 3113 | op.barMeasure.scrollWidth = |
| 3114 | Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth); |
| 3115 | op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm)); |
| 3116 | } |
| 3117 | |
| 3118 | if (op.updatedDisplay || op.selectionChanged) |
| 3119 | op.preparedSelection = display.input.prepareSelection(op.focus); |
| 3120 | } |
| 3121 | |
| 3122 | function endOperation_W2(op) { |
| 3123 | var cm = op.cm; |
no test coverage detected