diff --git a/bin/commands/issue.rs b/bin/commands/issue.rs index d6b59346..73a969ce 100644 --- a/bin/commands/issue.rs +++ b/bin/commands/issue.rs @@ -244,8 +244,8 @@ pub async fn run(options: Options, ctx: impl Context) -> anyhow::Result<()> { IssueOperation::Edit { id } => { terminal::run_rad( Some("issue"), - &["edit".into(), id.to_string().into()], - Quiet::Yes, + &["edit".into(), id.to_string().into(), "--quiet".into()], + Quiet::No, )?; } IssueOperation::Comment { diff --git a/bin/commands/issue/list.rs b/bin/commands/issue/list.rs index d2da9cbd..189e2b5a 100644 --- a/bin/commands/issue/list.rs +++ b/bin/commands/issue/list.rs @@ -514,16 +514,24 @@ fn browser(channel: &Channel) -> Widget { Browser::new(tx.clone()) .to_widget(tx.clone()) .on_update(|state| BrowserProps::from(state).to_boxed_any().into()) - .on_event(|event, _, _| { - if let Event::Key(key) = event { - match key { - Key::Enter => Some(Message::Exit { - operation: Some(RequestedIssueOperation::Show), - }), - Key::Char('e') => Some(Message::Exit { - operation: Some(RequestedIssueOperation::Edit), - }), - _ => None, + .on_event(|event, _, props| { + let default = BrowserProps::default(); + let props = props + .and_then(|props| props.inner_ref::()) + .unwrap_or(&default); + if !props.show_search() { + if let Event::Key(key) = event { + match key { + Key::Enter => Some(Message::Exit { + operation: Some(RequestedIssueOperation::Show), + }), + Key::Char('e') => Some(Message::Exit { + operation: Some(RequestedIssueOperation::Edit), + }), + _ => None, + } + } else { + None } } else { None diff --git a/bin/commands/issue/list/ui.rs b/bin/commands/issue/list/ui.rs index 79561877..51da1779 100644 --- a/bin/commands/issue/list/ui.rs +++ b/bin/commands/issue/list/ui.rs @@ -49,6 +49,12 @@ pub struct BrowserProps<'a> { search: String, } +impl<'a> BrowserProps<'a> { + pub fn show_search(&self) -> bool { + self.show_search + } +} + impl From<&State> for BrowserProps<'_> { fn from(state: &State) -> Self { use radicle::issue::State;