Expand description
The inspector’s value reader: a long value read a screen at a time.
Text is cut into units — a line, or a segment of SEG bytes of a longer
line — and only the units on screen are wrapped. Scrolling walks units from
the top of the pane; End finds the last unit by searching back for a line
break and fills the pane upward. So the end of a 2 MiB value is as near as
its start, and no key wraps more than a screen and a unit of it.
A unit’s bounds depend only on the text, never on how it was reached, so a unit wrapped walking down is the unit found walking up.
Structs§
- Reader
- Where a pane is in its value, and the units of text wrapped so far.
- Row
- One row of wrapped text, and the bytes of the value it shows.
- Shown
- A row on screen.
- Window
- The rows on screen, and whether any are above or below them.
Enums§
- Content
- What the value pane reads.
- Text
Form - Text as itself (lines broken, tabs spaced, controls marked) or as an escaped literal on one line.
- Tone
- Wrap
- How a line wider than the pane breaks: at spaces and after
/ & ? , ; | -, or at the pane’s edge.
Constants§
- MAX_
HITS - The most matches a search in a value lists.
- SEG
- The most bytes of a long line wrapped as one unit.
Functions§
- count_
lines - Lines in
text: its line breaks, plus one. - find_
hits - Every place
needleis in the value, up toMAX_HITS: bytes into text or hex, rows of lines. - hex_
per_ line - Bytes to a hex row at
widthcells: 32 where a row of them fits, then 16, 8, 4. A row ofnis the offset and a space, three cells a byte, two spaces, and a cell a byte. - hex_row
- A hex dump row: offset, the bytes, and their printable ASCII.
- hits_
in_ row - Where
needleis in a row on screen, as byte ranges of its text. - ignores_
case - Whether a search for
needleignores case: only when it has no capitals. - wrap_
lines - Lines of a short text, wrapped to
widthat word breaks, for the pane’s own sentences and short values. - wrap_
unit - Wrap bytes
start..endoftextto rows of at mostwidthcells. Raw text spaces its tabs to stops of four and marks controls; escaped text is the literal, quoted at the value’s two ends.