Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
atom.config.observe('fuzzy-finder.scoringSystem', (newValue) => {
this.scoringSystem = newValue
if (this.scoringSystem === SCORING_SYSTEMS.STANDARD) {
this.selectListView.update({filter: null})
} else if (this.scoringSystem === SCORING_SYSTEMS.FAST) {
if (!this.nativeFuzzy) {
this.nativeFuzzy = new NativeFuzzy.Matcher(this.items.map(el => el.label))
// We need a separate instance of the fuzzy finder to calculate the
// matched paths only for the returned results. This speeds up considerably
// the filtering of items.
this.nativeFuzzyForResults = new NativeFuzzy.Matcher([])
}
this.selectListView.update({ filter: this.filterFn })
} else {
this.selectListView.update({ filter: this.filterFn })
}
this.updateExperimentPrompt()
})
)
atom.config.observe('fuzzy-finder.scoringSystem', (newValue) => {
this.scoringSystem = newValue
if (this.scoringSystem === SCORING_SYSTEMS.STANDARD) {
this.selectListView.update({filter: null})
} else if (this.scoringSystem === SCORING_SYSTEMS.FAST) {
if (!this.nativeFuzzy) {
this.nativeFuzzy = new NativeFuzzy.Matcher(this.items.map(el => el.label))
// We need a separate instance of the fuzzy finder to calculate the
// matched paths only for the returned results. This speeds up considerably
// the filtering of items.
this.nativeFuzzyForResults = new NativeFuzzy.Matcher([])
}
this.selectListView.update({ filter: this.filterFn })
} else {
this.selectListView.update({ filter: this.filterFn })
}
this.updateExperimentPrompt()
})
)