From 907d3e403569a2aab7d080c1caa8c07eaec470b4 Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Thu, 4 Aug 2022 10:16:26 -0700 Subject: [PATCH] Checkpoint, not compiling --- Cargo.lock | 1 + crates/terminal/Cargo.toml | 1 + crates/terminal/src/terminal_view.rs | 3 +++ 3 files changed, 5 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index a32f08d8f7..60518a2faf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5356,6 +5356,7 @@ dependencies = [ "alacritty_terminal", "anyhow", "client", + "context_menu", "dirs 4.0.0", "editor", "futures", diff --git a/crates/terminal/Cargo.toml b/crates/terminal/Cargo.toml index d06d16b1ba..732a03ed1e 100644 --- a/crates/terminal/Cargo.toml +++ b/crates/terminal/Cargo.toml @@ -16,6 +16,7 @@ theme = { path = "../theme" } settings = { path = "../settings" } workspace = { path = "../workspace" } project = { path = "../project" } +context_menu = { path = "../context_menu" } smallvec = { version = "1.6", features = ["union"] } smol = "1.2.5" mio-extras = "2.0.6" diff --git a/crates/terminal/src/terminal_view.rs b/crates/terminal/src/terminal_view.rs index 40a882e488..309b3be11a 100644 --- a/crates/terminal/src/terminal_view.rs +++ b/crates/terminal/src/terminal_view.rs @@ -5,6 +5,7 @@ use gpui::{ actions, elements::*, AnyViewHandle, AppContext, Entity, ModelHandle, View, ViewContext, ViewHandle, }; +use theme::ContextMenu; use workspace::{Item, Workspace}; use crate::TerminalSize; @@ -39,6 +40,7 @@ pub struct TerminalView { modal: bool, pub content: TerminalContent, associated_directory: Option, + context_menu: ViewHandle, } pub struct ErrorView { @@ -111,6 +113,7 @@ impl TerminalView { modal, content, associated_directory: working_directory, + context_menu: cx.add_view(|cx| ContextMenu::new(cx)), } }