           when 'down' then [+height * count, 0]
         )
 
-    select = (ranges) =>
-      head = blockwiseSelection.getHead()
+    select = (ranges) ->
+      head = blockwiseSelection.getHeadSelection()
       wasReversed = blockwiseSelection.isReversed()
       blockwiseSelection.setSelectedBufferRanges(ranges, {reversed: head.isReversed()})
       blockwiseSelection.reverse() if wasReversed

          when 'up' then [start, start]
          when 'down' then [end, end]

    @withLinewise selection, =>
      text = getText()
      range = getRangeToInsert(text)
      setTextInRangeAndSelect(range, text, selection)

          count = Math.min([count, counts...]...)
        else if @vimState.isMode('visual', 'blockwise')
          counts = @vimState.getBlockwiseSelections().map (bs) ->
            {start} = bs.getStartSelection().getBufferRange()
            Math.floor(start.row / bs.getHeight())
          count = Math.min([count, counts...]...)
      when 'left'
