mirror of
https://github.com/atom/atom.git
synced 2026-01-23 22:08:08 -05:00
add config option for explicitly setting the editor line height
This commit is contained in:
@@ -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`.
|
||||
|
||||
Reference in New Issue
Block a user