diff --git a/crates/language_selector2/src/language_selector.rs b/crates/language_selector2/src/language_selector.rs index d0802daaa0..49be0c5418 100644 --- a/crates/language_selector2/src/language_selector.rs +++ b/crates/language_selector2/src/language_selector.rs @@ -5,8 +5,8 @@ use anyhow::anyhow; use editor::Editor; use fuzzy::{match_strings, StringMatch, StringMatchCandidate}; use gpui::{ - actions, Action, AppContext, DismissEvent, Div, EventEmitter, FocusHandle, FocusableView, - Model, ParentElement, Render, Styled, View, ViewContext, VisualContext, WeakView, + actions, AppContext, DismissEvent, Div, EventEmitter, FocusHandle, FocusableView, Model, + ParentElement, Render, Styled, View, ViewContext, VisualContext, WeakView, }; use language::{Buffer, LanguageRegistry}; use picker::{Picker, PickerDelegate}; @@ -27,8 +27,7 @@ pub struct LanguageSelector { } impl LanguageSelector { - fn register(workspace: &mut Workspace, cx: &mut ViewContext) { - dbg!("regsiter"); + fn register(workspace: &mut Workspace, _: &mut ViewContext) { workspace.register_action(move |workspace, _: &Toggle, cx| { Self::toggle(workspace, cx); }); @@ -105,16 +104,6 @@ impl LanguageSelectorDelegate { .enumerate() .map(|(candidate_id, name)| StringMatchCandidate::new(candidate_id, name)) .collect::>(); - let mut matches = candidates - .iter() - .map(|candidate| StringMatch { - candidate_id: candidate.id, - score: 0., - positions: Default::default(), - string: candidate.string.clone(), - }) - .collect::>(); - matches.sort_unstable_by(|mat1, mat2| mat1.string.cmp(&mat2.string)); Self { language_selector, @@ -122,7 +111,7 @@ impl LanguageSelectorDelegate { project, language_registry, candidates, - matches, + matches: vec![], selected_index: 0, } } diff --git a/crates/workspace2/src/status_bar.rs b/crates/workspace2/src/status_bar.rs index 8e448ae062..c4e0999395 100644 --- a/crates/workspace2/src/status_bar.rs +++ b/crates/workspace2/src/status_bar.rs @@ -51,15 +51,6 @@ impl Render for StatusBar { .child( h_stack() .gap_4() - .child( - h_stack().gap_1().child( - // TODO: Language picker - div() - .border() - .border_color(gpui::red()) - .child(Button::new("status_buffer_language", "Rust")), - ), - ) .child( h_stack() .gap_1() @@ -78,16 +69,6 @@ impl Render for StatusBar { .child(IconButton::new("status-feedback", Icon::Envelope)), ), ) - .child( - // Bottom Dock - h_stack().gap_1().child( - // Terminal - div() - .border() - .border_color(gpui::red()) - .child(IconButton::new("status-terminal", Icon::Terminal)), - ), - ) .child( // Right Dock h_stack() diff --git a/crates/workspace2/src/workspace2.rs b/crates/workspace2/src/workspace2.rs index 11c3cbe556..5dcec2cabd 100644 --- a/crates/workspace2/src/workspace2.rs +++ b/crates/workspace2/src/workspace2.rs @@ -2164,10 +2164,7 @@ impl Workspace { cx: &mut ViewContext, ) { match event { - pane::Event::AddItem { item } => { - self.handle_pane_focused(pane.clone(), cx); - item.added_to_pane(self, pane, cx); - } + pane::Event::AddItem { item } => item.added_to_pane(self, pane, cx), pane::Event::Split(direction) => { self.split_and_clone(pane, *direction, cx); }