diff --git a/CHANGELOG.md b/CHANGELOG.md index 10b341f..a8bd9a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - /Applications symlink into OS X DMG for easier installation - Colored emojis on Linux/BSD +### Changed + +- On Windows, the ConPTY backend will now be used by default if available +- The `enable_experimental_conpty_backend` config option has been replaced with `winpty_backend` + ### Fixed - URLs not truncated with non-matching single quote diff --git a/README.md b/README.md index 13ba027..fee19f5 100644 --- a/README.md +++ b/README.md @@ -145,13 +145,13 @@ desktop environment has trouble rendering the default SVG icons, you can find a prerendered SVG as well as simplified versions of the SVG in the `extra/logo/compat` directory. -To work properly on Windows, Alacritty requires winpty to emulate UNIX's PTY -API. The agent is a single binary (`winpty-agent.exe`) which **must** be in -the same directory as the Alacritty executable and is available through the -[GitHub releases page](https://github.com/jwilm/alacritty/releases). +On Windows, Alacritty also requires Microsoft's VC++ redistributable. -On Windows, Alacritty also requires Microsoft's VC++ redistributable to work -properly. +For Windows versions older than Windows 10 (October 2018 Update), Alacritty +requires winpty to emulate UNIX's PTY API. The agent is a single binary +(`winpty-agent.exe`) which **must** be in the same directory as the Alacritty +executable and is available through the +[GitHub releases page](https://github.com/jwilm/alacritty/releases). ## Configuration diff --git a/alacritty.yml b/alacritty.yml index fa40e0b..38303ee 100644 --- a/alacritty.yml +++ b/alacritty.yml @@ -337,16 +337,15 @@ # directory of the parent process will be used. #working_directory: None -# Windows 10 ConPTY backend (Windows only) +# WinPTY backend (Windows only) # -# This will enable better color support and may resolve other issues, -# however this API and its implementation is still young and so is -# disabled by default, as stability may not be as good as the winpty -# backend. +# Alacritty defaults to using the newer ConPTY backend if it is available, +# since it resolves a lot of bugs and is quite a bit faster. If it is not +# available, the the WinPTY backend will be used instead. # -# Alacritty will fall back to the WinPTY automatically if the ConPTY -# backend cannot be initialized. -#enable_experimental_conpty_backend: false +# Setting this option to `true` makes Alacritty use the legacy WinPTY backend, +# even if the ConPTY backend is available. +#winpty_backend: false # Send ESC (\x1b) before characters when alt is pressed. #alt_send_esc: true diff --git a/alacritty_terminal/src/config/mod.rs b/alacritty_terminal/src/config/mod.rs index 2643241..3c8a85a 100644 --- a/alacritty_terminal/src/config/mod.rs +++ b/alacritty_terminal/src/config/mod.rs @@ -108,11 +108,10 @@ pub struct Config { #[serde(default, deserialize_with = "failure_default")] pub cursor: Cursor, - /// Enable experimental conpty backend instead of using winpty. - /// Will only take effect on Windows 10 Oct 2018 and later. + /// Use WinPTY backend even if ConPTY is available #[cfg(windows)] #[serde(default, deserialize_with = "failure_default")] - pub enable_experimental_conpty_backend: bool, + pub winpty_backend: bool, /// Send escape sequences using the alt key. #[serde(default, deserialize_with = "failure_default")] diff --git a/alacritty_terminal/src/tty/windows/conpty.rs b/alacritty_terminal/src/tty/windows/conpty.rs index 5e5a011..44b3662 100644 --- a/alacritty_terminal/src/tty/windows/conpty.rs +++ b/alacritty_terminal/src/tty/windows/conpty.rs @@ -102,7 +102,7 @@ impl Drop for Conpty { unsafe impl Send for Conpty {} pub fn new(config: &Config, size: &SizeInfo, _window_id: Option) -> Option { - if !config.enable_experimental_conpty_backend { + if config.winpty_backend { return None; } diff --git a/alacritty_terminal/src/tty/windows/mod.rs b/alacritty_terminal/src/tty/windows/mod.rs index 9e2f722..f5e0e61 100644 --- a/alacritty_terminal/src/tty/windows/mod.rs +++ b/alacritty_terminal/src/tty/windows/mod.rs @@ -61,11 +61,11 @@ pub struct Pty { pub fn new(config: &Config, size: &SizeInfo, window_id: Option) -> Pty { if let Some(pty) = conpty::new(config, size, window_id) { - info!("Using Conpty agent"); + info!("Using ConPTY backend"); IS_CONPTY.store(true, Ordering::Relaxed); pty } else { - info!("Using Winpty agent"); + info!("Using WinPTY backend"); winpty::new(config, size, window_id) } }