From c37138e09e99553a3dcac0efb67a4b24dfdea0d1 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Wed, 17 Aug 2016 18:07:52 +0200 Subject: [PATCH] Revert refactoring to make the diff shorter --- src/text-editor-presenter.coffee | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/text-editor-presenter.coffee b/src/text-editor-presenter.coffee index c65a735d8..8c1d6ccbd 100644 --- a/src/text-editor-presenter.coffee +++ b/src/text-editor-presenter.coffee @@ -741,21 +741,23 @@ class TextEditorPresenter clientHeightWithoutHorizontalScrollbar = clientHeightWithHorizontalScrollbar - @measuredHorizontalScrollbarHeight horizontalScrollbarVisible = + not @model.isMini() and (@contentWidth > clientWidthWithVerticalScrollbar or @contentWidth > clientWidthWithoutVerticalScrollbar and @contentHeight > clientHeightWithHorizontalScrollbar) verticalScrollbarVisible = + not @model.isMini() and (@contentHeight > clientHeightWithHorizontalScrollbar or @contentHeight > clientHeightWithoutHorizontalScrollbar and @contentWidth > clientWidthWithVerticalScrollbar) horizontalScrollbarHeight = - if horizontalScrollbarVisible and not @model.isMini() + if horizontalScrollbarVisible @measuredHorizontalScrollbarHeight else 0 verticalScrollbarWidth = - if verticalScrollbarVisible and not @model.isMini() + if verticalScrollbarVisible @measuredVerticalScrollbarWidth else 0