MCPcopy
hub / github.com/VSCodeVim/Vim / execActionWithCount

Method execActionWithCount

src/actions/motion.ts:870–895  ·  view source on GitHub ↗
(
    position: Position,
    vimState: VimState,
    count: number,
  )

Source from the content-addressed store, hash-verified

868 keys = ['F', '<character>'];
869
870 public override async execActionWithCount(
871 position: Position,
872 vimState: VimState,
873 count: number,
874 ): Promise<Position | IMovement> {
875 if (configuration.sneakReplacesF) {
876 return new SneakBackward(this.keysPressed.concat('\n'), this.isRepeat).execActionWithCount(
877 position,
878 vimState,
879 count,
880 );
881 }
882
883 count ||= 1;
884 const toFind = Notation.ToControlCharacter(this.keysPressed[1]);
885 const result = findHelper(vimState, position, toFind, count, 'backward');
886
887 vimState.lastSemicolonRepeatableMovement = new MoveFindBackward(this.keysPressed, true);
888 vimState.lastCommaRepeatableMovement = new MoveFindForward(this.keysPressed, true);
889
890 if (!result) {
891 return failedMovement(vimState);
892 }
893
894 return result;
895 }
896}
897
898function tilHelper(

Callers

nothing calls this directly

Calls 5

failedMovementFunction · 0.90
findHelperFunction · 0.85
ToControlCharacterMethod · 0.80
execActionWithCountMethod · 0.65
concatMethod · 0.45

Tested by

no test coverage detected