diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-11-20 18:32:10 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-20 18:32:10 +0100 |
| commit | 4bd9168d7f9ed51291e7df4eed6bc7f7a928fb23 (patch) | |
| tree | f2c45146a93236599116c7608f7976450a6babac /src/librustdoc/html/render.rs | |
| parent | 5a84f9b86ec3e2b5b6393faebeeaa96dc6c21192 (diff) | |
| parent | 00ef5c1b9877c309fc4814fa2f0c8022266feee6 (diff) | |
| download | rust-4bd9168d7f9ed51291e7df4eed6bc7f7a928fb23.tar.gz rust-4bd9168d7f9ed51291e7df4eed6bc7f7a928fb23.zip | |
Rollup merge of #66514 - GuillaumeGomez:fix-search-filter-save, r=kinnison
Fix selected crate search filter Fixes #62929. r? @kinnison
Diffstat (limited to 'src/librustdoc/html/render.rs')
| -rw-r--r-- | src/librustdoc/html/render.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index 2fa56f58512..bd2a6602e16 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -882,7 +882,9 @@ themePicker.onblur = handleThemeButtonsBlur; v.push_str(&minify_replacer( &format!("{}\n{}", variables.join(""), all_indexes.join("\n")), options.enable_minification)); - v.push_str("initSearch(searchIndex);addSearchOptions(searchIndex);"); + // "addSearchOptions" has to be called first so the crate filtering can be set before the + // search might start (if it's set into the URL for example). + v.push_str("addSearchOptions(searchIndex);initSearch(searchIndex);"); cx.shared.fs.write(&dst, &v)?; } if options.enable_index_page { |
