diff options
author | Andrew Borg (Kashin) <1192958+aborg-dev@users.noreply.github.com> | 2025-01-16 15:04:21 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-16 15:04:21 +0000 |
commit | 5e78d20c709cb1ab8d44ca7a8702cc26d779227c (patch) | |
tree | f5174dfb36771fbfb149b338f000ab27c119baab /alacritty/src/input/mod.rs | |
parent | c9c41e637ac49f3cd67cf0362c596ae9d947f896 (diff) | |
download | r-alacritty-5e78d20c709cb1ab8d44ca7a8702cc26d779227c.tar.gz r-alacritty-5e78d20c709cb1ab8d44ca7a8702cc26d779227c.tar.bz2 r-alacritty-5e78d20c709cb1ab8d44ca7a8702cc26d779227c.zip |
Add option to drain PTY on shutdown
This patch removes the `hold` option on `alacritty_terminal` in favor of
a `drain_on_exit` option, which will drain the PTY before shutdown. The
hold logic is instead handled in `alacritty`.
Diffstat (limited to 'alacritty/src/input/mod.rs')
-rw-r--r-- | alacritty/src/input/mod.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/alacritty/src/input/mod.rs b/alacritty/src/input/mod.rs index 60a50529..3f85512f 100644 --- a/alacritty/src/input/mod.rs +++ b/alacritty/src/input/mod.rs @@ -324,7 +324,10 @@ impl<T: EventListener> Execute<T> for Action { #[cfg(not(target_os = "macos"))] Action::Hide => ctx.window().set_visible(false), Action::Minimize => ctx.window().set_minimized(true), - Action::Quit => ctx.terminal_mut().exit(), + Action::Quit => { + ctx.window().hold = false; + ctx.terminal_mut().exit(); + }, Action::IncreaseFontSize => ctx.change_font_size(FONT_SIZE_STEP), Action::DecreaseFontSize => ctx.change_font_size(-FONT_SIZE_STEP), Action::ResetFontSize => ctx.reset_font_size(), |