export class GoAction implements IAction { public Motion : IMotion ; constructor ( ) { this . Motion = null ; } public GetActionType ( ) { return ActionType . Move ; } public Execute ( editor , vim ) { let from = editor . GetCurrentPosition ( ) ; let to = this . Motion . CalculateEnd ( editor , vim , from ) ; if ( to == null ) { return ; } if ( from . Char === to . Char && from . Line === to . Line ) { return ; } editor . SetPosition ( editor . UpdateValidPosition ( to , true ) ) ; } }