This commit is contained in:
Mikayla Maki 2023-05-15 16:47:39 -07:00
parent 606d5e36e1
commit ead9ac6f23
No known key found for this signature in database
2 changed files with 4 additions and 3 deletions

View file

@ -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))