   else
     keystroke
 
-isLinewiseRange = (range) ->
-  (not range.isEmpty()) and (range.start.column is 0) and (range.end.column is 0)
+isLinewiseRange = ({start, end}) ->
+  (start.row isnt end.row) and (start.column is end.column is 0)
 
 isEndsWithNewLineForBufferRow = (editor, row) ->
   {start, end} = editor.bufferRangeForBufferRow(row, {includeNewline: true})

  {editor} = cursor
  row = cursor.getBufferRow()
  if editor.isFoldedAtBufferRow(row)
    editor.unfoldBufferRow row

markerOptions = {ivalidate: 'never', persistent: false}
# Return markers

  not originalPoint.isEqual(cursor.getBufferPosition())

getBufferRows = (editor, {startRow, direction, includeStartRow}) ->
  switch direction
    when 'previous'
      unless includeStartRow
