diff options
| author | lukeflo | 2025-05-24 17:31:33 +0200 |
|---|---|---|
| committer | lukeflo | 2025-05-24 17:31:33 +0200 |
| commit | 28030fd0830478872be2b9e86b74e0c054a96111 (patch) | |
| tree | 1d5029f00bc42a81378529816eaf55e162b9ce4f /src/bibiman.rs | |
| parent | 7fe5acb85b9e665ec83f590942ee78b8c90d6aae (diff) | |
| download | bibiman-28030fd0830478872be2b9e86b74e0c054a96111.tar.gz bibiman-28030fd0830478872be2b9e86b74e0c054a96111.zip | |
implemented a workflow, but citekey matching still buggy
Diffstat (limited to 'src/bibiman.rs')
| -rw-r--r-- | src/bibiman.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/bibiman.rs b/src/bibiman.rs index c90905f..ef5dfe3 100644 --- a/src/bibiman.rs +++ b/src/bibiman.rs @@ -89,7 +89,7 @@ impl Bibiman { main_bibfiles.append(cfg.general.bibfiles.as_mut().unwrap()) }; let main_bibfiles = cliargs::parse_files(main_bibfiles); - let main_biblio = BibiSetup::new(&main_bibfiles); + let main_biblio = BibiSetup::new(&main_bibfiles, cfg); let tag_list = TagList::new(main_biblio.keyword_list.clone()); let search_struct = BibiSearch::default(); let entry_table = EntryTable::new(main_biblio.entry_list.clone()); @@ -133,8 +133,8 @@ impl Bibiman { self.former_area = None; } - pub fn update_lists(&mut self) { - self.main_biblio = BibiSetup::new(&self.main_bibfiles); + pub fn update_lists(&mut self, cfg: &BibiConfig) { + self.main_biblio = BibiSetup::new(&self.main_bibfiles, cfg); self.tag_list = TagList::new(self.main_biblio.keyword_list.clone()); self.entry_table = EntryTable::new(self.main_biblio.entry_list.clone()); } @@ -397,7 +397,7 @@ impl Bibiman { tui.terminal.clear()?; // Update the database and the lists to show changes - Self::update_lists(self); + Self::update_lists(self, cfg); // Select entry which was selected before entering editor self.select_entry_by_citekey(citekey); @@ -466,7 +466,7 @@ impl Bibiman { self.popup_area.popup_selection(items); } - pub fn append_entry_to_file(&mut self) -> Result<()> { + pub fn append_entry_to_file(&mut self, cfg: &BibiConfig) -> Result<()> { // Index of selected popup field let popup_idx = self.popup_area.popup_state.selected().unwrap(); @@ -535,7 +535,7 @@ impl Bibiman { // Write content to file file.write_all(self.popup_area.popup_sel_item.as_bytes())?; // Update the database and the lists to reflect the new content - self.update_lists(); + self.update_lists(cfg); self.close_popup(); // Select newly created entry |
