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

Method scroll_policy

crates/openshell-tui/src/app.rs:1802–1809  ·  view source on GitHub ↗

Scroll policy pane by a delta (positive = down, negative = up). Clamps so at least one viewport of content remains visible.

(&mut self, delta: isize)

Source from the content-addressed store, hash-verified

1800 ///
1801 /// Clamps so at least one viewport of content remains visible.
1802 pub fn scroll_policy(&mut self, delta: isize) {
1803 self.policy_scroll = clamped_scroll(
1804 self.policy_scroll,
1805 delta,
1806 self.policy_lines.len(),
1807 self.policy_viewport_height,
1808 );
1809 }
1810
1811 fn handle_logs_key(&mut self, key: KeyEvent) {
1812 if self.log_detail_index.is_some() {

Callers 2

runFunction · 0.80
handle_policy_keyMethod · 0.80

Calls 2

clamped_scrollFunction · 0.85
lenMethod · 0.80

Tested by

no test coverage detected