Skip to main content

caret_in_view

Function caret_in_view 

Source
pub fn caret_in_view(caret: Extent, view: Extent) -> f64
Expand description

How far the editor scrolls so the caret’s line shows in view, the part of its pane the reader can see (above an on-screen keyboard): nothing when it shows already, up to its top when it is above, down to its bottom when it is below. A line taller than the view shows from its top.