|
763 | 763 | updateHeightsInViewport(cm); |
764 | 764 | var barMeasure = measureForScrollbars(cm); |
765 | 765 | updateSelection(cm); |
766 | | - setDocumentHeight(cm, barMeasure); |
767 | 766 | updateScrollbars(cm, barMeasure); |
| 767 | + setDocumentHeight(cm, barMeasure); |
768 | 768 | } |
769 | 769 |
|
770 | 770 | update.signal(cm, "update", cm); |
|
781 | 781 | postUpdateDisplay(cm, update); |
782 | 782 | var barMeasure = measureForScrollbars(cm); |
783 | 783 | updateSelection(cm); |
784 | | - setDocumentHeight(cm, barMeasure); |
785 | 784 | updateScrollbars(cm, barMeasure); |
| 785 | + setDocumentHeight(cm, barMeasure); |
786 | 786 | update.finish(); |
787 | 787 | } |
788 | 788 | } |
789 | 789 |
|
790 | 790 | function setDocumentHeight(cm, measure) { |
791 | 791 | cm.display.sizer.style.minHeight = measure.docHeight + "px"; |
792 | 792 | cm.display.heightForcer.style.top = measure.docHeight + "px"; |
793 | | - cm.display.gutters.style.height = Math.max(measure.docHeight + cm.display.barHeight + scrollGap(cm), |
794 | | - measure.clientHeight) + "px"; |
| 793 | + cm.display.gutters.style.height = (measure.docHeight + cm.display.barHeight + scrollGap(cm)) + "px"; |
795 | 794 | } |
796 | 795 |
|
797 | 796 | // Read the actual heights of the rendered lines, and update their |
|
3116 | 3115 |
|
3117 | 3116 | if (op.preparedSelection) |
3118 | 3117 | cm.display.input.showSelection(op.preparedSelection); |
3119 | | - if (op.updatedDisplay) |
3120 | | - setDocumentHeight(cm, op.barMeasure); |
3121 | 3118 | if (op.updatedDisplay || op.startHeight != cm.doc.height) |
3122 | 3119 | updateScrollbars(cm, op.barMeasure); |
| 3120 | + if (op.updatedDisplay) |
| 3121 | + setDocumentHeight(cm, op.barMeasure); |
3123 | 3122 |
|
3124 | 3123 | if (op.selectionChanged) restartBlink(cm); |
3125 | 3124 |
|
|
0 commit comments