   getDestinationRow: (count) ->
     if count? then count - 1 else (@editor.getLineCount() - 1)
 
+# keymap: G
 class MoveToLine extends MoveToLineBase
   @extend()
 

    if matchPosition = @searchForMatch(startPosition, reverse, inCharacter, outCharacter)
      cursor.setBufferPosition(matchPosition)

class RepeatSearch extends SearchBase
  @extend()
  constructor: (@vimState) ->
    super(@vimState, dontUpdateCurrentSearch: true)
    @input = new Input(@vimState.getSearchHistoryItem(0) ? "")
    @replicateCurrentSearch()

  isComplete: -> true

  reversed: ->
    @reverse = not @initiallyReversed
    this

class RepeatSearchBackwards extends RepeatSearch
  @extend()
  constructor: ->
    super
    @reversed()

# Alias
# MoveToLine = MoveToAbsoluteLine
ScrollHalfScreenUp = ScrollHalfUpKeepCursor
ScrollHalfScreenDown = ScrollHalfDownKeepCursor
ScrollFullScreenUp = ScrollFullUpKeepCursor
ScrollFullScreenDown = ScrollFullDownKeepCursor

module.exports = {
  MotionError
  Motion

  @extend()
  previousFirstScreenRow: 0
  currentFirstScreenRow: 0
  direction: null

  select: (options) ->
    finalDestination = @scrollScreen()
