diff options
| author | lukeflo | 2025-05-25 14:21:17 +0200 |
|---|---|---|
| committer | lukeflo | 2025-05-25 14:21:17 +0200 |
| commit | 06782b5ed1527b1d4eb6e26feb5a260415efe1af (patch) | |
| tree | 33fa4c6d0eeb7ceef3dcf83d8bd034af6e74c6be /src/bibiman.rs | |
| parent | d112312c3fcf79c679e2aa4a47a60b69f83cbce9 (diff) | |
| download | bibiman-06782b5ed1527b1d4eb6e26feb5a260415efe1af.tar.gz bibiman-06782b5ed1527b1d4eb6e26feb5a260415efe1af.zip | |
enhancement from PR \#28 discussion
+ Collect basenames and filepaths from pdf dir into HashMap
+ Identical basenames in different subdirs are possible
+ Collected into Vector
+ TODO: implement selection for multiple files (yank and open)
Diffstat (limited to 'src/bibiman.rs')
| -rw-r--r-- | src/bibiman.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bibiman.rs b/src/bibiman.rs index ef5dfe3..646a078 100644 --- a/src/bibiman.rs +++ b/src/bibiman.rs @@ -557,7 +557,8 @@ impl Bibiman { let url = app::prepare_weblink(object); app::open_connected_link(cfg, &url)?; } else if self.popup_area.popup_list[popup_idx].contains("File") { - let object = self.entry_table.entry_table_items[entry_idx].filepath(); + // TODO: Selection for multiple files + let object = self.entry_table.entry_table_items[entry_idx].filepath()[0]; app::open_connected_file(cfg, object)?; } else { eprintln!("Unable to find ressource to open"); @@ -604,7 +605,7 @@ impl Bibiman { .filepath .clone(); if let Some(p) = path { - let p = p.as_os_str().to_str(); + let p = p[0].as_os_str().to_str(); if let Some(p) = p { Bibiman::yank_text(p); self.popup_area.popup_message( |
