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

Method execActionWithCount

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

Source from the content-addressed store, hash-verified

1064 movementType: CursorMovePosition = 'wrappedLineLastNonWhitespaceCharacter';
1065
1066 public override async execActionWithCount(
1067 position: Position,
1068 vimState: VimState,
1069 count: number,
1070 ): Promise<Position | IMovement> {
1071 count ||= 1;
1072 const pos = await super.execActionWithCount(position, vimState, count);
1073
1074 // If in visual, return a selection
1075 if (pos instanceof Position) {
1076 return pos.getDown(count - 1);
1077 } else {
1078 return { start: pos.start, stop: pos.stop.getDown(count - 1).getLeftThroughLineBreaks() };
1079 }
1080 }
1081}
1082
1083@RegisterAction

Callers

nothing calls this directly

Calls 3

getDownMethod · 0.80
execActionWithCountMethod · 0.65

Tested by

no test coverage detected