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.

Remove hardcoding of "Terminal" string

Joseph Lyons46efb844af3e
diff --git a/crates/terminal_view/src/terminal_button.rs b/crates/terminal_view/src/terminal_button.rs
index d3b5d627e37..c3efb43fb4f 100644
--- a/crates/terminal_view/src/terminal_button.rs
+++ b/crates/terminal_view/src/terminal_button.rs
@@ -49,9 +49,8 @@ impl View for TerminalButton {
};
let focused_view = cx.focused_view_id(cx.window_id());
- // FIXME: Don't hardcode "Terminal" in here
let active = focused_view
- .map(|view| cx.view_ui_name(cx.window_id(), view) == Some("Terminal"))
+ .map(|view| cx.view_ui_name(cx.window_id(), view) == Some(TerminalView::ui_name()))
.unwrap_or(false);
let has_terminals = !project.local_terminal_handles().is_empty();