| 907 | } |
| 908 | |
| 909 | @RegisterAction |
| 910 | class MoveTilForward extends BaseMovement { |
| 911 | keys = ['t', '<character>']; |
| 912 | |
| 913 | public override async execActionWithCount( |
| 914 | position: Position, |
| 915 | vimState: VimState, |
| 916 | count: number, |
| 917 | ): Promise<Position | IMovement> { |
| 918 | count ||= 1; |
| 919 | const toFind = Notation.ToControlCharacter(this.keysPressed[1]); |
| 920 | let result = tilHelper(vimState, position, toFind, count, 'forward'); |
| 921 | |
| 922 | // For t<character> vim executes ; as 2; and , as 2, |
| 923 | if (result && this.isRepeat && position.isEqual(result) && count === 1) { |
| 924 | result = tilHelper(vimState, position, toFind, 2, 'forward'); |
| 925 | } |
| 926 | |
| 927 | vimState.lastSemicolonRepeatableMovement = new MoveTilForward(this.keysPressed, true); |
| 928 | vimState.lastCommaRepeatableMovement = new MoveTilBackward(this.keysPressed, true); |
| 929 | |
| 930 | if (!result) { |
| 931 | return failedMovement(vimState); |
| 932 | } |
| 933 | |
| 934 | if (vimState.recordedState.operator) { |
| 935 | result = result.getRight(); |
| 936 | } |
| 937 | |
| 938 | return result; |
| 939 | } |
| 940 | } |
| 941 | |
| 942 | @RegisterAction |
| 943 | class MoveTilBackward extends BaseMovement { |
nothing calls this directly
no outgoing calls
no test coverage detected