     @term.focus()
 
   resizeToPane_: ->
-    return unless @ptyProcess
-    {cols, rows} = @getDimensions_()
+    return unless @ptyProcess and @term
+    @term.fit()
+    {cols, rows} = @getDimensions()
     @resize cols, rows
 
   getDimensions: ->
     cols = @term.cols
     rows = @term.rows
-    {cols, rows}
-
-  getDimensions_: ->
-    if not @term
-      cols = Math.floor @width() / 7
-      rows = Math.floor @height() / 15
-      return {cols, rows}
-
-    @find('.terminal').append @fakeRow
-    fakeCol = @fakeRow.children().first()
-    cols = Math.floor (@width() / fakeCol.width()) or 9
-    rows = Math.floor (@height() / fakeCol.height()) or 16
-    @fakeRow.remove()
     {cols, rows}
 
   exit: ->

      @emitter.emit 'did-change-title', title

    term.open this.get(0)

    if not @opts.forkPTY
      term.end = => @exit()

path = require 'path'
debounce = require 'debounce'
Terminal = require 'xterm'
Terminal.loadAddon('fit')
{CompositeDisposable} = require 'atom'
 # see https://github.com/f/atom-term.js/pull/5
 # see https://github.com/f/atom-term.js/pull/4
