Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
vsc menu: Fix issue when switching branch while non-visible worktree is open (#19888)
Bennet Bo Fenner21b58643fadb
diff --git a/crates/vcs_menu/src/lib.rs b/crates/vcs_menu/src/lib.rsindex 3ee289df0e2..8f73153dd88 100644--- a/crates/vcs_menu/src/lib.rs+++ b/crates/vcs_menu/src/lib.rs@@ -242,7 +242,7 @@ impl PickerDelegate for BranchListDelegate {BranchEntry::NewBranch { name: branch_name } => branch_name,};let worktree = project- .worktrees(cx)+ .visible_worktrees(cx).next().context("worktree disappeared")?;let repository = ProjectPath::root_path(worktree.read(cx).id());