From 5eb12e671bf477d94e379fd1b3cc22e37aac3dd6 Mon Sep 17 00:00:00 2001 From: Justin Palmer Date: Tue, 18 Mar 2014 15:57:53 -0700 Subject: [PATCH] add config option for explicitly setting the editor line height --- src/editor-view.coffee | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/editor-view.coffee b/src/editor-view.coffee index a2148516e..8c58ded79 100644 --- a/src/editor-view.coffee +++ b/src/editor-view.coffee @@ -44,6 +44,7 @@ class EditorView extends View @configDefaults: fontFamily: '' fontSize: 16 + editorLineHeight: 1 showInvisibles: false showIndentGuide: false showLineNumbers: true @@ -340,6 +341,8 @@ class EditorView extends View @subscribe atom.config.observe 'editor.invisibles', (invisibles) => @setInvisibles(invisibles) @subscribe atom.config.observe 'editor.fontSize', (fontSize) => @setFontSize(fontSize) @subscribe atom.config.observe 'editor.fontFamily', (fontFamily) => @setFontFamily(fontFamily) + @subscribe atom.config.observe 'editor.editorLineHeight', (editorLineHeight) => @setEditorLineHeight(editorLineHeight) + handleEvents: -> @on 'focus', => @@ -742,6 +745,10 @@ class EditorView extends View @redraw() + setEditorLineHeight: (editorLineHeight) -> + @css('line-height', editorLineHeight) + @redraw() + # Public: Gets the font family for the editor. # # Returns a {String} identifying the CSS `font-family`.