Skip to main content

at_bottom

Function at_bottom 

Source
pub fn at_bottom(max_offset: Pixels, offset: Pixels, slack: Pixels) -> bool
Expand description

Whether offset is at the end of the scrollable range, within slack.

Both of gpui’s conventions bite here, so: max_offset is the overflow and offset is negative going down, which makes the distance still to go max_offset - |offset|. Content that fits is always “at the bottom” — there is nowhere else to be, and answering false would unpin an empty log.