Clear search results when input is cleared

This commit is contained in:
Jackson Kearl 2019-11-07 09:42:21 -08:00
parent 010f2bee0e
commit 9935244a6a
2 changed files with 4 additions and 6 deletions

View file

@ -1169,6 +1169,7 @@ export class SearchView extends ViewletPanel {
const useExcludesAndIgnoreFiles = this.inputPatternExcludes.useExcludesAndIgnoreFiles();
if (contentPattern.length === 0) {
this.clearSearchResults();
return;
}

View file

@ -574,13 +574,10 @@ export class SearchWidget extends Widget {
const value = this.searchInput.getValue();
const useGlobalFindBuffer = this.searchConfiguration.globalFindClipboard;
if (value) {
if (useGlobalFindBuffer) {
this.clipboardServce.writeFindText(value);
}
this._onSearchSubmit.fire();
if (value && useGlobalFindBuffer) {
this.clipboardServce.writeFindText(value);
}
this._onSearchSubmit.fire();
}
dispose(): void {