Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
And a few more todos
Mikaylae786e221212b
diff --git a/crates/collab/src/tests/editor_tests.rs b/crates/collab/src/tests/editor_tests.rsindex 6f06e9f10fa..0c3601b0753 100644--- a/crates/collab/src/tests/editor_tests.rs+++ b/crates/collab/src/tests/editor_tests.rs@@ -71,6 +71,7 @@ async fn test_host_disconnect(let workspace_b =cx_b.add_window(|cx| Workspace::new(0, project_b.clone(), client_b.app_state.clone(), cx));let cx_b = &mut VisualTestContext::from_window(*workspace_b, cx_b);+ let workspace_b_view = workspace_b.root_view(cx_b).unwrap();let editor_b = workspace_b.update(cx_b, |workspace, cx| {@@ -85,8 +86,10 @@ async fn test_host_disconnect(//TODO: focusassert!(cx_b.update_view(&editor_b, |editor, cx| editor.is_focused(cx)));editor_b.update(cx_b, |editor, cx| editor.insert("X", cx));- //todo(is_edited)- // assert!(workspace_b.is_edited(cx_b));++ cx_b.update(|cx| {+ assert!(workspace_b_view.read(cx).is_edited());+ });// Drop client A's connection. Collaborators should disappear and the project should not be shown as shared.server.forbid_connections();@@ -105,11 +108,11 @@ async fn test_host_disconnect(// Ensure client B's edited state is reset and that the whole window is blurred.workspace_b- .update(cx_b, |_, cx| {+ .update(cx_b, |workspace, cx| {assert_eq!(cx.focused(), None);+ assert!(!workspace.is_edited())}).unwrap();- // assert!(!workspace_b.is_edited(cx_b));// Ensure client B is not prompted to save edits when closing window after disconnecting.let can_close = workspace_bdiff --git a/crates/gpui/src/platform/test/platform.rs b/crates/gpui/src/platform/test/platform.rsindex 38f23b94f20..a7dc6d48419 100644--- a/crates/gpui/src/platform/test/platform.rs+++ b/crates/gpui/src/platform/test/platform.rs@@ -282,8 +282,7 @@ impl Platform for TestPlatform {}fn should_auto_hide_scrollbars(&self) -> bool {- // todo()- true+ false}fn write_to_clipboard(&self, item: ClipboardItem) {diff --git a/crates/vcs_menu/src/lib.rs b/crates/vcs_menu/src/lib.rsindex 2735f81677c..0774c6f5755 100644--- a/crates/vcs_menu/src/lib.rs+++ b/crates/vcs_menu/src/lib.rs@@ -18,7 +18,6 @@ use workspace::{ModalView, Toast, Workspace};actions!(branches, [OpenRecent]);pub fn init(cx: &mut AppContext) {- // todo!() pocx.observe_new_views(|workspace: &mut Workspace, _| {workspace.register_action(|workspace, action, cx| {BranchList::toggle_modal(workspace, action, cx).log_err();diff --git a/crates/workspace/src/pane_group.rs b/crates/workspace/src/pane_group.rsindex e28d0e63ded..3dcdeec37f4 100644--- a/crates/workspace/src/pane_group.rs+++ b/crates/workspace/src/pane_group.rs@@ -12,7 +12,7 @@ use serde::Deserialize;use std::sync::Arc;use ui::{prelude::*, Button};-const HANDLE_HITBOX_SIZE: f32 = 4.0;+pub const HANDLE_HITBOX_SIZE: f32 = 4.0;const HORIZONTAL_MIN_SIZE: f32 = 80.;const VERTICAL_MIN_SIZE: f32 = 100.;@@ -268,15 +268,6 @@ impl Member {)}).into_any()-- // let el = div()- // .flex()- // .flex_1()- // .gap_px()- // .w_full()- // .h_full()- // .bg(cx.theme().colors().editor)- // .children();}Member::Axis(axis) => axis.render(diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rsindex 2bff02b4f6b..a1d6ab499ae 100644--- a/crates/workspace/src/workspace.rs+++ b/crates/workspace/src/workspace.rs@@ -852,6 +852,10 @@ impl Workspace {&self.right_dock}+ pub fn is_edited(&self) -> bool {+ self.window_edited+ }+pub fn add_panel<T: Panel>(&mut self, panel: View<T>, cx: &mut ViewContext<Self>) {let dock = match panel.position(cx) {DockPosition::Left => &self.left_dock,@@ -2055,7 +2059,7 @@ impl Workspace {_ => bounding_box.center(),};- let distance_to_next = 8.; //todo(pane dividers styling)+ let distance_to_next = pane_group::HANDLE_HITBOX_SIZE;let target = match direction {SplitDirection::Left => {