     if document = @history.previous()
       @history.current = document
       @render(document)
+      @dispatch('written:changed', document: document)
 
   redo: (e) =>
     if e.code == 'KeyZ' && e.metaKey && e.shiftKey


      @render(document)
      @history.push(document)


  render: (document, focus = true) =>

    if document = @history.next()
      @history.current = document
      @render(@history.current)
      @dispatch('written:changed', document: document)

  toString: =>
    texts = []
