diff --git a/spec/app/editor-spec.coffee b/spec/app/editor-spec.coffee index 5860af6cd..73d20676b 100644 --- a/spec/app/editor-spec.coffee +++ b/spec/app/editor-spec.coffee @@ -493,6 +493,8 @@ describe "Editor", -> expect(editor.lineHeight).toBeGreaterThan lineHeightBefore expect(editor.charWidth).toBeGreaterThan charWidthBefore expect(editor.getCursorView().position()).toEqual { top: 5 * editor.lineHeight, left: 6 * editor.charWidth } + expect(editor.renderedLines.outerHeight()).toBe buffer.getLineCount() * editor.lineHeight + expect(editor.verticalScrollbarContent.height()).toBe buffer.getLineCount() * editor.lineHeight # ensure we clean up font size subscription editor.trigger('core:close') diff --git a/src/app/editor.coffee b/src/app/editor.coffee index e4fb4aae8..2d88288f1 100644 --- a/src/app/editor.coffee +++ b/src/app/editor.coffee @@ -572,6 +572,8 @@ class Editor extends View if fontSize? @css('font-size', fontSize + 'px') @calculateDimensions() + @updatePaddingOfRenderedLines() + @handleScrollHeightChange() @updateCursorViews() @updateRenderedLines()