mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-27 04:44:30 +00:00
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:
commit
9165320390
3 changed files with 10 additions and 2 deletions
|
@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ use std::{
|
|||
};
|
||||
use theme::Theme;
|
||||
|
||||
#[derive(Eq, PartialEq, Hash)]
|
||||
#[derive(Eq, PartialEq, Hash, Debug)]
|
||||
pub enum ItemEvent {
|
||||
CloseItem,
|
||||
UpdateTab,
|
||||
|
|
Loading…
Reference in a new issue