提交 3c231cfa 编写于 作者: R Rob Lourens

Fix #61350 - NPE when clicking "use exclude patterns" button

上级 7b61ee4f
......@@ -31,7 +31,6 @@ export class PatternInputWidget extends Widget {
public inputFocusTracker: dom.IFocusTracker;
protected onOptionChange: (event: Event) => void;
private width: number;
private placeholder: string;
private ariaLabel: string;
......@@ -50,7 +49,6 @@ export class PatternInputWidget extends Widget {
@IContextKeyService private contextKeyService: IContextKeyService
) {
super();
this.onOptionChange = null;
this.width = options.width || 100;
this.placeholder = options.placeholder || '';
this.ariaLabel = options.ariaLabel || nls.localize('defaultLabel', "input");
......@@ -70,19 +68,6 @@ export class PatternInputWidget extends Widget {
}
}
public on(eventType: string, handler: (event: Event) => void): PatternInputWidget {
switch (eventType) {
case 'keydown':
case 'keyup':
this._register(dom.addDisposableListener(this.inputBox.inputElement, eventType, handler));
break;
case PatternInputWidget.OPTION_CHANGE:
this.onOptionChange = handler;
break;
}
return this;
}
public setWidth(newWidth: number): void {
this.width = newWidth;
this.domNode.style.width = this.width + 'px';
......@@ -218,7 +203,6 @@ export class ExcludePatternInputWidget extends PatternInputWidget {
isChecked: true,
}));
this._register(this.useExcludesAndIgnoreFilesBox.onChange(viaKeyboard => {
this.onOptionChange(null);
if (!viaKeyboard) {
this.inputBox.focus();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册