   wise: 'linewise'
 
   getRange: (selection) ->
-    row = @getNormalizedHeadBufferPosition(selection).row
+    row = @getCursorPositionForSelection(selection).row
     rowRange = @editor.languageMode.rowRangeForCommentAtBufferRow(row)
     rowRange ?= [row, row] if @editor.isBufferRowCommented(row)
     if rowRange?

  @deriveInnerAndA()

  getRange: (selection) ->
    fromRow = @getNormalizedHeadBufferPosition(selection).row

    baseIndentLevel = @getIndentLevelForBufferRow(fromRow)
    predict = (row) =>

    getCodeFoldRowRangesContainesForRow(@editor, row).reverse()

  getRange: (selection) ->
    row = @getCursorPositionForSelection(selection).row
    selectedRange = selection.getBufferRange()
    for rowRange in @getFoldRowRangesContainsForRow(row)
      range = @getBufferRangeForRowRange(@adjustRowRange(rowRange))
