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.

Use better name for the method that closes deleted buffers

Kirill Bulatov2c8fffc4f8e1
diff --git a/crates/workspace/src/pane.rs b/crates/workspace/src/pane.rs
index c54f8d393b5..39f1a9fd9ec 100644
--- a/crates/workspace/src/pane.rs
+++ b/crates/workspace/src/pane.rs
@@ -1305,7 +1305,7 @@ impl Pane {
&self.toolbar
}
- pub fn delete_item(
+ pub fn handle_deleted_project_item(
&mut self,
entry_id: ProjectEntryId,
cx: &mut ViewContext<Pane>,
diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rs
index 11703aba6ee..8a5ce7a105d 100644
--- a/crates/workspace/src/workspace.rs
+++ b/crates/workspace/src/workspace.rs
@@ -539,7 +539,9 @@ impl Workspace {
project::Event::DeletedEntry(entry_id) => {
for pane in this.panes.iter() {
- pane.update(cx, |pane, cx| pane.delete_item(*entry_id, cx));
+ pane.update(cx, |pane, cx| {
+ pane.handle_deleted_project_item(*entry_id, cx)
+ });
}
}