Splice remove suggesion hints when those are cleared in the editor. (#9088)

Closes https://github.com/zed-industries/zed/issues/6793

Release Notes:

- Fixed copilot suggestions not disappearing after disabling the tool
([6793](https://github.com/zed-industries/zed/issues/6793))
This commit is contained in:
Kirill Bulatov 2024-03-09 02:00:01 +02:00 committed by GitHub
parent 347178039c
commit 146971fb02
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 12 deletions

View file

@ -149,7 +149,7 @@ impl CopilotButton {
pub fn build_copilot_menu(&mut self, cx: &mut ViewContext<Self>) -> View<ContextMenu> {
let fs = self.fs.clone();
return ContextMenu::build(cx, move |mut menu, cx| {
ContextMenu::build(cx, move |mut menu, cx| {
if let Some(language) = self.language.clone() {
let fs = fs.clone();
let language_enabled =
@ -216,7 +216,7 @@ impl CopilotButton {
.boxed_clone(),
)
.action("Sign Out", SignOut.boxed_clone())
});
})
}
pub fn update_enabled(&mut self, editor: View<Editor>, cx: &mut ViewContext<Self>) {