       if processed is 0
         # console.log "no kurwa: #{@formattedData(@data)}"
         break
-        # throw 'up'
 
       @data = @data.slice(processed)
 
-      # match = null
-
-      # for pattern in @COMPILED_PATTERNS
-      #   match = pattern[0].exec(@data)
-
-      #   if match
-      #     handler = pattern[1]
-      #     handler.call(this, @data, match)
-      #     @data = @data.slice(match[0].length)
-      #     break
-
-      # break unless match
-
     @render()
 
     @data.length is 0
-
-  # aaa: ->
-  #   if @data.length > 500
-  #     head = @data.slice(0, 100)
-  #     hex = ("0x#{c.charCodeAt(0).toString(16)}" for c in head)
-  #     console.log "failed matching: '" + Utf8.decode(head) + "' (" + hex.join() + ")" # [pos: " + (@dataIndex - count) + "]"
 
   formattedData: (data) ->
     head = data.slice(0, 100)

        @reportRowAndColumn()
      when "r" # Set top and bottom margins (scroll region on VT100)
        @setScrollRegion n or 0, m or @lines - 1
      else
        throw "no handler for CSI term: " + term


  handlePrivateControlSequence: (data, params) ->
    action = data[data.length - 1]

    @view.visualBell()
    # @trigger('bell')

  feed: (data) ->
    @data += data

