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
8 changes: 2 additions & 6 deletions addons/xterm-addon-search/src/SearchAddon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export class SearchAddon implements ITerminalAddon {
this._onResizeDisposable?.dispose();
}

public clearDecorations(internal?: boolean): void {
public clearDecorations(retainCachedSearchTerm?: boolean): void {
this._selectedDecoration?.dispose();
this._searchResults?.clear();
this._resultDecorations?.forEach(decorations => {
Expand All @@ -110,11 +110,7 @@ export class SearchAddon implements ITerminalAddon {
this._resultDecorations?.clear();
this._searchResults = undefined;
this._resultDecorations = undefined;
if (!internal) {
// we want to keep _cachedSearchTerm defined if this is
// an internal call
// so that when the buffer changes,
// we can use that to search for new matches
if (!retainCachedSearchTerm) {
this._cachedSearchTerm = undefined;
}
}
Expand Down