Commit d96aa184f5

d96aa184f5f57756ea6a800c061ad8ecb87d43e4

parent: c90f634bce

Unsigned

Duck <57977673+woducku@users.noreply.github.com> · 2026-06-26 17:47 UTC

remove history limit

Layout: unified · split

docs/.vitepress/theme/components/Search.vue +1 −3
@@ -290,8 +290,6 @@ interface SearchHistoryEntry {
290290 href?: string
291291}
292292
293const MAX_HISTORY = 12
294
295293const saveHistoryEnabled = useLocalStorage('vitepress:local-search-save-history', false)
296294
297295const searchHistory = useLocalStorage<SearchHistoryEntry[]>(
@@ -312,7 +310,7 @@ function saveToHistory(query: string, mode: SearchMode, path?: string[], href?:
312310 ...searchHistory.value.filter(
313311 (h) => !(h.query === trimmed && h.mode === mode && (h.path ?? []).join('\n') === pathKey)
314312 )
315 ].slice(0, MAX_HISTORY)
313 ]
316314}
317315
318316function removeFromHistory(index: number) {