mirror of https://github.com/lapce/lapce.git
unixready not for windows
This commit is contained in:
parent
9a9673d39b
commit
a6f37624b6
|
@ -15,9 +15,10 @@
|
||||||
term::SizeInfo,
|
term::SizeInfo,
|
||||||
tty::{self, setup_env, EventedPty, EventedReadWrite},
|
tty::{self, setup_env, EventedPty, EventedReadWrite},
|
||||||
};
|
};
|
||||||
|
#[cfg(not(windows))]
|
||||||
|
use mio::unix::UnixReady;
|
||||||
use mio::{
|
use mio::{
|
||||||
channel::{channel, Receiver, Sender},
|
channel::{channel, Receiver, Sender},
|
||||||
unix::UnixReady,
|
|
||||||
Events, PollOpt, Ready,
|
Events, PollOpt, Ready,
|
||||||
};
|
};
|
||||||
use serde::{Deserialize, Deserializer, Serialize};
|
use serde::{Deserialize, Deserializer, Serialize};
|
||||||
|
@ -75,10 +76,10 @@ pub fn new(
|
||||||
args: vec!["-l".to_string()],
|
args: vec!["-l".to_string()],
|
||||||
});
|
});
|
||||||
setup_env(&config);
|
setup_env(&config);
|
||||||
|
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
set_locale_environment();
|
set_locale_environment();
|
||||||
|
|
||||||
let size =
|
let size =
|
||||||
SizeInfo::new(width as f32, height as f32, 1.0, 1.0, 0.0, 0.0, true);
|
SizeInfo::new(width as f32, height as f32, 1.0, 1.0, 0.0, 0.0, true);
|
||||||
let mut pty = alacritty_terminal::tty::new(&config, &size, None);
|
let mut pty = alacritty_terminal::tty::new(&config, &size, None);
|
||||||
|
@ -314,6 +315,8 @@ fn set_current(&mut self, new: Option<Writing>) {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_locale_environment() {
|
fn set_locale_environment() {
|
||||||
let locale = locale_config::Locale::global_default().to_string().replace("-", "_");
|
let locale = locale_config::Locale::global_default()
|
||||||
|
.to_string()
|
||||||
|
.replace("-", "_");
|
||||||
std::env::set_var("LC_ALL", locale + ".UTF-8");
|
std::env::set_var("LC_ALL", locale + ".UTF-8");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue