diff --git a/tabby-core/src/components/selectorModal.component.ts b/tabby-core/src/components/selectorModal.component.ts index 23bcdc4b..a39cea20 100644 --- a/tabby-core/src/components/selectorModal.component.ts +++ b/tabby-core/src/components/selectorModal.component.ts @@ -76,10 +76,11 @@ export class SelectorModalComponent { { sort: true }, ).search(f) - const freeOption = this.options.find(x => x.freeInputPattern) - if (freeOption && !this.filteredOptions.includes(freeOption)) { - this.filteredOptions.push(freeOption) - } + this.options.filter(x => x.freeInputPattern).forEach(freeOption => { + if (freeOption && !this.filteredOptions.includes(freeOption)) { + this.filteredOptions.push(freeOption) + } + }) } this.selectedIndex = Math.max(0, this.selectedIndex) this.selectedIndex = Math.min(this.filteredOptions.length - 1, this.selectedIndex)