(op)
| 5398 | } |
| 5399 | |
| 5400 | function endOperation_R2(op) { |
| 5401 | var cm = op.cm, |
| 5402 | display = cm.display |
| 5403 | if (op.updatedDisplay) { |
| 5404 | updateHeightsInViewport(cm) |
| 5405 | } |
| 5406 | |
| 5407 | op.barMeasure = measureForScrollbars(cm) |
| 5408 | |
| 5409 | // If the max line changed since it was last measured, measure it, |
| 5410 | // and ensure the document's width matches it. |
| 5411 | // updateDisplay_W2 will use these properties to do the actual resizing |
| 5412 | if (display.maxLineChanged && !cm.options.lineWrapping) { |
| 5413 | op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3 |
| 5414 | cm.display.sizerWidth = op.adjustWidthTo |
| 5415 | op.barMeasure.scrollWidth = Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth) |
| 5416 | op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm)) |
| 5417 | } |
| 5418 | |
| 5419 | if (op.updatedDisplay || op.selectionChanged) { |
| 5420 | op.preparedSelection = display.input.prepareSelection() |
| 5421 | } |
| 5422 | } |
| 5423 | |
| 5424 | function endOperation_W2(op) { |
| 5425 | var cm = op.cm |
no test coverage detected