Default to ConPTY instead of WinPTY
This commit is contained in:
parent
512461a241
commit
7a957978e4
|
@ -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
|
- /Applications symlink into OS X DMG for easier installation
|
||||||
- Colored emojis on Linux/BSD
|
- 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
|
### Fixed
|
||||||
|
|
||||||
- URLs not truncated with non-matching single quote
|
- URLs not truncated with non-matching single quote
|
||||||
|
|
12
README.md
12
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
|
a prerendered SVG as well as simplified versions of the SVG in the
|
||||||
`extra/logo/compat` directory.
|
`extra/logo/compat` directory.
|
||||||
|
|
||||||
To work properly on Windows, Alacritty requires winpty to emulate UNIX's PTY
|
On Windows, Alacritty also requires Microsoft's VC++ redistributable.
|
||||||
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 to work
|
For Windows versions older than Windows 10 (October 2018 Update), Alacritty
|
||||||
properly.
|
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
|
## Configuration
|
||||||
|
|
||||||
|
|
|
@ -337,16 +337,15 @@
|
||||||
# directory of the parent process will be used.
|
# directory of the parent process will be used.
|
||||||
#working_directory: None
|
#working_directory: None
|
||||||
|
|
||||||
# Windows 10 ConPTY backend (Windows only)
|
# WinPTY backend (Windows only)
|
||||||
#
|
#
|
||||||
# This will enable better color support and may resolve other issues,
|
# Alacritty defaults to using the newer ConPTY backend if it is available,
|
||||||
# however this API and its implementation is still young and so is
|
# since it resolves a lot of bugs and is quite a bit faster. If it is not
|
||||||
# disabled by default, as stability may not be as good as the winpty
|
# available, the the WinPTY backend will be used instead.
|
||||||
# backend.
|
|
||||||
#
|
#
|
||||||
# Alacritty will fall back to the WinPTY automatically if the ConPTY
|
# Setting this option to `true` makes Alacritty use the legacy WinPTY backend,
|
||||||
# backend cannot be initialized.
|
# even if the ConPTY backend is available.
|
||||||
#enable_experimental_conpty_backend: false
|
#winpty_backend: false
|
||||||
|
|
||||||
# Send ESC (\x1b) before characters when alt is pressed.
|
# Send ESC (\x1b) before characters when alt is pressed.
|
||||||
#alt_send_esc: true
|
#alt_send_esc: true
|
||||||
|
|
|
@ -108,11 +108,10 @@ pub struct Config<T> {
|
||||||
#[serde(default, deserialize_with = "failure_default")]
|
#[serde(default, deserialize_with = "failure_default")]
|
||||||
pub cursor: Cursor,
|
pub cursor: Cursor,
|
||||||
|
|
||||||
/// Enable experimental conpty backend instead of using winpty.
|
/// Use WinPTY backend even if ConPTY is available
|
||||||
/// Will only take effect on Windows 10 Oct 2018 and later.
|
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
#[serde(default, deserialize_with = "failure_default")]
|
#[serde(default, deserialize_with = "failure_default")]
|
||||||
pub enable_experimental_conpty_backend: bool,
|
pub winpty_backend: bool,
|
||||||
|
|
||||||
/// Send escape sequences using the alt key.
|
/// Send escape sequences using the alt key.
|
||||||
#[serde(default, deserialize_with = "failure_default")]
|
#[serde(default, deserialize_with = "failure_default")]
|
||||||
|
|
|
@ -102,7 +102,7 @@ impl Drop for Conpty {
|
||||||
unsafe impl Send for Conpty {}
|
unsafe impl Send for Conpty {}
|
||||||
|
|
||||||
pub fn new<C>(config: &Config<C>, size: &SizeInfo, _window_id: Option<usize>) -> Option<Pty> {
|
pub fn new<C>(config: &Config<C>, size: &SizeInfo, _window_id: Option<usize>) -> Option<Pty> {
|
||||||
if !config.enable_experimental_conpty_backend {
|
if config.winpty_backend {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,11 +61,11 @@ pub struct Pty {
|
||||||
|
|
||||||
pub fn new<C>(config: &Config<C>, size: &SizeInfo, window_id: Option<usize>) -> Pty {
|
pub fn new<C>(config: &Config<C>, size: &SizeInfo, window_id: Option<usize>) -> Pty {
|
||||||
if let Some(pty) = conpty::new(config, size, window_id) {
|
if let Some(pty) = conpty::new(config, size, window_id) {
|
||||||
info!("Using Conpty agent");
|
info!("Using ConPTY backend");
|
||||||
IS_CONPTY.store(true, Ordering::Relaxed);
|
IS_CONPTY.store(true, Ordering::Relaxed);
|
||||||
pty
|
pty
|
||||||
} else {
|
} else {
|
||||||
info!("Using Winpty agent");
|
info!("Using WinPTY backend");
|
||||||
winpty::new(config, size, window_id)
|
winpty::new(config, size, window_id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue