   paste: ->
     @input atom.clipboard.read()
 
-  attachResizeEvents: ->
-    @on 'focus', @focus
-    $(window).on 'resize', => @resizeToPane()
-    @disposable = atom.workspace.getActivePane().observeFlexScale => setTimeout (=> @resizeToPane()), 300
-
   focus: ->
     @resizeToPane()
     @focusTerm()


  attachEvents: ->
    @resizeToPane = @resizeToPane.bind this
    @attachResizeEvents()
    atom.commands.add "atom-workspace", "term2:paste", => @paste()
    atom.commands.add "atom-workspace", "term2:copy", => @copy()



      @ptyProcess.on 'term2:data', (data) =>
        utf8 = new Buffer(data, "base64").toString("utf-8")
        @term.write utf8
        @emitter.emit('data', data)

