aboutsummaryrefslogtreecommitdiff
path: root/src/bibiman.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/bibiman.rs')
-rw-r--r--src/bibiman.rs12
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