       startOfTrailingWhitespace.column -= 1
     cursor.setBufferPosition(startOfTrailingWhitespace)
 
-  moveCursor: (cursor) ->
-    _.times (@getCount(1) - 1), ->
+  getCount: ->
+    super - 1
+
+  moveCursor: (cursor) ->
+    @countTimes ->
       cursor.moveDown()
     @skipTrailingWhitespace(cursor)
 

    @wasLinewise = @isLinewise()

  execute: ->
    _.times(@getCount(1), -> true)

  select: (count=1) ->
    # in visual mode, the current selections are already there

      @abort()

  moveCursor: (cursor) ->
    @countTimes ->
      cursor.moveToBeginningOfLine()
      if settings.get('swapZeroWithHat')
        cursor.moveToFirstCharacterOfLine()

class MoveToFirstCharacterOfLine extends Motion
  @extend()

  moveCursor: (cursor) ->
    @countTimes ->
      cursor.moveToBeginningOfLine()
      unless settings.get('swapZeroWithHat')
        cursor.moveToFirstCharacterOfLine()

class MoveToFirstCharacterOfLineAndDown extends Motion
  @extend()
  linewise: true
  defaultCount: 0

  getCount: ->
    super - 1

  moveCursor: (cursor) ->
    @countTimes ->
      cursor.moveDown()
    cursor.moveToBeginningOfLine()
    cursor.moveToFirstCharacterOfLine()

class MoveToLastCharacterOfLine extends Motion
  @extend()
  defaultCount: 1

  moveCursor: (cursor) ->
    @countTimes ->
      cursor.moveToEndOfLine()
      cursor.goalColumn = Infinity

