(vimState: VimState, start: Position, end: Position)
| 334 | public modes = [Mode.Normal, Mode.Visual, Mode.VisualLine, Mode.VisualBlock]; |
| 335 | |
| 336 | public async run(vimState: VimState, start: Position, end: Position): Promise<void> { |
| 337 | // = operates on complete lines |
| 338 | vimState.editor.selection = new vscode.Selection(start.getLineBegin(), end.getLineEnd()); |
| 339 | await vscode.commands.executeCommand('editor.action.formatSelection'); |
| 340 | let line = vimState.cursorStartPosition.line; |
| 341 | |
| 342 | if (vimState.cursorStartPosition.isAfter(vimState.cursorStopPosition)) { |
| 343 | line = vimState.cursorStopPosition.line; |
| 344 | } |
| 345 | |
| 346 | const newCursorPosition = TextEditor.getFirstNonWhitespaceCharOnLine(vimState.document, line); |
| 347 | vimState.cursorStopPosition = newCursorPosition; |
| 348 | vimState.cursorStartPosition = newCursorPosition; |
| 349 | await vimState.setCurrentMode(Mode.Normal); |
| 350 | } |
| 351 | } |
| 352 | |
| 353 | abstract class ChangeCaseOperator extends BaseOperator { |
nothing calls this directly
no test coverage detected