diff options
| author | lukeflo | 2024-12-15 13:21:42 +0100 |
|---|---|---|
| committer | lukeflo | 2024-12-23 21:03:19 +0100 |
| commit | a6fca1fcf164142d84d09242b9d95a1da0b2d2d9 (patch) | |
| tree | 08cae1f39342d5d81bb2d51554a62676899ef70e /src/bibiman.rs | |
| parent | b892bc9a66e65cb73901d719c83768face67941d (diff) | |
| download | bibiman-a6fca1fcf164142d84d09242b9d95a1da0b2d2d9.tar.gz bibiman-a6fca1fcf164142d84d09242b9d95a1da0b2d2d9.zip | |
use input struct, place cursor at pos
Diffstat (limited to 'src/bibiman.rs')
| -rw-r--r-- | src/bibiman.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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); |
