diff options
| author | lukeflo | 2025-06-30 10:43:38 +0200 |
|---|---|---|
| committer | lukeflo | 2025-06-30 10:43:38 +0200 |
| commit | b10615ade6bb2710cf6716f05cc496cb082d24ad (patch) | |
| tree | a468b0766e1f3c32148e9eef5b8f0d75bf256fa8 /src/app.rs | |
| parent | ae1667410b0a812fff8d464251548f23f88ae024 (diff) | |
| download | bibiman-b10615ade6bb2710cf6716f05cc496cb082d24ad.tar.gz bibiman-b10615ade6bb2710cf6716f05cc496cb082d24ad.zip | |
opening notes in set editor
Diffstat (limited to 'src/app.rs')
| -rw-r--r-- | src/app.rs | 16 |
1 files changed, 2 insertions, 14 deletions
@@ -18,6 +18,7 @@ use crate::bibiman::CurrentArea; use crate::config::BibiConfig; use color_eyre::eyre::{Context, Ok, Result}; +use editor_command::EditorBuilder; // use super::Event; use crate::cliargs::CLIArgs; use crate::tui::commands::InputCmdAction; @@ -279,7 +280,7 @@ impl App { if let Some(PopupKind::Help) = self.bibiman.popup_area.popup_kind { self.bibiman.close_popup(); } else if let Some(PopupKind::OpenRes) = self.bibiman.popup_area.popup_kind { - self.bibiman.open_connected_res(cfg)?; + self.bibiman.open_connected_res(cfg, tui)?; } else if let Some(PopupKind::AppendToFile) = self.bibiman.popup_area.popup_kind { self.bibiman.append_entry_to_file(cfg)? @@ -423,19 +424,6 @@ pub fn open_connected_file(cfg: &BibiConfig, file: &OsStr) -> Result<()> { Ok(()) } -pub fn open_connected_note(cfg: &BibiConfig, file: &OsStr) -> Result<()> { - // let cmd = cfg.general.editor.as_ref().unwrap(); - - let _ = Command::new("xdg-open") - .arg(file) - .stdout(Stdio::null()) - .stderr(Stdio::null()) - .spawn() - .wrap_err("Opening file not possible"); - - Ok(()) -} - pub fn open_connected_link(cfg: &BibiConfig, link: &str) -> Result<()> { // Build command to execute pdf-reader. 'xdg-open' is Linux standard let cmd = &cfg.general.url_opener; |
