Setup env correctly after upgrading alacritty_terminal
Co-Authored-By: Antonio <antonio@zed.dev>
This commit is contained in:
parent
0aa1b1f070
commit
698108ac8b
1 changed files with 10 additions and 5 deletions
|
@ -277,7 +277,7 @@ impl TerminalBuilder {
|
||||||
pub fn new(
|
pub fn new(
|
||||||
working_directory: Option<PathBuf>,
|
working_directory: Option<PathBuf>,
|
||||||
shell: Shell,
|
shell: Shell,
|
||||||
mut env: HashMap<String, String>,
|
env: HashMap<String, String>,
|
||||||
blink_settings: Option<TerminalBlink>,
|
blink_settings: Option<TerminalBlink>,
|
||||||
alternate_scroll: AlternateScroll,
|
alternate_scroll: AlternateScroll,
|
||||||
window: AnyWindowHandle,
|
window: AnyWindowHandle,
|
||||||
|
@ -300,17 +300,22 @@ impl TerminalBuilder {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// First, setup Alacritty's env
|
||||||
|
setup_env();
|
||||||
|
|
||||||
|
// Then setup configured environment variables
|
||||||
|
for (key, value) in env {
|
||||||
|
std::env::set_var(key, value);
|
||||||
|
}
|
||||||
//TODO: Properly set the current locale,
|
//TODO: Properly set the current locale,
|
||||||
env.insert("LC_ALL".to_string(), "en_US.UTF-8".to_string());
|
std::env::set_var("LC_ALL", "en_US.UTF-8");
|
||||||
env.insert("ZED_TERM".to_string(), true.to_string());
|
std::env::set_var("ZED_TERM", "true");
|
||||||
|
|
||||||
let config = Config {
|
let config = Config {
|
||||||
scrolling_history: 10000,
|
scrolling_history: 10000,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
|
|
||||||
setup_env();
|
|
||||||
|
|
||||||
//Spawn a task so the Alacritty EventLoop can communicate with us in a view context
|
//Spawn a task so the Alacritty EventLoop can communicate with us in a view context
|
||||||
//TODO: Remove with a bounded sender which can be dispatched on &self
|
//TODO: Remove with a bounded sender which can be dispatched on &self
|
||||||
let (events_tx, events_rx) = unbounded();
|
let (events_tx, events_rx) = unbounded();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue