aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/editor.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-view/src/editor.rs')
-rw-r--r--helix-view/src/editor.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs
index af69ceea..47edf303 100644
--- a/helix-view/src/editor.rs
+++ b/helix-view/src/editor.rs
@@ -187,9 +187,9 @@ pub struct TerminalConfig {
#[cfg(windows)]
pub fn get_terminal_provider() -> Option<TerminalConfig> {
- use crate::clipboard::provider::command::exists;
+ use crate::env::binary_exists;
- if exists("wt") {
+ if binary_exists("wt") {
return Some(TerminalConfig {
command: "wt".to_string(),
args: vec![
@@ -210,16 +210,16 @@ pub fn get_terminal_provider() -> Option<TerminalConfig> {
#[cfg(not(any(windows, target_os = "wasm32")))]
pub fn get_terminal_provider() -> Option<TerminalConfig> {
- use crate::clipboard::provider::command::{env_var_is_set, exists};
+ use crate::env::{binary_exists, env_var_is_set};
- if env_var_is_set("TMUX") && exists("tmux") {
+ if env_var_is_set("TMUX") && binary_exists("tmux") {
return Some(TerminalConfig {
command: "tmux".to_string(),
args: vec!["split-window".to_string()],
});
}
- if env_var_is_set("WEZTERM_UNIX_SOCKET") && exists("wezterm") {
+ if env_var_is_set("WEZTERM_UNIX_SOCKET") && binary_exists("wezterm") {
return Some(TerminalConfig {
command: "wezterm".to_string(),
args: vec!["cli".to_string(), "split-pane".to_string()],