Default autoWidth in getter method to match autoHeight

This commit is contained in:
Nathan Sobo
2016-08-17 12:04:57 -06:00
parent 13c00995d4
commit 6a0b4d8fc0

View File

@@ -144,7 +144,6 @@ class TextEditor extends Model
@selections = []
@hasTerminatedPendingState = false
@autoWidth ?= false
@mini ?= false
@scrollPastEnd ?= true
@showInvisibles ?= true
@@ -3544,6 +3543,8 @@ class TextEditor extends Model
getAutoHeight: -> @autoHeight ? true
getAutoWidth: -> @autoWidth ? false
setWidth: (width, reentrant=false) ->
if reentrant
@update({width})
@@ -3556,9 +3557,6 @@ class TextEditor extends Model
Grim.deprecate("This is now a view method. Call TextEditorElement::getWidth instead.")
@width
getAutoWidth: ->
@autoWidth
# Experimental: Scroll the editor such that the given screen row is at the
# top of the visible area.
setFirstVisibleScreenRow: (screenRow, fromView) ->