toolchains: Use language-specific terms in UI (#20985)

Closes #ISSUE

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2024-11-21 15:57:22 +01:00 committed by GitHub
parent 75c545aa1e
commit 0b373d43dc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 76 additions and 9 deletions

View file

@ -425,6 +425,19 @@ impl<D: PickerDelegate> Picker<D> {
self.cancel(&menu::Cancel, cx);
}
pub fn refresh_placeholder(&mut self, cx: &mut WindowContext<'_>) {
match &self.head {
Head::Editor(view) => {
let placeholder = self.delegate.placeholder_text(cx);
view.update(cx, |this, cx| {
this.set_placeholder_text(placeholder, cx);
cx.notify();
});
}
Head::Empty(_) => {}
}
}
pub fn refresh(&mut self, cx: &mut ViewContext<Self>) {
let query = self.query(cx);
self.update_matches(query, cx);