         expect(tokenizedBuffer.lineForScreenRow(13).indentLevel).toBe 2
         expect(tokenizedBuffer.lineForScreenRow(14)).not.toBeDefined()
 
-      it "updates empty lines surrounding a change encompasing more lines than the old text", ->
+      it "updates the indentLevel of empty lines surrounding a change that inserts lines", ->
         # create some new lines
         buffer.insert([7, 0], '\n\n')
         buffer.insert([5, 0], '\n\n')

        expect(tokenizedBuffer.lineForScreenRow(12).indentLevel).toBe 2
        expect(tokenizedBuffer.lineForScreenRow(13).indentLevel).toBe 2

      it "updates empty lines surrounding a change encompasing less lines than the old text", ->
        # create some new lines
        buffer.insert([7, 0], '\n\n')
        buffer.insert([5, 0], '\n\n')

        buffer.setText('\n\n\n')
        expect(tokenizedBuffer.lineForScreenRow(1).indentLevel).toBe 0

    describe "when the changed lines are surrounded by whitespace-only lines", ->
      it "updates the indentLevel of empty lines that precede the change", ->
        expect(tokenizedBuffer.lineForScreenRow(12).indentLevel).toBe 0

        buffer.insert([12, 0], '\n')
        buffer.insert([13, 0], '  ')
        expect(tokenizedBuffer.lineForScreenRow(12).indentLevel).toBe 1

