(cm)
| 639 | } |
| 640 | |
| 641 | function adjustContentWidth(cm) { |
| 642 | var display = cm.display; |
| 643 | var width = measureChar(cm, display.maxLine, display.maxLine.text.length).left; |
| 644 | display.maxLineChanged = false; |
| 645 | var minWidth = Math.max(0, width + 3); |
| 646 | var maxScrollLeft = Math.max(0, display.sizer.offsetLeft + minWidth + scrollerCutOff - display.scroller.clientWidth); |
| 647 | display.sizer.style.minWidth = minWidth + "px"; |
| 648 | if (maxScrollLeft < cm.doc.scrollLeft) |
| 649 | setScrollLeft(cm, Math.min(display.scroller.scrollLeft, maxScrollLeft), true); |
| 650 | } |
| 651 | |
| 652 | function setDocumentHeight(cm, measure) { |
| 653 | cm.display.sizer.style.minHeight = cm.display.heightForcer.style.top = measure.docHeight + "px"; |
no test coverage detected