scroll

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package scroll computes the visible line window for a cursor-navigable list rendered inside a fixed-height terminal viewport, so a namespace scan or cross-repo list that outgrows the screen scrolls instead of clipping silently or pushing the footer off-screen.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Window

func Window(total, cursorLine, visible int) (int, int)

Window returns the [start, end) line range to render out of total lines, keeping cursorLine inside the window. Visible is the number of lines available for the list body; a total that fits within visible returns the full range unchanged. A non-positive visible or total returns [0, total).

Types

This section is empty.

Jump to

Keyboard shortcuts

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