           expect(line2.endColumn).toBe 14
           expect(line2.textLength).toBe 3
 
-  describe ".screenPositionFromBufferPosition(point, allowEOL=false)", ->
-    it "translates the given buffer position to a screen position, accounting for wrapped lines", ->
-      # before any wrapped lines
-      expect(wrapper.screenPositionFromBufferPosition([0, 5])).toEqual([0, 5])
-      expect(wrapper.screenPositionFromBufferPosition([0, 29])).toEqual([0, 29])
-
-      # on a wrapped line
-      expect(wrapper.screenPositionFromBufferPosition([3, 5])).toEqual([3, 5])
-      expect(wrapper.screenPositionFromBufferPosition([3, 50])).toEqual([3, 50])
-      expect(wrapper.screenPositionFromBufferPosition([3, 62])).toEqual([4, 11])
-
-      # following a wrapped line
-      expect(wrapper.screenPositionFromBufferPosition([4, 5])).toEqual([5, 5])
-
-    describe "when allowEOL is true", ->
-      it "preserves a position at the end of a wrapped screen line ", ->
-        expect(wrapper.screenPositionFromBufferPosition([3, 51], true)).toEqual([3, 51])
-
-    describe "when allowEOL is false", ->
-      it "translates a position at the end of a wrapped screen line to the begining of the next screen line", ->
-        expect(wrapper.screenPositionFromBufferPosition([3, 51])).toEqual([4, 0])
-
-  describe ".bufferPositionFromScreenPosition(point)", ->
-    it "translates the given screen position to a buffer position, account for wrapped lines", ->
-      # before any wrapped lines
-      expect(wrapper.bufferPositionFromScreenPosition([0, 5])).toEqual([0, 5])
-
-      # on a wrapped line
-      expect(wrapper.bufferPositionFromScreenPosition([3, 5])).toEqual([3, 5])
-      expect(wrapper.bufferPositionFromScreenPosition([4, 0])).toEqual([3, 51])
-      expect(wrapper.bufferPositionFromScreenPosition([4, 5])).toEqual([3, 56])
-
-      # following a wrapped line
-      expect(wrapper.bufferPositionFromScreenPosition([5, 5])).toEqual([4, 5])
-

          expect(event.oldRange).toEqual([[7, 0], [8, 20]])
          expect(event.newRange).toEqual([[7, 0], [7, 47]])

    describe "when buffer lines are updated and inserted", ->
      fit "re-wraps existing and new screen lines and emits a change event", ->
        buffer.insert([6, 21], '1234567890 abcdefghij 1234567890\nabcdefghij')
        expect(tokensText(wrapper.tokensForScreenRow(7))).toBe '      current < pivot1234567890 abcdefghij '


    describe "when buffer lines are removed", ->

  describe ".screenPositionFromBufferPosition(point, allowEOL=false)", ->
    it "translates the given buffer position to a screen position, accounting for wrapped lines", ->
      # before any wrapped lines
      expect(wrapper.screenPositionFromBufferPosition([0, 5])).toEqual([0, 5])
      expect(wrapper.screenPositionFromBufferPosition([0, 29])).toEqual([0, 29])

      # on a wrapped line
      expect(wrapper.screenPositionFromBufferPosition([3, 5])).toEqual([3, 5])
      expect(wrapper.screenPositionFromBufferPosition([3, 50])).toEqual([3, 50])
      expect(wrapper.screenPositionFromBufferPosition([3, 62])).toEqual([4, 11])

      # following a wrapped line
      expect(wrapper.screenPositionFromBufferPosition([4, 5])).toEqual([5, 5])

    describe "when allowEOL is true", ->
      it "preserves a position at the end of a wrapped screen line ", ->
        expect(wrapper.screenPositionFromBufferPosition([3, 51], true)).toEqual([3, 51])

    describe "when allowEOL is false", ->
      it "translates a position at the end of a wrapped screen line to the begining of the next screen line", ->
        expect(wrapper.screenPositionFromBufferPosition([3, 51])).toEqual([4, 0])

  describe ".bufferPositionFromScreenPosition(point)", ->
    it "translates the given screen position to a buffer position, account for wrapped lines", ->
      # before any wrapped lines
      expect(wrapper.bufferPositionFromScreenPosition([0, 5])).toEqual([0, 5])

      # on a wrapped line
      expect(wrapper.bufferPositionFromScreenPosition([3, 5])).toEqual([3, 5])
      expect(wrapper.bufferPositionFromScreenPosition([4, 0])).toEqual([3, 51])
      expect(wrapper.bufferPositionFromScreenPosition([4, 5])).toEqual([3, 56])

      # following a wrapped line
      expect(wrapper.bufferPositionFromScreenPosition([5, 5])).toEqual([4, 5])

  describe ".splitTokens(tokens)", ->
    makeTokens = (array) ->
