Skip to content

Commit d234b0b

Browse files
committed
rustdoc: Update document title when displaying search results
Fixes #26360.
1 parent 7a13b93 commit d234b0b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/librustdoc/html/static/main.js

+3
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,9 @@
571571
return;
572572
}
573573

574+
// Update document title to maintain a meaningful browser history
575+
$(document).prop("title", "Results for " + query.query + " - Rust");
576+
574577
// Because searching is incremental by character, only the most
575578
// recent search query is added to the browser history.
576579
if (browserSupportsHistoryApi()) {

0 commit comments

Comments
 (0)