mirror of
https://github.com/tridactyl/tridactyl.git
synced 2026-09-10 07:16:33 -04:00
Fix #1175: use .includes if :set completions empty
This commit is contained in:
parent
385b818c44
commit
902b3b6e58
|
|
@ -92,8 +92,13 @@ export class SettingsCompletionSource extends Completions.CompletionSourceFuse {
|
|||
return
|
||||
}
|
||||
|
||||
this.options = Object.keys(settings)
|
||||
.filter(x => x.startsWith(query))
|
||||
const settingNames = Object.keys(settings)
|
||||
let matches = settingNames.filter(x => x.startsWith(query))
|
||||
if (matches.length === 0) {
|
||||
matches = settingNames.filter(x => x.includes(query))
|
||||
}
|
||||
|
||||
this.options = matches
|
||||
.sort()
|
||||
.map(setting => {
|
||||
const md = defaultConfigMembers[setting]
|
||||
|
|
|
|||
Loading…
Reference in a new issue