Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions addons/xterm-addon-search/src/SearchAddon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export class SearchAddon implements ITerminalAddon {
}
this._lastSearchOptions = searchOptions;
if (searchOptions?.decorations) {
if (this._resultIndex || this._cachedSearchTerm && term !== this._cachedSearchTerm) {
if (!!this._resultIndex || this._cachedSearchTerm && term !== this._cachedSearchTerm) {
this._highlightAllMatches(term, searchOptions);
}
}
Expand Down Expand Up @@ -306,7 +306,7 @@ export class SearchAddon implements ITerminalAddon {
throw new Error('Cannot use addon until it has been loaded');
}
this._lastSearchOptions = searchOptions;
if (searchOptions?.decorations && (this._resultIndex || term !== this._cachedSearchTerm)) {
if (searchOptions?.decorations && (!!this._resultIndex || term !== this._cachedSearchTerm)) {
this._highlightAllMatches(term, searchOptions);
}
return this._fireResults(term, this._findPreviousAndSelect(term, searchOptions), searchOptions);
Expand Down