 
   expandBufferRangeToLineBoundaries: (range) ->
     @screenLineIterator.seekToBufferPosition(Point(range.start.row, 0))
-    while @screenLineIterator.getBufferStart().column isnt 0
-      break unless @screenLineIterator.moveToPredecessor()
+    while @screenLineIterator.isSoftWrappedAtStart()
+      @screenLineIterator.moveToPredecessor()
     startScreenRow = @screenLineIterator.getScreenRow()
     startBufferRow = @screenLineIterator.getBufferStart().row
 
-    @screenLineIterator.seekToBufferPosition(Point(range.end.row, 0))
-    while @screenLineIterator.moveToSuccessor()
-      if @screenLineIterator.getBufferStart().column is 0
-        @screenLineIterator.moveToPredecessor()
-        endScreenRow = @screenLineIterator.getScreenRow()
-        endBufferRow = @screenLineIterator.getBufferEnd().row
-        break
-
-    endScreenRow ?= @screenLineIterator.getScreenRow()
-    endBufferRow ?= @screenLineIterator.getBufferEnd().row
+    @screenLineIterator.seekToBufferPosition(Point(range.end.row, Infinity))
+    while @screenLineIterator.isSoftWrappedAtEnd()
+      @screenLineIterator.moveToSuccessor()
+    endScreenRow = @screenLineIterator.getScreenRow()
+    endBufferRow = @screenLineIterator.getBufferEnd().row
 
     {startScreenRow, endScreenRow, startBufferRow, endBufferRow}
 

          screenLines.push({
            screenExtent: tokensScreenExtent,
            bufferExtent: traversal(screenLineBufferEnd, screenLineBufferStart),
            tokens
          })
          tokens = []
          tokensScreenExtent = 0

      screenLines.push({
        screenExtent: tokensScreenExtent,
        bufferExtent: traversal(Point(bufferRow, bufferColumn), screenLineBufferStart),
        tokens,
        softWrappedAtStart: lastWrapBufferColumn > 0,
        softWrappedAtEnd: false
      })
      tokens = []
      screenLineWidth = 0
