Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Add search bar to terminal panel

Antonio Scandurra414b97adce4e
diff --git a/Cargo.lock b/Cargo.lock
index 7fa4d3b9ba3..95fcf2224d8 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -6809,6 +6809,7 @@ dependencies = [
"procinfo",
"project",
"rand 0.8.5",
+ "search",
"serde",
"serde_derive",
"settings",
diff --git a/crates/terminal_view/Cargo.toml b/crates/terminal_view/Cargo.toml
index a42d6c550ee..6fa920d7393 100644
--- a/crates/terminal_view/Cargo.toml
+++ b/crates/terminal_view/Cargo.toml
@@ -14,6 +14,7 @@ editor = { path = "../editor" }
language = { path = "../language" }
gpui = { path = "../gpui" }
project = { path = "../project" }
+search = { path = "../search" }
settings = { path = "../settings" }
theme = { path = "../theme" }
util = { path = "../util" }
diff --git a/crates/terminal_view/src/terminal_panel.rs b/crates/terminal_view/src/terminal_panel.rs
index 791a8b21c56..cd834cec9ad 100644
--- a/crates/terminal_view/src/terminal_panel.rs
+++ b/crates/terminal_view/src/terminal_panel.rs
@@ -99,6 +99,9 @@ impl TerminalPanel {
))
.into_any()
});
+ let buffer_search_bar = cx.add_view(search::BufferSearchBar::new);
+ pane.toolbar()
+ .update(cx, |toolbar, cx| toolbar.add_item(buffer_search_bar, cx));
pane
});
let subscriptions = vec![