MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / scroll_viewport_zero_before_first_draw

Function scroll_viewport_zero_before_first_draw

crates/openshell-tui/src/app.rs:2892–2897  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2890
2891 #[test]
2892 fn scroll_viewport_zero_before_first_draw() {
2893 // viewport=0 is treated as 1 (the .max(1) fallback).
2894 // 100 lines, viewport 0 -> max = 99.
2895 assert_eq!(clamped_scroll(0, 1, 100, 0), 1);
2896 assert_eq!(clamped_scroll(98, 5, 100, 0), 99);
2897 }
2898
2899 #[test]
2900 fn scroll_up_one() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected