Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use lazy enumeration to keep response time fast.
With HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE, it can take a while to compute all unique search results, which would normally keep the shell unresponsive during this computation. This commit separates the retrieval of all history matches from the computation of the matches that need to be presented to the user (unique matches only if HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE is set). The computation of the matches needing to be displayed is then done lazily, and only when the user requests a new previously undisplayed result. This keeps the response time fast while still enabling us to filter for unique search results.
- Loading branch information