Fix typo
This commit is contained in:
parent
606d5e36e1
commit
ead9ac6f23
2 changed files with 4 additions and 3 deletions
|
@ -279,7 +279,7 @@ pub enum Event {
|
||||||
uuid: String,
|
uuid: String,
|
||||||
file_type: Option<Arc<str>>,
|
file_type: Option<Arc<str>>,
|
||||||
},
|
},
|
||||||
CompletionDiscarded {
|
CompletionsDiscarded {
|
||||||
uuids: Vec<String>,
|
uuids: Vec<String>,
|
||||||
file_type: Option<Arc<str>>,
|
file_type: Option<Arc<str>>,
|
||||||
},
|
},
|
||||||
|
@ -789,7 +789,7 @@ impl Copilot {
|
||||||
Err(error) => return Task::ready(Err(error)),
|
Err(error) => return Task::ready(Err(error)),
|
||||||
};
|
};
|
||||||
|
|
||||||
cx.emit(Event::CompletionDiscarded {
|
cx.emit(Event::CompletionsDiscarded {
|
||||||
uuids: completions
|
uuids: completions
|
||||||
.iter()
|
.iter()
|
||||||
.map(|completion| completion.uuid.clone())
|
.map(|completion| completion.uuid.clone())
|
||||||
|
|
|
@ -3115,7 +3115,8 @@ impl Editor {
|
||||||
fn discard_copilot_suggestion(&mut self, cx: &mut ViewContext<Self>) -> bool {
|
fn discard_copilot_suggestion(&mut self, cx: &mut ViewContext<Self>) -> bool {
|
||||||
if self.has_active_copilot_suggestion(cx) {
|
if self.has_active_copilot_suggestion(cx) {
|
||||||
if let Some(copilot) = Copilot::global(cx) {
|
if let Some(copilot) = Copilot::global(cx) {
|
||||||
let file_type = self.copilot_state
|
let file_type = self
|
||||||
|
.copilot_state
|
||||||
.completions
|
.completions
|
||||||
.get(0)
|
.get(0)
|
||||||
.and_then(|completion| self.language_at(completion.range.start.offset, cx))
|
.and_then(|completion| self.language_at(completion.range.start.offset, cx))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue