 {spliceWithArray} = require 'underscore-plus'
 
-# Private: Used by the display buffer to map screen rows to buffer rows and
-# vice-versa. This mapping may not be 1:1 due to folds and soft-wraps. This
-# object maintains an array of regions, which contain `bufferRows` and
-# `screenRows` fields.
+# Used by the display buffer to map screen rows to buffer rows and vice-versa.
+# This mapping may not be 1:1 due to folds and soft-wraps. This object maintains
+# an array of regions, which contain `bufferRows` and `screenRows` fields.
 #
 # Rectangular Regions:
 # If a region has the same number of buffer rows and screen rows, it is referred

      screenRows += region.screenRows
    {index, screenRows, bufferRows}

  # Private:
  mergeAdjacentRectangularRegions: (startIndex, endIndex) ->
    for index in [endIndex..startIndex]
      if 0 < index < @regions.length

      screenRows += region.screenRows
    {index, screenRows, bufferRows}

  traverseToScreenRow: (targetScreenRow) ->
    bufferRows = 0
    screenRows = 0
