Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
search(incremental: boolean, searchDirection: 'next' | 'previous'): void {
if (this.searchInput) {
this.searchOptions.incremental = incremental;
const searchText = this.searchInput.value;
if (searchDirection === 'next') {
findNext(this.terminal, searchText, this.searchOptions);
}
if (searchDirection === 'previous') {
findPrevious(this.terminal, searchText, this.searchOptions);
}
}
}
protected findPrevious(): void {
if (this.searchInput) {
const text = this.searchInput.value;
findPrevious(this.terminal, text, {...this.searcOptions, incremental: false});
}
}