KetraTerm
API · DevelopmentAll versions

TerminalSearchState

data class TerminalSearchState @JvmOverloads constructor(val query: String, val resultCount: Int, val activeResultIndex: Int, val isSearching: Boolean = false, val failure: Throwable? = null)

Public snapshot of terminal search results.

Constructors

Link copied to clipboard
constructor(query: String, resultCount: Int, activeResultIndex: Int, isSearching: Boolean = false, failure: Throwable? = null)

Properties

Link copied to clipboard

zero-based active match, or -1 when no match is active or when a capped search has no known global match index.

Link copied to clipboard

failure of the last pass, or null. A failed pass is not reported as a successful empty search; changing the query retries it.

Link copied to clipboard

Whether resultCount is a lower bound rather than an exact completed total.

Link copied to clipboard

whether a background pass is pending or running.

Link copied to clipboard

current literal search query.

Link copied to clipboard

matches found so far for a new query, or matches from the last completed pass during a content refresh. While searching, the count is provisional and may lag output; a new query starts with zero matches. A capped pass reports 1,001: 1,000 collected matches plus one overflow witness. Hosts should display 1,000+ when isCountLimited is true.