Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
debugger: Fix prevent creating breakpoints inside breakpoint editor (#42475)
Remco Smitse8daab15ab06
diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rsindex d4647300996..cff337714b9 100644--- a/crates/editor/src/editor.rs+++ b/crates/editor/src/editor.rs@@ -11060,6 +11060,10 @@ impl Editor {window: &mut Window,cx: &mut Context<Self>,) {+ if self.breakpoint_store.is_none() {+ return;+ }+for (anchor, breakpoint) in self.breakpoints_at_cursors(window, cx) {let breakpoint = breakpoint.unwrap_or_else(|| Breakpoint {message: None,@@ -11119,6 +11123,10 @@ impl Editor {window: &mut Window,cx: &mut Context<Self>,) {+ if self.breakpoint_store.is_none() {+ return;+ }+for (anchor, breakpoint) in self.breakpoints_at_cursors(window, cx) {let Some(breakpoint) = breakpoint.filter(|breakpoint| breakpoint.is_disabled()) else {continue;@@ -11138,6 +11146,10 @@ impl Editor {window: &mut Window,cx: &mut Context<Self>,) {+ if self.breakpoint_store.is_none() {+ return;+ }+for (anchor, breakpoint) in self.breakpoints_at_cursors(window, cx) {let Some(breakpoint) = breakpoint.filter(|breakpoint| breakpoint.is_enabled()) else {continue;@@ -11157,6 +11169,10 @@ impl Editor {window: &mut Window,cx: &mut Context<Self>,) {+ if self.breakpoint_store.is_none() {+ return;+ }+for (anchor, breakpoint) in self.breakpoints_at_cursors(window, cx) {if let Some(breakpoint) = breakpoint {self.edit_breakpoint_at_anchor(