Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
git_ui: Toggle directory expansion with Enter key in tree view (#52965)
Erin van der Veenc512c72b634d
diff --git a/crates/git_ui/src/git_panel.rs b/crates/git_ui/src/git_panel.rsindex a6f1e097cfe..6d4c73dd57b 100644--- a/crates/git_ui/src/git_panel.rs+++ b/crates/git_ui/src/git_panel.rs@@ -1272,6 +1272,14 @@ impl GitPanel {}fn open_diff(&mut self, _: &menu::Confirm, window: &mut Window, cx: &mut Context<Self>) {+ if let Some(GitListEntry::Directory(dir_entry)) = self+ .selected_entry+ .and_then(|i| self.entries.get(i))+ .cloned()+ {+ self.toggle_directory(&dir_entry.key, window, cx);+ return;+ }maybe!({let entry = self.entries.get(self.selected_entry?)?.status_entry()?;let workspace = self.workspace.upgrade()?;