MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / contains_point

Function contains_point

crates/opencode-tui/src/components/sidebar.rs:602–609  ·  view source on GitHub ↗
(area: Option<Rect>, col: u16, row: u16)

Source from the content-addressed store, hash-verified

600}
601
602fn contains_point(area: Option<Rect>, col: u16, row: u16) -> bool {
603 let Some(area) = area else {
604 return false;
605 };
606 let max_x = area.x.saturating_add(area.width);
607 let max_y = area.y.saturating_add(area.height);
608 col >= area.x && col < max_x && row >= area.y && row < max_y
609}
610
611fn truncate_text(text: &str, max_chars: usize) -> String {
612 if max_chars == 0 {

Callers 2

handle_clickMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected