Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Shorten explanation when edit predictions are disabled for a language (#54808)

Justin Su747c41f1cbc2
diff --git a/crates/edit_prediction_ui/src/edit_prediction_button.rs b/crates/edit_prediction_ui/src/edit_prediction_button.rs
index cd3164d2eea..1d1a423cc82 100644
--- a/crates/edit_prediction_ui/src/edit_prediction_button.rs
+++ b/crates/edit_prediction_ui/src/edit_prediction_button.rs
@@ -712,14 +712,16 @@ impl EditPredictionButton {
match language_state.clone() {
Some((language, false)) => {
- menu = menu.item(
- entry
- .disabled(true)
- .documentation_aside(DocumentationSide::Left, move |_cx| {
- Label::new(format!("Edit predictions cannot be toggled for this buffer because they are disabled for {}", language.name()))
- .into_any_element()
- })
- );
+ menu = menu.item(entry.disabled(true).documentation_aside(
+ DocumentationSide::Left,
+ move |_cx| {
+ Label::new(format!(
+ "Edit predictions are disabled for {}",
+ language.name()
+ ))
+ .into_any_element()
+ },
+ ));
}
Some(_) | None => menu = menu.item(entry),
}