 
             expect(lineStateForScreenRow(presenter, 9)).toBeUndefined()
 
+          it "updates when the editor's content changes", ->
+            presenter = buildPresenter(explicitHeight: 25, scrollTop: 10, lineHeight: 10, tileSize: 2)
+
+            expectStateUpdate presenter, -> buffer.insert([2, 0], "hello\nworld\n")
+
+            line1 = editor.tokenizedLineForScreenRow(1)
+            expectValues lineStateForScreenRow(presenter, 1), {
+              text: line1.text
+              tags: line1.tags
+            }
+
+            line2 = editor.tokenizedLineForScreenRow(2)
+            expectValues lineStateForScreenRow(presenter, 2), {
+              text: line2.text
+              tags: line2.tags
+            }
+
+            line3 = editor.tokenizedLineForScreenRow(3)
+            expectValues lineStateForScreenRow(presenter, 3), {
+              text: line3.text
+              tags: line3.tags
+            }
+
           it "includes the .endOfLineInvisibles if the editor.showInvisibles config option is true", ->
             editor.setText("hello\nworld\r\n")
             presenter = buildPresenter(explicitHeight: 25, scrollTop: 0, lineHeight: 10)


            gutterState = getLineNumberGutterState(presenter)
            gutterState.content.tiles[tileRow]?.lineNumbers[key]

          it "contains states for line numbers that are visible on screen", ->
            editor.foldBufferRow(4)

          tileRow = presenter.tileForRow(row)
          presenter.getState().content.tiles[tileRow]?.lines[lineId]

        tiledContentContract (presenter) -> presenter.getState().content

        describe "[tileId].lines[lineId]", -> # line state objects
          it "includes the state for visible lines in a tile", ->
