(vimState: VimState, start: Position, end: Position)
| 571 | keys = ['<']; |
| 572 | |
| 573 | public async run(vimState: VimState, start: Position, end: Position): Promise<void> { |
| 574 | // Repeating this command with dot should apply the indent to the previous selection |
| 575 | if ( |
| 576 | vimState.dotCommandStatus === DotCommandStatus.Executing && |
| 577 | vimState.dotCommandPreviousVisualSelection |
| 578 | ) { |
| 579 | if (vimState.cursorStartPosition.isAfter(vimState.cursorStopPosition)) { |
| 580 | const shiftSelectionByNum = |
| 581 | vimState.dotCommandPreviousVisualSelection.end.line - |
| 582 | vimState.dotCommandPreviousVisualSelection.start.line; |
| 583 | |
| 584 | start = vimState.cursorStartPosition; |
| 585 | const newEnd = vimState.cursorStartPosition.getDown(shiftSelectionByNum); |
| 586 | |
| 587 | vimState.editor.selection = new vscode.Selection(start, newEnd); |
| 588 | } |
| 589 | } |
| 590 | |
| 591 | for (let i = 0; i < (vimState.recordedState.count || 1); i++) { |
| 592 | await vscode.commands.executeCommand('editor.action.outdentLines'); |
| 593 | } |
| 594 | |
| 595 | await vimState.setCurrentMode(Mode.Normal); |
| 596 | vimState.cursorStopPosition = TextEditor.getFirstNonWhitespaceCharOnLine( |
| 597 | vimState.document, |
| 598 | start.line, |
| 599 | ); |
| 600 | } |
| 601 | } |
| 602 | |
| 603 | @RegisterAction |
nothing calls this directly
no test coverage detected