aboutsummaryrefslogtreecommitdiff
path: root/alacritty_terminal/src/tty
diff options
context:
space:
mode:
Diffstat (limited to 'alacritty_terminal/src/tty')
-rw-r--r--alacritty_terminal/src/tty/unix.rs11
-rw-r--r--alacritty_terminal/src/tty/windows/conpty.rs1
-rw-r--r--alacritty_terminal/src/tty/windows/winpty.rs2
3 files changed, 6 insertions, 8 deletions
diff --git a/alacritty_terminal/src/tty/unix.rs b/alacritty_terminal/src/tty/unix.rs
index b373ada2..3998d9e6 100644
--- a/alacritty_terminal/src/tty/unix.rs
+++ b/alacritty_terminal/src/tty/unix.rs
@@ -1,6 +1,7 @@
//! TTY related functionality.
use std::borrow::Cow;
+#[cfg(not(target_os = "macos"))]
use std::env;
use std::ffi::CStr;
use std::fs::File;
@@ -148,12 +149,10 @@ pub fn new<C>(config: &Config<C>, size: &SizeInfo, window_id: Option<usize>) ->
let (master, slave) = make_pty(size.to_winsize());
#[cfg(any(target_os = "linux", target_os = "macos"))]
- {
- if let Ok(mut termios) = termios::tcgetattr(master) {
- // Set character encoding to UTF-8.
- termios.input_flags.set(InputFlags::IUTF8, true);
- let _ = termios::tcsetattr(master, SetArg::TCSANOW, &termios);
- }
+ if let Ok(mut termios) = termios::tcgetattr(master) {
+ // Set character encoding to UTF-8.
+ termios.input_flags.set(InputFlags::IUTF8, true);
+ let _ = termios::tcsetattr(master, SetArg::TCSANOW, &termios);
}
let mut buf = [0; 1024];
diff --git a/alacritty_terminal/src/tty/windows/conpty.rs b/alacritty_terminal/src/tty/windows/conpty.rs
index fa9f8b5a..b9748c8b 100644
--- a/alacritty_terminal/src/tty/windows/conpty.rs
+++ b/alacritty_terminal/src/tty/windows/conpty.rs
@@ -5,7 +5,6 @@ use std::os::windows::io::IntoRawHandle;
use std::ptr;
use mio_anonymous_pipes::{EventedAnonRead, EventedAnonWrite};
-use miow;
use winapi::shared::basetsd::{PSIZE_T, SIZE_T};
use winapi::shared::minwindef::{BYTE, DWORD};
use winapi::shared::ntdef::{HANDLE, HRESULT, LPWSTR};
diff --git a/alacritty_terminal/src/tty/windows/winpty.rs b/alacritty_terminal/src/tty/windows/winpty.rs
index 76c4c0b6..f9dd56bb 100644
--- a/alacritty_terminal/src/tty/windows/winpty.rs
+++ b/alacritty_terminal/src/tty/windows/winpty.rs
@@ -34,7 +34,7 @@ pub fn new<C>(config: &Config<C>, size: &SizeInfo, _window_id: Option<usize>) ->
SpawnFlags::AUTO_SHUTDOWN | SpawnFlags::EXIT_AFTER_SHUTDOWN,
None, // appname.
Some(&cmdline),
- config.working_directory.as_ref().map(|p| p.as_path()),
+ config.working_directory.as_deref(),
None, // Env.
)
.unwrap();