mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
refine name for clearDecorations param (#3757)
This commit is contained in:
@@ -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 => {
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user