Skip to main content

gutter_width

Function gutter_width 

Source
pub fn gutter_width(line_count: u32) -> usize
Expand description

How many columns the gutter needs for a buffer of line_count lines.

The invariant is constant within a frame, not constant forever. A file that grows past 9 999 lines widening its gutter is what vim does and what a reader expects; the text jumping sideways while they scroll is not. Every face derives its geometry from this ONE function so they cannot disagree about where a line starts.