 
     @render()
 
+    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) + "]"
+
     @data.length is 0
 
   render: ->
-    @renderer.render(@buffer.changes(), @buffer.cursorX, @buffer.cursorY)
+    @view.render(@buffer.changes(), @buffer.cursorX, @buffer.cursorY)
     @buffer.clearChanges()
 
   # ==== Screen buffer operations

  # ------ Cursor control

  showCursor: ->
    @renderer.showCursor true

  hideCursor: ->
    @renderer.showCursor false

  # ----- Scroll control


class AsciiIo.VT

  constructor: (@cols, @lines, @view) ->
    @data = ''
    @resetTerminal()
    @render()
