MCPcopy Create free account
hub / github.com/evilsocket/cake / scroll_to_bottom

Method scroll_to_bottom

cake-cli/src/chat.rs:159–165  ·  view source on GitHub ↗
(&mut self, visible_height: u16)

Source from the content-addressed store, hash-verified

157 }
158
159 fn scroll_to_bottom(&mut self, visible_height: u16) {
160 if self.total_lines > visible_height {
161 self.scroll_offset = self.total_lines - visible_height;
162 } else {
163 self.scroll_offset = 0;
164 }
165 }
166}
167
168// ── Helpers ────────────────────────────────────────────────────────────────

Callers 1

draw_chatFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected