toolchains: Use language-specific terms in UI (#20985)
Closes #ISSUE Release Notes: - N/A
This commit is contained in:
parent
75c545aa1e
commit
0b373d43dc
6 changed files with 76 additions and 9 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue