This commit is contained in:
Corey Johnson & Nathan Sobo
2012-01-25 10:37:19 -08:00
parent 3317afb695
commit 0528a7b8cb

View File

@@ -20,10 +20,15 @@ class Editor extends Template
initialize: () ->
requireStylesheet 'editor.css'
@cursor = Cursor.build(this).appendTo(this)
@bindKeys()
@attachCursor()
@handleEvents()
@setBuffer(new Buffer)
attachCursor: ->
@cursor = Cursor.build(this).appendTo(this)
bindKeys: ->
atom.bindKeys '*',
right: 'move-right'
left: 'move-left'
@@ -35,6 +40,7 @@ class Editor extends Template
@on 'move-down', => @moveDown()
@on 'move-up', => @moveUp()
handleEvents: ->
@on 'focus', =>
@hiddenInput.focus()
false