Fixed prefix length bug
This commit is contained in:
@@ -280,12 +280,12 @@ export class Omnisearch {
|
|||||||
let results: SearchResult[]
|
let results: SearchResult[]
|
||||||
if (settings.simpleSearch) {
|
if (settings.simpleSearch) {
|
||||||
results = await this.search(query, {
|
results = await this.search(query, {
|
||||||
prefixLength: 1,
|
prefixLength: 3,
|
||||||
singleFilePath: options?.singleFilePath,
|
singleFilePath: options?.singleFilePath,
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
results = await this.search(query, {
|
results = await this.search(query, {
|
||||||
prefixLength: 3,
|
prefixLength: 1,
|
||||||
singleFilePath: options?.singleFilePath,
|
singleFilePath: options?.singleFilePath,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ export class SettingsTab extends PluginSettingTab {
|
|||||||
new Setting(containerEl)
|
new Setting(containerEl)
|
||||||
.setName('Simpler search')
|
.setName('Simpler search')
|
||||||
.setDesc(
|
.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 =>
|
.addToggle(toggle =>
|
||||||
toggle.setValue(settings.simpleSearch).onChange(async v => {
|
toggle.setValue(settings.simpleSearch).onChange(async v => {
|
||||||
|
|||||||
Reference in New Issue
Block a user