 
     return sizes
 
-  updateSize: (force=no) ->
+
+  updateSize: (force = no) ->
+
 
     [swidth, sheight] = [@parent.getWidth()  or @currentWidth,\
                          @parent.getHeight() or @currentHeight]
 
+    @updateAppSize()
+
     return  if not force and \
                swidth is @currentWidth and sheight is @currentHeight
 


  changeScreenBuffer: (index) ->

  isScrolledToBottom: ->
    @container.scrollTop() + @parent.getHeight() >= @container.prop("scrollHeight") - 3

  scrollToBottom: (animate=no) ->
    return if @isScrolledToBottom()
    @container.stop()
    if animate
      @container.animate { scrollTop: @container.prop("scrollHeight") - @parent.getHeight() }, duration: 200
    else
      @container.scrollTop(@container.prop("scrollHeight") - @parent.getHeight())

  setScrollbackLimit: (limit) ->
    @screenBuffer.scrollbackLimit = limit
    @screenBuffer.flush()

  inspectString: (string) ->
    escaped = string.replace /[\x00-\x1f\\]/g, (character) ->

      '\\x' + hex
    '"' + escaped.replace('"', '\\"') + '"'


  paste: (event) =>

    KD.utils.stopDOMEvent event
    @server.input event.originalEvent.clipboardData.getData "text/plain"
    @setKeyFocus()
