From a6fca1fcf164142d84d09242b9d95a1da0b2d2d9 Mon Sep 17 00:00:00 2001 From: lukeflo Date: Sun, 15 Dec 2024 13:21:42 +0100 Subject: use input struct, place cursor at pos --- src/bibiman.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/bibiman.rs') diff --git a/src/bibiman.rs b/src/bibiman.rs index 10dab1e..4e6e5e8 100644 --- a/src/bibiman.rs +++ b/src/bibiman.rs @@ -123,8 +123,8 @@ impl Bibiman { self.popup_area.popup_kind = Some(PopupKind::AddEntry); } - pub fn handle_new_entry_submission(&mut self, args: &CLIArgs) { - let new_entry_title = self.popup_area.add_entry_input.trim(); + pub fn handle_new_entry_submission(&mut self, args: &CLIArgs, doi_string: &Input) { + let new_entry_title = doi_string.value(); let doi2bib = doi2bib::Doi2Bib::new().unwrap(); let new_entry_future = doi2bib.resolve_doi(new_entry_title); let new_entry = block_on(new_entry_future); -- cgit v1.2.3