source_listing.rst (2087B)
1 ============== 2 Source listing 3 ============== 4 5 .. image:: img/source-listing.png 6 :class: border 7 :alt: The source listing and each component 8 :width: 958px 9 10 Search field 11 ------------ 12 13 The header shows the :ref:`search <searchfox_search>` field. 14 15 Revision 16 -------- 17 18 In the file listing, the header shows the currently-showing revision's hash and 19 the commit message. 20 21 Breadcrumbs 22 ----------- 23 24 Below the header, breadcrumbs for the file is shown. 25 26 You can select different tree from the repository drop down menu there, and also navigate to other directory, or open a context menu for the file symbol. 27 28 Line numbers 29 ------------ 30 31 Lines can be selected by clicking, optionally with modifier keys. The selected lines are reflected to the URL, and opening URLs with those lines shows the selected lines. 32 33 This is handy for sharing a code with pointing specific lines. 34 35 * Click the line number selects the line. 36 * :kbd:`Shift` + click: selects lines by start/end range. 37 * :kbd:`Ctrl` + click / :kbd:`Cmd` + click: adds/removes individual line from/to the selection. 38 39 Blame strip 40 ----------- 41 42 See the :ref:`Blame strip <searchfox-blame-strip>` documentation. 43 44 Code coverage 45 ------------- 46 47 The light-blue line next to the blame strip shows the `code coverage <https://firefox-source-docs.mozilla.org/tools/code-coverage/index.html>`__ information. 48 49 Hovering a pointer over the coverage strip shows a coverage popup, which shows how many times the line is hit in the automation. 50 51 .. image:: img/coverage.png 52 :class: border 53 :alt: The code coverage information 54 :width: 589px 55 56 Nesting header 57 -------------- 58 59 .. image:: img/nesting.png 60 :class: border 61 :alt: The nesting header 62 :width: 535px 63 64 For nesting structures inside a source code, such as namespaces, classes, functions, etc, Searchfox shows a sticky header for the nesting. 65 66 For variable declarations spans across multiple lines in C++ code, the nesting header is shown if it has 10+ lines. 67 68 Symbols 69 ------- 70 71 Clicking each symbol (functions, variables) opens :ref:`Context menu <searchfox_context_menu>`.