reset search result index when buffer changes/ terminal is resized (#3793)
This commit is contained in:
@@ -88,6 +88,7 @@ export class SearchAddon implements ITerminalAddon {
|
||||
if (this._cachedSearchTerm && this._lastSearchOptions?.decorations) {
|
||||
this._highlightTimeout = setTimeout(() => {
|
||||
this.findPrevious(this._cachedSearchTerm!, { ...this._lastSearchOptions, incremental: true, noScroll: true });
|
||||
this._resultIndex = this._searchResults ? this._searchResults.size -1 : -1;
|
||||
this._onDidChangeResults.fire({ resultIndex: this._searchResults ? this._searchResults.size - 1 : -1, resultCount: this._searchResults ? this._searchResults.size : -1 });
|
||||
}, 200);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user