(vimState: VimState)
| 502 | } |
| 503 | |
| 504 | public async escape(vimState: VimState): Promise<void> { |
| 505 | vimState.cursorStopPosition = this.searchState.cursorStartPosition; |
| 506 | |
| 507 | globalState.searchState = SearchCommandLine.previousSearchStates.at(-1); |
| 508 | |
| 509 | if (vimState.modeData.mode === Mode.SearchInProgressMode) { |
| 510 | const offset = |
| 511 | vimState.editor.visibleRanges[0].start.line - |
| 512 | vimState.modeData.firstVisibleLineBeforeSearch; |
| 513 | scrollView(vimState, offset); |
| 514 | } |
| 515 | |
| 516 | await vimState.setCurrentMode(this.previousMode); |
| 517 | if (this.text.length > 0) { |
| 518 | void SearchCommandLine.addSearchStateToHistory(this.searchState); |
| 519 | } |
| 520 | } |
| 521 | |
| 522 | public async ctrlF(vimState: VimState): Promise<void> { |
| 523 | await SearchCommandLine.onSearch(vimState, this.searchState.direction); |
nothing calls this directly
no test coverage detected