From 698a5ac421c58203db50707e703e814bf8ff82f1 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 29 Sep 2015 17:37:43 +0200 Subject: [PATCH] :green_heart: --- src/text-editor-component.coffee | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/text-editor-component.coffee b/src/text-editor-component.coffee index b9535b2aa..0ed7df25e 100644 --- a/src/text-editor-component.coffee +++ b/src/text-editor-component.coffee @@ -560,6 +560,7 @@ class TextEditorComponent handleStylingChange: => @sampleFontStyling() @sampleBackgroundColors() + @presenter.characterWidthsChanged() handleDragUntilMouseUp: (dragHandler) => dragging = false @@ -708,8 +709,6 @@ class TextEditorComponent oldFontFamily = @fontFamily oldLineHeight = @lineHeight - @presenter.characterWidthsChanged() - {@fontSize, @fontFamily, @lineHeight} = getComputedStyle(@getTopmostDOMNode()) if @fontSize isnt oldFontSize or @fontFamily isnt oldFontFamily or @lineHeight isnt oldLineHeight @@ -824,6 +823,7 @@ class TextEditorComponent setFontSize: (fontSize) -> @getTopmostDOMNode().style.fontSize = fontSize + 'px' @sampleFontStyling() + @presenter.characterWidthsChanged() getFontFamily: -> getComputedStyle(@getTopmostDOMNode()).fontFamily @@ -831,10 +831,12 @@ class TextEditorComponent setFontFamily: (fontFamily) -> @getTopmostDOMNode().style.fontFamily = fontFamily @sampleFontStyling() + @presenter.characterWidthsChanged() setLineHeight: (lineHeight) -> @getTopmostDOMNode().style.lineHeight = lineHeight @sampleFontStyling() + @presenter.characterWidthsChanged() setShowIndentGuide: (showIndentGuide) -> atom.config.set("editor.showIndentGuide", showIndentGuide)