Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix typo
Mikayla Makiead9ac6f2364
diff --git a/crates/copilot/src/copilot.rs b/crates/copilot/src/copilot.rsindex 55c4c70f65e..b9e850b3713 100644--- a/crates/copilot/src/copilot.rs+++ b/crates/copilot/src/copilot.rs@@ -279,7 +279,7 @@ pub enum Event {uuid: String,file_type: Option<Arc<str>>,},- CompletionDiscarded {+ CompletionsDiscarded {uuids: Vec<String>,file_type: Option<Arc<str>>,},@@ -789,7 +789,7 @@ impl Copilot {Err(error) => return Task::ready(Err(error)),};- cx.emit(Event::CompletionDiscarded {+ cx.emit(Event::CompletionsDiscarded {uuids: completions.iter().map(|completion| completion.uuid.clone())diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rsindex 221e94370e7..9c5fe7e9408 100644--- a/crates/editor/src/editor.rs+++ b/crates/editor/src/editor.rs@@ -3115,7 +3115,8 @@ impl Editor {fn discard_copilot_suggestion(&mut self, cx: &mut ViewContext<Self>) -> bool {if self.has_active_copilot_suggestion(cx) {if let Some(copilot) = Copilot::global(cx) {- let file_type = self.copilot_state+ let file_type = self+ .copilot_state.completions.get(0).and_then(|completion| self.language_at(completion.range.start.offset, cx))