aboutsummaryrefslogtreecommitdiff
path: root/src/app.rs
diff options
context:
space:
mode:
authorlukeflo2025-06-30 10:43:38 +0200
committerlukeflo2025-06-30 10:43:38 +0200
commitb10615ade6bb2710cf6716f05cc496cb082d24ad (patch)
treea468b0766e1f3c32148e9eef5b8f0d75bf256fa8 /src/app.rs
parentae1667410b0a812fff8d464251548f23f88ae024 (diff)
downloadbibiman-b10615ade6bb2710cf6716f05cc496cb082d24ad.tar.gz
bibiman-b10615ade6bb2710cf6716f05cc496cb082d24ad.zip
opening notes in set editor
Diffstat (limited to 'src/app.rs')
-rw-r--r--src/app.rs16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/app.rs b/src/app.rs
index f015494..496896a 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -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;