Fix a bug where the terminal would not be closed by the terminal exiting (#2706)

Release Notes:

- Fixed a bug where terminal tabs in the panel would not close on tty
process exit.
This commit is contained in:
Mikayla Maki 2023-07-11 12:23:26 -07:00 committed by GitHub
commit 9165320390
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 2 deletions

View file

@ -221,6 +221,14 @@ impl TerminalPanel {
pane::Event::ZoomIn => cx.emit(Event::ZoomIn),
pane::Event::ZoomOut => cx.emit(Event::ZoomOut),
pane::Event::Focus => cx.emit(Event::Focus),
pane::Event::AddItem { item } => {
if let Some(workspace) = self.workspace.upgrade(cx) {
let pane = self.pane.clone();
workspace.update(cx, |workspace, cx| item.added_to_pane(workspace, pane, cx))
}
}
_ => {}
}
}

View file

@ -275,7 +275,7 @@ impl TerminalView {
cx.spawn(|this, mut cx| async move {
Timer::after(CURSOR_BLINK_INTERVAL).await;
this.update(&mut cx, |this, cx| this.resume_cursor_blinking(epoch, cx))
.log_err();
.ok();
})
.detach();
}

View file

@ -27,7 +27,7 @@ use std::{
};
use theme::Theme;
#[derive(Eq, PartialEq, Hash)]
#[derive(Eq, PartialEq, Hash, Debug)]
pub enum ItemEvent {
CloseItem,
UpdateTab,