diff options
author | Kirill Chibisov <contact@kchibisov.com> | 2021-11-22 21:34:09 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-22 18:34:09 +0000 |
commit | 8681f71084894db6d1e258be17db1f80bb669314 (patch) | |
tree | 24d3c0ced916d2d171fd03f50cd34dcda8f0aa06 /alacritty_terminal/src/tty/windows/conpty.rs | |
parent | c89939b5d14e581e1aeaa940d81843192e0abc79 (diff) | |
download | alacritty-8681f71084894db6d1e258be17db1f80bb669314.tar.gz alacritty-8681f71084894db6d1e258be17db1f80bb669314.zip |
Add parameters to `msg create-window` subcommand
Alacritty's `msg create-window` subcommand would previously inherit all
the CLI parameters from the original executable. However not only could
this lead to unexpected behavior, it also prevents multi-window users
from making use of parameters like `-e`, `--working-directory`, or
`--hold`.
This is solved by adding a JSON-based message format to the IPC socket
messages which instructs the Alacritty server on which CLI parameters
should be used to create the new window.
Fixes #5562.
Fixes #5561.
Fixes #5560.
Diffstat (limited to 'alacritty_terminal/src/tty/windows/conpty.rs')
-rw-r--r-- | alacritty_terminal/src/tty/windows/conpty.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/alacritty_terminal/src/tty/windows/conpty.rs b/alacritty_terminal/src/tty/windows/conpty.rs index 002022ea..9556be8b 100644 --- a/alacritty_terminal/src/tty/windows/conpty.rs +++ b/alacritty_terminal/src/tty/windows/conpty.rs @@ -15,7 +15,7 @@ use winapi::um::processthreadsapi::{ use winapi::um::winbase::{EXTENDED_STARTUPINFO_PRESENT, STARTF_USESTDHANDLES, STARTUPINFOEXW}; use winapi::um::wincontypes::{COORD, HPCON}; -use crate::config::Config; +use crate::config::PtyConfig; use crate::event::OnResize; use crate::grid::Dimensions; use crate::term::SizeInfo; @@ -40,7 +40,7 @@ impl Drop for Conpty { // The ConPTY handle can be sent between threads. unsafe impl Send for Conpty {} -pub fn new<C>(config: &Config<C>, size: &SizeInfo) -> Option<Pty> { +pub fn new(config: &PtyConfig, size: &SizeInfo) -> Option<Pty> { let mut pty_handle = 0 as HPCON; // Passing 0 as the size parameter allows the "system default" buffer @@ -136,7 +136,7 @@ pub fn new<C>(config: &Config<C>, size: &SizeInfo) -> Option<Pty> { } } - let cmdline = win32_string(&cmdline(&config)); + let cmdline = win32_string(&cmdline(config)); let cwd = config.working_directory.as_ref().map(win32_string); let mut proc_info: PROCESS_INFORMATION = Default::default(); |