   # ------ Cursor control
 
   showCursor: ->
-    @renderer.showCursor true
+    @view.showCursor true
 
   hideCursor: ->
-    @renderer.showCursor false
+    @view.showCursor false
 
   # ----- Scroll control
 

class AsciiIo.VT

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


    @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: ->
    @view.render(@buffer.changes(), @buffer.cursorX, @buffer.cursorY)
    @buffer.clearChanges()

  # ==== Screen buffer operations
