提交 6581d602 编写于 作者: S Sandeep Somavarapu

Fix #80369

上级 44ac060e
......@@ -1605,7 +1605,7 @@ export class ShowRecommendedExtensionsAction extends Action {
return this.viewletService.openViewlet(VIEWLET_ID, true)
.then(viewlet => viewlet as IExtensionsViewlet)
.then(viewlet => {
viewlet.search('@recommended ');
viewlet.search('@recommended ', true);
viewlet.focus();
});
}
......
......@@ -59,11 +59,6 @@ import { RemoteNameContext } from 'vs/workbench/browser/contextkeys';
import { ILabelService } from 'vs/platform/label/common/label';
import { MementoObject } from 'vs/workbench/common/memento';
interface SearchInputEvent extends Event {
target: HTMLInputElement;
immediate?: boolean;
}
const NonEmptyWorkspaceContext = new RawContextKey<boolean>('nonEmptyWorkspace', false);
const DefaultViewsContext = new RawContextKey<boolean>('defaultExtensionViews', true);
const SearchMarketplaceExtensionsContext = new RawContextKey<boolean>('searchMarketplaceExtensions', false);
......@@ -488,12 +483,13 @@ export class ExtensionsViewlet extends ViewContainerViewlet implements IExtensio
return this.secondaryActions;
}
search(value: string): void {
search(value: string, refresh: boolean = false): void {
if (this.searchBox) {
const event = new Event('input', { bubbles: true }) as SearchInputEvent;
event.immediate = true;
this.searchBox.setValue(value);
if (this.searchBox.getValue() !== value) {
this.searchBox.setValue(value);
} else if (refresh) {
this.doSearch();
}
}
}
......
......@@ -23,7 +23,7 @@ export const VIEW_CONTAINER: ViewContainer = Registry.as<IViewContainersRegistry
export const EXTENSIONS_CONFIG = '.vscode/extensions.json';
export interface IExtensionsViewlet extends IViewlet {
search(text: string): void;
search(text: string, refresh?: boolean): void;
}
export const enum ExtensionState {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册