Make fuzzy toggle handler more concise

This commit is contained in:
Daniel Imms 2022-08-22 07:55:49 -07:00
parent 653a83453a
commit 2ba72b53f6
No known key found for this signature in database
GPG key ID: E5CF412B63651C69

View file

@ -1020,13 +1020,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
inputActiveOptionBackground: this._themeService.getColorTheme().getColor(inputActiveOptionBackground)
});
fuzzySearchToggle.onChange(() => {
if (fuzzySearchToggle.checked) {
quickPick.hide();
this.runRecent(type, 'fuzzy', quickPick.value);
} else {
quickPick.hide();
this.runRecent(type, 'contiguous', quickPick.value);
}
this.runRecent(type, fuzzySearchToggle.checked ? 'fuzzy' : 'contiguous', quickPick.value);
});
const outputProvider = this._instantiationService.createInstance(TerminalOutputProvider);
const quickPick = this._quickInputService.createQuickPick<IQuickPickItem & { rawLabel: string }>();