How to use the xterm/lib/addons/search/search.findPrevious function in xterm

To help you get started, weโ€™ve selected a few xterm examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github eclipse-theia / theia / packages / terminal / src / browser / search / terminal-search-widget.tsx View on Github external
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);
            }
        }
    }
github eclipse-theia / theia / packages / terminal / src / browser / find-text-terminal-widget.tsx View on Github external
protected findPrevious(): void {
        if (this.searchInput) {
            const text = this.searchInput.value;
            findPrevious(this.terminal, text, {...this.searcOptions, incremental: false});
        }
    }