mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-01 06:43:24 +03:00
Remove remnants from conflict resolution (#3528)
Fixes a couple of things that slipped through when going through the last merge conflict Release Notes: - N/A
This commit is contained in:
parent
27e1787ce3
commit
2a68a6171a
@ -1717,11 +1717,6 @@ impl Editor {
|
||||
let focus_handle = cx.focus_handle();
|
||||
cx.on_focus(&focus_handle, Self::handle_focus).detach();
|
||||
cx.on_blur(&focus_handle, Self::handle_blur).detach();
|
||||
cx.on_release(|this, cx| {
|
||||
//todo!()
|
||||
//cx.emit_global(EditorReleased(self.handle.clone()));
|
||||
})
|
||||
.detach();
|
||||
|
||||
let mut this = Self {
|
||||
handle: cx.view().downgrade(),
|
||||
@ -8197,7 +8192,7 @@ impl Editor {
|
||||
}
|
||||
|
||||
pub fn text_option(&self, cx: &AppContext) -> Option<String> {
|
||||
let text = self.buffer.read(cx).read(cx).text();
|
||||
let text = self.text(cx);
|
||||
let text = text.trim();
|
||||
|
||||
if text.is_empty() {
|
||||
|
@ -68,7 +68,6 @@ use std::{
|
||||
use theme::{ActiveTheme, ThemeSettings};
|
||||
pub use toolbar::{Toolbar, ToolbarItemEvent, ToolbarItemLocation, ToolbarItemView};
|
||||
pub use ui;
|
||||
// use ui::{h_stack, v_stack, StyledExt};
|
||||
use util::ResultExt;
|
||||
use uuid::Uuid;
|
||||
pub use workspace_settings::{AutosaveSetting, WorkspaceSettings};
|
||||
|
@ -102,31 +102,6 @@ pub fn initialize_workspace(app_state: Arc<AppState>, cx: &mut AppContext) {
|
||||
cx.subscribe(&workspace_handle, {
|
||||
move |workspace, _, event, cx| {
|
||||
if let workspace::Event::PaneAdded(pane) = event {
|
||||
pane.update(cx, |pane, cx| {
|
||||
pane.toolbar().update(cx, |toolbar, cx| {
|
||||
let breadcrumbs = cx.build_view(|_| Breadcrumbs::new(workspace));
|
||||
toolbar.add_item(breadcrumbs, cx);
|
||||
let buffer_search_bar = cx.build_view(search::BufferSearchBar::new);
|
||||
toolbar.add_item(buffer_search_bar.clone(), cx);
|
||||
// todo!()
|
||||
// let quick_action_bar = cx.add_view(|_| {
|
||||
// QuickActionBar::new(buffer_search_bar, workspace)
|
||||
// });
|
||||
// toolbar.add_item(quick_action_bar, cx);
|
||||
let diagnostic_editor_controls =
|
||||
cx.build_view(|_| diagnostics::ToolbarControls::new());
|
||||
// toolbar.add_item(diagnostic_editor_controls, cx);
|
||||
// let project_search_bar = cx.add_view(|_| ProjectSearchBar::new());
|
||||
// toolbar.add_item(project_search_bar, cx);
|
||||
// let lsp_log_item =
|
||||
// cx.add_view(|_| language_tools::LspLogToolbarItemView::new());
|
||||
// toolbar.add_item(lsp_log_item, cx);
|
||||
// let syntax_tree_item = cx
|
||||
// .add_view(|_| language_tools::SyntaxTreeToolbarItemView::new());
|
||||
// toolbar.add_item(syntax_tree_item, cx);
|
||||
})
|
||||
});
|
||||
|
||||
initialize_pane(workspace, pane, cx);
|
||||
}
|
||||
}
|
||||
@ -153,9 +128,6 @@ pub fn initialize_workspace(app_state: Arc<AppState>, cx: &mut AppContext) {
|
||||
let feedback_button = cx
|
||||
.build_view(|_| feedback::deploy_feedback_button::DeployFeedbackButton::new(workspace));
|
||||
// let cursor_position = cx.add_view(|_| editor::items::CursorPosition::new());
|
||||
// let feedback_button = cx.add_view(|_| {
|
||||
// feedback::deploy_feedback_button::DeployFeedbackButton::new(workspace)
|
||||
// });
|
||||
let cursor_position = cx.build_view(|_| editor::items::CursorPosition::new());
|
||||
workspace.status_bar().update(cx, |status_bar, cx| {
|
||||
status_bar.add_left_item(diagnostic_summary, cx);
|
||||
@ -456,11 +428,6 @@ fn initialize_pane(workspace: &mut Workspace, pane: &View<Pane>, cx: &mut ViewCo
|
||||
// toolbar.add_item(diagnostic_editor_controls, cx);
|
||||
// let project_search_bar = cx.add_view(|_| ProjectSearchBar::new());
|
||||
// toolbar.add_item(project_search_bar, cx);
|
||||
// let submit_feedback_button =
|
||||
// cx.add_view(|_| SubmitFeedbackButton::new());
|
||||
// toolbar.add_item(submit_feedback_button, cx);
|
||||
// let feedback_info_text = cx.add_view(|_| FeedbackInfoText::new());
|
||||
// toolbar.add_item(feedback_info_text, cx);
|
||||
// let lsp_log_item =
|
||||
// cx.add_view(|_| language_tools::LspLogToolbarItemView::new());
|
||||
// toolbar.add_item(lsp_log_item, cx);
|
||||
|
Loading…
Reference in New Issue
Block a user