Remove the ability to retrieve the view's parent

This commit is contained in:
Antonio Scandurra 2023-05-03 16:52:55 +02:00
parent 7f137ed3dd
commit e9ed40da37
10 changed files with 22 additions and 30 deletions

View file

@ -124,6 +124,7 @@ impl TerminalView {
workspace_id: WorkspaceId,
cx: &mut ViewContext<Self>,
) -> Self {
let view_id = cx.view_id();
cx.observe(&terminal, |_, _, cx| cx.notify()).detach();
cx.subscribe(&terminal, |this, _, event, cx| match event {
Event::Wakeup => {
@ -162,7 +163,7 @@ impl TerminalView {
terminal,
has_new_content: true,
has_bell: false,
context_menu: cx.add_view(ContextMenu::new),
context_menu: cx.add_view(|cx| ContextMenu::new(view_id, cx)),
blink_state: true,
blinking_on: false,
blinking_paused: false,