Skip to content

Commit

Permalink
feat: change priority order of editor envvar lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
eekhof authored and altsem committed Sep 3, 2024
1 parent 5083799 commit bc18b6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ops/show.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ fn editor(file: &Path, maybe_line: Option<u32>) -> Option<Action> {
let file = file.to_str().unwrap().to_string();

Some(Rc::new(move |state, term| {
const EDITOR_VARS: [&str; 3] = ["GIT_EDITOR", "VISUAL", "EDITOR"];
const EDITOR_VARS: [&str; 3] = ["VISUAL", "EDITOR", "GIT_EDITOR"];
let configured_editor = EDITOR_VARS
.into_iter()
.find_map(|var| std::env::var(var).ok());
Expand Down

0 comments on commit bc18b6e

Please sign in to comment.