autodoc: use location.replace to avoid history spam when searching

This commit is contained in:
Loris Cro 2022-08-06 17:29:39 +02:00
parent 9fc6990052
commit cb7c912a1b

View File

@ -3264,8 +3264,7 @@ var zigAnalysis;
let oldHash = location.hash;
let parts = oldHash.split("?");
let newPart2 = domSearch.value === "" ? "" : "?" + domSearch.value;
location.hash =
parts.length === 1 ? oldHash + newPart2 : parts[0] + newPart2;
location.replace(parts.length === 1 ? oldHash + newPart2 : parts[0] + newPart2);
}
function getSearchTerms() {
let list = curNavSearch.trim().split(/[ \r\n\t]+/);