Shim ::setWidth and ::getWidth to TextEditorElement

This commit is contained in:
Antonio Scandurra
2015-09-25 11:05:41 +02:00
parent ce714b9852
commit 33a67ad3c9
4 changed files with 26 additions and 2 deletions

View File

@@ -2987,8 +2987,16 @@ class TextEditor extends Model
getClientHeight: -> @displayBuffer.getClientHeight()
setWidth: (width) -> @displayBuffer.setWidth(width)
getWidth: -> @displayBuffer.getWidth()
setWidth: (width, reentrant=false) ->
if reentrant
@displayBuffer.setWidth(width)
else
Grim.deprecate("This is now a view method. Call TextEditorElement::setWidth instead.")
atom.views.getView(this).setWidth(width)
getWidth: ->
Grim.deprecate("This is now a view method. Call TextEditorElement::getWidth instead.")
atom.views.getView(this).getWidth()
getScrollRow: -> @scrollRow
setScrollRow: (@scrollRow) ->