未验证 提交 4b88d528 编写于 作者: A Alex Dima

Merge remote-tracking branch 'origin/master' into pr/lmvco/88536

......@@ -58,18 +58,23 @@ export class ListService implements IListService {
private disposables = new DisposableStore();
private lists: IRegisteredList[] = [];
private _lastFocusedWidget: ListWidget | undefined = undefined;
private _hasCreatedStyleController: boolean = false;
get lastFocusedList(): ListWidget | undefined {
return this._lastFocusedWidget;
}
constructor(@IThemeService themeService: IThemeService) {
// create a shared default tree style sheet for performance reasons
const styleController = new DefaultStyleController(createStyleSheet(), '');
this.disposables.add(attachListStyler(styleController, themeService));
constructor(@IThemeService private readonly _themeService: IThemeService) {
}
register(widget: ListWidget, extraContextKeys?: (IContextKey<boolean>)[]): IDisposable {
if (!this._hasCreatedStyleController) {
this._hasCreatedStyleController = true;
// create a shared default tree style sheet for performance reasons
const styleController = new DefaultStyleController(createStyleSheet(), '');
this.disposables.add(attachListStyler(styleController, this._themeService));
}
if (this.lists.some(l => l.widget === widget)) {
throw new Error('Cannot register the same widget multiple times');
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册