Skip to content

Commit 2fcbda6

Browse files
committed
Auto merge of #148466 - liigo:better-rustdoc, r=GuillaumeGomez
rustdoc: quality of life changes - Support `=` shortcut (alongside `+`) to expand all sections. Already support `s` and `S`, `Shift` or not. - ~~Fix search-input's placeholder. The input is auto focused, any key press will be accepted as input not shortcut, current placeholder is missleading.~~
2 parents 95aeb46 + 9f3d84b commit 2fcbda6

File tree

1 file changed

+2
-1
lines changed
  • src/librustdoc/html/static/js

1 file changed

+2
-1
lines changed

src/librustdoc/html/static/js/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,7 @@ function preLoadCss(cssUrl) {
683683
break;
684684

685685
case "+":
686+
case "=":
686687
ev.preventDefault();
687688
expandAllDocs();
688689
break;
@@ -1620,7 +1621,7 @@ function preLoadCss(cssUrl) {
16201621
["↓", "Move down in search results"],
16211622
["← / →", "Switch result tab (when results focused)"],
16221623
["⏎", "Go to active search result"],
1623-
["+", "Expand all sections"],
1624+
["+ / =", "Expand all sections"],
16241625
["-", "Collapse all sections"],
16251626
// for the sake of brevity, we don't say "inherit impl blocks",
16261627
// although that would be more correct,

0 commit comments

Comments
 (0)