scroll

package
v0.19.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Align

func Align(sel, off, h, total int) int

Align returns a y-offset that keeps the selection away from viewport edges. It behaves like a lightweight scrolloff: nudge just enough to keep a small buffer.

func Reveal

func Reveal(start, end, off, h, total int) int

Reveal returns a y-offset that makes sure the span [start,end] is visible with a small buffer above and below when possible. If the span is already comfortably visible, the current offset is returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL