Skip to content

Commit

Permalink
Bump alacritty_terminal to 0.23
Browse files Browse the repository at this point in the history
  • Loading branch information
snaggen authored and jackpot51 committed Apr 5, 2024
1 parent fdf6195 commit 69c2269
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
16 changes: 11 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ rust-version = "1.71"
vergen = { version = "8", features = ["git", "gitcl"] }

[dependencies]
alacritty_terminal = "0.20"
alacritty_terminal = "0.23"
env_logger = "0.10"
hex_color = { version = "3", features = ["serde"] }
indexmap = "2"
Expand Down
4 changes: 4 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1165,6 +1165,7 @@ impl App {
working_directory: None,
//TODO: configurable hold (keep open when child exits)?
hold: false,
env: HashMap::new(),
};
let tab_title_override = if !profile.tab_title.is_empty() {
Some(profile.tab_title.clone())
Expand Down Expand Up @@ -2235,6 +2236,9 @@ impl Application for App {
}
}
}
TermEvent::ChildExit(_error_code) => {
//Ignore this for now
},
}
}
Message::TermEventTx(term_event_tx) => {
Expand Down
6 changes: 4 additions & 2 deletions src/terminal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ impl Terminal {
let window_id = 0;
let pty = tty::new(&options, size.into(), window_id)?;

let pty_event_loop = EventLoop::new(term.clone(), event_proxy, pty, options.hold, false);
let pty_event_loop = EventLoop::new(term.clone(), event_proxy, pty, options.hold, false)?;
let notifier = Notifier(pty_event_loop.channel());
let _pty_join_handle = pty_event_loop.spawn();

Expand Down Expand Up @@ -876,6 +876,8 @@ impl Terminal {
impl Drop for Terminal {
fn drop(&mut self) {
// Ensure shutdown on terminal drop
self.notifier.0.send(Msg::Shutdown);
if let Err(err) = self.notifier.0.send(Msg::Shutdown) {
log::warn!("Failed to send shutdown message on dropped terminal: {err}");
}
}
}

0 comments on commit 69c2269

Please sign in to comment.