提交 03a56712 编写于 作者: J Jackson Kearl

[Search] Fix focus sometimes going to wrong element. Fixes #86234

上级 72779d52
......@@ -963,13 +963,15 @@ export class SearchView extends ViewletPane {
return this.searchWidget && this.searchWidget.searchInput.getValue().length > 0;
}
clearSearchResults(): void {
clearSearchResults(clearInput = true): void {
this.viewModel.searchResult.clear();
this.showEmptyStage(true);
if (this.contextService.getWorkbenchState() === WorkbenchState.EMPTY) {
this.showSearchWithoutFolderMessage();
}
this.searchWidget.clear();
if (clearInput) {
this.searchWidget.clear();
}
this.viewModel.cancelSearch();
this.updateActions();
......@@ -1202,7 +1204,7 @@ export class SearchView extends ViewletPane {
const useExcludesAndIgnoreFiles = this.inputPatternExcludes.useExcludesAndIgnoreFiles();
if (contentPattern.length === 0) {
this.clearSearchResults();
this.clearSearchResults(false);
this.clearMessage();
return;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册