                 expect(lineStateForScreenRow(presenter, 6).decorationClasses).toEqual ['a', 'b']
                 expect(lineStateForScreenRow(presenter, 7).decorationClasses).toBeNull()
 
-              waitsForStateToUpdateAsync presenter, -> editor.getBuffer().insert([5, 0], 'x')
+              waitsForStateToUpdate presenter, -> editor.getBuffer().insert([5, 0], 'x')
               runs ->
                 expect(marker1.isValid()).toBe false
                 expect(lineStateForScreenRow(presenter, 4).decorationClasses).toBeNull()
                 expect(lineStateForScreenRow(presenter, 5).decorationClasses).toBeNull()
                 expect(lineStateForScreenRow(presenter, 6).decorationClasses).toBeNull()
 
-              waitsForStateToUpdateAsync presenter, -> editor.undo()
+              waitsForStateToUpdate presenter, -> editor.undo()
               runs ->
                 expect(lineStateForScreenRow(presenter, 3).decorationClasses).toBeNull()
                 expect(lineStateForScreenRow(presenter, 4).decorationClasses).toEqual ['a', 'b']

            }

          # becoming empty
          waitsForStateToUpdate presenter, -> editor.getSelections()[1].clear(autoscroll: false)
          runs ->
            expectUndefinedStateForSelection(presenter, 1)

          # becoming non-empty
          waitsForStateToUpdate presenter, -> editor.getSelections()[1].setBufferRange([[2, 4], [2, 6]], autoscroll: false)
          runs ->
            expectValues stateForSelectionInTile(presenter, 1, 2), {
              regions: [{top: 0, left: 4 * 10, width: 2 * 10, height: 10}]
            }

          # moving out of view
          waitsForStateToUpdate presenter, -> editor.getSelections()[1].setBufferRange([[3, 4], [3, 6]], autoscroll: false)
          runs ->
            expectUndefinedStateForSelection(presenter, 1)

          # adding
          waitsForStateToUpdate presenter, -> editor.addSelectionForBufferRange([[1, 4], [1, 6]], autoscroll: false)
          runs ->
            expectValues stateForSelectionInTile(presenter, 2, 0), {
              regions: [{top: 10, left: 4 * 10, width: 2 * 10, height: 10}]
            }

          # moving added selection
          waitsForStateToUpdate presenter, -> editor.getSelections()[2].setBufferRange([[1, 4], [1, 8]], autoscroll: false)

          destroyedSelection = null
          runs ->

                expect(lineStateForScreenRow(presenter, 6).decorationClasses).toEqual ['b']
                expect(lineStateForScreenRow(presenter, 7).decorationClasses).toBeNull()

              waitsForStateToUpdate presenter, -> decoration1.destroy()
              runs ->
                expect(lineStateForScreenRow(presenter, 2).decorationClasses).toBeNull()
                expect(lineStateForScreenRow(presenter, 3).decorationClasses).toBeNull()
