Skip to content

Commit

Permalink
is -> did
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyriar committed Oct 31, 2023
1 parent ea2d775 commit 974b275
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions addons/xterm-addon-search/src/SearchAddon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ export class SearchAddon extends Disposable implements ITerminalAddon {
if (!this._terminal) {
throw new Error('Cannot use addon until it has been loaded');
}
const isOptionsChanged = this._lastSearchOptions ? this._isOptionsChange(this._lastSearchOptions, searchOptions) : true;
const didOptionsChanged = this._lastSearchOptions ? this._didOptionsChange(this._lastSearchOptions, searchOptions) : true;
this._lastSearchOptions = searchOptions;
if (searchOptions?.decorations) {
if (this._cachedSearchTerm === undefined || term !== this._cachedSearchTerm || isOptionsChanged) {
if (this._cachedSearchTerm === undefined || term !== this._cachedSearchTerm || didOptionsChanged) {
this._highlightAllMatches(term, searchOptions);
}
}
Expand Down Expand Up @@ -303,10 +303,10 @@ export class SearchAddon extends Disposable implements ITerminalAddon {
if (!this._terminal) {
throw new Error('Cannot use addon until it has been loaded');
}
const isOptionsChanged = this._lastSearchOptions ? this._isOptionsChange(this._lastSearchOptions, searchOptions) : true;
const didOptionsChanged = this._lastSearchOptions ? this._didOptionsChange(this._lastSearchOptions, searchOptions) : true;
this._lastSearchOptions = searchOptions;
if (searchOptions?.decorations) {
if (this._cachedSearchTerm === undefined || term !== this._cachedSearchTerm || isOptionsChanged) {
if (this._cachedSearchTerm === undefined || term !== this._cachedSearchTerm || didOptionsChanged) {
this._highlightAllMatches(term, searchOptions);
}
}
Expand All @@ -318,7 +318,7 @@ export class SearchAddon extends Disposable implements ITerminalAddon {
return found;
}

private _isOptionsChange(lastSearchOptions: ISearchOptions, searchOptions?: ISearchOptions): boolean {
private _didOptionsChange(lastSearchOptions: ISearchOptions, searchOptions?: ISearchOptions): boolean {
if (!searchOptions) {
return false;
}
Expand Down

0 comments on commit 974b275

Please sign in to comment.