aboutsummaryrefslogtreecommitdiff
path: root/src/bibiman.rs
diff options
context:
space:
mode:
authorlukeflo2025-02-17 21:43:18 +0100
committerlukeflo2025-02-17 21:43:18 +0100
commitde0e6fcde0f4fdd9a08255dac52629bec28a0ca3 (patch)
tree6df6f37849c118c997006487b49ede619002e4e2 /src/bibiman.rs
parentd443843d352d740b895c4d622eb9af9567aa7423 (diff)
downloadbibiman-de0e6fcde0f4fdd9a08255dac52629bec28a0ca3.tar.gz
bibiman-de0e6fcde0f4fdd9a08255dac52629bec28a0ca3.zip
Update README
Diffstat (limited to 'src/bibiman.rs')
-rw-r--r--src/bibiman.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bibiman.rs b/src/bibiman.rs
index 6aa138d..20cdfc6 100644
--- a/src/bibiman.rs
+++ b/src/bibiman.rs
@@ -328,7 +328,7 @@ impl Bibiman {
self.entry_table.entry_table_state.select(Some(idx_count));
}
- pub fn run_editor(&mut self, args: &CLIArgs, tui: &mut Tui) -> Result<()> {
+ pub fn run_editor(&mut self, cfg: &BibiConfig, args: &CLIArgs, tui: &mut Tui) -> Result<()> {
// get filecontent and citekey for calculating line number
let citekey: &str = &self.entry_table.entry_table_items
[self.entry_table.entry_table_state.selected().unwrap()]
@@ -379,6 +379,7 @@ impl Bibiman {
tui.exit()?;
// Use VISUAL or EDITOR. Set "vi" as last fallback
let mut cmd: Command = EditorBuilder::new()
+ .source(cfg.general.editor.clone())
.environment()
.source(Some("vi"))
.build()