MCPcopy Create free account
hub / github.com/GCWing/BitFun / apply_selection

Method apply_selection

src/apps/cli/src/ui/command_menu.rs:102–111  ·  view source on GitHub ↗

Confirm the selected command and return its name

(&mut self)

Source from the content-addressed store, hash-verified

100
101 /// Confirm the selected command and return its name
102 pub fn apply_selection(&mut self) -> Option<String> {
103 if !self.visible {
104 return None;
105 }
106
107 let selected = self.selected_item()?;
108 let command = selected.name.to_string();
109 self.suppress();
110 Some(command)
111 }
112
113 pub fn render(&mut self, frame: &mut Frame, area: Rect, theme: &Theme) {
114 if !self.visible || area.height < 3 {

Callers 3

handle_mouse_eventMethod · 0.80
handle_keyMethod · 0.80

Calls 2

suppressMethod · 0.80
selected_itemMethod · 0.45

Tested by

no test coverage detected