Fixed prefix length bug
This commit is contained in:
@@ -280,12 +280,12 @@ export class Omnisearch {
|
||||
let results: SearchResult[]
|
||||
if (settings.simpleSearch) {
|
||||
results = await this.search(query, {
|
||||
prefixLength: 1,
|
||||
prefixLength: 3,
|
||||
singleFilePath: options?.singleFilePath,
|
||||
})
|
||||
} else {
|
||||
results = await this.search(query, {
|
||||
prefixLength: 3,
|
||||
prefixLength: 1,
|
||||
singleFilePath: options?.singleFilePath,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ export class SettingsTab extends PluginSettingTab {
|
||||
new Setting(containerEl)
|
||||
.setName('Simpler search')
|
||||
.setDesc(
|
||||
`Enable this if Obsidian often freezes while making searches. This will return more strict results.`
|
||||
`Enable this if Obsidian often freezes while making searches. This may return fewer results.`
|
||||
)
|
||||
.addToggle(toggle =>
|
||||
toggle.setValue(settings.simpleSearch).onChange(async v => {
|
||||
|
||||
Reference in New Issue
Block a user